diff --git a/404.html b/404.html index 7035401b..68f4dd50 100644 --- a/404.html +++ b/404.html @@ -13,13 +13,13 @@ ページが見つかりません | Hello Web3 - - + +
メインコンテンツまでスキップ

ページが見つかりません

お探しのページが見つかりませんでした。

このページにリンクしているサイトの所有者に連絡をしてリンクが壊れていることを伝えてください。

- - + + \ No newline at end of file diff --git a/assets/js/24826458.1041ead5.js b/assets/js/24826458.1041ead5.js new file mode 100644 index 00000000..8479036d --- /dev/null +++ b/assets/js/24826458.1041ead5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[6926],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),f=u(r),m=a,d=f["".concat(s,".").concat(m)]||f[m]||c[m]||o;return r?n.createElement(d,l(l({ref:t},p),{},{components:r})):n.createElement(d,l({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=f;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var u=2;u{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var n=r(7462),a=(r(7294),r(3905));const o={slug:"What-is-SafeERC20",title:"SafeERC20\u3068\u306f",authors:["Thurendous"],blogDescription:"Foundry\u306e\u4f7f\u3044\u65b9\u5165\u9580",tags:["Etheruem","blockchain","Foundry"]},l=void 0,i={permalink:"/blog/What-is-SafeERC20",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/20230812About-safeERC20/2023-8-12-EVM-deep-dive-part1.md",source:"@site/blog/20230812About-safeERC20/2023-8-12-EVM-deep-dive-part1.md",title:"SafeERC20\u3068\u306f",description:"Hello! Everybody!",date:"2023-08-12T00:00:00.000Z",formattedDate:"2023\u5e748\u670812\u65e5",tags:[{label:"Etheruem",permalink:"/blog/tags/etheruem"},{label:"blockchain",permalink:"/blog/tags/blockchain"},{label:"Foundry",permalink:"/blog/tags/foundry"}],readingTime:1.076,hasTruncateMarker:!1,authors:[{name:"Thurendous",title:"Think borderlessly",url:"https://github.com/thurendous",imageURL:"https://github.com/thurendous.png",key:"Thurendous"}],frontMatter:{slug:"What-is-SafeERC20",title:"SafeERC20\u3068\u306f",authors:["Thurendous"],blogDescription:"Foundry\u306e\u4f7f\u3044\u65b9\u5165\u9580",tags:["Etheruem","blockchain","Foundry"]},nextItem:{title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",permalink:"/blog/EVM-deep-dive-part2"}},s={authorsImageUrls:[void 0]},u=[{value:"Reference",id:"reference",level:2}],p={toc:u};function c(e){let{components:t,...r}=e;return(0,a.kt)("wrapper",(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Hello! Everybody!"),(0,a.kt)("h1",{id:"safeerc20-\u306e\u4f7f\u3044\u65b9---what-is-and-how-to-use-safeerc20"},(0,a.kt)("inlineCode",{parentName:"h1"},"SafeERC20")," \u306e\u4f7f\u3044\u65b9 - What is and how to use ",(0,a.kt)("inlineCode",{parentName:"h1"},"SafeERC20")),(0,a.kt)("p",null,"OpenZeppelin \u306e SafeERC20 \u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u8da3\u65e8\u306f\u3001ERC20 \u30c8\u30fc\u30af\u30f3\u306b\u306f\u57fa\u6e96\u304c\u3042\u308b\u3082\u306e\u306e\u3001\u57fa\u6e96\u306b\u6cbf\u3063\u3066\u3044\u306a\u3044\u6709\u540d\u306a\u30c8\u30fc\u30af\u30f3\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001BNB \u3084 USDT \u306f bool \u5024\u3092\u8fd4\u3055\u306a\u3044 transfer \u95a2\u6570\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u30c8\u30fc\u30af\u30f3\u3092\u6271\u3046\u3068\u304d\u306b\u3001SafeERC20 \u3092\u4f7f\u3046\u3053\u3068\u3067\u3001bool \u5024\u3092\u8fd4\u3055\u306a\u3044\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3082\u3001\u5931\u6557\u3057\u305f\u5834\u5408\u306b\u306f revert \u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002"),(0,a.kt)("h1",{id:"\u3058\u3083\u6b63\u78ba\u306b\u4f7f\u3046\u306b\u306f"},"\u3058\u3083\u6b63\u78ba\u306b\u4f7f\u3046\u306b\u306f\uff1f"),(0,a.kt)("p",null,"SafeERC20 \u306e\u4f7f\u7528\u65b9\u6cd5\u306f\u3088\u304f\u8aa4\u89e3\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002"),(0,a.kt)("p",null,"SafeERC20 \u306f\u3001\u30c8\u30fc\u30af\u30f3\u3092\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b ERC20 \u306e\u62e1\u5f35\u3067\u306f\u3042\u308a\u307e\u305b\u3093\uff08OpenZeppelin \u306e ERC20 \u306f\u3059\u3067\u306b\u5b89\u5168\u3067\u3059\u304c\uff57\uff09\u3002\u4ed6\u4eba\u306e ERC20 \u30c8\u30fc\u30af\u30f3\u3068\u306e\u3084\u308a\u53d6\u308a\u3092\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306e\u88dc\u52a9\u6a5f\u80fd\u3067\u3059\u3002"),(0,a.kt)("p",null,"\u3053\u306e\u88dc\u52a9\u6a5f\u80fd\u304c\u884c\u3046\u3053\u3068\u306f\u3001"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"ERC20 \u64cd\u4f5c\u306e\u30d6\u30fc\u30eb\u5024\u306e\u623b\u308a\u5024\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u5931\u6557\u3057\u305f\u5834\u5408\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092 revert \u3055\u305b\u307e\u3059\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u540c\u6642\u306b\u3001\u30d6\u30fc\u30eb\u5024\u306e\u623b\u308a\u5024\u3092\u6301\u305f\u306a\u3044\u975e\u6a19\u6e96\u306e ERC20 \u30c8\u30fc\u30af\u30f3\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u3055\u3089\u306b\u3001",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729"},"\u653b\u6483")," \u3092\u7de9\u548c\u3059\u308b\u305f\u3081\u306b\u3001\u627f\u8a8d\u984d\u3092\u5897\u6e1b\u3055\u305b\u308b\u305f\u3081\u306e\u88dc\u52a9\u6a5f\u80fd\u3082\u63d0\u4f9b\u3057\u307e\u3059\u3002")),(0,a.kt)("p",null,"\u4f8b\u3068\u3057\u3066\u3001\u30c8\u30fc\u30af\u30f3\u3068\u3084\u308a\u53d6\u308a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5951\u7d04\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u305d\u308c\u306f\u3001\u4eba\u3005\u304c\u4e00\u5b9a\u306e\u4fa1\u683c\u3067\u30c8\u30fc\u30af\u30f3\u3092\u8ca9\u58f2\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3001\u5f8c\u3067\u8cfc\u5165\u8005\u304c\u305d\u308c\u3089\u304b\u3089\u8cfc\u5165\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u3044\u304f\u3064\u304b\u306e\u30c8\u30fc\u30af\u30f3\u306e\u8ee2\u9001\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u305d\u308c\u3089\u306b SafeERC20 \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002IERC20 \u306e\u578b\u306e\u5024\u3067\u5b89\u5168\u306a\u64cd\u4f5c\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u884c\u300cusing SafeERC20 for IERC20\u300d\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f8b\uff1atradingToken.safeTransferFrom\u3002"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-solidity"},"contract FixedPriceMarket {\n using SafeERC20 for IERC20;\n\n IERC20 tradingToken = 0x1234...;\n uint256 price = 128;\n\n mapping (address => uint256) selling;\n\n function sell(uint256 tokenValue) {\n tradingToken.safeTransferFrom(msg.sender, this, tokenValue);\n selling[msg.sender] = selling[msg.sender].add(tokenValue);\n }\n\n function buy(address seller, uint256 tokenValue) {\n require(msg.value == tokenValue.mul(price));\n selling[seller] = selling[seller].sub(tokenValue);\n tradingToken.safeTransfer(msg.sender, tokenValue);\n seller.transfer(msg.value);\n }\n}\n")),(0,a.kt)("h2",{id:"reference"},"Reference"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://forum.openzeppelin.com/t/safeerc20-tokentimelock-wrappers/396"},"OpenZeppelin Forum"),(0,a.kt)("br",{parentName:"p"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://zenn.dev/retocrooman/articles/20768619a313ae"},"SafeERC20 \u306b\u3064\u3044\u3066")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/2ebf6dbc.3e8568c0.js b/assets/js/2ebf6dbc.3e8568c0.js deleted file mode 100644 index 9b2efbf5..00000000 --- a/assets/js/2ebf6dbc.3e8568c0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[7467],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var l=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=l.createContext({}),m=function(e){var t=l.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=m(e.components);return l.createElement(i.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},c=l.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),c=m(n),k=r,d=c["".concat(i,".").concat(k)]||c[k]||s[k]||a;return n?l.createElement(d,o(o({ref:t},u),{},{components:n})):l.createElement(d,o({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,o=new Array(a);o[0]=c;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p.mdxType="string"==typeof e?e:r,o[1]=p;for(var m=2;m{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>s,frontMatter:()=>a,metadata:()=>p,toc:()=>m});var l=n(7462),r=(n(7294),n(3905));const a={slug:"EVM-deep-dive-part2",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",tags:["EVM","opcode","Etheruem","blockchain","examples"]},o=void 0,p={permalink:"/blog/EVM-deep-dive-part2",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md",source:"@site/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",description:"Hello, everybody!",date:"2023-05-13T00:00:00.000Z",formattedDate:"2023\u5e745\u670813\u65e5",tags:[{label:"EVM",permalink:"/blog/tags/evm"},{label:"opcode",permalink:"/blog/tags/opcode"},{label:"Etheruem",permalink:"/blog/tags/etheruem"},{label:"blockchain",permalink:"/blog/tags/blockchain"},{label:"examples",permalink:"/blog/tags/examples"}],readingTime:7.626,hasTruncateMarker:!1,authors:[{name:"Thurendous",title:"Think borderlessly",url:"https://github.com/thurendous",imageURL:"https://github.com/thurendous.png",key:"Thurendous"}],frontMatter:{slug:"EVM-deep-dive-part2",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",tags:["EVM","opcode","Etheruem","blockchain","examples"]},nextItem:{title:"SafeERC20\u3068\u306f",permalink:"/blog/What is SafeERC20"}},i={authorsImageUrls:[void 0]},m=[{value:"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35",id:"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35",level:2},{value:"\u30e1\u30e2\u30ea\u306f byte \u306e Array \u3060\u304b\u3089",id:"\u30e1\u30e2\u30ea\u306f-byte-\u306e-array-\u3060\u304b\u3089",level:2},{value:"Bytecode",id:"bytecode",level:2},{value:"Reference",id:"reference",level:2}],u={toc:m};function s(e){let{components:t,...a}=e;return(0,r.kt)("wrapper",(0,l.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Hello, everybody!"),(0,r.kt)("h1",{id:"never-give-up"},"Never Give Up"),(0,r.kt)("p",null,"\u4ee5\u524d\u66f8\u3044\u305f\u6642\u304b\u3089\u3001EVM \u306b\u3064\u3044\u3066\u7406\u89e3\u3067\u304d\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u3001\u5f53\u6642\u306f\u8aad\u307f\u3065\u3089\u304b\u3063\u305f\u6280\u8853\u7cfb\u306e\u6587\u7ae0\u3082\u3059\u3089\u3059\u3089\u8aad\u3081\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u305d\u3053\u3067 EVM \u306e\u3053\u3068\u3042\u308b\u3044\u306f\u4ed6\u306e\u306a\u306b\u304b\u3067\u9811\u5f35\u3063\u3066\u3044\u308b\u3042\u306a\u305f\u3082\u3082\u3057\u304b\u3057\u3066\u4f55\u304b\u304c\u3067\u304d\u305a\u306b\u60a9\u3093\u3067\u3044\u308b\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u884c\u3063\u3066\u304a\u304d\u307e\u3059\u304c\u3001\u50d5\u3082\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3001\u5b89\u5fc3\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u3046\u3061\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3060\u308d\u3046\u3002"),(0,r.kt)("p",null,"\u3061\u306a\u307f\u306b\u3001\u3053\u3061\u3089\u306e\u753b\u50cf\u3092\u307f\u3066\u3054\u3089\u3093\u3002"),(0,r.kt)("p",null,"\u672c\u5f53\u306b\u7d4c\u9a13\u3057\u305f\u4eba\u3057\u304b\u308f\u304b\u3089\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3057\u3001\u7d4c\u9a13\u3057\u305f\u3068\u3057\u3066\u3082\u3082\u3046\u4e00\u5ea6\u7d4c\u9a13\u3059\u308b\u3068\u3001\u3084\u306f\u308a\u4fe1\u3058\u3089\u308c\u306a\u3044\u6c17\u6301\u3061\u306b\u306a\u308b\u3068\u601d\u3046\u3088\u306d\u3002"),(0,r.kt)("p",null,"\u4f55\u304c\u3069\u3046\u306a\u3063\u3066\u3082\u3001\u7d9a\u3051\u308b\u3053\u3068\u304c\u4e00\u756a\u5927\u5207\u3002"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u9045\u304f\u3066\u3082\u3044\u3044")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(8919).Z,width:"828",height:"382"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u7406\u60f3\u3068\u73fe\u5b9f")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(4740).Z,width:"820",height:"380"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u300c\u7d9a\u3051\u3066\u3066\u3082\u610f\u5473\u306a\u3044\u300d")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(6794).Z,width:"934",height:"524"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u6700\u521d\u306e\u7b2c\u4e00\u6b69\u304c\u4e00\u756a\u3080\u305a\u3044\u3051\u3069\u306d")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(408).Z,width:"792",height:"742"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u4e09\u65e5\u574a\u4e3b VS \u7d9a\u3051\u308b")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(3814).Z,width:"886",height:"516"})),(0,r.kt)("hr",null),(0,r.kt)("p",null,"\u4eca\u56de\u306f\u3001\u30e1\u30e2\u30ea\u30fc\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002"),(0,r.kt)("p",null,"Part 1 \u3067\u306f\u3001EVM \u304c\u3069\u306e\u3088\u3046\u306b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u3069\u3053\u3092\u72d9\u3063\u3066 run \u3055\u305b\u308b\u304b\u3092\u898b\u3066\u304d\u305f\u3002 \u305d\u308c\u306f\u3001\u5916\u90e8\u306e calldata \u3092\u5165\u529b\u3057\u3066\u304d\u3066\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u3069\u306e\u95a2\u6570\u3092\u547c\u3093\u3067\u3044\u308b\u304b\u3092\u5224\u5225\u3057\u3066 run \u3059\u3079\u304d\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u7b87\u6240\u3092\u6c7a\u3081\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u95a2\u6570\u306e\u7f72\u540d\u30fbcall stack\u30fbcalldata\u30fbEVM \u306e\u30aa\u30da\u30b3\u30fc\u30c9 \u306b\u3064\u3044\u3066\u7406\u89e3\u304c\u9032\u3093\u3060\u3068\u601d\u3046\u3002"),(0,r.kt)("p",null,"Part 2 \u3067\u306f\u3001EVM \u306b\u304a\u3051\u308b\u30e1\u30e2\u30ea\u30fc\u306b\u3064\u3044\u3066\u8272\u3005\u898b\u3066\u3044\u3053\u3046\u3002"),(0,r.kt)("h1",{id:"memory"},"Memory"),(0,r.kt)("p",null,"Part1 \u306e\u30b3\u30fc\u30c9\u3092\u601d\u3044\u3060\u3057\u3066\u307f\u3066\u3002",(0,r.kt)("inlineCode",{parentName:"p"},"1_Storage.sol"),"\u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3042\u3063\u305f\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sol"},"pragma solidity >=0.7.0 <0.9.0;\n\ncontract Storage {\n uint256 number;\n\n function store(uint256 num) public {\n number = num;\n }\n\n function retrieve() public view returns (uint256) {\n return number;\n }\n}\n")),(0,r.kt)("p",null,"\u3053\u308c\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u3068\u3001\u3053\u3046\u306a\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"608060405234801561001057600080fd....\n")),(0,r.kt)("p",null,"\u4eca\u56de\u306f\u3053\u306e\u90e8\u5206\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u3066\u8aac\u660e\u3057\u305f\u3044\u3068\u601d\u3046\u3002\u4e00\u756a\u6700\u521d\u306e 5bytes \u3060\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"6080604052\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"60 80 = PUSH1 0x80\n60 40 = PUSH1 0x40\n52 = MSTORE\n")),(0,r.kt)("p",null,"\u3053\u308c\u304c\u805e\u3044\u305f\u3053\u3068\u3042\u308b\u304c\u304b\u3082\u3057\u308c\u306a\u3044\u3051\u3069\u3001\u3044\u308f\u3086\u308b\u300cfree memory pointer\u300d\u3060\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u30fc\u3092\u7406\u89e3\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002"),(0,r.kt)("h1",{id:"\u30e1\u30e2\u30ea\u306e\u30c7\u30fc\u30bf\u69cb\u9020"},"\u30e1\u30e2\u30ea\u306e\u30c7\u30fc\u30bf\u69cb\u9020"),(0,r.kt)("p",null,"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3046\u3068\u3001byte \u306e array \u3060\u300232bytes(256bit)\u3042\u308b\u3044\u306f 1byte(8bit)\u306e\u5358\u4f4d\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002\u8aad\u307e\u308c\u308b\u3068\u304d\u306b\u306f\u300132bytes(256bit)\u5358\u4f4d\u3054\u3068\u306b\u306a\u308b\u3002\u4e0b\u8a18\u306e\u753b\u50cf\u306f\u8a71\u3057\u305f\u5185\u5bb9\u3092\u5177\u73fe\u5316\u3057\u305f\u3082\u306e\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(5473).Z,width:"559",height:"427"})),(0,r.kt)("p",null,"\u3053\u306e\u6a5f\u80fd\u306f\uff13\u3064\u306e opcode \u306b\u5de6\u53f3\u3055\u308c\u3066\u3044\u308b\u3002"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"MSTORE(x, y)"),": 32 byte(256 bit) \u306e\u5024 y \u3092\u30e1\u30e2\u30ea\u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e x \u306b\u4fdd\u5b58"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"MLOAD(x)"),": 32 byte(256 bit) \u306e\u30e1\u30e2\u30ea\u306e\u5834\u6240\u3092\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 x \u304b\u3089\u8aad\u307f\u51fa\u3057\u3001\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"MSOTRE8(x, y)"),": 1 byte (8 bit)\u306e\u5024 y \u3092\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e x \u306b\u4fdd\u5b58\u3059\u308b")),(0,r.kt)("p",null,"\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u3053\u3068\u306f\u3069\u3053\u304b\u3089\u30e1\u30e2\u30ea\u3092\u8aad\u307f\u53d6\u308b/\u66f8\u304d\u8fbc\u3080\u304b\u3092\u6c7a\u3081\u3066\u3044\u308b\u3068\u8003\u3048\u3066\u3088\u3044\u3002\u3082\u3057\u30011byte \u3088\u308a\u591a\u304f\u8aad\u307f\u53d6\u308b/\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3092\u3057\u305f\u3044\u306e\u3067\u3042\u308c\u3070\u3001\u305d\u306e\u307e\u307e\u7d99\u7d9a\u3059\u308c\u3070\u3088\u3044\u3060\u3051\u306e\u8a71\u306b\u306a\u308b\u3002"),(0,r.kt)("h1",{id:"evm-playground"},"EVM playground"),(0,r.kt)("p",null,"\u3053\u306e ",(0,r.kt)("a",{parentName:"p",href:"https://www.evm.codes/playground?fork=shanghai"},"EVM playground")," \u306f\u3042\u306a\u305f\u306e\u7406\u89e3\u306e\u624b\u52a9\u3051\u304c\u3067\u304d\u308b\u3060\u308d\u3046\u3002Run \u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u53f3\u4e0a\u306e\u77e2\u5370\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u3088\u3046\u3002\u77e2\u5370\u30dc\u30bf\u30f3\u306f\u30b3\u30fc\u30c9\u306e\u7a3c\u50cd\u30d7\u30ed\u30bb\u30b9\u3092\u305f\u3069\u3063\u3066\u3044\u3063\u3066\u304f\u308c\u308b\u3002\u30b9\u30bf\u30c3\u30af\u3001\u30e1\u30e2\u30ea\u306f\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u306e\u304b\u3082\u308f\u304b\u308b\u3002\u3059\u3054\u304f\u76f4\u611f\u7684\u306a\u30c4\u30fc\u30eb\u3060\u3068\u611f\u5fc3\u3059\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"// MSTORE 32 bytes 0x11...1 at memory location 0\nPUSH32 0x1111111111111111111111111111111111111111111111111111111111111111\nPUSH1 0x00\nMSTORE\n\n// MSTORE8 1 byte 0x22 at memory location 32 (0x20 in hex)\nPUSH1 0x22\nPUSH1 0x20\nMSTORE8\n\n// MSTORE8 1 byte 0x33 at memory location 33 (0x21 in hex)\nPUSH1 0x33\nPUSH1 0x21\nMSTORE8\n\n// MLOAD 32 bytes to the call stack from memory location 0 ie 0-32 bytes of memory\nPUSH1 0x00\nMLOAD\n\n// MLOAD 32 bytes to the call stack from memory location 32 ie 32-64 bytes of memory\nPUSH1 0x20\nMLOAD\n\n// MLOAD 32 to the call stack from memory location 33 ie 33-65 bytes of memory\nPUSH1 0x21\nMLOAD\n")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3e29126-2954-40e3-bc1b-7ca5e780fd1c_1500x850.png",alt:null})),(0,r.kt)("p",null,"opcode \u306b\u3064\u3044\u3066\u3082\u3001\u82f1\u8a9e\u3060\u304c\u8aac\u660e\u6587\u304c\u3064\u3044\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3084\u3063\u3066\u307f\u3066\u5909\u3060\u306a\u3068\u601d\u3046\u3053\u3068\u306f\u306a\u3044\u306e\u304b\uff1f\n\u307e\u305a\u3001MSTORE8 \u3092\u4f7f\u3063\u3066 1 byte \u306e 0x22 \u3092\u30e1\u30e2\u30ea\u306e 0x20 \u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u308b\u3064\u3082\u308a\u3060\u304c\u3001\u4f55\u6545\u304b\u30e1\u30e2\u30ea\u306f\u3053\u3053\u304b\u3089\u3001"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F954d54e6-0bce-4de3-a61d-dd41fdae49c7_836x152.png",alt:null})),(0,r.kt)("p",null,"\u3053\u3046\u5909\u308f\u308b\u3093\u3060\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F225fde5a-09bf-4a24-a702-88ad5010951e_836x176.png",alt:null})),(0,r.kt)("p",null,"\u3053\u306e\u4f59\u5206\u306a\u30bc\u30ed\u3063\u3066\u306a\u3093\u3060\u3068\u601d\u3046\u3060\u308d\u3046\u3002"),(0,r.kt)("h2",{id:"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35"},"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35"),(0,r.kt)("p",null,"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30e1\u30e2\u30ea\u3078\u306a\u306b\u304b\u3092\u66f8\u304d\u8fbc\u3080\u969b\u3001byte \u6570\u306b\u5f93\u3063\u3066\u30ac\u30b9\u4ee3\u3092\u652f\u6255\u3063\u3066\u3044\u308b\u3002\u3053\u308c\u304c opcode \u306e\u30b3\u30b9\u30c8\u3068\u8a00\u3046\u3002\u3082\u3057\u3001\u3053\u308c\u307e\u3067\u30e1\u30e2\u30ea\u3078\u66f8\u304d\u8fbc\u3093\u3060\u3053\u3068\u304c\u306a\u3044\u5834\u6240\u3078\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u8ffd\u52a0\u7684\u306b\u30e1\u30e2\u30ea\u62e1\u5f35\u306e\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u307e\u3067\u66f8\u304d\u8fbc\u3093\u3060\u3053\u3068\u304c\u306a\u3044\u7b87\u6240\u3078\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u30e1\u30e2\u30ea\u306f 32bytes(256bit)\u62e1\u5f35\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308b\u3002"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u30e1\u30e2\u30ea\u306e\u30b3\u30b9\u30c8\u306e\u5897\u3048\u65b9\u306b\u95a2\u3057\u3066\u306f\u3001\u6700\u521d\u306e 724bytes \u306f\u7dda\u5f62\u7684\u306b\u5897\u52a0\u3059\u308b\u304c\u3001\u305d\u308c\u4ee5\u964d\u306f\u4e8c\u6b21\u6307\u6570\u95a2\u6570\u7684\u306b\u306a\u308b\u3002")),(0,r.kt)("p",null,"\u4e0a\u306e\u4f8b\u3067\u306f\u3001\u307e\u305a 0x00 \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078 32 bytes \u66f8\u304d\u8fbc\u3093\u3060\u304c\u3001\u305d\u3053\u304b\u3089\u3055\u3089\u306b\u66f8\u304d\u8fbc\u3080\u3068\u306a\u308b\u3068\u3001\u30e1\u30e2\u30ea\u62e1\u5f35\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u305a\u3001\u7d50\u679c\u7684\u306b\u3001\u30e1\u30e2\u30ea\u306f 64 bytes \u306b\u306a\u3063\u305f\u3002"),(0,r.kt)("p",null,"\u30e1\u30e2\u30ea\u306b\u3042\u308b\u4fdd\u5b58\u9818\u57df\u306e\u6700\u521d\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f\u30bc\u30ed\u3002\u3060\u304b\u3089 2200000000000000000000000000000000000000000000000000000000000000 \u304c\u30e1\u30e2\u30ea\u306b\u8ffd\u52a0\u3055\u308c\u305f\u3002"),(0,r.kt)("h2",{id:"\u30e1\u30e2\u30ea\u306f-byte-\u306e-array-\u3060\u304b\u3089"},"\u30e1\u30e2\u30ea\u306f byte \u306e Array \u3060\u304b\u3089"),(0,r.kt)("p",null,"\u6b21\u306b\u6ce8\u610f\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u306f\u3001\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 33(0x21)\u304b\u3089 MLOAD \u3057\u305f\u3068\u304d\u306b\u3001\u4e0b\u8a18\u306e\u5024\u304c\u8fd4\u3055\u308c\u305f\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"3300000000000000000000000000000000000000000000000000000000000000\n")),(0,r.kt)("p",null,"32 bytes \u305a\u3064\u8aad\u307f\u8fbc\u3093\u3067\u3044\u306a\u304f\u3066\u3082\u3001\u8aad\u307f\u8fbc\u3081\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u3063\u305f\u3002"),(0,r.kt)("p",null,"memory \u306f\u305f\u3060\u306e byte array \u306a\u306e\u3067\u3001\u3069\u3053\u306e\u5834\u6240\u304b\u3089\u3067\u3082\u8aad\u307f\u8fbc\u3081\u308b\u3053\u3068\u3092\u899a\u3048\u3066\u4e0b\u3055\u3044\u300232bytes \u306e\u5236\u9650\u306f\u7279\u306b\u306a\u304f\u3001\u3069\u3053\u304b\u3089\u3067\u3082 byte \u5358\u4f4d\u304b\u3089\u8aad\u307f\u8fbc\u3081\u308b\u3002"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u95a2\u6570\u5185\u3067\u306e\u307f\u65b0\u305f\u306b\u30e1\u30e2\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u308c\u306f\u65b0\u305f\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3055\u308c\u305f\u8907\u96d1\u306a\u578b\uff08\u4f8b\u3048\u3070 ",(0,r.kt)("inlineCode",{parentName:"p"},"new int[...]")," \u306a\u3069\uff09\u3067\u3042\u3063\u305f\u308a\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u53c2\u7167\u5909\u6570\u304b\u3089\u30b3\u30d4\u30fc\u3055\u308c\u305f\u3082\u306e\u3067\u3042\u3063\u305f\u308a\u3057\u307e\u3059\u3002")),(0,r.kt)("p",null,"\u73fe\u5728\u3001\u6211\u3005\u306f\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u3064\u3044\u3066\u7406\u89e3\u3067\u304d\u305f\u306e\u3067\u3001free memory \u306e\u8a71\u3078\u623b\u308d\u3046\u3002"),(0,r.kt)("h1",{id:"free-memory-pointer"},"Free Memory Pointer"),(0,r.kt)("p",null,"Free Memory Pointer \u3068\u306f\u3001\u7c21\u5358\u306b\u3044\u3046\u3068\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30dd\u30a4\u30f3\u30bf\u30fc\u3067\u3042\u308a\u3001Free Memory \u304c\u3069\u3053\u304b\u3089\u30b9\u30bf\u30fc\u30c8\u3059\u3079\u304d\u306a\u306e\u304b\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002\u8a00\u3044\u63db\u3048\u308b\u3068\u3001\u30e1\u30e2\u30ea\u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3069\u3053\u307e\u3067\u66f8\u304d\u8fbc\u307e\u308c\u3066\u3044\u3066\u3001\u3069\u3053\u304b\u3089\u66f8\u304d\u8fbc\u3080\u3079\u304d\u306a\u306e\u304b\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30e1\u30e2\u30ea\u3092\u4e0a\u66f8\u304d\u3059\u308b\u306e\u3092\u9632\u3050\u305f\u3081\u3067\u3082\u3042\u308b\u3002"),(0,r.kt)("p",null,"\u5909\u6570\u304c\u30e1\u30e2\u30ea\u3078\u66f8\u304d\u8fbc\u3080\u3068\u304d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u307e\u305a Free Memory Pointer \u3092\u53c2\u7167\u3057\u3001\u3069\u3053\u304b\u3089\u66f8\u304d\u8fbc\u3080\u3079\u304d\u304b\u3092\u6c7a\u3081\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002\u305d\u308c\u304b\u3089 Free Memory Pointer \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3001\u6700\u65b0\u306e\u30e1\u30e2\u30ea\u306e\u300c\u5883\u754c\u5024\u300d\u3042\u308b\u3044\u306f\u300c\u30aa\u30d5\u30bb\u30c3\u30c8\u300d\u3092\u8a18\u9332\u3059\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"}," newFreeMemoryPointer = freeMemoryPointer + dataSizeBytes\n")),(0,r.kt)("h2",{id:"bytecode"},"Bytecode"),(0,r.kt)("p",null,"\u5148\u7a0b\u306b\u3082\u8a00\u53ca\u3057\u305f\u3088\u3046\u306b\u3001Free Memory Pointer \u306f\u6700\u521d\u306e runtime bytecode \u306e\u3053\u306e\u90e8\u5206\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"60 80 = PUSH1 0x80\n60 40 = PUSH1 0x40\n52 = MSTORE\n")),(0,r.kt)("p",null,"\u3053\u308c\u306f\u57fa\u672c\u7684\u306b\u4f55\u3092\u8a00\u3063\u3066\u3044\u308b\u304b\u3068\u3044\u3046\u3068\u3001Free Memory Pointer \u306f\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x40(64 in decimal)\u3067\u3001\u5024\u306f 0x80(128 in decimal)\u3068\u306a\u308b\u3002"),(0,r.kt)("p",null,"\u3059\u3050\u306b\u7591\u554f\u306b\u601d\u3046\u306e\u306f\u3001\u306a\u305c\u3053\u306e\u6570\u5b57\u306a\u306e\u3068\u3044\u3046\u3053\u3068\u3060\u308d\u3046\u3002"),(0,r.kt)("p",null,"\u7b54\u3048\uff1a"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"0x00 - 0x3f (64 bytes): scratch space"),(0,r.kt)("p",{parentName:"blockquote"},"0x40 - 0x5f (32 bytes): free memory pointer"),(0,r.kt)("p",{parentName:"blockquote"},"0x60 - 0x7f (32 bytes): zero slot")),(0,r.kt)("p",null,"0x40 \u306f solidity \u304c\u5b9a\u7fa9\u3057\u305f\u4e00\u756a\u6700\u521d\u306e Free Memory Pointer \u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3060\u3002\u5024 0x80 \u306f\u5358\u306b\u6700\u521d\u306e 4 \u3064\u306e 32 bytes \u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3089\u306e\u4e88\u7d04\u3055\u308c\u305f\u30e1\u30e2\u30ea\u306b\u3064\u3044\u3066"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Scrach space: inline assembly \u306e\u30cf\u30c3\u30b7\u30f3\u30b0\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u4f7f\u3063\u3066\u3082\u826f\u3044"),(0,r.kt)("li",{parentName:"ul"},"Free memroy pointer: \u4eca\u306e\u30e1\u30e2\u30ea\u306e\u30b5\u30a4\u30ba\u3001free memory \u306e\u30b9\u30bf\u30fc\u30c8\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3001\u6700\u521d\u306f 0x80"),(0,r.kt)("li",{parentName:"ul"},"The zero slot: \u52d5\u7684\u306a Memory Array \u306e\u521d\u671f\u5024\u3067\u3042\u308a\u3001\u3069\u3093\u306a\u3068\u304d\u306b\u3067\u3082\u66f8\u304d\u8fbc\u307e\u308c\u308b\u3053\u3068\u306f\u306a\u3044")),(0,r.kt)("h1",{id:"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea"},"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea"),(0,r.kt)("p",null,"\u30ea\u30a2\u30eb\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304f\u3068\u3057\u3088\u3046\u304b\u3002"),(0,r.kt)("p",null,"\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u4f5c\u6210\u3057\u305f\u3002\u3053\u3044\u3064\u306e\u540d\u306f ",(0,r.kt)("inlineCode",{parentName:"p"},"MemoryLane"),"\u3002\u305f\u3063\u305f\u4e00\u500b\u306e\u95a2\u6570\u3092\u6301\u3063\u3066\u304a\u308a\u3001\uff12\u3064\u306e Array \u3092\u6301\u3063\u3066\u3044\u308b\u3002\u305d\u308c\u304b\u3089 b","[0]","\u306b\u5024 1 \u3092\u4ed8\u4e0e\u3059\u308b\u3002"),(0,r.kt)("p",null,"3 \u884c\u7a0b\u5ea6\u306e\u30b3\u30fc\u30c9\u3060\u3051\u3069\u3001\u304b\u306a\u308a\u591a\u304f\u306e\u3053\u3068\u304c\u8d77\u304d\u3066\u3044\u308b\u3088\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sol"},"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.3;\n\ncontract MemoryLane {\n function memoryLane() public pure {\n bytes32[5] memory a;\n bytes32[5] memory b;\n b[0] = bytes32(uint256(1));\n }\n}\n\n")),(0,r.kt)("p",null,"\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u3082\u3046\u4e00\u5ea6 ",(0,r.kt)("a",{parentName:"p",href:"https://remix.ethereum.org/"},"remix")," \u3078\u6295\u5165\u3002"),(0,r.kt)("p",null,"\u305d\u308c\u304b\u3089\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u304f\u3060\u3055\u3044\u3002"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"memoryLane()"),"\u95a2\u6570\u3092 run \u3057\u3066\u3001debugging mode \u3078\u5165\u3063\u3066\u304f\u3060\u3055\u3044\u3002"),(0,r.kt)("p",null,"opcode \u3092\u5c11\u3057\u305a\u3064\u898b\u3066\u3044\u3053\u3046\u3002"),(0,r.kt)("p",null,"\u5c11\u3057\u7c21\u5358\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u3092",(0,r.kt)("a",{parentName:"p",href:"https://www.evm.codes/playground?unit=Wei&codeType=Mnemonic&code=%27Vg*%28_I...1W0GJ_%21%21%21%21z00FK22WJQ0Y22z20F8K33W33Q1Y33z21F8d%28v0Z0-Jq00Xd%28vJZJ-64q20Xdv33Z33-65q21Xpp%27%7EN+locatioCzG1_wppVv7o7hBcall+stack+from%7EuIIIIq%28+ofNzp%5Cnj+bytegSTOREdw%29*_+0xZ9BY9Chex%7DzXpM%29W+at%7EV%2F%2F+MQ+%7B0x2N+memoryKwg8+1j_J32I11GpPUSHFpMgCn+Be+9+i7+t*+J%29LOAD%28js%21uu%01%21%28%29*79BCFGIJKNQVWXYZ_dgjpquvwz%7E_&fork=shanghai"},"EVM playground"),"\u3078\u5165\u308c\u3066\u3044\u308b\u3002\u305d\u306e opcode \u306f\u305d\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u7c21\u5358\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u306f opcode \u3092\u9806\u756a\u306b\u69cb\u6210\u3057\u3001JUMP \u306a\u3069\u306e\u30e1\u30e2\u30ea\u64cd\u4f5c\u3068\u95a2\u9023\u3057\u306a\u3044\u3053\u3068\u3092\u9664\u5916\u3057\u305f\u3002\u3044\u308d\u3044\u308d\u30b3\u30e1\u30f3\u30c8\u3082\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u53c2\u7167\u3057\u3066\u307b\u3057\u3044\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u30b3\u30fc\u30c9\u306f 6 \u90e8\u5206\u304b\u3089\u69cb\u6210\u3055\u308c\u3066\u3044\u3066\u3001\u3053\u308c\u304b\u3089 dive in \u3059\u308b\u3002"),(0,r.kt)("p",null,"play ground \u3092\u4f7f\u3046\u3053\u3068\u3092\u5f37\u304f\u304a\u3059\u3059\u3081\u3059\u308b\u3002"),(0,r.kt)("h1",{id:"free-memory-pointer-initialisation-evm-playground-lines-1-15"},"Free Memory Pointer Initialisation (EVM Playground Lines 1-15)"),(0,r.kt)("p",null,"\u307e\u305a\u3001\u201cfree memory pointer initialisation\u201d\u304b\u3089\u3084\u3063\u3066\u3044\u304f\u3002\u4e0a\u8a18\u3067\u3082\u3042\u3063\u305f\u3088\u3046\u306b\u30010x80(128 in decimal)\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3002\u3053\u308c\u306f free memory pointer \u306e\u5024\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002Solidity \u306e memory \u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(3136).Z,width:"726",height:"129"})),(0,r.kt)("p",null,"\u3053\u306e\u6bb5\u968e\u3067\u306f\u3001\u307e\u3060\u30e1\u30e2\u30ea\u306b\u306f\u306a\u306b\u3082\u306a\u3044\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(5939).Z,width:"722",height:"166"})),(0,r.kt)("p",null,"\u7d9a\u3044\u3066 free memory pointer \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x40(64 in decimal)\u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002"),(0,r.kt)("p",null,"\u6700\u5f8c\u306b\u3001MSTORE \u3092\u4f7f\u3063\u3066\u30010x40 \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306b 0x80 \u306e\u5024\u3092\u8a18\u9332\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u5f8c\u3001\u30b9\u30bf\u30c3\u30af\u306b\u306f\u4f55\u3082\u306a\u304f\u3001\u30e1\u30e2\u30ea\u306b\u306a\u306b\u304b\u3092\u6b8b\u305b\u305f\u3053\u3068\u306b\u306a\u308b\u3002\u30e1\u30e2\u30ea\u306f 16 \u9032\u6570\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u6570\u5b57\u3054\u3068\u306b 4bit \u306e\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u4eca\u3068\u306a\u3063\u3066\u3001192 \u306e 16 \u9032\u6570\u306e\u6570\u5b57\u3068\u306a\u3063\u3066\u3044\u308b\uff08\u6570\u5b57 2 \u6841 = 1 byte = 8 bit\uff09\u3002"),(0,r.kt)("p",null,"\u5148\u7a0b\u306e\u5185\u5bb9\u3092\u601d\u3044\u51fa\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6700\u521d\u306e 64bytes \u306f scrach space \u3067\u3001\u6b21\u306e 32bytes \u306f free memory pointer \u306b\u306a\u308b\u3002\u3053\u308c\u306f\u307e\u3055\u306b\u4e0b\u8a18\u306e\u72b6\u614b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(499).Z,width:"721",height:"197"})),(0,r.kt)("h1",{id:"memory-allocation-variable-a--free-memory-pointer-update-evm-playground-lines-16-34"},"Memory Allocation Variable \u201ca\u201d & Free Memory Pointer Update (EVM Playground Lines 16-34)"),(0,r.kt)("p",null,"\u6b8b\u308a\u306e\u90e8\u5206\u306b\u3064\u3044\u3066\u306f\u3001\u7c21\u5358\u306b\u3059\u308b\u305f\u3081\u306b\u4e00\u65e6\u6700\u5f8c\u306e\u98db\u3070\u3057\u3066\u30cf\u30a4\u30ec\u30d9\u30eb\u306e\u6982\u8981\u3092\u898b\u3066\u307f\u3088\u3046\u3002"),(0,r.kt)("p",null,"\u6b21\u306e\u30e1\u30e2\u30ea\u306b\u95a2\u3057\u3066\u3001\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"(bytes32","[5]",")\u306e\u3053\u3068\u3092\u914d\u7f6e\u3057\u3066 free memory pointer \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u304c\u308f\u304b\u308b\u3002"),(0,r.kt)("p",null,"\u30b3\u30f3\u30d1\u30a4\u30e9\u306f array size \u306b\u3088\u3063\u3066\u3069\u308c\u304f\u3089\u3044\u306e\u30b9\u30da\u30fc\u30b9\u304c\u5fc5\u8981\u304b\u6c7a\u5b9a\u3059\u308b\u3002"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u30e1\u30e2\u30ea array \u306e\u8981\u7d20\u306e\u5360\u3081\u308b\u9818\u57df\u306f 32 bytes \u306e\u500d\u6570\u306b\u306a\u308b\u3002\u3053\u308c\u306f ",(0,r.kt)("inlineCode",{parentName:"p"},"bytes1[]"),"\u306b\u5bfe\u3057\u3066\u3082\u901a\u7528\u3059\u308b\u3002\u305f\u3060\u3057\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"bytes")," \u3084 ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," \u306f\u9055\u3046\u3002")),(0,r.kt)("p",null,"array \u306e\u30b5\u30a4\u30ba \xd732bytes \u3067\u3069\u308c\u304f\u3089\u3044\u306e\u30e1\u30e2\u30ea\u3092\u98df\u3046\u304b\u308f\u304b\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u5834\u5408\u30015 ","*"," 32 bytes \u3067\u30010xa0 (160)\u306b\u306a\u308b\u306e\u3060\u3002\u3057\u305f\u304c\u3063\u3066\u305d\u306e\u5024\u306f stack \u306b\u30d7\u30c3\u30b7\u30e5\u3055\u308c\u3001\u73fe\u5728\u306e free memory pointer \u306b\u4fdd\u5b58\u3055\u308c\u305f\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u5f8c\u3001\u524d\u306e free memory pointer \u306e\u5024\u3068\u8db3\u3057\u7b97\u3092\u3057\u3066\u3001\u5024 0x120 (288)\u304c\u751f\u6210\u3055\u308c\u305f\u3002\u3053\u306e\u5024\u304c free memory pointer \u306b\u4fdd\u5b58\u3055\u308c\u305f\u3002"),(0,r.kt)("p",null,"stack \u306b\u306f\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"\u30e1\u30e2\u30ea\u3092\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 0x80 \u306b\u30ad\u30fc\u30d7\u3057\u3066\u5f8c\u304b\u3089\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u3002",(0,r.kt)("inlineCode",{parentName:"p"},"0xffff"),"\u306f JUMP \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u610f\u5473\u3057\u3066\u304a\u308a\u3001\u95a2\u4fc2\u306a\u3044\u306e\u3067\u5f53\u9762\u306f\u7121\u8996\u3057\u3066\u3088\u3044(stack \u306e underflow \u3092\u9632\u3050\u305f\u3081\u306b\u3042\u308b)\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(8735).Z,width:"719",height:"255"})),(0,r.kt)("h1",{id:"memory-initialisation-variable-a-evm-playground-lines-35-95"},"Memory Initialisation Variable \u201ca\u201d (EVM Playground Lines 35-95)"),(0,r.kt)("p",null,"\u4eca\u3067\u306f\u30e1\u30e2\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u3066 free memory pointer \u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u305f\u3002\u3053\u3053\u304b\u3089\u306f\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"\u306e\u30e1\u30e2\u30ea\u306b\u304a\u3051\u308b\u521d\u671f\u5316\u3092\u3059\u308b\u3002\u5909\u6570\u306f\u5ba3\u8a00\u3055\u308c\u3066\u5024\u4ee3\u5165\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30bc\u30ed\u5024\u306b\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3092\u3059\u308b\u305f\u3081\u306b\u306f\u3001EVM \u306e CALLDATACOPY \u3092\u4f7f\u3063\u3066\u5b9f\u65bd\u3059\u308b\u3002\u3053\u306e opcode \u306f\uff13\u3064\u306e\u5f15\u6570\u304c\u5fc5\u8981\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"memoryOffset\uff08\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078\u30b3\u30d4\u30fc\u3059\u308b\u5834\u6240\uff09"),(0,r.kt)("li",{parentName:"ul"},"calldataOffset\uff08calldata \u306b\u304a\u3051\u308b byte offset \u306e\u3053\u3068\uff09"),(0,r.kt)("li",{parentName:"ul"},"size\uff08\u30b3\u30d4\u30fc\u3059\u308b byte size\uff09")),(0,r.kt)("p",null,"\u4eca\u56de\u306e\u5834\u5408\u3001memoryOffset \u306f",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 0x80\u3002"),(0,r.kt)("p",null,"calldataOffset \u306f\u5b9f\u969b\u306e calldata \u306e\u30b5\u30a4\u30ba\u3001\u306a\u305c\u306a\u3089\u305d\u3082\u305d\u3082 calldata \u306e copy \u304c\u3044\u3089\u306a\u3044\u3002\u30e1\u30e2\u30ea\u3092\u30bc\u30ed\u5024\u3067\u521d\u671f\u5316\u3057\u305f\u3044\u3002\u7d50\u679c\u7684\u306b\u30b5\u30a4\u30ba\u304c 0xa0 \u3042\u308b\u3044\u306f 160 bytes \u306b\u306a\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u3001\u30e1\u30e2\u30ea\u304c 288 bytes \u306b\u306a\u3063\u305f\u3068\u308f\u304b\u308b(zero slot \u3082\u542b\u3081\u3066)\u3002stack \u306f\u4eca\u3082\u3046\u4e00\u5ea6\u5909\u6570\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3068 JUMP \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u6301\u3063\u3066\u3044\u308b\u72b6\u614b\u3002"),(0,r.kt)("p",null,"\uff08\u305d\u306e\u9593\u306b\u7d30\u304b\u3044\u64cd\u4f5c\u306b\u3064\u3044\u3066\u306f\u3001\u4f55\u5ea6\u3082 pop \u3057\u3066\u3044\u308b\u306e\u304c\u3042\u308b\u304c\u3001\u500b\u4eba\u7684\u306b\u306f\u307e\u3060\u306a\u305e\u3067\u3001\u308f\u304b\u308b\u65b9\u306a\u3089\u6559\u3048\u3066\u4e0b\u3055\u3044\uff09"),(0,r.kt)("h1",{id:"memory-allocation-variable-b--free-memory-pointer-update-evm-playground-lines-96-112"},"Memory Allocation Variable \u201cb\u201d & Free Memory Pointer Update (EVM Playground Lines 96-112)"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u306e\u64cd\u4f5c\u306f\u4e0a\u8a18\u306e\u6d41\u308c\u3068\u975e\u5e38\u306b\u4f3c\u3066\u3044\u308b\u304c\u3001\u305f\u3060\u3057\u3001\u4eca\u56de\u306f",(0,r.kt)("inlineCode",{parentName:"p"},"bytes32[2] memory b"),"\u3068\u306a\u308b\u3002"),(0,r.kt)("p",null,"free memory pointer \u3092 0x160(352 in decimal)\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b(\u524d\u306e free memory pointer 288 + \u65b0\u3057\u3044\u5909\u6570\u306e\u30b5\u30a4\u30ba 64 bytes)\u3002"),(0,r.kt)("p",null,"\u6ce8\u610f\u3068\u3057\u3066\u306f\u3001free memory pointer \u306f\u30e1\u30e2\u30ea\u306b\u3066 0x160 \u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u3001\u305d\u3053\u3067\u73fe\u5728\u306f\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"b"),"\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3(0x120)\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u3066\u3042\u308b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(82).Z,width:"713",height:"407"})),(0,r.kt)("h1",{id:"memory-initialisation-variable-b-evm-playground-lines-113-162"},"Memory Initialisation Variable \u201cb\u201d (EVM Playground Lines 113-162)"),(0,r.kt)("p",null,"\u7d9a\u3044\u3066\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"b"),"\u521d\u671f\u5316\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002"),(0,r.kt)("p",null,"\u73fe\u5728\u3001\u30e1\u30e2\u30ea\u306f 352bytes \u3078\u62e1\u5f35\u3055\u308c\u305f\u3002\u30b9\u30bf\u30c3\u30af\u306b\u306f\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092 2 \u500b\u6301\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("h1",{id:"assign-value-to-b0-evm-playground-lines-163-207"},"Assign Value to ",(0,r.kt)("inlineCode",{parentName:"h1"},"b[0]")," (EVM Playground Lines 163-207)"),(0,r.kt)("p",null,"\u3084\u3063\u3068\u6700\u5f8c\u306e\u6bb5\u968e\u306b\u6765\u308c\u305f\u3002\u6b63\u76f4\u306b\u3044\u3063\u3066\u96e3\u3057\u304b\u3063\u305f\u3002"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u306f\u3001array ",(0,r.kt)("inlineCode",{parentName:"p"},"b")," \u306e index ",(0,r.kt)("inlineCode",{parentName:"p"},"0"),"\u306b\u5024\u3092\u4ed8\u4e0e\u3057\u305f\u3044\u3002"),(0,r.kt)("p",null,"\u30b3\u30fc\u30c9\u3067\u306f b","[0]"," = 1 \u3068\u306a\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u307e\u305a\u3001\u3053\u306e\u5024\u304c stack \u306b\u7a81\u3063\u8fbc\u307e\u308c\u308b\u3002\u305d\u306e\u5f8c\u3001bit shift \u304c\u8d77\u304d\u308b\u304c\u3001\u3053\u308c\u79fb\u52d5\u3057\u305f\u306e\u306f 0 \u3067\u4f55\u3082\u5909\u308f\u308a\u306f\u306a\u3044\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002"),(0,r.kt)("p",null,"\u6b21\u306b array \u306e index \u306b\u306f 0x00 \u3078\u66f8\u304d\u8fbc\u307e\u308c\u30010 positon \u3078\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u306e\u969b\u306b\u3001array length \u306e 2 \u3092\u8d85\u3048\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u30c1\u30a7\u30c3\u30af\u3002\u3082\u3057\u6761\u4ef6\u3092\u30af\u30ea\u30a2\u3067\u304d\u306a\u3044\u5834\u5408\u3001\u7570\u306a\u308b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3078\u98db\u3073\u3001\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306e\u90e8\u5206\u3078\u98db\u3070\u3055\u308c\u308b\u3002"),(0,r.kt)("p",null,"MUL\u3001ADD opcode \u306f\u30e1\u30e2\u30ea\u3044\u306b\u304a\u3044\u3066\u5024\u304c\u66f8\u304d\u8fbc\u307e\u308c\u308b\u5834\u6240\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"0x20 (32 in decimal) * 0x00 (0 in decimal) = 0x00\n")),(0,r.kt)("p",null,"\u30e1\u30e2\u30ea\u306e array \u306f 32 byte \u5358\u4f4d\u3067\u3042\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u3057\u3066\u307b\u3057\u3044\u3002\u3053\u3061\u3089\u306f 0x00 \u306b\u306a\u308b\u306e\u3067\u3001offset \u306f\u4e0d\u8981\u3067\u305d\u306e\u307e\u307e 0 \u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u304b\u3089\u66f8\u7740\u8fbc\u3080\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"0x00 + 0x120 = 0x120 (288 in decimal)\n")),(0,r.kt)("p",null,"ADD \u306f offset \u306e\u5024\u3092\u30e1\u30e2\u30ea\u306b\u3042\u308b\u5909\u6570 b \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b\u3088\u3046\u306b\u4f7f\u308f\u308c\u305f\u3002offset \u306f\u4eca\u56de 0 \u306a\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u3001free memory pointer \u306e\u4f4d\u7f6e\u306b\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3068\u306a\u308b\u3002"),(0,r.kt)("p",null,"\u4e00\u756a\u6700\u5f8c\u306b\u3001MSTORE \u3092\u4f7f\u3063\u3066\u5024 0x01 \u3092\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x120 \u3078\u66f8\u304d\u8fbc\u3080\u3002\u305d\u3057\u3066\u3001\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u3059\u3079\u3066\u306e\u8981\u7d20\u3092 pop \u3057\u3001\u7d42\u4e86\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3067\u30e1\u30e2\u30ea\u306f",(0,r.kt)("inlineCode",{parentName:"p"},"b[0] = 1"),"\u3068\u306a\u3063\u3066\u3044\u308b\u3002\u4e0b\u304b\u3089 3 \u884c\u76ee\u306e\u3068\u3053\u308d\u306b 1 \u3068\u3044\u3046\u6570\u5b57\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u304c\u308f\u304b\u308b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(4039).Z,width:"716",height:"381"})),(0,r.kt)("p",null,"\u4eca\u56de\u306e\u8a18\u4e8b\u306f\u3053\u3053\u307e\u3067\uff01Bye\uff01"),(0,r.kt)("h2",{id:"reference"},"Reference"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy-d6b?s=r"},"EVM Deep Dives: The Path to Shadowy Super Coder \ud83e\udd77 \ud83d\udcbb - Part 2")))}s.isMDXComponent=!0},8919:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/0plus1is1-67419ad8c3e6896eb20d34b24f09e059.png"},408:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/keeptrying-d7c22670dd835427081a62ef78787bc0.png"},3814:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/keeptryingallday-55e3b5ef7bf92e4188f07f753f51c8fd.png"},4740:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/meikyuu-8f55c9a4c82238d91b81b7627ee94a99.png"},3136:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory00-64684a54a90cd8fad4035fb6bc659256.png"},5939:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory01-bedf15c76b97ec5039e2dc0c9d1acd30.png"},499:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory02-5c58412a5109dbc9f344363980e9a18e.png"},8735:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory03-45df8d05acd1c466840636031aeb0c69.png"},82:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory04-21f31db9f1b092990a9a117ab315b165.png"},4039:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory05-98e5924ea9117797c28563e880002aec.png"},5473:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memoryImpression-bf6e64d85b0989e34e97553f008b2e36.png"},6794:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/thisispointless-c42e9d59813d74a2a459dc60158cfd9c.png"}}]); \ No newline at end of file diff --git a/assets/js/2ebf6dbc.79b055f0.js b/assets/js/2ebf6dbc.79b055f0.js new file mode 100644 index 00000000..8b4b6324 --- /dev/null +++ b/assets/js/2ebf6dbc.79b055f0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[7467],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var l=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=l.createContext({}),m=function(e){var t=l.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=m(e.components);return l.createElement(i.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},c=l.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),c=m(n),k=r,d=c["".concat(i,".").concat(k)]||c[k]||s[k]||a;return n?l.createElement(d,o(o({ref:t},u),{},{components:n})):l.createElement(d,o({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,o=new Array(a);o[0]=c;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p.mdxType="string"==typeof e?e:r,o[1]=p;for(var m=2;m{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>s,frontMatter:()=>a,metadata:()=>p,toc:()=>m});var l=n(7462),r=(n(7294),n(3905));const a={slug:"EVM-deep-dive-part2",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",tags:["EVM","opcode","Etheruem","blockchain","examples"]},o=void 0,p={permalink:"/blog/EVM-deep-dive-part2",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md",source:"@site/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",description:"Hello, everybody!",date:"2023-05-13T00:00:00.000Z",formattedDate:"2023\u5e745\u670813\u65e5",tags:[{label:"EVM",permalink:"/blog/tags/evm"},{label:"opcode",permalink:"/blog/tags/opcode"},{label:"Etheruem",permalink:"/blog/tags/etheruem"},{label:"blockchain",permalink:"/blog/tags/blockchain"},{label:"examples",permalink:"/blog/tags/examples"}],readingTime:7.626,hasTruncateMarker:!1,authors:[{name:"Thurendous",title:"Think borderlessly",url:"https://github.com/thurendous",imageURL:"https://github.com/thurendous.png",key:"Thurendous"}],frontMatter:{slug:"EVM-deep-dive-part2",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",tags:["EVM","opcode","Etheruem","blockchain","examples"]},prevItem:{title:"SafeERC20\u3068\u306f",permalink:"/blog/What-is-SafeERC20"},nextItem:{title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",permalink:"/blog/EVM-deep-dive-part1"}},i={authorsImageUrls:[void 0]},m=[{value:"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35",id:"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35",level:2},{value:"\u30e1\u30e2\u30ea\u306f byte \u306e Array \u3060\u304b\u3089",id:"\u30e1\u30e2\u30ea\u306f-byte-\u306e-array-\u3060\u304b\u3089",level:2},{value:"Bytecode",id:"bytecode",level:2},{value:"Reference",id:"reference",level:2}],u={toc:m};function s(e){let{components:t,...a}=e;return(0,r.kt)("wrapper",(0,l.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Hello, everybody!"),(0,r.kt)("h1",{id:"never-give-up"},"Never Give Up"),(0,r.kt)("p",null,"\u4ee5\u524d\u66f8\u3044\u305f\u6642\u304b\u3089\u3001EVM \u306b\u3064\u3044\u3066\u7406\u89e3\u3067\u304d\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u3001\u5f53\u6642\u306f\u8aad\u307f\u3065\u3089\u304b\u3063\u305f\u6280\u8853\u7cfb\u306e\u6587\u7ae0\u3082\u3059\u3089\u3059\u3089\u8aad\u3081\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u305d\u3053\u3067 EVM \u306e\u3053\u3068\u3042\u308b\u3044\u306f\u4ed6\u306e\u306a\u306b\u304b\u3067\u9811\u5f35\u3063\u3066\u3044\u308b\u3042\u306a\u305f\u3082\u3082\u3057\u304b\u3057\u3066\u4f55\u304b\u304c\u3067\u304d\u305a\u306b\u60a9\u3093\u3067\u3044\u308b\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u884c\u3063\u3066\u304a\u304d\u307e\u3059\u304c\u3001\u50d5\u3082\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3001\u5b89\u5fc3\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u3046\u3061\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3060\u308d\u3046\u3002"),(0,r.kt)("p",null,"\u3061\u306a\u307f\u306b\u3001\u3053\u3061\u3089\u306e\u753b\u50cf\u3092\u307f\u3066\u3054\u3089\u3093\u3002"),(0,r.kt)("p",null,"\u672c\u5f53\u306b\u7d4c\u9a13\u3057\u305f\u4eba\u3057\u304b\u308f\u304b\u3089\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3057\u3001\u7d4c\u9a13\u3057\u305f\u3068\u3057\u3066\u3082\u3082\u3046\u4e00\u5ea6\u7d4c\u9a13\u3059\u308b\u3068\u3001\u3084\u306f\u308a\u4fe1\u3058\u3089\u308c\u306a\u3044\u6c17\u6301\u3061\u306b\u306a\u308b\u3068\u601d\u3046\u3088\u306d\u3002"),(0,r.kt)("p",null,"\u4f55\u304c\u3069\u3046\u306a\u3063\u3066\u3082\u3001\u7d9a\u3051\u308b\u3053\u3068\u304c\u4e00\u756a\u5927\u5207\u3002"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u9045\u304f\u3066\u3082\u3044\u3044")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(8919).Z,width:"828",height:"382"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u7406\u60f3\u3068\u73fe\u5b9f")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(4740).Z,width:"820",height:"380"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u300c\u7d9a\u3051\u3066\u3066\u3082\u610f\u5473\u306a\u3044\u300d")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(6794).Z,width:"934",height:"524"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u6700\u521d\u306e\u7b2c\u4e00\u6b69\u304c\u4e00\u756a\u3080\u305a\u3044\u3051\u3069\u306d")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(408).Z,width:"792",height:"742"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u4e09\u65e5\u574a\u4e3b VS \u7d9a\u3051\u308b")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(3814).Z,width:"886",height:"516"})),(0,r.kt)("hr",null),(0,r.kt)("p",null,"\u4eca\u56de\u306f\u3001\u30e1\u30e2\u30ea\u30fc\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002"),(0,r.kt)("p",null,"Part 1 \u3067\u306f\u3001EVM \u304c\u3069\u306e\u3088\u3046\u306b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u3069\u3053\u3092\u72d9\u3063\u3066 run \u3055\u305b\u308b\u304b\u3092\u898b\u3066\u304d\u305f\u3002 \u305d\u308c\u306f\u3001\u5916\u90e8\u306e calldata \u3092\u5165\u529b\u3057\u3066\u304d\u3066\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u3069\u306e\u95a2\u6570\u3092\u547c\u3093\u3067\u3044\u308b\u304b\u3092\u5224\u5225\u3057\u3066 run \u3059\u3079\u304d\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u7b87\u6240\u3092\u6c7a\u3081\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u95a2\u6570\u306e\u7f72\u540d\u30fbcall stack\u30fbcalldata\u30fbEVM \u306e\u30aa\u30da\u30b3\u30fc\u30c9 \u306b\u3064\u3044\u3066\u7406\u89e3\u304c\u9032\u3093\u3060\u3068\u601d\u3046\u3002"),(0,r.kt)("p",null,"Part 2 \u3067\u306f\u3001EVM \u306b\u304a\u3051\u308b\u30e1\u30e2\u30ea\u30fc\u306b\u3064\u3044\u3066\u8272\u3005\u898b\u3066\u3044\u3053\u3046\u3002"),(0,r.kt)("h1",{id:"memory"},"Memory"),(0,r.kt)("p",null,"Part1 \u306e\u30b3\u30fc\u30c9\u3092\u601d\u3044\u3060\u3057\u3066\u307f\u3066\u3002",(0,r.kt)("inlineCode",{parentName:"p"},"1_Storage.sol"),"\u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3042\u3063\u305f\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sol"},"pragma solidity >=0.7.0 <0.9.0;\n\ncontract Storage {\n uint256 number;\n\n function store(uint256 num) public {\n number = num;\n }\n\n function retrieve() public view returns (uint256) {\n return number;\n }\n}\n")),(0,r.kt)("p",null,"\u3053\u308c\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u3068\u3001\u3053\u3046\u306a\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"608060405234801561001057600080fd....\n")),(0,r.kt)("p",null,"\u4eca\u56de\u306f\u3053\u306e\u90e8\u5206\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u3066\u8aac\u660e\u3057\u305f\u3044\u3068\u601d\u3046\u3002\u4e00\u756a\u6700\u521d\u306e 5bytes \u3060\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"6080604052\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"60 80 = PUSH1 0x80\n60 40 = PUSH1 0x40\n52 = MSTORE\n")),(0,r.kt)("p",null,"\u3053\u308c\u304c\u805e\u3044\u305f\u3053\u3068\u3042\u308b\u304c\u304b\u3082\u3057\u308c\u306a\u3044\u3051\u3069\u3001\u3044\u308f\u3086\u308b\u300cfree memory pointer\u300d\u3060\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u30fc\u3092\u7406\u89e3\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002"),(0,r.kt)("h1",{id:"\u30e1\u30e2\u30ea\u306e\u30c7\u30fc\u30bf\u69cb\u9020"},"\u30e1\u30e2\u30ea\u306e\u30c7\u30fc\u30bf\u69cb\u9020"),(0,r.kt)("p",null,"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3046\u3068\u3001byte \u306e array \u3060\u300232bytes(256bit)\u3042\u308b\u3044\u306f 1byte(8bit)\u306e\u5358\u4f4d\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002\u8aad\u307e\u308c\u308b\u3068\u304d\u306b\u306f\u300132bytes(256bit)\u5358\u4f4d\u3054\u3068\u306b\u306a\u308b\u3002\u4e0b\u8a18\u306e\u753b\u50cf\u306f\u8a71\u3057\u305f\u5185\u5bb9\u3092\u5177\u73fe\u5316\u3057\u305f\u3082\u306e\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(5473).Z,width:"559",height:"427"})),(0,r.kt)("p",null,"\u3053\u306e\u6a5f\u80fd\u306f\uff13\u3064\u306e opcode \u306b\u5de6\u53f3\u3055\u308c\u3066\u3044\u308b\u3002"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"MSTORE(x, y)"),": 32 byte(256 bit) \u306e\u5024 y \u3092\u30e1\u30e2\u30ea\u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e x \u306b\u4fdd\u5b58"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"MLOAD(x)"),": 32 byte(256 bit) \u306e\u30e1\u30e2\u30ea\u306e\u5834\u6240\u3092\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 x \u304b\u3089\u8aad\u307f\u51fa\u3057\u3001\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"MSOTRE8(x, y)"),": 1 byte (8 bit)\u306e\u5024 y \u3092\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e x \u306b\u4fdd\u5b58\u3059\u308b")),(0,r.kt)("p",null,"\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u3053\u3068\u306f\u3069\u3053\u304b\u3089\u30e1\u30e2\u30ea\u3092\u8aad\u307f\u53d6\u308b/\u66f8\u304d\u8fbc\u3080\u304b\u3092\u6c7a\u3081\u3066\u3044\u308b\u3068\u8003\u3048\u3066\u3088\u3044\u3002\u3082\u3057\u30011byte \u3088\u308a\u591a\u304f\u8aad\u307f\u53d6\u308b/\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3092\u3057\u305f\u3044\u306e\u3067\u3042\u308c\u3070\u3001\u305d\u306e\u307e\u307e\u7d99\u7d9a\u3059\u308c\u3070\u3088\u3044\u3060\u3051\u306e\u8a71\u306b\u306a\u308b\u3002"),(0,r.kt)("h1",{id:"evm-playground"},"EVM playground"),(0,r.kt)("p",null,"\u3053\u306e ",(0,r.kt)("a",{parentName:"p",href:"https://www.evm.codes/playground?fork=shanghai"},"EVM playground")," \u306f\u3042\u306a\u305f\u306e\u7406\u89e3\u306e\u624b\u52a9\u3051\u304c\u3067\u304d\u308b\u3060\u308d\u3046\u3002Run \u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u53f3\u4e0a\u306e\u77e2\u5370\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u3088\u3046\u3002\u77e2\u5370\u30dc\u30bf\u30f3\u306f\u30b3\u30fc\u30c9\u306e\u7a3c\u50cd\u30d7\u30ed\u30bb\u30b9\u3092\u305f\u3069\u3063\u3066\u3044\u3063\u3066\u304f\u308c\u308b\u3002\u30b9\u30bf\u30c3\u30af\u3001\u30e1\u30e2\u30ea\u306f\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u306e\u304b\u3082\u308f\u304b\u308b\u3002\u3059\u3054\u304f\u76f4\u611f\u7684\u306a\u30c4\u30fc\u30eb\u3060\u3068\u611f\u5fc3\u3059\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"// MSTORE 32 bytes 0x11...1 at memory location 0\nPUSH32 0x1111111111111111111111111111111111111111111111111111111111111111\nPUSH1 0x00\nMSTORE\n\n// MSTORE8 1 byte 0x22 at memory location 32 (0x20 in hex)\nPUSH1 0x22\nPUSH1 0x20\nMSTORE8\n\n// MSTORE8 1 byte 0x33 at memory location 33 (0x21 in hex)\nPUSH1 0x33\nPUSH1 0x21\nMSTORE8\n\n// MLOAD 32 bytes to the call stack from memory location 0 ie 0-32 bytes of memory\nPUSH1 0x00\nMLOAD\n\n// MLOAD 32 bytes to the call stack from memory location 32 ie 32-64 bytes of memory\nPUSH1 0x20\nMLOAD\n\n// MLOAD 32 to the call stack from memory location 33 ie 33-65 bytes of memory\nPUSH1 0x21\nMLOAD\n")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3e29126-2954-40e3-bc1b-7ca5e780fd1c_1500x850.png",alt:null})),(0,r.kt)("p",null,"opcode \u306b\u3064\u3044\u3066\u3082\u3001\u82f1\u8a9e\u3060\u304c\u8aac\u660e\u6587\u304c\u3064\u3044\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3084\u3063\u3066\u307f\u3066\u5909\u3060\u306a\u3068\u601d\u3046\u3053\u3068\u306f\u306a\u3044\u306e\u304b\uff1f\n\u307e\u305a\u3001MSTORE8 \u3092\u4f7f\u3063\u3066 1 byte \u306e 0x22 \u3092\u30e1\u30e2\u30ea\u306e 0x20 \u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u308b\u3064\u3082\u308a\u3060\u304c\u3001\u4f55\u6545\u304b\u30e1\u30e2\u30ea\u306f\u3053\u3053\u304b\u3089\u3001"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F954d54e6-0bce-4de3-a61d-dd41fdae49c7_836x152.png",alt:null})),(0,r.kt)("p",null,"\u3053\u3046\u5909\u308f\u308b\u3093\u3060\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F225fde5a-09bf-4a24-a702-88ad5010951e_836x176.png",alt:null})),(0,r.kt)("p",null,"\u3053\u306e\u4f59\u5206\u306a\u30bc\u30ed\u3063\u3066\u306a\u3093\u3060\u3068\u601d\u3046\u3060\u308d\u3046\u3002"),(0,r.kt)("h2",{id:"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35"},"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35"),(0,r.kt)("p",null,"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30e1\u30e2\u30ea\u3078\u306a\u306b\u304b\u3092\u66f8\u304d\u8fbc\u3080\u969b\u3001byte \u6570\u306b\u5f93\u3063\u3066\u30ac\u30b9\u4ee3\u3092\u652f\u6255\u3063\u3066\u3044\u308b\u3002\u3053\u308c\u304c opcode \u306e\u30b3\u30b9\u30c8\u3068\u8a00\u3046\u3002\u3082\u3057\u3001\u3053\u308c\u307e\u3067\u30e1\u30e2\u30ea\u3078\u66f8\u304d\u8fbc\u3093\u3060\u3053\u3068\u304c\u306a\u3044\u5834\u6240\u3078\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u8ffd\u52a0\u7684\u306b\u30e1\u30e2\u30ea\u62e1\u5f35\u306e\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u307e\u3067\u66f8\u304d\u8fbc\u3093\u3060\u3053\u3068\u304c\u306a\u3044\u7b87\u6240\u3078\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u30e1\u30e2\u30ea\u306f 32bytes(256bit)\u62e1\u5f35\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308b\u3002"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u30e1\u30e2\u30ea\u306e\u30b3\u30b9\u30c8\u306e\u5897\u3048\u65b9\u306b\u95a2\u3057\u3066\u306f\u3001\u6700\u521d\u306e 724bytes \u306f\u7dda\u5f62\u7684\u306b\u5897\u52a0\u3059\u308b\u304c\u3001\u305d\u308c\u4ee5\u964d\u306f\u4e8c\u6b21\u6307\u6570\u95a2\u6570\u7684\u306b\u306a\u308b\u3002")),(0,r.kt)("p",null,"\u4e0a\u306e\u4f8b\u3067\u306f\u3001\u307e\u305a 0x00 \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078 32 bytes \u66f8\u304d\u8fbc\u3093\u3060\u304c\u3001\u305d\u3053\u304b\u3089\u3055\u3089\u306b\u66f8\u304d\u8fbc\u3080\u3068\u306a\u308b\u3068\u3001\u30e1\u30e2\u30ea\u62e1\u5f35\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u305a\u3001\u7d50\u679c\u7684\u306b\u3001\u30e1\u30e2\u30ea\u306f 64 bytes \u306b\u306a\u3063\u305f\u3002"),(0,r.kt)("p",null,"\u30e1\u30e2\u30ea\u306b\u3042\u308b\u4fdd\u5b58\u9818\u57df\u306e\u6700\u521d\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f\u30bc\u30ed\u3002\u3060\u304b\u3089 2200000000000000000000000000000000000000000000000000000000000000 \u304c\u30e1\u30e2\u30ea\u306b\u8ffd\u52a0\u3055\u308c\u305f\u3002"),(0,r.kt)("h2",{id:"\u30e1\u30e2\u30ea\u306f-byte-\u306e-array-\u3060\u304b\u3089"},"\u30e1\u30e2\u30ea\u306f byte \u306e Array \u3060\u304b\u3089"),(0,r.kt)("p",null,"\u6b21\u306b\u6ce8\u610f\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u306f\u3001\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 33(0x21)\u304b\u3089 MLOAD \u3057\u305f\u3068\u304d\u306b\u3001\u4e0b\u8a18\u306e\u5024\u304c\u8fd4\u3055\u308c\u305f\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"3300000000000000000000000000000000000000000000000000000000000000\n")),(0,r.kt)("p",null,"32 bytes \u305a\u3064\u8aad\u307f\u8fbc\u3093\u3067\u3044\u306a\u304f\u3066\u3082\u3001\u8aad\u307f\u8fbc\u3081\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u3063\u305f\u3002"),(0,r.kt)("p",null,"memory \u306f\u305f\u3060\u306e byte array \u306a\u306e\u3067\u3001\u3069\u3053\u306e\u5834\u6240\u304b\u3089\u3067\u3082\u8aad\u307f\u8fbc\u3081\u308b\u3053\u3068\u3092\u899a\u3048\u3066\u4e0b\u3055\u3044\u300232bytes \u306e\u5236\u9650\u306f\u7279\u306b\u306a\u304f\u3001\u3069\u3053\u304b\u3089\u3067\u3082 byte \u5358\u4f4d\u304b\u3089\u8aad\u307f\u8fbc\u3081\u308b\u3002"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u95a2\u6570\u5185\u3067\u306e\u307f\u65b0\u305f\u306b\u30e1\u30e2\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u308c\u306f\u65b0\u305f\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3055\u308c\u305f\u8907\u96d1\u306a\u578b\uff08\u4f8b\u3048\u3070 ",(0,r.kt)("inlineCode",{parentName:"p"},"new int[...]")," \u306a\u3069\uff09\u3067\u3042\u3063\u305f\u308a\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u53c2\u7167\u5909\u6570\u304b\u3089\u30b3\u30d4\u30fc\u3055\u308c\u305f\u3082\u306e\u3067\u3042\u3063\u305f\u308a\u3057\u307e\u3059\u3002")),(0,r.kt)("p",null,"\u73fe\u5728\u3001\u6211\u3005\u306f\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u3064\u3044\u3066\u7406\u89e3\u3067\u304d\u305f\u306e\u3067\u3001free memory \u306e\u8a71\u3078\u623b\u308d\u3046\u3002"),(0,r.kt)("h1",{id:"free-memory-pointer"},"Free Memory Pointer"),(0,r.kt)("p",null,"Free Memory Pointer \u3068\u306f\u3001\u7c21\u5358\u306b\u3044\u3046\u3068\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30dd\u30a4\u30f3\u30bf\u30fc\u3067\u3042\u308a\u3001Free Memory \u304c\u3069\u3053\u304b\u3089\u30b9\u30bf\u30fc\u30c8\u3059\u3079\u304d\u306a\u306e\u304b\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002\u8a00\u3044\u63db\u3048\u308b\u3068\u3001\u30e1\u30e2\u30ea\u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3069\u3053\u307e\u3067\u66f8\u304d\u8fbc\u307e\u308c\u3066\u3044\u3066\u3001\u3069\u3053\u304b\u3089\u66f8\u304d\u8fbc\u3080\u3079\u304d\u306a\u306e\u304b\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30e1\u30e2\u30ea\u3092\u4e0a\u66f8\u304d\u3059\u308b\u306e\u3092\u9632\u3050\u305f\u3081\u3067\u3082\u3042\u308b\u3002"),(0,r.kt)("p",null,"\u5909\u6570\u304c\u30e1\u30e2\u30ea\u3078\u66f8\u304d\u8fbc\u3080\u3068\u304d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u307e\u305a Free Memory Pointer \u3092\u53c2\u7167\u3057\u3001\u3069\u3053\u304b\u3089\u66f8\u304d\u8fbc\u3080\u3079\u304d\u304b\u3092\u6c7a\u3081\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002\u305d\u308c\u304b\u3089 Free Memory Pointer \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3001\u6700\u65b0\u306e\u30e1\u30e2\u30ea\u306e\u300c\u5883\u754c\u5024\u300d\u3042\u308b\u3044\u306f\u300c\u30aa\u30d5\u30bb\u30c3\u30c8\u300d\u3092\u8a18\u9332\u3059\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"}," newFreeMemoryPointer = freeMemoryPointer + dataSizeBytes\n")),(0,r.kt)("h2",{id:"bytecode"},"Bytecode"),(0,r.kt)("p",null,"\u5148\u7a0b\u306b\u3082\u8a00\u53ca\u3057\u305f\u3088\u3046\u306b\u3001Free Memory Pointer \u306f\u6700\u521d\u306e runtime bytecode \u306e\u3053\u306e\u90e8\u5206\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"60 80 = PUSH1 0x80\n60 40 = PUSH1 0x40\n52 = MSTORE\n")),(0,r.kt)("p",null,"\u3053\u308c\u306f\u57fa\u672c\u7684\u306b\u4f55\u3092\u8a00\u3063\u3066\u3044\u308b\u304b\u3068\u3044\u3046\u3068\u3001Free Memory Pointer \u306f\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x40(64 in decimal)\u3067\u3001\u5024\u306f 0x80(128 in decimal)\u3068\u306a\u308b\u3002"),(0,r.kt)("p",null,"\u3059\u3050\u306b\u7591\u554f\u306b\u601d\u3046\u306e\u306f\u3001\u306a\u305c\u3053\u306e\u6570\u5b57\u306a\u306e\u3068\u3044\u3046\u3053\u3068\u3060\u308d\u3046\u3002"),(0,r.kt)("p",null,"\u7b54\u3048\uff1a"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"0x00 - 0x3f (64 bytes): scratch space"),(0,r.kt)("p",{parentName:"blockquote"},"0x40 - 0x5f (32 bytes): free memory pointer"),(0,r.kt)("p",{parentName:"blockquote"},"0x60 - 0x7f (32 bytes): zero slot")),(0,r.kt)("p",null,"0x40 \u306f solidity \u304c\u5b9a\u7fa9\u3057\u305f\u4e00\u756a\u6700\u521d\u306e Free Memory Pointer \u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3060\u3002\u5024 0x80 \u306f\u5358\u306b\u6700\u521d\u306e 4 \u3064\u306e 32 bytes \u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3089\u306e\u4e88\u7d04\u3055\u308c\u305f\u30e1\u30e2\u30ea\u306b\u3064\u3044\u3066"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Scrach space: inline assembly \u306e\u30cf\u30c3\u30b7\u30f3\u30b0\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u4f7f\u3063\u3066\u3082\u826f\u3044"),(0,r.kt)("li",{parentName:"ul"},"Free memroy pointer: \u4eca\u306e\u30e1\u30e2\u30ea\u306e\u30b5\u30a4\u30ba\u3001free memory \u306e\u30b9\u30bf\u30fc\u30c8\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3001\u6700\u521d\u306f 0x80"),(0,r.kt)("li",{parentName:"ul"},"The zero slot: \u52d5\u7684\u306a Memory Array \u306e\u521d\u671f\u5024\u3067\u3042\u308a\u3001\u3069\u3093\u306a\u3068\u304d\u306b\u3067\u3082\u66f8\u304d\u8fbc\u307e\u308c\u308b\u3053\u3068\u306f\u306a\u3044")),(0,r.kt)("h1",{id:"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea"},"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea"),(0,r.kt)("p",null,"\u30ea\u30a2\u30eb\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304f\u3068\u3057\u3088\u3046\u304b\u3002"),(0,r.kt)("p",null,"\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u4f5c\u6210\u3057\u305f\u3002\u3053\u3044\u3064\u306e\u540d\u306f ",(0,r.kt)("inlineCode",{parentName:"p"},"MemoryLane"),"\u3002\u305f\u3063\u305f\u4e00\u500b\u306e\u95a2\u6570\u3092\u6301\u3063\u3066\u304a\u308a\u3001\uff12\u3064\u306e Array \u3092\u6301\u3063\u3066\u3044\u308b\u3002\u305d\u308c\u304b\u3089 b","[0]","\u306b\u5024 1 \u3092\u4ed8\u4e0e\u3059\u308b\u3002"),(0,r.kt)("p",null,"3 \u884c\u7a0b\u5ea6\u306e\u30b3\u30fc\u30c9\u3060\u3051\u3069\u3001\u304b\u306a\u308a\u591a\u304f\u306e\u3053\u3068\u304c\u8d77\u304d\u3066\u3044\u308b\u3088\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sol"},"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.3;\n\ncontract MemoryLane {\n function memoryLane() public pure {\n bytes32[5] memory a;\n bytes32[5] memory b;\n b[0] = bytes32(uint256(1));\n }\n}\n\n")),(0,r.kt)("p",null,"\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u3082\u3046\u4e00\u5ea6 ",(0,r.kt)("a",{parentName:"p",href:"https://remix.ethereum.org/"},"remix")," \u3078\u6295\u5165\u3002"),(0,r.kt)("p",null,"\u305d\u308c\u304b\u3089\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u304f\u3060\u3055\u3044\u3002"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"memoryLane()"),"\u95a2\u6570\u3092 run \u3057\u3066\u3001debugging mode \u3078\u5165\u3063\u3066\u304f\u3060\u3055\u3044\u3002"),(0,r.kt)("p",null,"opcode \u3092\u5c11\u3057\u305a\u3064\u898b\u3066\u3044\u3053\u3046\u3002"),(0,r.kt)("p",null,"\u5c11\u3057\u7c21\u5358\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u3092",(0,r.kt)("a",{parentName:"p",href:"https://www.evm.codes/playground?unit=Wei&codeType=Mnemonic&code=%27Vg*%28_I...1W0GJ_%21%21%21%21z00FK22WJQ0Y22z20F8K33W33Q1Y33z21F8d%28v0Z0-Jq00Xd%28vJZJ-64q20Xdv33Z33-65q21Xpp%27%7EN+locatioCzG1_wppVv7o7hBcall+stack+from%7EuIIIIq%28+ofNzp%5Cnj+bytegSTOREdw%29*_+0xZ9BY9Chex%7DzXpM%29W+at%7EV%2F%2F+MQ+%7B0x2N+memoryKwg8+1j_J32I11GpPUSHFpMgCn+Be+9+i7+t*+J%29LOAD%28js%21uu%01%21%28%29*79BCFGIJKNQVWXYZ_dgjpquvwz%7E_&fork=shanghai"},"EVM playground"),"\u3078\u5165\u308c\u3066\u3044\u308b\u3002\u305d\u306e opcode \u306f\u305d\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u7c21\u5358\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u306f opcode \u3092\u9806\u756a\u306b\u69cb\u6210\u3057\u3001JUMP \u306a\u3069\u306e\u30e1\u30e2\u30ea\u64cd\u4f5c\u3068\u95a2\u9023\u3057\u306a\u3044\u3053\u3068\u3092\u9664\u5916\u3057\u305f\u3002\u3044\u308d\u3044\u308d\u30b3\u30e1\u30f3\u30c8\u3082\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u53c2\u7167\u3057\u3066\u307b\u3057\u3044\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u30b3\u30fc\u30c9\u306f 6 \u90e8\u5206\u304b\u3089\u69cb\u6210\u3055\u308c\u3066\u3044\u3066\u3001\u3053\u308c\u304b\u3089 dive in \u3059\u308b\u3002"),(0,r.kt)("p",null,"play ground \u3092\u4f7f\u3046\u3053\u3068\u3092\u5f37\u304f\u304a\u3059\u3059\u3081\u3059\u308b\u3002"),(0,r.kt)("h1",{id:"free-memory-pointer-initialisation-evm-playground-lines-1-15"},"Free Memory Pointer Initialisation (EVM Playground Lines 1-15)"),(0,r.kt)("p",null,"\u307e\u305a\u3001\u201cfree memory pointer initialisation\u201d\u304b\u3089\u3084\u3063\u3066\u3044\u304f\u3002\u4e0a\u8a18\u3067\u3082\u3042\u3063\u305f\u3088\u3046\u306b\u30010x80(128 in decimal)\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3002\u3053\u308c\u306f free memory pointer \u306e\u5024\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002Solidity \u306e memory \u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(3136).Z,width:"726",height:"129"})),(0,r.kt)("p",null,"\u3053\u306e\u6bb5\u968e\u3067\u306f\u3001\u307e\u3060\u30e1\u30e2\u30ea\u306b\u306f\u306a\u306b\u3082\u306a\u3044\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(5939).Z,width:"722",height:"166"})),(0,r.kt)("p",null,"\u7d9a\u3044\u3066 free memory pointer \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x40(64 in decimal)\u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002"),(0,r.kt)("p",null,"\u6700\u5f8c\u306b\u3001MSTORE \u3092\u4f7f\u3063\u3066\u30010x40 \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306b 0x80 \u306e\u5024\u3092\u8a18\u9332\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u5f8c\u3001\u30b9\u30bf\u30c3\u30af\u306b\u306f\u4f55\u3082\u306a\u304f\u3001\u30e1\u30e2\u30ea\u306b\u306a\u306b\u304b\u3092\u6b8b\u305b\u305f\u3053\u3068\u306b\u306a\u308b\u3002\u30e1\u30e2\u30ea\u306f 16 \u9032\u6570\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u6570\u5b57\u3054\u3068\u306b 4bit \u306e\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u4eca\u3068\u306a\u3063\u3066\u3001192 \u306e 16 \u9032\u6570\u306e\u6570\u5b57\u3068\u306a\u3063\u3066\u3044\u308b\uff08\u6570\u5b57 2 \u6841 = 1 byte = 8 bit\uff09\u3002"),(0,r.kt)("p",null,"\u5148\u7a0b\u306e\u5185\u5bb9\u3092\u601d\u3044\u51fa\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6700\u521d\u306e 64bytes \u306f scrach space \u3067\u3001\u6b21\u306e 32bytes \u306f free memory pointer \u306b\u306a\u308b\u3002\u3053\u308c\u306f\u307e\u3055\u306b\u4e0b\u8a18\u306e\u72b6\u614b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(499).Z,width:"721",height:"197"})),(0,r.kt)("h1",{id:"memory-allocation-variable-a--free-memory-pointer-update-evm-playground-lines-16-34"},"Memory Allocation Variable \u201ca\u201d & Free Memory Pointer Update (EVM Playground Lines 16-34)"),(0,r.kt)("p",null,"\u6b8b\u308a\u306e\u90e8\u5206\u306b\u3064\u3044\u3066\u306f\u3001\u7c21\u5358\u306b\u3059\u308b\u305f\u3081\u306b\u4e00\u65e6\u6700\u5f8c\u306e\u98db\u3070\u3057\u3066\u30cf\u30a4\u30ec\u30d9\u30eb\u306e\u6982\u8981\u3092\u898b\u3066\u307f\u3088\u3046\u3002"),(0,r.kt)("p",null,"\u6b21\u306e\u30e1\u30e2\u30ea\u306b\u95a2\u3057\u3066\u3001\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"(bytes32","[5]",")\u306e\u3053\u3068\u3092\u914d\u7f6e\u3057\u3066 free memory pointer \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u304c\u308f\u304b\u308b\u3002"),(0,r.kt)("p",null,"\u30b3\u30f3\u30d1\u30a4\u30e9\u306f array size \u306b\u3088\u3063\u3066\u3069\u308c\u304f\u3089\u3044\u306e\u30b9\u30da\u30fc\u30b9\u304c\u5fc5\u8981\u304b\u6c7a\u5b9a\u3059\u308b\u3002"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u30e1\u30e2\u30ea array \u306e\u8981\u7d20\u306e\u5360\u3081\u308b\u9818\u57df\u306f 32 bytes \u306e\u500d\u6570\u306b\u306a\u308b\u3002\u3053\u308c\u306f ",(0,r.kt)("inlineCode",{parentName:"p"},"bytes1[]"),"\u306b\u5bfe\u3057\u3066\u3082\u901a\u7528\u3059\u308b\u3002\u305f\u3060\u3057\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"bytes")," \u3084 ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," \u306f\u9055\u3046\u3002")),(0,r.kt)("p",null,"array \u306e\u30b5\u30a4\u30ba \xd732bytes \u3067\u3069\u308c\u304f\u3089\u3044\u306e\u30e1\u30e2\u30ea\u3092\u98df\u3046\u304b\u308f\u304b\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u5834\u5408\u30015 ","*"," 32 bytes \u3067\u30010xa0 (160)\u306b\u306a\u308b\u306e\u3060\u3002\u3057\u305f\u304c\u3063\u3066\u305d\u306e\u5024\u306f stack \u306b\u30d7\u30c3\u30b7\u30e5\u3055\u308c\u3001\u73fe\u5728\u306e free memory pointer \u306b\u4fdd\u5b58\u3055\u308c\u305f\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u5f8c\u3001\u524d\u306e free memory pointer \u306e\u5024\u3068\u8db3\u3057\u7b97\u3092\u3057\u3066\u3001\u5024 0x120 (288)\u304c\u751f\u6210\u3055\u308c\u305f\u3002\u3053\u306e\u5024\u304c free memory pointer \u306b\u4fdd\u5b58\u3055\u308c\u305f\u3002"),(0,r.kt)("p",null,"stack \u306b\u306f\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"\u30e1\u30e2\u30ea\u3092\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 0x80 \u306b\u30ad\u30fc\u30d7\u3057\u3066\u5f8c\u304b\u3089\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u3002",(0,r.kt)("inlineCode",{parentName:"p"},"0xffff"),"\u306f JUMP \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u610f\u5473\u3057\u3066\u304a\u308a\u3001\u95a2\u4fc2\u306a\u3044\u306e\u3067\u5f53\u9762\u306f\u7121\u8996\u3057\u3066\u3088\u3044(stack \u306e underflow \u3092\u9632\u3050\u305f\u3081\u306b\u3042\u308b)\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(8735).Z,width:"719",height:"255"})),(0,r.kt)("h1",{id:"memory-initialisation-variable-a-evm-playground-lines-35-95"},"Memory Initialisation Variable \u201ca\u201d (EVM Playground Lines 35-95)"),(0,r.kt)("p",null,"\u4eca\u3067\u306f\u30e1\u30e2\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u3066 free memory pointer \u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u305f\u3002\u3053\u3053\u304b\u3089\u306f\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"\u306e\u30e1\u30e2\u30ea\u306b\u304a\u3051\u308b\u521d\u671f\u5316\u3092\u3059\u308b\u3002\u5909\u6570\u306f\u5ba3\u8a00\u3055\u308c\u3066\u5024\u4ee3\u5165\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30bc\u30ed\u5024\u306b\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3092\u3059\u308b\u305f\u3081\u306b\u306f\u3001EVM \u306e CALLDATACOPY \u3092\u4f7f\u3063\u3066\u5b9f\u65bd\u3059\u308b\u3002\u3053\u306e opcode \u306f\uff13\u3064\u306e\u5f15\u6570\u304c\u5fc5\u8981\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"memoryOffset\uff08\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078\u30b3\u30d4\u30fc\u3059\u308b\u5834\u6240\uff09"),(0,r.kt)("li",{parentName:"ul"},"calldataOffset\uff08calldata \u306b\u304a\u3051\u308b byte offset \u306e\u3053\u3068\uff09"),(0,r.kt)("li",{parentName:"ul"},"size\uff08\u30b3\u30d4\u30fc\u3059\u308b byte size\uff09")),(0,r.kt)("p",null,"\u4eca\u56de\u306e\u5834\u5408\u3001memoryOffset \u306f",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 0x80\u3002"),(0,r.kt)("p",null,"calldataOffset \u306f\u5b9f\u969b\u306e calldata \u306e\u30b5\u30a4\u30ba\u3001\u306a\u305c\u306a\u3089\u305d\u3082\u305d\u3082 calldata \u306e copy \u304c\u3044\u3089\u306a\u3044\u3002\u30e1\u30e2\u30ea\u3092\u30bc\u30ed\u5024\u3067\u521d\u671f\u5316\u3057\u305f\u3044\u3002\u7d50\u679c\u7684\u306b\u30b5\u30a4\u30ba\u304c 0xa0 \u3042\u308b\u3044\u306f 160 bytes \u306b\u306a\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u3001\u30e1\u30e2\u30ea\u304c 288 bytes \u306b\u306a\u3063\u305f\u3068\u308f\u304b\u308b(zero slot \u3082\u542b\u3081\u3066)\u3002stack \u306f\u4eca\u3082\u3046\u4e00\u5ea6\u5909\u6570\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3068 JUMP \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u6301\u3063\u3066\u3044\u308b\u72b6\u614b\u3002"),(0,r.kt)("p",null,"\uff08\u305d\u306e\u9593\u306b\u7d30\u304b\u3044\u64cd\u4f5c\u306b\u3064\u3044\u3066\u306f\u3001\u4f55\u5ea6\u3082 pop \u3057\u3066\u3044\u308b\u306e\u304c\u3042\u308b\u304c\u3001\u500b\u4eba\u7684\u306b\u306f\u307e\u3060\u306a\u305e\u3067\u3001\u308f\u304b\u308b\u65b9\u306a\u3089\u6559\u3048\u3066\u4e0b\u3055\u3044\uff09"),(0,r.kt)("h1",{id:"memory-allocation-variable-b--free-memory-pointer-update-evm-playground-lines-96-112"},"Memory Allocation Variable \u201cb\u201d & Free Memory Pointer Update (EVM Playground Lines 96-112)"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u306e\u64cd\u4f5c\u306f\u4e0a\u8a18\u306e\u6d41\u308c\u3068\u975e\u5e38\u306b\u4f3c\u3066\u3044\u308b\u304c\u3001\u305f\u3060\u3057\u3001\u4eca\u56de\u306f",(0,r.kt)("inlineCode",{parentName:"p"},"bytes32[2] memory b"),"\u3068\u306a\u308b\u3002"),(0,r.kt)("p",null,"free memory pointer \u3092 0x160(352 in decimal)\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b(\u524d\u306e free memory pointer 288 + \u65b0\u3057\u3044\u5909\u6570\u306e\u30b5\u30a4\u30ba 64 bytes)\u3002"),(0,r.kt)("p",null,"\u6ce8\u610f\u3068\u3057\u3066\u306f\u3001free memory pointer \u306f\u30e1\u30e2\u30ea\u306b\u3066 0x160 \u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u3001\u305d\u3053\u3067\u73fe\u5728\u306f\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"b"),"\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3(0x120)\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u3066\u3042\u308b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(82).Z,width:"713",height:"407"})),(0,r.kt)("h1",{id:"memory-initialisation-variable-b-evm-playground-lines-113-162"},"Memory Initialisation Variable \u201cb\u201d (EVM Playground Lines 113-162)"),(0,r.kt)("p",null,"\u7d9a\u3044\u3066\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"b"),"\u521d\u671f\u5316\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002"),(0,r.kt)("p",null,"\u73fe\u5728\u3001\u30e1\u30e2\u30ea\u306f 352bytes \u3078\u62e1\u5f35\u3055\u308c\u305f\u3002\u30b9\u30bf\u30c3\u30af\u306b\u306f\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092 2 \u500b\u6301\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("h1",{id:"assign-value-to-b0-evm-playground-lines-163-207"},"Assign Value to ",(0,r.kt)("inlineCode",{parentName:"h1"},"b[0]")," (EVM Playground Lines 163-207)"),(0,r.kt)("p",null,"\u3084\u3063\u3068\u6700\u5f8c\u306e\u6bb5\u968e\u306b\u6765\u308c\u305f\u3002\u6b63\u76f4\u306b\u3044\u3063\u3066\u96e3\u3057\u304b\u3063\u305f\u3002"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u306f\u3001array ",(0,r.kt)("inlineCode",{parentName:"p"},"b")," \u306e index ",(0,r.kt)("inlineCode",{parentName:"p"},"0"),"\u306b\u5024\u3092\u4ed8\u4e0e\u3057\u305f\u3044\u3002"),(0,r.kt)("p",null,"\u30b3\u30fc\u30c9\u3067\u306f b","[0]"," = 1 \u3068\u306a\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u307e\u305a\u3001\u3053\u306e\u5024\u304c stack \u306b\u7a81\u3063\u8fbc\u307e\u308c\u308b\u3002\u305d\u306e\u5f8c\u3001bit shift \u304c\u8d77\u304d\u308b\u304c\u3001\u3053\u308c\u79fb\u52d5\u3057\u305f\u306e\u306f 0 \u3067\u4f55\u3082\u5909\u308f\u308a\u306f\u306a\u3044\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002"),(0,r.kt)("p",null,"\u6b21\u306b array \u306e index \u306b\u306f 0x00 \u3078\u66f8\u304d\u8fbc\u307e\u308c\u30010 positon \u3078\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u306e\u969b\u306b\u3001array length \u306e 2 \u3092\u8d85\u3048\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u30c1\u30a7\u30c3\u30af\u3002\u3082\u3057\u6761\u4ef6\u3092\u30af\u30ea\u30a2\u3067\u304d\u306a\u3044\u5834\u5408\u3001\u7570\u306a\u308b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3078\u98db\u3073\u3001\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306e\u90e8\u5206\u3078\u98db\u3070\u3055\u308c\u308b\u3002"),(0,r.kt)("p",null,"MUL\u3001ADD opcode \u306f\u30e1\u30e2\u30ea\u3044\u306b\u304a\u3044\u3066\u5024\u304c\u66f8\u304d\u8fbc\u307e\u308c\u308b\u5834\u6240\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"0x20 (32 in decimal) * 0x00 (0 in decimal) = 0x00\n")),(0,r.kt)("p",null,"\u30e1\u30e2\u30ea\u306e array \u306f 32 byte \u5358\u4f4d\u3067\u3042\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u3057\u3066\u307b\u3057\u3044\u3002\u3053\u3061\u3089\u306f 0x00 \u306b\u306a\u308b\u306e\u3067\u3001offset \u306f\u4e0d\u8981\u3067\u305d\u306e\u307e\u307e 0 \u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u304b\u3089\u66f8\u7740\u8fbc\u3080\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"0x00 + 0x120 = 0x120 (288 in decimal)\n")),(0,r.kt)("p",null,"ADD \u306f offset \u306e\u5024\u3092\u30e1\u30e2\u30ea\u306b\u3042\u308b\u5909\u6570 b \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b\u3088\u3046\u306b\u4f7f\u308f\u308c\u305f\u3002offset \u306f\u4eca\u56de 0 \u306a\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u3001free memory pointer \u306e\u4f4d\u7f6e\u306b\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3068\u306a\u308b\u3002"),(0,r.kt)("p",null,"\u4e00\u756a\u6700\u5f8c\u306b\u3001MSTORE \u3092\u4f7f\u3063\u3066\u5024 0x01 \u3092\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x120 \u3078\u66f8\u304d\u8fbc\u3080\u3002\u305d\u3057\u3066\u3001\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u3059\u3079\u3066\u306e\u8981\u7d20\u3092 pop \u3057\u3001\u7d42\u4e86\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3067\u30e1\u30e2\u30ea\u306f",(0,r.kt)("inlineCode",{parentName:"p"},"b[0] = 1"),"\u3068\u306a\u3063\u3066\u3044\u308b\u3002\u4e0b\u304b\u3089 3 \u884c\u76ee\u306e\u3068\u3053\u308d\u306b 1 \u3068\u3044\u3046\u6570\u5b57\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u304c\u308f\u304b\u308b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(4039).Z,width:"716",height:"381"})),(0,r.kt)("p",null,"\u4eca\u56de\u306e\u8a18\u4e8b\u306f\u3053\u3053\u307e\u3067\uff01Bye\uff01"),(0,r.kt)("h2",{id:"reference"},"Reference"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy-d6b?s=r"},"EVM Deep Dives: The Path to Shadowy Super Coder \ud83e\udd77 \ud83d\udcbb - Part 2")))}s.isMDXComponent=!0},8919:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/0plus1is1-67419ad8c3e6896eb20d34b24f09e059.png"},408:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/keeptrying-d7c22670dd835427081a62ef78787bc0.png"},3814:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/keeptryingallday-55e3b5ef7bf92e4188f07f753f51c8fd.png"},4740:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/meikyuu-8f55c9a4c82238d91b81b7627ee94a99.png"},3136:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory00-64684a54a90cd8fad4035fb6bc659256.png"},5939:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory01-bedf15c76b97ec5039e2dc0c9d1acd30.png"},499:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory02-5c58412a5109dbc9f344363980e9a18e.png"},8735:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory03-45df8d05acd1c466840636031aeb0c69.png"},82:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory04-21f31db9f1b092990a9a117ab315b165.png"},4039:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory05-98e5924ea9117797c28563e880002aec.png"},5473:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memoryImpression-bf6e64d85b0989e34e97553f008b2e36.png"},6794:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/thisispointless-c42e9d59813d74a2a459dc60158cfd9c.png"}}]); \ No newline at end of file diff --git a/assets/js/814f3328.d1c786fe.js b/assets/js/814f3328.bf11c486.js similarity index 83% rename from assets/js/814f3328.d1c786fe.js rename to assets/js/814f3328.bf11c486.js index 0c0ed64f..0d9e4ca2 100644 --- a/assets/js/814f3328.d1c786fe.js +++ b/assets/js/814f3328.bf11c486.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[2535],{5641:e=>{e.exports=JSON.parse('{"title":"Recent posts","items":[{"title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2","permalink":"/blog/EVM-deep-dive-part2"},{"title":"SafeERC20\u3068\u306f","permalink":"/blog/What is SafeERC20"},{"title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1","permalink":"/blog/EVM-deep-dive-part1"},{"title":"CEI\u3068\u306f : Checks Effects Interactions","permalink":"/blog/checks-effects-interactions"},{"title":"\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u3092\u4e8b\u4f8b\u3067\u7406\u89e3\u3059\u308b","permalink":"/blog/Zero-knowledge-proofs-explained-by-examples"},{"title":"opcode\u306b\u3064\u3044\u3066","permalink":"/blog/opcode-basics"},{"title":"ERC1155\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","permalink":"/blog/what-is-ERC1155-with-code-explained"},{"title":"solidity\u306b\u304a\u3044\u3066\u306a\u305cprivate\u306a\u5909\u6570\u306fprivate\u3067\u306f\u306a\u3044\u306e\u304b","permalink":"/blog/private-variable-in-solidity-with-code-explained"},{"title":"NFT\u3001ERC721\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","permalink":"/blog/what-is-ERC721-and-NFT-with-code-explained"},{"title":"Web3 Term Dictionary","permalink":"/blog/web3-term-dictionary"}]}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[2535],{5641:e=>{e.exports=JSON.parse('{"title":"Recent posts","items":[{"title":"SafeERC20\u3068\u306f","permalink":"/blog/What-is-SafeERC20"},{"title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2","permalink":"/blog/EVM-deep-dive-part2"},{"title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1","permalink":"/blog/EVM-deep-dive-part1"},{"title":"CEI\u3068\u306f : Checks Effects Interactions","permalink":"/blog/checks-effects-interactions"},{"title":"\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u3092\u4e8b\u4f8b\u3067\u7406\u89e3\u3059\u308b","permalink":"/blog/Zero-knowledge-proofs-explained-by-examples"},{"title":"opcode\u306b\u3064\u3044\u3066","permalink":"/blog/opcode-basics"},{"title":"ERC1155\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","permalink":"/blog/what-is-ERC1155-with-code-explained"},{"title":"solidity\u306b\u304a\u3044\u3066\u306a\u305cprivate\u306a\u5909\u6570\u306fprivate\u3067\u306f\u306a\u3044\u306e\u304b","permalink":"/blog/private-variable-in-solidity-with-code-explained"},{"title":"NFT\u3001ERC721\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","permalink":"/blog/what-is-ERC721-and-NFT-with-code-explained"},{"title":"Web3 Term Dictionary","permalink":"/blog/web3-term-dictionary"}]}')}}]); \ No newline at end of file diff --git a/assets/js/873f7565.e2b623ab.js b/assets/js/873f7565.e2b623ab.js deleted file mode 100644 index 29141aec..00000000 --- a/assets/js/873f7565.e2b623ab.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[4726],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>d});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),f=u(r),d=a,m=f["".concat(s,".").concat(d)]||f[d]||c[d]||o;return r?n.createElement(m,l(l({ref:t},p),{},{components:r})):n.createElement(m,l({ref:t},p))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=f;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var u=2;u{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var n=r(7462),a=(r(7294),r(3905));const o={slug:"What is SafeERC20",title:"SafeERC20\u3068\u306f",authors:["Thurendous"],blogDescription:"Foundry\u306e\u4f7f\u3044\u65b9\u5165\u9580",tags:["Etheruem","blockchain","Foundry"]},l=void 0,i={permalink:"/blog/What is SafeERC20",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/2023-8-12-What-is-safeERC20/2023-2-26-EVM-deep-dive-part1.md",source:"@site/blog/2023-8-12-What-is-safeERC20/2023-2-26-EVM-deep-dive-part1.md",title:"SafeERC20\u3068\u306f",description:"Hello! Everybody!",date:"2023-02-26T00:00:00.000Z",formattedDate:"2023\u5e742\u670826\u65e5",tags:[{label:"Etheruem",permalink:"/blog/tags/etheruem"},{label:"blockchain",permalink:"/blog/tags/blockchain"},{label:"Foundry",permalink:"/blog/tags/foundry"}],readingTime:1.076,hasTruncateMarker:!1,authors:[{name:"Thurendous",title:"Think borderlessly",url:"https://github.com/thurendous",imageURL:"https://github.com/thurendous.png",key:"Thurendous"}],frontMatter:{slug:"What is SafeERC20",title:"SafeERC20\u3068\u306f",authors:["Thurendous"],blogDescription:"Foundry\u306e\u4f7f\u3044\u65b9\u5165\u9580",tags:["Etheruem","blockchain","Foundry"]},prevItem:{title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",permalink:"/blog/EVM-deep-dive-part2"},nextItem:{title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",permalink:"/blog/EVM-deep-dive-part1"}},s={authorsImageUrls:[void 0]},u=[{value:"Reference",id:"reference",level:2}],p={toc:u};function c(e){let{components:t,...r}=e;return(0,a.kt)("wrapper",(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Hello! Everybody!"),(0,a.kt)("h1",{id:"safeerc20-\u306e\u4f7f\u3044\u65b9---what-is-and-how-to-use-safeerc20"},(0,a.kt)("inlineCode",{parentName:"h1"},"SafeERC20")," \u306e\u4f7f\u3044\u65b9 - What is and how to use ",(0,a.kt)("inlineCode",{parentName:"h1"},"SafeERC20")),(0,a.kt)("p",null,"OpenZeppelin \u306e SafeERC20 \u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u8da3\u65e8\u306f\u3001ERC20 \u30c8\u30fc\u30af\u30f3\u306b\u306f\u57fa\u6e96\u304c\u3042\u308b\u3082\u306e\u306e\u3001\u57fa\u6e96\u306b\u6cbf\u3063\u3066\u3044\u306a\u3044\u6709\u540d\u306a\u30c8\u30fc\u30af\u30f3\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001BNB \u3084 USDT \u306f bool \u5024\u3092\u8fd4\u3055\u306a\u3044 transfer \u95a2\u6570\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u30c8\u30fc\u30af\u30f3\u3092\u6271\u3046\u3068\u304d\u306b\u3001SafeERC20 \u3092\u4f7f\u3046\u3053\u3068\u3067\u3001bool \u5024\u3092\u8fd4\u3055\u306a\u3044\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3082\u3001\u5931\u6557\u3057\u305f\u5834\u5408\u306b\u306f revert \u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002"),(0,a.kt)("h1",{id:"\u3058\u3083\u6b63\u78ba\u306b\u4f7f\u3046\u306b\u306f"},"\u3058\u3083\u6b63\u78ba\u306b\u4f7f\u3046\u306b\u306f\uff1f"),(0,a.kt)("p",null,"SafeERC20 \u306e\u4f7f\u7528\u65b9\u6cd5\u306f\u3088\u304f\u8aa4\u89e3\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002"),(0,a.kt)("p",null,"SafeERC20 \u306f\u3001\u30c8\u30fc\u30af\u30f3\u3092\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b ERC20 \u306e\u62e1\u5f35\u3067\u306f\u3042\u308a\u307e\u305b\u3093\uff08OpenZeppelin \u306e ERC20 \u306f\u3059\u3067\u306b\u5b89\u5168\u3067\u3059\u304c\uff57\uff09\u3002\u4ed6\u4eba\u306e ERC20 \u30c8\u30fc\u30af\u30f3\u3068\u306e\u3084\u308a\u53d6\u308a\u3092\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306e\u88dc\u52a9\u6a5f\u80fd\u3067\u3059\u3002"),(0,a.kt)("p",null,"\u3053\u306e\u88dc\u52a9\u6a5f\u80fd\u304c\u884c\u3046\u3053\u3068\u306f\u3001"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"ERC20 \u64cd\u4f5c\u306e\u30d6\u30fc\u30eb\u5024\u306e\u623b\u308a\u5024\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u5931\u6557\u3057\u305f\u5834\u5408\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092 revert \u3055\u305b\u307e\u3059\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u540c\u6642\u306b\u3001\u30d6\u30fc\u30eb\u5024\u306e\u623b\u308a\u5024\u3092\u6301\u305f\u306a\u3044\u975e\u6a19\u6e96\u306e ERC20 \u30c8\u30fc\u30af\u30f3\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u3055\u3089\u306b\u3001",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729"},"\u653b\u6483")," \u3092\u7de9\u548c\u3059\u308b\u305f\u3081\u306b\u3001\u627f\u8a8d\u984d\u3092\u5897\u6e1b\u3055\u305b\u308b\u305f\u3081\u306e\u88dc\u52a9\u6a5f\u80fd\u3082\u63d0\u4f9b\u3057\u307e\u3059\u3002")),(0,a.kt)("p",null,"\u4f8b\u3068\u3057\u3066\u3001\u30c8\u30fc\u30af\u30f3\u3068\u3084\u308a\u53d6\u308a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5951\u7d04\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u305d\u308c\u306f\u3001\u4eba\u3005\u304c\u4e00\u5b9a\u306e\u4fa1\u683c\u3067\u30c8\u30fc\u30af\u30f3\u3092\u8ca9\u58f2\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3001\u5f8c\u3067\u8cfc\u5165\u8005\u304c\u305d\u308c\u3089\u304b\u3089\u8cfc\u5165\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u3044\u304f\u3064\u304b\u306e\u30c8\u30fc\u30af\u30f3\u306e\u8ee2\u9001\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u305d\u308c\u3089\u306b SafeERC20 \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002IERC20 \u306e\u578b\u306e\u5024\u3067\u5b89\u5168\u306a\u64cd\u4f5c\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u884c\u300cusing SafeERC20 for IERC20\u300d\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f8b\uff1atradingToken.safeTransferFrom\u3002"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-solidity"},"contract FixedPriceMarket {\n using SafeERC20 for IERC20;\n\n IERC20 tradingToken = 0x1234...;\n uint256 price = 128;\n\n mapping (address => uint256) selling;\n\n function sell(uint256 tokenValue) {\n tradingToken.safeTransferFrom(msg.sender, this, tokenValue);\n selling[msg.sender] = selling[msg.sender].add(tokenValue);\n }\n\n function buy(address seller, uint256 tokenValue) {\n require(msg.value == tokenValue.mul(price));\n selling[seller] = selling[seller].sub(tokenValue);\n tradingToken.safeTransfer(msg.sender, tokenValue);\n seller.transfer(msg.value);\n }\n}\n")),(0,a.kt)("h2",{id:"reference"},"Reference"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://forum.openzeppelin.com/t/safeerc20-tokentimelock-wrappers/396"},"OpenZeppelin Forum"),"\n",(0,a.kt)("a",{parentName:"p",href:"https://zenn.dev/retocrooman/articles/20768619a313ae"},"SafeERC20 \u306b\u3064\u3044\u3066")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9f6838dd.26b2f6f9.js b/assets/js/9f6838dd.26b2f6f9.js deleted file mode 100644 index 7b782cbe..00000000 --- a/assets/js/9f6838dd.26b2f6f9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[3675],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>k});var r=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var u=r.createContext({}),i=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},c=function(e){var t=i(e.components);return r.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},s=r.forwardRef((function(e,t){var n=e.components,l=e.mdxType,a=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),s=i(n),k=l,m=s["".concat(u,".").concat(k)]||s[k]||d[k]||a;return n?r.createElement(m,p(p({ref:t},c),{},{components:n})):r.createElement(m,p({ref:t},c))}));function k(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var a=n.length,p=new Array(a);p[0]=s;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:l,p[1]=o;for(var i=2;i{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>i});var r=n(7462),l=(n(7294),n(3905));const a={slug:"EVM-deep-dive-part1",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",tags:["EVM","opcode","Etheruem","blockchain","examples"]},p=void 0,o={permalink:"/blog/EVM-deep-dive-part1",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md",source:"@site/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",description:"Hello, everybody!",date:"2023-02-26T00:00:00.000Z",formattedDate:"2023\u5e742\u670826\u65e5",tags:[{label:"EVM",permalink:"/blog/tags/evm"},{label:"opcode",permalink:"/blog/tags/opcode"},{label:"Etheruem",permalink:"/blog/tags/etheruem"},{label:"blockchain",permalink:"/blog/tags/blockchain"},{label:"examples",permalink:"/blog/tags/examples"}],readingTime:3.734,hasTruncateMarker:!1,authors:[{name:"Thurendous",title:"Think borderlessly",url:"https://github.com/thurendous",imageURL:"https://github.com/thurendous.png",key:"Thurendous"}],frontMatter:{slug:"EVM-deep-dive-part1",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",tags:["EVM","opcode","Etheruem","blockchain","examples"]},prevItem:{title:"SafeERC20\u3068\u306f",permalink:"/blog/What is SafeERC20"},nextItem:{title:"CEI\u3068\u306f : Checks Effects Interactions",permalink:"/blog/checks-effects-interactions"}},u={authorsImageUrls:[void 0]},i=[{value:"\u57fa\u790e\uff1aSolidity \u2192 Bytecode \u2192 Opcode",id:"\u57fa\u790esolidity--bytecode--opcode",level:2},{value:"1_Storage.sol \u30b3\u30f3\u30c8\u30e9\u30af\u30c8",id:"1_storagesol-\u30b3\u30f3\u30c8\u30e9\u30af\u30c8",level:2},{value:"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084 Calldata",id:"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084-calldata",level:2},{value:"\u30aa\u30da\u30b3\u30fc\u30c9\uff06\u30b9\u30bf\u30c3\u30af",id:"\u30aa\u30da\u30b3\u30fc\u30c9\u30b9\u30bf\u30c3\u30af",level:2},{value:"Reference",id:"reference",level:2}],c={toc:i};function d(e){let{components:t,...n}=e;return(0,l.kt)("wrapper",(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Hello, everybody!"),(0,l.kt)("p",null,"First Principle \u3068\u3044\u3046\u8a00\u8449\u3092\u8033\u306b\u3055\u308c\u305f\u3053\u3068\u306f\u306a\u3044\u3060\u308d\u3046\u304b\u3002\u305d\u308c\u306f\u5965\u6df1\u304f\u7269\u4e8b\u306e\u57fa\u790e\u3092\u7406\u89e3\u3057\u305f\u4e0a\u3067\u3001\u3088\u308a\u3088\u3044\u767a\u60f3\u3092\u751f\u307e\u308c\u308b\u3053\u3068\u3068\u3044\u3046\u6982\u5ff5\u3060\u3002"),(0,l.kt)("p",null,"\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u4e16\u754c\u3067\u306f\u3001EVM \u3068\u305d\u306e\u5468\u308a\u306b\u3042\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u95a2\u3057\u3066\u306f\u3001\u307e\u3055\u306b\u3053\u306e First Principle \u3067\u3042\u308b\u3002Solidity \u3042\u308b\u3044\u306f\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u3053\u306e\u57fa\u790e\u306e\u4e0a\u306b\u4f5c\u308b\u69cb\u9020\u7269\u306a\u306e\u3067\u3001EVM \u306e\u3053\u3068\u3092\u7406\u89e3\u305b\u305a\u306b\u306f\u3088\u3044 solidity dev \u3068\u79f0\u3059\u308b\u306b\u306f\u307e\u3060\u65e9\u3044\u3068\u8a00\u3063\u3066\u3088\u3044\u3060\u308d\u3046\u3002"),(0,l.kt)("h2",{id:"\u57fa\u790esolidity--bytecode--opcode"},"\u57fa\u790e\uff1aSolidity \u2192 Bytecode \u2192 Opcode"),(0,l.kt)("p",null,"\u307e\u305a\u3001\u57fa\u790e\u7684\u306a\u90e8\u5206\u306b\u3064\u3044\u3066\u4e00\u5b9a\u7a0b\u5ea6\u306e\u77e5\u8b58\u3092\u6709\u3059\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u308b\u3002"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u304a\u3055\u3089\u3044\uff1a",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Bytecode & ABI: \u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u306f EVM \u4e0a\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u30b3\u30fc\u30c9\u3067\u3001ABI \u3068\u306f\u3053\u306e EVM \u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u3084\u308a\u53d6\u308a\u304c\u3067\u304d\u308b\u305f\u3081\u306e interface\u3002"),(0,l.kt)("li",{parentName:"ul"},"Solidity \u30b3\u30fc\u30c9\u306f\u307e\u305a\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3078\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304b\u3089\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3078\u4e57\u305b\u308b\u3068\u3044\u3046\u6d41\u308c\u306b\u306a\u308b\u3002\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u5b9f\u306f\u8272\u3005\u306a\u30aa\u30da\u30b3\u30fc\u30c9\u3092\u610f\u5473\u3057\u3066\u3044\u308b\u3002")))),(0,l.kt)("p",null,"\u4eca\u56de\u306f\u57fa\u672c\u7684\u306a solidity \u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u3064\u3044\u3066\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u4e00\u90e8\u3092\u4e00\u7dd2\u306b\u307f\u3066\u3044\u304d\u3001EVM \u304c\u3069\u306e\u3088\u3046\u306b\u95a2\u6570\u3092\u9078\u3093\u3067\u3044\u308b\u304b\u3092\u898b\u3088\u3046\u3002"),(0,l.kt)("p",null,"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304b\u3089\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u305f\u3082\u306e\u3067\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u306f\u3044\u304f\u3064\u304b\u3082\u306e\u95a2\u6570\u304c\u3042\u308b\u3060\u308d\u3046\u3002"),(0,l.kt)("p",null,"\u3088\u304f\u3042\u308b\u8cea\u554f\u306f\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u305f\u5f8c\u3001EVM \u306f\u3069\u306e\u3088\u3046\u306b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u3069\u306e\u90e8\u5206\u3092\u5b9f\u884c\u3059\u3079\u304d\u304b\u304c\u308f\u304b\u3063\u305f\u306e\u304b\u3068\u3044\u3046\u306e\u304c\u3042\u308b\u3002"),(0,l.kt)("h2",{id:"1_storagesol-\u30b3\u30f3\u30c8\u30e9\u30af\u30c8"},"1_Storage.sol \u30b3\u30f3\u30c8\u30e9\u30af\u30c8"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-solidity"},"pragma solidity >=0.7.0 <0.9.0;\n\ncontract Storage {\n uint256 number;\n\n function store(uint256 num) public {\n number = num;\n }\n\n function retrieve() public view returns (uint256) {\n return number;\n }\n}\n")),(0,l.kt)("p",null,"\u4eca\u56de\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u4e0a\u8a18\u306e\u3082\u306e\u3068\u306a\u308b\u3002\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u306f\u4e8c\u500b\u306e\u95a2\u6570\u304c\u3042\u308b\u3002",(0,l.kt)("inlineCode",{parentName:"p"},"store()"),"\u3068 ",(0,l.kt)("inlineCode",{parentName:"p"},"retrieve()"),"\u3002"),(0,l.kt)("p",null,"runtime \u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033\n")),(0,l.kt)("p",null,"\u4eca\u56de\u30d5\u30a9\u30fc\u30ab\u30b9\u3059\u308b\u306e\u306f\u4ee5\u4e0b\u306e\u90e8\u5206\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"60003560e01c80632e64cec11461003b5780636057361d1461005957\n")),(0,l.kt)("p",null,"\u3053\u306e\u90e8\u5206\u306f\u5168\u4f53\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u304b\u3089\u629c\u304d\u53d6\u3063\u305f\u3082\u306e\u3002"),(0,l.kt)("p",null,"\u95a2\u6570\u306e\u30bb\u30ec\u30af\u30bf\u306e\u30ed\u30b8\u30c3\u30af\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3002"),(0,l.kt)("p",null,"\u8a00\u3044\u9045\u308c\u305f\u304c\u3001EVM \u306e\u30aa\u30da\u30b3\u30fc\u30c9\u306b\u95a2\u3057\u3066\u306f\u3001",(0,l.kt)("a",{parentName:"p",href:"https://www.ethervm.io/"},"\u3053\u3053"),"\u304b\u3089\u78ba\u8a8d\u3067\u304d\u308b\u3002"),(0,l.kt)("p",null,"\u30aa\u30da\u30b3\u30fc\u30c9\u306f 1 byte \u306e\u9577\u3055\u306b\u306a\u308b\u3002\u305d\u3046\u3059\u308b\u3068\u81ea\u7136\u306b 256 \u30d1\u30bf\u30fc\u30f3\u304c\u3042\u308b\u3068\u5206\u308b\u3068\u601d\u3046\u3002"),(0,l.kt)("p",null,"\u3057\u304b\u3057\u3001\u5b9f\u969b\u306b\u306f 140 \u500b\u306e\u30aa\u30da\u30b3\u30fc\u30c9\u3057\u304b\u5b58\u5728\u3057\u306a\u3044\u3002"),(0,l.kt)("p",null,"\u4ee5\u4e0b\u306f\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u95a2\u4fc2\u3059\u308b\u30aa\u30da\u30b3\u30fc\u30c9\u3078\u5909\u63db\u3057\u305f\u3082\u306e\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"60 00 = PUSH1 0x00\n35 = CALLDATALOAD\n60 e0 = PUSH1 0xe0\n1c = SHR\n80 = DUP1\n63 2e64cec1 = PUSH4 0x2e64cec1\n14 = EQ\n61 003b = PUSH2 0x003b\n57 = JUMPI\n80 = DUP1\n63 6057361d = PUSH4 0x6057361d\n14 = EQ\n61 0059 = PUSH2 0x0059\n57 = JUMPI\n")),(0,l.kt)("h2",{id:"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084-calldata"},"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084 Calldata"),(0,l.kt)("p",null,"\u30aa\u30da\u30b3\u30fc\u30c9\u3078\u30c0\u30a4\u30d6\u3059\u308b\u524d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u306b\u3064\u3044\u3066\u5fa9\u7fd2\u3057\u3088\u3046\u3002"),(0,l.kt)("p",null,"\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u306e\u524d\u306b\u3001calldata \u306b\u3001\u95a2\u6570\u306e\u7f72\u540d\u3001\u305d\u3057\u3066\u7d9a\u3044\u3066\u5f15\u6570\u3082\u5165\u308c\u308b\u3002"),(0,l.kt)("p",null,"Solidity \u306e\u30b3\u30fc\u30c9\u306b\u8868\u73fe\u3057\u3066\u3082\u3089\u3046\u3068\u3001\u3053\u3046\u306a\u308b\u3060\u308d\u3046\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-solidity"},"event FunctionCalldata(bytes);\nbytes memory functionCalldata = abi.encodeWithSignature('store(uint256)', 10);\nemit FunctionCalldata(functionCalldata);\naddress(storageContract).call(functionCalldata);\n")),(0,l.kt)("p",null,"\u4eca\u56de\u306e\u5834\u5408\u3001\u50d5\u306f store \u95a2\u6570\u3092\u547c\u3073\u300110 \u5f15\u6570\u3068\u3057\u3066\u4ee3\u5165\u3057\u305f\u3044\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-solidity"},"0x6057361d000000000000000000000000000000000000000000000000000000000000000a\n")),(0,l.kt)("p",null,"\u4e0a\u306e\u9577\u3044\u6570\u5b57\u306e\u914d\u5217\u306f abi.encodeWithSignature(\u201dstore(uint256)\u201d,10)\u306e\u7d50\u679c\u3002"),(0,l.kt)("p",null,"\u95a2\u6570\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306f\uff14\u30d0\u30a4\u30c8\u306e Keccak \u30cf\u30c3\u30b7\u30e5\u5024\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u300c0x6057361d\u300d\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"keccak256(\u201cstore(uint256)\u201d) \u2192 first 4 bytes = 6057361d\n\nkeccak256(\u201cretrieve()\u201d) \u2192 first 4 bytes = 2e64cec1\n")),(0,l.kt)("p",null,"\u5148\u7a0b\u306e calldata \u3092\u898b\u308b\u3068\u3001\u5168\u90e8\u3067 36bytes \u3042\u3063\u305f\u3002\u6700\u521d\u306e 4bytes: ",(0,l.kt)("inlineCode",{parentName:"p"},"6057361d"),"\u306f\u95a2\u6570\u306e\u30bb\u30ec\u30af\u30bf\u95a2\u9023\u3067\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"store(uint256)"),"\u3068\u95a2\u4fc2\u3059\u308b\u3002"),(0,l.kt)("p",null,"\u3054\u81ea\u8eab\u3067\u306f\u30c3\u30b7\u30e5\u3057\u3066\u307f\u3066 \u2192",(0,l.kt)("a",{parentName:"p",href:"https://emn178.github.io/online-tools/keccak_256.html"},"\u3053\u3053")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"6057361d = function signature (4 bytes)\n\n000000000000000000000000000000000000000000000000000000000000000a = uint256 input (32 bytes)\n")),(0,l.kt)("p",null,"\u4ee5\u4e0a\u3001calldata \u306e\u6e96\u5099\u3060\u3063\u305f\u3002"),(0,l.kt)("h2",{id:"\u30aa\u30da\u30b3\u30fc\u30c9\u30b9\u30bf\u30c3\u30af"},"\u30aa\u30da\u30b3\u30fc\u30c9\uff06\u30b9\u30bf\u30c3\u30af"),(0,l.kt)("p",null,"\u305d\u308c\u3067\u306f\u3001EVM \u30ec\u30d9\u30eb\u3078\u30c0\u30a4\u30d6\u3057\u3066\u3044\u3053\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002\u308f\u304b\u3089\u306a\u3044\u5834\u5408\u306f",(0,l.kt)("a",{parentName:"p",href:"https://www.youtube.com/watch?v=FNZ5o9S9prU"},"\u3053\u308c"),"\u3092\u898b\u3066\u3002"),(0,l.kt)("p",null,"\u5148\u7a0b\u306e\u30aa\u30da\u30b3\u30fc\u30c9\u306f\u3053\u308c\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"60 00 = PUSH1 0x00\n35 = CALLDATALOAD\n60 e0 = PUSH1 0xe0\n1c = SHR\n80 = DUP1\n63 2e64cec1 = PUSH4 0x2e64cec1\n14 = EQ\n61 003b = PUSH2 0x003b\n57 = JUMPI\n80 = DUP1\n63 6057361d = PUSH4 0x6057361d\n14 = EQ\n61 0059 = PUSH2 0x0059\n57 = JUMPI\n")),(0,l.kt)("p",null,"PUSH1 \u306f 1byte \u306e\u30c7\u30fc\u30bf\u3092\u30b9\u30bf\u30c3\u30af\u3078\u5165\u308c\u308b\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u3046\u3059\u308b\u3068\u3001\u30b9\u30bf\u30c3\u30af\u306f\u3053\u3046\u306a\u308b"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH1 0x00 | 0 |\n")),(0,l.kt)("p",null,"\u7d9a\u3044\u3066 CALLDATALOAD \u306f\u6700\u521d\u306e stack(0)\u306e\u5024\u3092\u30dd\u30c3\u30d7\u3055\u305b\u308b\u3002\u3053\u306e 0 \u5024\u3092 input \u3068\u3057\u3066\u4f7f\u7528\u3057\u3001offset \u3068\u3057\u3066\u4f7f\u3046\u3002\u30b9\u30bf\u30c3\u30af\u30a2\u30a4\u30c6\u30e0\u306e\u30b5\u30a4\u30ba\u306f 32bytes \u306a\u306e\u306b\u5bfe\u3057\u3001\u4eca\u56de\u306e calldata \u306f 36bytes \u306b\u306a\u3063\u3066\u3044\u308b\u3002\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u306f msg.data","[i : i+32]","\u3067\u3001i \u306f\u4eca\u56de\u306e input \u5024\u3068\u306a\u308b\u3002\u3053\u308c\u306f\u6bce\u56de\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u304c 32bytes \u306b\u306a\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3067\u304d\u308b\u3002\u540c\u6642\u306b\u3001\u3069\u306e\u90e8\u5206\u306b\u3082\u30a2\u30af\u30bb\u30eb\u3067\u304d\u308b\u3002"),(0,l.kt)("p",null,"\u4eca\u56de\u306e\u5834\u5408\u3001offset \u306f\u306a\u304b\u3063\u305f\u306e\u3067\u300132bytes \u306e calldata \u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u306b push \u3057\u305f\u3002\u3055\u304d\u307b\u3069\u7528\u610f\u3057\u305f calldata \u306f\u3053\u308c\u3002\u3084\u3063\u3068\u51fa\u756a\u304c\u304d\u305f\u3002"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"0x6057361d000000000000000000000000000000000000000000000000000000000000000a"),"\u3002"),(0,l.kt)("p",null,"\u3068\u3044\u3046\u306e\u306f\u3001\u6700\u5f8c\u306e",(0,l.kt)("inlineCode",{parentName:"p"},"0000000a"),"\u304c\u9664\u5916\u3055\u308c\u305f 32bytes \u304c\u4eca\u56de\u306e\u5165\u529b\u3068\u306a\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"CALLDATALOAD | 0x6057361d0...00 |\n")),(0,l.kt)("p",null,"\u6b21\u306b PUSH1 \u3092\u4f7f\u3063\u3066 hex value \u306e 0xe0 \u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3002\u3053\u308c\u306f\u5341\u9032\u6570\u3060\u3068 224\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH1 0xe0 | 224 |\n | 0x6057361d0...00 |\n")),(0,l.kt)("p",null,"SHR \u3092\u4f7f\u3063\u3066\u30e9\u30a4\u30c8\u30b7\u30d5\u30c8\u3055\u305b\u308b\u3002\u4eca\u56de\u306f\u6700\u521d\u306e\u30a2\u30a4\u30c6\u30e0\u3067\u3042\u308b 224 \u3092\u53d6\u308a\u51fa\u3057\u3001input \u3068\u3057\u3066\u6271\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u4e8c\u756a\u76ee\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u3069\u308c\u304f\u3089\u3044\u53f3\u3078\u30e9\u30a4\u30c8\u30b7\u30d5\u30c8\u3055\u305b\u308b\u304b\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u3002256 - 244 = 32 bit \u3068\u308f\u304b\u308b\u3088\u3046\u306b\u3001\u6700\u5f8c\u306b\u306f 4bytes \u306e\u30bb\u30ec\u30af\u30bf\u304c call stack \u306b\u6b8b\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"SHR | 0x6057361d |\n")),(0,l.kt)("p",null,"DUP1 \u3092\u4f7f\u3063\u3066\u30b9\u30bf\u30c3\u30af\u306e\u4e00\u756a\u4e0a\u306e\u5024\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"DUP1 | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"PUSH4 \u3092\u4f7f\u3063\u3066 4byte \u306e\u95a2\u6570\u306e\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306e",(0,l.kt)("inlineCode",{parentName:"p"},"retrieve()")," (0x2e64cec1) \u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH4 0x2e64cec1 | 0x2e64cec1 |\n | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"EQ \u306f\u4e8c\u500b\u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u304b\u3089\u51fa\u3057\u3001\u30a4\u30b3\u30fc\u30eb\u306a\u306e\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\u3082\u3057\u30a4\u30b3\u30fc\u30eb\u306a\u3089 1\uff08true\uff09 \u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3001\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f 0\uff08false\uff09 \u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"EQ | 0 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"\u6b21\u306b PUSH2 \u3092\u4f7f\u3063\u3066\u4e8c\u500b\u306e\u5024\u3092\u30d7\u30c3\u30b7\u30e5\u3002\uff080x003b, \u5341\u9032\u6570\u3060\u3068 59\uff09"),(0,l.kt)("p",null,"\u3053\u3053\u3067\u306f\u300159 \u304c\u51fa\u305f\u306e\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u304c\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306b\u6b21\u306e\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u306f\u3069\u3053\u306b\u3042\u308b\u306e\u304b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b\u304b\u3089\u3002\u3053\u306e 59 \u306f retrieve()\u304c\u30b9\u30bf\u30fc\u30c8\u5730\u70b9\u306f 59 \u3092\u610f\u5473\u3057\u3066\u3044\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH2 0x003b | 59 |\n | 0 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"JUMPI \u306f\u201djump if\u201d\u3092\u610f\u5473\u3059\u308b\u3002\u4e8c\u500b\u306e\u5024\u3092\u30dd\u30c3\u30d7\u3055\u305b\u3001\u4e00\u500b\u76ee\u306e\u5024\u306f 59 \u3067\u3001\u4e8c\u500b\u76ee\u306f 0\u3002\u4e8c\u500b\u76ee\u306e\u5024\u306f bool \u5024\u3067\u3053\u306e jump \u3092\u5b9f\u884c\u3059\u3079\u304d\u304b\u3092\u78ba\u5b9a\u3057\u3066\u3044\u308b\u30021 = true, 0 = false\u3002"),(0,l.kt)("p",null,"\u3082\u3057 true \u306e\u5834\u5408\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u306f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u5b9f\u884c\u306f\u305d\u3061\u3089\u3078 jump \u3059\u308b\u3002\u4eca\u56de\u306f false \u306a\u306e\u3067\u3001\u30b9\u30ad\u30c3\u30d7\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"JUMPI | 0x6057361d |\n")),(0,l.kt)("p",null,"DUP1 again"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"DUP1 | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"PUSH4 \u306f 4byte \u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH4 0x6057361d | 0x6057361d |\n | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"\u307e\u305f EQ \u3057\u3066\u3001\u4eca\u56de\u306f true \u306a\u306e\u3067\u3002\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u304c\u5408\u3063\u305f\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"EQ | 1 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"JUMPI\u3001\u4eca\u56de\u306f true \u306a\u3093\u3067 jump \u3092\u5b9f\u884c\u3059\u308b\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u306f 89 \u3067\u3001\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u9055\u3046\u5834\u6240\u3078\u79fb\u52d5\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH2 0x0059 | 89 |\n | 1 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"\u3053\u306e\u5834\u6240\u306b JUMPDEST \u30aa\u30da\u30b3\u30fc\u30c9\u304c\u3042\u308b\u3002\u3053\u308c\u304c\u306a\u3044\u3068\u5931\u6557\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"JUMPI | 0x6057361d |\n")),(0,l.kt)("p",null,"\u305d\u3053\u3067\u7d42\u308f\u308a\u3002\u3053\u308c\u3067\u30aa\u30da\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u306f",(0,l.kt)("inlineCode",{parentName:"p"},"store(uint156)"),"\u306e\u5834\u6240\u3078\u79fb\u52d5\u3067\u304d\u305f\u3002"),(0,l.kt)("p",null,"\u4eca\u56de\u306f\u4e8c\u500b\u306e\u95a2\u6570\u3057\u304b\u306a\u3044\u3082\u306e\u306e\u3001\u305f\u3068\u3048 20 \u500b\u306e\u95a2\u6570\u304c\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u30d7\u30ed\u30bb\u30b9\u306f\u4e00\u7dd2\u3002"),(0,l.kt)("p",null,"\u3053\u306e",(0,l.kt)("a",{parentName:"p",href:"https://www.evm.codes/playground?unit=Wei&callData=0x6057361d000000000000000000000000000000000000000000000000000000000000000a&codeType=Mnemonic&code=%27%210%7E0KCALLDATALOAD%7E2z2qw%21E0%7E3KSHR%7E5z2qwDUP1%7E6%28X4_2E64CEC1%7E7KEQ%7E12z5qwX2_3B%7E13%28*I%7E16z3qwDUP1%7E17KX4_6057361D%7E18KEQ%7E23z5qwX2_59%7E24K*I%7E27z3qwkY+wX30_0%7E28KwZGV59z31q%211%7E60+%7BG%7DW%7DKwkYwX26_0%7E62z2qKZstore%7Buint256V89z27q%210+ZContinueW.KK%27%7E+ZOffset+z+%7Bprevious+instruFoccupies+w%5Cnq%29s%7DwkZThes-ar-just+paddingNenabl-usNgetN_+0xZ%2F%2F+Yprogram+counter+59+%26+89XPUSHW+funFexecution...V%7D%29codew*DEST%7EN+to%28wwGretrieve%7BFction+-e+*JUMP%29+byte%28+K%21X1_%01%21%28%29*-FGKNVWXYZ_kqwz%7E_&fork=merge"},"\u30ea\u30f3\u30af"),"\u306f\u975e\u5e38\u306b\u304a\u3059\u3059\u3081\u3002\u89e6\u3063\u3066\u307f\u308b\u3068\u5409\u3002"),(0,l.kt)("p",null,"EVM \u306e\u30b9\u30bf\u30c3\u30af\u30fb\u30e1\u30e2\u30ea\u30fb\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u3066\u304f\u308c\u308b\u3002"),(0,l.kt)("h2",{id:"reference"},"Reference"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy"},"EVM Deep Dives: The Path to Shadowy Super Coder \ud83e\udd77 \ud83d\udcbb - Part 1")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/9f6838dd.30a98e63.js b/assets/js/9f6838dd.30a98e63.js new file mode 100644 index 00000000..cecde098 --- /dev/null +++ b/assets/js/9f6838dd.30a98e63.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[3675],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>k});var r=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var u=r.createContext({}),i=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},c=function(e){var t=i(e.components);return r.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},s=r.forwardRef((function(e,t){var n=e.components,l=e.mdxType,a=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),s=i(n),k=l,m=s["".concat(u,".").concat(k)]||s[k]||d[k]||a;return n?r.createElement(m,p(p({ref:t},c),{},{components:n})):r.createElement(m,p({ref:t},c))}));function k(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var a=n.length,p=new Array(a);p[0]=s;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:l,p[1]=o;for(var i=2;i{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>i});var r=n(7462),l=(n(7294),n(3905));const a={slug:"EVM-deep-dive-part1",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",tags:["EVM","opcode","Etheruem","blockchain","examples"]},p=void 0,o={permalink:"/blog/EVM-deep-dive-part1",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md",source:"@site/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",description:"Hello, everybody!",date:"2023-02-26T00:00:00.000Z",formattedDate:"2023\u5e742\u670826\u65e5",tags:[{label:"EVM",permalink:"/blog/tags/evm"},{label:"opcode",permalink:"/blog/tags/opcode"},{label:"Etheruem",permalink:"/blog/tags/etheruem"},{label:"blockchain",permalink:"/blog/tags/blockchain"},{label:"examples",permalink:"/blog/tags/examples"}],readingTime:3.734,hasTruncateMarker:!1,authors:[{name:"Thurendous",title:"Think borderlessly",url:"https://github.com/thurendous",imageURL:"https://github.com/thurendous.png",key:"Thurendous"}],frontMatter:{slug:"EVM-deep-dive-part1",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",tags:["EVM","opcode","Etheruem","blockchain","examples"]},prevItem:{title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",permalink:"/blog/EVM-deep-dive-part2"},nextItem:{title:"CEI\u3068\u306f : Checks Effects Interactions",permalink:"/blog/checks-effects-interactions"}},u={authorsImageUrls:[void 0]},i=[{value:"\u57fa\u790e\uff1aSolidity \u2192 Bytecode \u2192 Opcode",id:"\u57fa\u790esolidity--bytecode--opcode",level:2},{value:"1_Storage.sol \u30b3\u30f3\u30c8\u30e9\u30af\u30c8",id:"1_storagesol-\u30b3\u30f3\u30c8\u30e9\u30af\u30c8",level:2},{value:"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084 Calldata",id:"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084-calldata",level:2},{value:"\u30aa\u30da\u30b3\u30fc\u30c9\uff06\u30b9\u30bf\u30c3\u30af",id:"\u30aa\u30da\u30b3\u30fc\u30c9\u30b9\u30bf\u30c3\u30af",level:2},{value:"Reference",id:"reference",level:2}],c={toc:i};function d(e){let{components:t,...n}=e;return(0,l.kt)("wrapper",(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Hello, everybody!"),(0,l.kt)("p",null,"First Principle \u3068\u3044\u3046\u8a00\u8449\u3092\u8033\u306b\u3055\u308c\u305f\u3053\u3068\u306f\u306a\u3044\u3060\u308d\u3046\u304b\u3002\u305d\u308c\u306f\u5965\u6df1\u304f\u7269\u4e8b\u306e\u57fa\u790e\u3092\u7406\u89e3\u3057\u305f\u4e0a\u3067\u3001\u3088\u308a\u3088\u3044\u767a\u60f3\u3092\u751f\u307e\u308c\u308b\u3053\u3068\u3068\u3044\u3046\u6982\u5ff5\u3060\u3002"),(0,l.kt)("p",null,"\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u4e16\u754c\u3067\u306f\u3001EVM \u3068\u305d\u306e\u5468\u308a\u306b\u3042\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u95a2\u3057\u3066\u306f\u3001\u307e\u3055\u306b\u3053\u306e First Principle \u3067\u3042\u308b\u3002Solidity \u3042\u308b\u3044\u306f\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u3053\u306e\u57fa\u790e\u306e\u4e0a\u306b\u4f5c\u308b\u69cb\u9020\u7269\u306a\u306e\u3067\u3001EVM \u306e\u3053\u3068\u3092\u7406\u89e3\u305b\u305a\u306b\u306f\u3088\u3044 solidity dev \u3068\u79f0\u3059\u308b\u306b\u306f\u307e\u3060\u65e9\u3044\u3068\u8a00\u3063\u3066\u3088\u3044\u3060\u308d\u3046\u3002"),(0,l.kt)("h2",{id:"\u57fa\u790esolidity--bytecode--opcode"},"\u57fa\u790e\uff1aSolidity \u2192 Bytecode \u2192 Opcode"),(0,l.kt)("p",null,"\u307e\u305a\u3001\u57fa\u790e\u7684\u306a\u90e8\u5206\u306b\u3064\u3044\u3066\u4e00\u5b9a\u7a0b\u5ea6\u306e\u77e5\u8b58\u3092\u6709\u3059\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u308b\u3002"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u304a\u3055\u3089\u3044\uff1a",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Bytecode & ABI: \u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u306f EVM \u4e0a\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u30b3\u30fc\u30c9\u3067\u3001ABI \u3068\u306f\u3053\u306e EVM \u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u3084\u308a\u53d6\u308a\u304c\u3067\u304d\u308b\u305f\u3081\u306e interface\u3002"),(0,l.kt)("li",{parentName:"ul"},"Solidity \u30b3\u30fc\u30c9\u306f\u307e\u305a\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3078\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304b\u3089\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3078\u4e57\u305b\u308b\u3068\u3044\u3046\u6d41\u308c\u306b\u306a\u308b\u3002\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u5b9f\u306f\u8272\u3005\u306a\u30aa\u30da\u30b3\u30fc\u30c9\u3092\u610f\u5473\u3057\u3066\u3044\u308b\u3002")))),(0,l.kt)("p",null,"\u4eca\u56de\u306f\u57fa\u672c\u7684\u306a solidity \u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u3064\u3044\u3066\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u4e00\u90e8\u3092\u4e00\u7dd2\u306b\u307f\u3066\u3044\u304d\u3001EVM \u304c\u3069\u306e\u3088\u3046\u306b\u95a2\u6570\u3092\u9078\u3093\u3067\u3044\u308b\u304b\u3092\u898b\u3088\u3046\u3002"),(0,l.kt)("p",null,"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304b\u3089\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u305f\u3082\u306e\u3067\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u306f\u3044\u304f\u3064\u304b\u3082\u306e\u95a2\u6570\u304c\u3042\u308b\u3060\u308d\u3046\u3002"),(0,l.kt)("p",null,"\u3088\u304f\u3042\u308b\u8cea\u554f\u306f\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u305f\u5f8c\u3001EVM \u306f\u3069\u306e\u3088\u3046\u306b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u3069\u306e\u90e8\u5206\u3092\u5b9f\u884c\u3059\u3079\u304d\u304b\u304c\u308f\u304b\u3063\u305f\u306e\u304b\u3068\u3044\u3046\u306e\u304c\u3042\u308b\u3002"),(0,l.kt)("h2",{id:"1_storagesol-\u30b3\u30f3\u30c8\u30e9\u30af\u30c8"},"1_Storage.sol \u30b3\u30f3\u30c8\u30e9\u30af\u30c8"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-solidity"},"pragma solidity >=0.7.0 <0.9.0;\n\ncontract Storage {\n uint256 number;\n\n function store(uint256 num) public {\n number = num;\n }\n\n function retrieve() public view returns (uint256) {\n return number;\n }\n}\n")),(0,l.kt)("p",null,"\u4eca\u56de\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u4e0a\u8a18\u306e\u3082\u306e\u3068\u306a\u308b\u3002\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u306f\u4e8c\u500b\u306e\u95a2\u6570\u304c\u3042\u308b\u3002",(0,l.kt)("inlineCode",{parentName:"p"},"store()"),"\u3068 ",(0,l.kt)("inlineCode",{parentName:"p"},"retrieve()"),"\u3002"),(0,l.kt)("p",null,"runtime \u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033\n")),(0,l.kt)("p",null,"\u4eca\u56de\u30d5\u30a9\u30fc\u30ab\u30b9\u3059\u308b\u306e\u306f\u4ee5\u4e0b\u306e\u90e8\u5206\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"60003560e01c80632e64cec11461003b5780636057361d1461005957\n")),(0,l.kt)("p",null,"\u3053\u306e\u90e8\u5206\u306f\u5168\u4f53\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u304b\u3089\u629c\u304d\u53d6\u3063\u305f\u3082\u306e\u3002"),(0,l.kt)("p",null,"\u95a2\u6570\u306e\u30bb\u30ec\u30af\u30bf\u306e\u30ed\u30b8\u30c3\u30af\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3002"),(0,l.kt)("p",null,"\u8a00\u3044\u9045\u308c\u305f\u304c\u3001EVM \u306e\u30aa\u30da\u30b3\u30fc\u30c9\u306b\u95a2\u3057\u3066\u306f\u3001",(0,l.kt)("a",{parentName:"p",href:"https://www.ethervm.io/"},"\u3053\u3053"),"\u304b\u3089\u78ba\u8a8d\u3067\u304d\u308b\u3002"),(0,l.kt)("p",null,"\u30aa\u30da\u30b3\u30fc\u30c9\u306f 1 byte \u306e\u9577\u3055\u306b\u306a\u308b\u3002\u305d\u3046\u3059\u308b\u3068\u81ea\u7136\u306b 256 \u30d1\u30bf\u30fc\u30f3\u304c\u3042\u308b\u3068\u5206\u308b\u3068\u601d\u3046\u3002"),(0,l.kt)("p",null,"\u3057\u304b\u3057\u3001\u5b9f\u969b\u306b\u306f 140 \u500b\u306e\u30aa\u30da\u30b3\u30fc\u30c9\u3057\u304b\u5b58\u5728\u3057\u306a\u3044\u3002"),(0,l.kt)("p",null,"\u4ee5\u4e0b\u306f\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u95a2\u4fc2\u3059\u308b\u30aa\u30da\u30b3\u30fc\u30c9\u3078\u5909\u63db\u3057\u305f\u3082\u306e\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"60 00 = PUSH1 0x00\n35 = CALLDATALOAD\n60 e0 = PUSH1 0xe0\n1c = SHR\n80 = DUP1\n63 2e64cec1 = PUSH4 0x2e64cec1\n14 = EQ\n61 003b = PUSH2 0x003b\n57 = JUMPI\n80 = DUP1\n63 6057361d = PUSH4 0x6057361d\n14 = EQ\n61 0059 = PUSH2 0x0059\n57 = JUMPI\n")),(0,l.kt)("h2",{id:"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084-calldata"},"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084 Calldata"),(0,l.kt)("p",null,"\u30aa\u30da\u30b3\u30fc\u30c9\u3078\u30c0\u30a4\u30d6\u3059\u308b\u524d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u306b\u3064\u3044\u3066\u5fa9\u7fd2\u3057\u3088\u3046\u3002"),(0,l.kt)("p",null,"\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u306e\u524d\u306b\u3001calldata \u306b\u3001\u95a2\u6570\u306e\u7f72\u540d\u3001\u305d\u3057\u3066\u7d9a\u3044\u3066\u5f15\u6570\u3082\u5165\u308c\u308b\u3002"),(0,l.kt)("p",null,"Solidity \u306e\u30b3\u30fc\u30c9\u306b\u8868\u73fe\u3057\u3066\u3082\u3089\u3046\u3068\u3001\u3053\u3046\u306a\u308b\u3060\u308d\u3046\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-solidity"},"event FunctionCalldata(bytes);\nbytes memory functionCalldata = abi.encodeWithSignature('store(uint256)', 10);\nemit FunctionCalldata(functionCalldata);\naddress(storageContract).call(functionCalldata);\n")),(0,l.kt)("p",null,"\u4eca\u56de\u306e\u5834\u5408\u3001\u50d5\u306f store \u95a2\u6570\u3092\u547c\u3073\u300110 \u5f15\u6570\u3068\u3057\u3066\u4ee3\u5165\u3057\u305f\u3044\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-solidity"},"0x6057361d000000000000000000000000000000000000000000000000000000000000000a\n")),(0,l.kt)("p",null,"\u4e0a\u306e\u9577\u3044\u6570\u5b57\u306e\u914d\u5217\u306f abi.encodeWithSignature(\u201dstore(uint256)\u201d,10)\u306e\u7d50\u679c\u3002"),(0,l.kt)("p",null,"\u95a2\u6570\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306f\uff14\u30d0\u30a4\u30c8\u306e Keccak \u30cf\u30c3\u30b7\u30e5\u5024\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u300c0x6057361d\u300d\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"keccak256(\u201cstore(uint256)\u201d) \u2192 first 4 bytes = 6057361d\n\nkeccak256(\u201cretrieve()\u201d) \u2192 first 4 bytes = 2e64cec1\n")),(0,l.kt)("p",null,"\u5148\u7a0b\u306e calldata \u3092\u898b\u308b\u3068\u3001\u5168\u90e8\u3067 36bytes \u3042\u3063\u305f\u3002\u6700\u521d\u306e 4bytes: ",(0,l.kt)("inlineCode",{parentName:"p"},"6057361d"),"\u306f\u95a2\u6570\u306e\u30bb\u30ec\u30af\u30bf\u95a2\u9023\u3067\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"store(uint256)"),"\u3068\u95a2\u4fc2\u3059\u308b\u3002"),(0,l.kt)("p",null,"\u3054\u81ea\u8eab\u3067\u306f\u30c3\u30b7\u30e5\u3057\u3066\u307f\u3066 \u2192",(0,l.kt)("a",{parentName:"p",href:"https://emn178.github.io/online-tools/keccak_256.html"},"\u3053\u3053")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"6057361d = function signature (4 bytes)\n\n000000000000000000000000000000000000000000000000000000000000000a = uint256 input (32 bytes)\n")),(0,l.kt)("p",null,"\u4ee5\u4e0a\u3001calldata \u306e\u6e96\u5099\u3060\u3063\u305f\u3002"),(0,l.kt)("h2",{id:"\u30aa\u30da\u30b3\u30fc\u30c9\u30b9\u30bf\u30c3\u30af"},"\u30aa\u30da\u30b3\u30fc\u30c9\uff06\u30b9\u30bf\u30c3\u30af"),(0,l.kt)("p",null,"\u305d\u308c\u3067\u306f\u3001EVM \u30ec\u30d9\u30eb\u3078\u30c0\u30a4\u30d6\u3057\u3066\u3044\u3053\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002\u308f\u304b\u3089\u306a\u3044\u5834\u5408\u306f",(0,l.kt)("a",{parentName:"p",href:"https://www.youtube.com/watch?v=FNZ5o9S9prU"},"\u3053\u308c"),"\u3092\u898b\u3066\u3002"),(0,l.kt)("p",null,"\u5148\u7a0b\u306e\u30aa\u30da\u30b3\u30fc\u30c9\u306f\u3053\u308c\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"60 00 = PUSH1 0x00\n35 = CALLDATALOAD\n60 e0 = PUSH1 0xe0\n1c = SHR\n80 = DUP1\n63 2e64cec1 = PUSH4 0x2e64cec1\n14 = EQ\n61 003b = PUSH2 0x003b\n57 = JUMPI\n80 = DUP1\n63 6057361d = PUSH4 0x6057361d\n14 = EQ\n61 0059 = PUSH2 0x0059\n57 = JUMPI\n")),(0,l.kt)("p",null,"PUSH1 \u306f 1byte \u306e\u30c7\u30fc\u30bf\u3092\u30b9\u30bf\u30c3\u30af\u3078\u5165\u308c\u308b\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u3046\u3059\u308b\u3068\u3001\u30b9\u30bf\u30c3\u30af\u306f\u3053\u3046\u306a\u308b"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH1 0x00 | 0 |\n")),(0,l.kt)("p",null,"\u7d9a\u3044\u3066 CALLDATALOAD \u306f\u6700\u521d\u306e stack(0)\u306e\u5024\u3092\u30dd\u30c3\u30d7\u3055\u305b\u308b\u3002\u3053\u306e 0 \u5024\u3092 input \u3068\u3057\u3066\u4f7f\u7528\u3057\u3001offset \u3068\u3057\u3066\u4f7f\u3046\u3002\u30b9\u30bf\u30c3\u30af\u30a2\u30a4\u30c6\u30e0\u306e\u30b5\u30a4\u30ba\u306f 32bytes \u306a\u306e\u306b\u5bfe\u3057\u3001\u4eca\u56de\u306e calldata \u306f 36bytes \u306b\u306a\u3063\u3066\u3044\u308b\u3002\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u306f msg.data","[i : i+32]","\u3067\u3001i \u306f\u4eca\u56de\u306e input \u5024\u3068\u306a\u308b\u3002\u3053\u308c\u306f\u6bce\u56de\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u304c 32bytes \u306b\u306a\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3067\u304d\u308b\u3002\u540c\u6642\u306b\u3001\u3069\u306e\u90e8\u5206\u306b\u3082\u30a2\u30af\u30bb\u30eb\u3067\u304d\u308b\u3002"),(0,l.kt)("p",null,"\u4eca\u56de\u306e\u5834\u5408\u3001offset \u306f\u306a\u304b\u3063\u305f\u306e\u3067\u300132bytes \u306e calldata \u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u306b push \u3057\u305f\u3002\u3055\u304d\u307b\u3069\u7528\u610f\u3057\u305f calldata \u306f\u3053\u308c\u3002\u3084\u3063\u3068\u51fa\u756a\u304c\u304d\u305f\u3002"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"0x6057361d000000000000000000000000000000000000000000000000000000000000000a"),"\u3002"),(0,l.kt)("p",null,"\u3068\u3044\u3046\u306e\u306f\u3001\u6700\u5f8c\u306e",(0,l.kt)("inlineCode",{parentName:"p"},"0000000a"),"\u304c\u9664\u5916\u3055\u308c\u305f 32bytes \u304c\u4eca\u56de\u306e\u5165\u529b\u3068\u306a\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"CALLDATALOAD | 0x6057361d0...00 |\n")),(0,l.kt)("p",null,"\u6b21\u306b PUSH1 \u3092\u4f7f\u3063\u3066 hex value \u306e 0xe0 \u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3002\u3053\u308c\u306f\u5341\u9032\u6570\u3060\u3068 224\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH1 0xe0 | 224 |\n | 0x6057361d0...00 |\n")),(0,l.kt)("p",null,"SHR \u3092\u4f7f\u3063\u3066\u30e9\u30a4\u30c8\u30b7\u30d5\u30c8\u3055\u305b\u308b\u3002\u4eca\u56de\u306f\u6700\u521d\u306e\u30a2\u30a4\u30c6\u30e0\u3067\u3042\u308b 224 \u3092\u53d6\u308a\u51fa\u3057\u3001input \u3068\u3057\u3066\u6271\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u4e8c\u756a\u76ee\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u3069\u308c\u304f\u3089\u3044\u53f3\u3078\u30e9\u30a4\u30c8\u30b7\u30d5\u30c8\u3055\u305b\u308b\u304b\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u3002256 - 244 = 32 bit \u3068\u308f\u304b\u308b\u3088\u3046\u306b\u3001\u6700\u5f8c\u306b\u306f 4bytes \u306e\u30bb\u30ec\u30af\u30bf\u304c call stack \u306b\u6b8b\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"SHR | 0x6057361d |\n")),(0,l.kt)("p",null,"DUP1 \u3092\u4f7f\u3063\u3066\u30b9\u30bf\u30c3\u30af\u306e\u4e00\u756a\u4e0a\u306e\u5024\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"DUP1 | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"PUSH4 \u3092\u4f7f\u3063\u3066 4byte \u306e\u95a2\u6570\u306e\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306e",(0,l.kt)("inlineCode",{parentName:"p"},"retrieve()")," (0x2e64cec1) \u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH4 0x2e64cec1 | 0x2e64cec1 |\n | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"EQ \u306f\u4e8c\u500b\u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u304b\u3089\u51fa\u3057\u3001\u30a4\u30b3\u30fc\u30eb\u306a\u306e\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\u3082\u3057\u30a4\u30b3\u30fc\u30eb\u306a\u3089 1\uff08true\uff09 \u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3001\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f 0\uff08false\uff09 \u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"EQ | 0 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"\u6b21\u306b PUSH2 \u3092\u4f7f\u3063\u3066\u4e8c\u500b\u306e\u5024\u3092\u30d7\u30c3\u30b7\u30e5\u3002\uff080x003b, \u5341\u9032\u6570\u3060\u3068 59\uff09"),(0,l.kt)("p",null,"\u3053\u3053\u3067\u306f\u300159 \u304c\u51fa\u305f\u306e\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u304c\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306b\u6b21\u306e\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u306f\u3069\u3053\u306b\u3042\u308b\u306e\u304b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b\u304b\u3089\u3002\u3053\u306e 59 \u306f retrieve()\u304c\u30b9\u30bf\u30fc\u30c8\u5730\u70b9\u306f 59 \u3092\u610f\u5473\u3057\u3066\u3044\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH2 0x003b | 59 |\n | 0 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"JUMPI \u306f\u201djump if\u201d\u3092\u610f\u5473\u3059\u308b\u3002\u4e8c\u500b\u306e\u5024\u3092\u30dd\u30c3\u30d7\u3055\u305b\u3001\u4e00\u500b\u76ee\u306e\u5024\u306f 59 \u3067\u3001\u4e8c\u500b\u76ee\u306f 0\u3002\u4e8c\u500b\u76ee\u306e\u5024\u306f bool \u5024\u3067\u3053\u306e jump \u3092\u5b9f\u884c\u3059\u3079\u304d\u304b\u3092\u78ba\u5b9a\u3057\u3066\u3044\u308b\u30021 = true, 0 = false\u3002"),(0,l.kt)("p",null,"\u3082\u3057 true \u306e\u5834\u5408\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u306f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u5b9f\u884c\u306f\u305d\u3061\u3089\u3078 jump \u3059\u308b\u3002\u4eca\u56de\u306f false \u306a\u306e\u3067\u3001\u30b9\u30ad\u30c3\u30d7\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"JUMPI | 0x6057361d |\n")),(0,l.kt)("p",null,"DUP1 again"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"DUP1 | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"PUSH4 \u306f 4byte \u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH4 0x6057361d | 0x6057361d |\n | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"\u307e\u305f EQ \u3057\u3066\u3001\u4eca\u56de\u306f true \u306a\u306e\u3067\u3002\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u304c\u5408\u3063\u305f\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"EQ | 1 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"JUMPI\u3001\u4eca\u56de\u306f true \u306a\u3093\u3067 jump \u3092\u5b9f\u884c\u3059\u308b\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u306f 89 \u3067\u3001\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u9055\u3046\u5834\u6240\u3078\u79fb\u52d5\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH2 0x0059 | 89 |\n | 1 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"\u3053\u306e\u5834\u6240\u306b JUMPDEST \u30aa\u30da\u30b3\u30fc\u30c9\u304c\u3042\u308b\u3002\u3053\u308c\u304c\u306a\u3044\u3068\u5931\u6557\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"JUMPI | 0x6057361d |\n")),(0,l.kt)("p",null,"\u305d\u3053\u3067\u7d42\u308f\u308a\u3002\u3053\u308c\u3067\u30aa\u30da\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u306f",(0,l.kt)("inlineCode",{parentName:"p"},"store(uint156)"),"\u306e\u5834\u6240\u3078\u79fb\u52d5\u3067\u304d\u305f\u3002"),(0,l.kt)("p",null,"\u4eca\u56de\u306f\u4e8c\u500b\u306e\u95a2\u6570\u3057\u304b\u306a\u3044\u3082\u306e\u306e\u3001\u305f\u3068\u3048 20 \u500b\u306e\u95a2\u6570\u304c\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u30d7\u30ed\u30bb\u30b9\u306f\u4e00\u7dd2\u3002"),(0,l.kt)("p",null,"\u3053\u306e",(0,l.kt)("a",{parentName:"p",href:"https://www.evm.codes/playground?unit=Wei&callData=0x6057361d000000000000000000000000000000000000000000000000000000000000000a&codeType=Mnemonic&code=%27%210%7E0KCALLDATALOAD%7E2z2qw%21E0%7E3KSHR%7E5z2qwDUP1%7E6%28X4_2E64CEC1%7E7KEQ%7E12z5qwX2_3B%7E13%28*I%7E16z3qwDUP1%7E17KX4_6057361D%7E18KEQ%7E23z5qwX2_59%7E24K*I%7E27z3qwkY+wX30_0%7E28KwZGV59z31q%211%7E60+%7BG%7DW%7DKwkYwX26_0%7E62z2qKZstore%7Buint256V89z27q%210+ZContinueW.KK%27%7E+ZOffset+z+%7Bprevious+instruFoccupies+w%5Cnq%29s%7DwkZThes-ar-just+paddingNenabl-usNgetN_+0xZ%2F%2F+Yprogram+counter+59+%26+89XPUSHW+funFexecution...V%7D%29codew*DEST%7EN+to%28wwGretrieve%7BFction+-e+*JUMP%29+byte%28+K%21X1_%01%21%28%29*-FGKNVWXYZ_kqwz%7E_&fork=merge"},"\u30ea\u30f3\u30af"),"\u306f\u975e\u5e38\u306b\u304a\u3059\u3059\u3081\u3002\u89e6\u3063\u3066\u307f\u308b\u3068\u5409\u3002"),(0,l.kt)("p",null,"EVM \u306e\u30b9\u30bf\u30c3\u30af\u30fb\u30e1\u30e2\u30ea\u30fb\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u3066\u304f\u308c\u308b\u3002"),(0,l.kt)("h2",{id:"reference"},"Reference"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy"},"EVM Deep Dives: The Path to Shadowy Super Coder \ud83e\udd77 \ud83d\udcbb - Part 1")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/a7023ddc.cd4b9faf.js b/assets/js/a7023ddc.3e2e928c.js similarity index 78% rename from assets/js/a7023ddc.cd4b9faf.js rename to assets/js/a7023ddc.3e2e928c.js index e35cf0b8..e8349f1b 100644 --- a/assets/js/a7023ddc.cd4b9faf.js +++ b/assets/js/a7023ddc.3e2e928c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[1713],{3457:l=>{l.exports=JSON.parse('[{"label":"EVM","permalink":"/blog/tags/evm","count":2},{"label":"opcode","permalink":"/blog/tags/opcode","count":3},{"label":"Etheruem","permalink":"/blog/tags/etheruem","count":5},{"label":"blockchain","permalink":"/blog/tags/blockchain","count":6},{"label":"examples","permalink":"/blog/tags/examples","count":4},{"label":"Foundry","permalink":"/blog/tags/foundry","count":1},{"label":"checks-effects-interactions","permalink":"/blog/tags/checks-effects-interactions","count":1},{"label":"hack","permalink":"/blog/tags/hack","count":1},{"label":"zero-knwoledge","permalink":"/blog/tags/zero-knwoledge","count":1},{"label":"proof","permalink":"/blog/tags/proof","count":1},{"label":"ERC1155","permalink":"/blog/tags/erc-1155","count":1},{"label":"ERC721","permalink":"/blog/tags/erc-721","count":2},{"label":"NFT","permalink":"/blog/tags/nft","count":2},{"label":"FT","permalink":"/blog/tags/ft","count":1},{"label":"solidity","permalink":"/blog/tags/solidity","count":3},{"label":"private","permalink":"/blog/tags/private","count":1},{"label":"variable","permalink":"/blog/tags/variable","count":1},{"label":"\u5909\u6570","permalink":"/blog/tags/\u5909\u6570","count":1},{"label":"\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","permalink":"/blog/tags/\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","count":4},{"label":"Web3","permalink":"/blog/tags/web-3","count":1},{"label":"about","permalink":"/blog/tags/about","count":2},{"label":"\u30af\u30ea\u30d7\u30c8","permalink":"/blog/tags/\u30af\u30ea\u30d7\u30c8","count":1},{"label":"\u672a\u6765","permalink":"/blog/tags/\u672a\u6765","count":1},{"label":"\u6b74\u53f2","permalink":"/blog/tags/\u6b74\u53f2","count":1},{"label":"\u30e1\u30bf\u30d0\u30fc\u30b9","permalink":"/blog/tags/\u30e1\u30bf\u30d0\u30fc\u30b9","count":1},{"label":"scaricity","permalink":"/blog/tags/scaricity","count":1},{"label":"\u5e0c\u5c11\u6027","permalink":"/blog/tags/\u5e0c\u5c11\u6027","count":1}]')}}]); \ No newline at end of file +"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[1713],{3457:l=>{l.exports=JSON.parse('[{"label":"Etheruem","permalink":"/blog/tags/etheruem","count":5},{"label":"blockchain","permalink":"/blog/tags/blockchain","count":6},{"label":"Foundry","permalink":"/blog/tags/foundry","count":1},{"label":"EVM","permalink":"/blog/tags/evm","count":2},{"label":"opcode","permalink":"/blog/tags/opcode","count":3},{"label":"examples","permalink":"/blog/tags/examples","count":4},{"label":"checks-effects-interactions","permalink":"/blog/tags/checks-effects-interactions","count":1},{"label":"hack","permalink":"/blog/tags/hack","count":1},{"label":"zero-knwoledge","permalink":"/blog/tags/zero-knwoledge","count":1},{"label":"proof","permalink":"/blog/tags/proof","count":1},{"label":"ERC1155","permalink":"/blog/tags/erc-1155","count":1},{"label":"ERC721","permalink":"/blog/tags/erc-721","count":2},{"label":"NFT","permalink":"/blog/tags/nft","count":2},{"label":"FT","permalink":"/blog/tags/ft","count":1},{"label":"solidity","permalink":"/blog/tags/solidity","count":3},{"label":"private","permalink":"/blog/tags/private","count":1},{"label":"variable","permalink":"/blog/tags/variable","count":1},{"label":"\u5909\u6570","permalink":"/blog/tags/\u5909\u6570","count":1},{"label":"\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","permalink":"/blog/tags/\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","count":4},{"label":"Web3","permalink":"/blog/tags/web-3","count":1},{"label":"about","permalink":"/blog/tags/about","count":2},{"label":"\u30af\u30ea\u30d7\u30c8","permalink":"/blog/tags/\u30af\u30ea\u30d7\u30c8","count":1},{"label":"\u672a\u6765","permalink":"/blog/tags/\u672a\u6765","count":1},{"label":"\u6b74\u53f2","permalink":"/blog/tags/\u6b74\u53f2","count":1},{"label":"\u30e1\u30bf\u30d0\u30fc\u30b9","permalink":"/blog/tags/\u30e1\u30bf\u30d0\u30fc\u30b9","count":1},{"label":"scaricity","permalink":"/blog/tags/scaricity","count":1},{"label":"\u5e0c\u5c11\u6027","permalink":"/blog/tags/\u5e0c\u5c11\u6027","count":1}]')}}]); \ No newline at end of file diff --git a/assets/js/b204a312.fd0aedfe.js b/assets/js/b204a312.fd0aedfe.js deleted file mode 100644 index 86f2b7b0..00000000 --- a/assets/js/b204a312.fd0aedfe.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[2041],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>d});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),f=u(r),d=a,m=f["".concat(s,".").concat(d)]||f[d]||c[d]||o;return r?n.createElement(m,l(l({ref:t},p),{},{components:r})):n.createElement(m,l({ref:t},p))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=f;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var u=2;u{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var n=r(7462),a=(r(7294),r(3905));const o={slug:"What is SafeERC20",title:"SafeERC20\u3068\u306f",authors:["Thurendous"],blogDescription:"Foundry\u306e\u4f7f\u3044\u65b9\u5165\u9580",tags:["Etheruem","blockchain","Foundry"]},l=void 0,i={permalink:"/blog/What is SafeERC20",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/2023-8-12-What-is-safeERC20/2023-2-26-EVM-deep-dive-part1.md",source:"@site/blog/2023-8-12-What-is-safeERC20/2023-2-26-EVM-deep-dive-part1.md",title:"SafeERC20\u3068\u306f",description:"Hello! Everybody!",date:"2023-02-26T00:00:00.000Z",formattedDate:"2023\u5e742\u670826\u65e5",tags:[{label:"Etheruem",permalink:"/blog/tags/etheruem"},{label:"blockchain",permalink:"/blog/tags/blockchain"},{label:"Foundry",permalink:"/blog/tags/foundry"}],readingTime:1.076,hasTruncateMarker:!1,authors:[{name:"Thurendous",title:"Think borderlessly",url:"https://github.com/thurendous",imageURL:"https://github.com/thurendous.png",key:"Thurendous"}],frontMatter:{slug:"What is SafeERC20",title:"SafeERC20\u3068\u306f",authors:["Thurendous"],blogDescription:"Foundry\u306e\u4f7f\u3044\u65b9\u5165\u9580",tags:["Etheruem","blockchain","Foundry"]},prevItem:{title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",permalink:"/blog/EVM-deep-dive-part2"},nextItem:{title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",permalink:"/blog/EVM-deep-dive-part1"}},s={authorsImageUrls:[void 0]},u=[{value:"Reference",id:"reference",level:2}],p={toc:u};function c(e){let{components:t,...r}=e;return(0,a.kt)("wrapper",(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Hello! Everybody!"),(0,a.kt)("h1",{id:"safeerc20-\u306e\u4f7f\u3044\u65b9---what-is-and-how-to-use-safeerc20"},(0,a.kt)("inlineCode",{parentName:"h1"},"SafeERC20")," \u306e\u4f7f\u3044\u65b9 - What is and how to use ",(0,a.kt)("inlineCode",{parentName:"h1"},"SafeERC20")),(0,a.kt)("p",null,"OpenZeppelin \u306e SafeERC20 \u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u8da3\u65e8\u306f\u3001ERC20 \u30c8\u30fc\u30af\u30f3\u306b\u306f\u57fa\u6e96\u304c\u3042\u308b\u3082\u306e\u306e\u3001\u57fa\u6e96\u306b\u6cbf\u3063\u3066\u3044\u306a\u3044\u6709\u540d\u306a\u30c8\u30fc\u30af\u30f3\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001BNB \u3084 USDT \u306f bool \u5024\u3092\u8fd4\u3055\u306a\u3044 transfer \u95a2\u6570\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u30c8\u30fc\u30af\u30f3\u3092\u6271\u3046\u3068\u304d\u306b\u3001SafeERC20 \u3092\u4f7f\u3046\u3053\u3068\u3067\u3001bool \u5024\u3092\u8fd4\u3055\u306a\u3044\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3082\u3001\u5931\u6557\u3057\u305f\u5834\u5408\u306b\u306f revert \u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002"),(0,a.kt)("h1",{id:"\u3058\u3083\u6b63\u78ba\u306b\u4f7f\u3046\u306b\u306f"},"\u3058\u3083\u6b63\u78ba\u306b\u4f7f\u3046\u306b\u306f\uff1f"),(0,a.kt)("p",null,"SafeERC20 \u306e\u4f7f\u7528\u65b9\u6cd5\u306f\u3088\u304f\u8aa4\u89e3\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002"),(0,a.kt)("p",null,"SafeERC20 \u306f\u3001\u30c8\u30fc\u30af\u30f3\u3092\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b ERC20 \u306e\u62e1\u5f35\u3067\u306f\u3042\u308a\u307e\u305b\u3093\uff08OpenZeppelin \u306e ERC20 \u306f\u3059\u3067\u306b\u5b89\u5168\u3067\u3059\u304c\uff57\uff09\u3002\u4ed6\u4eba\u306e ERC20 \u30c8\u30fc\u30af\u30f3\u3068\u306e\u3084\u308a\u53d6\u308a\u3092\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306e\u88dc\u52a9\u6a5f\u80fd\u3067\u3059\u3002"),(0,a.kt)("p",null,"\u3053\u306e\u88dc\u52a9\u6a5f\u80fd\u304c\u884c\u3046\u3053\u3068\u306f\u3001"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"ERC20 \u64cd\u4f5c\u306e\u30d6\u30fc\u30eb\u5024\u306e\u623b\u308a\u5024\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u5931\u6557\u3057\u305f\u5834\u5408\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092 revert \u3055\u305b\u307e\u3059\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u540c\u6642\u306b\u3001\u30d6\u30fc\u30eb\u5024\u306e\u623b\u308a\u5024\u3092\u6301\u305f\u306a\u3044\u975e\u6a19\u6e96\u306e ERC20 \u30c8\u30fc\u30af\u30f3\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u3055\u3089\u306b\u3001",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729"},"\u653b\u6483")," \u3092\u7de9\u548c\u3059\u308b\u305f\u3081\u306b\u3001\u627f\u8a8d\u984d\u3092\u5897\u6e1b\u3055\u305b\u308b\u305f\u3081\u306e\u88dc\u52a9\u6a5f\u80fd\u3082\u63d0\u4f9b\u3057\u307e\u3059\u3002")),(0,a.kt)("p",null,"\u4f8b\u3068\u3057\u3066\u3001\u30c8\u30fc\u30af\u30f3\u3068\u3084\u308a\u53d6\u308a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5951\u7d04\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u305d\u308c\u306f\u3001\u4eba\u3005\u304c\u4e00\u5b9a\u306e\u4fa1\u683c\u3067\u30c8\u30fc\u30af\u30f3\u3092\u8ca9\u58f2\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3001\u5f8c\u3067\u8cfc\u5165\u8005\u304c\u305d\u308c\u3089\u304b\u3089\u8cfc\u5165\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u3044\u304f\u3064\u304b\u306e\u30c8\u30fc\u30af\u30f3\u306e\u8ee2\u9001\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u305d\u308c\u3089\u306b SafeERC20 \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002IERC20 \u306e\u578b\u306e\u5024\u3067\u5b89\u5168\u306a\u64cd\u4f5c\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u884c\u300cusing SafeERC20 for IERC20\u300d\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f8b\uff1atradingToken.safeTransferFrom\u3002"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-solidity"},"contract FixedPriceMarket {\n using SafeERC20 for IERC20;\n\n IERC20 tradingToken = 0x1234...;\n uint256 price = 128;\n\n mapping (address => uint256) selling;\n\n function sell(uint256 tokenValue) {\n tradingToken.safeTransferFrom(msg.sender, this, tokenValue);\n selling[msg.sender] = selling[msg.sender].add(tokenValue);\n }\n\n function buy(address seller, uint256 tokenValue) {\n require(msg.value == tokenValue.mul(price));\n selling[seller] = selling[seller].sub(tokenValue);\n tradingToken.safeTransfer(msg.sender, tokenValue);\n seller.transfer(msg.value);\n }\n}\n")),(0,a.kt)("h2",{id:"reference"},"Reference"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://forum.openzeppelin.com/t/safeerc20-tokentimelock-wrappers/396"},"OpenZeppelin Forum"),"\n",(0,a.kt)("a",{parentName:"p",href:"https://zenn.dev/retocrooman/articles/20768619a313ae"},"SafeERC20 \u306b\u3064\u3044\u3066")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/b2f554cd.29ac878f.js b/assets/js/b2f554cd.29ac878f.js new file mode 100644 index 00000000..ba9e07ff --- /dev/null +++ b/assets/js/b2f554cd.29ac878f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[1477],{10:n=>{n.exports=JSON.parse('{"blogPosts":[{"id":"What-is-SafeERC20","metadata":{"permalink":"/blog/What-is-SafeERC20","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/20230812About-safeERC20/2023-8-12-EVM-deep-dive-part1.md","source":"@site/blog/20230812About-safeERC20/2023-8-12-EVM-deep-dive-part1.md","title":"SafeERC20\u3068\u306f","description":"Hello! Everybody!","date":"2023-08-12T00:00:00.000Z","formattedDate":"2023\u5e748\u670812\u65e5","tags":[{"label":"Etheruem","permalink":"/blog/tags/etheruem"},{"label":"blockchain","permalink":"/blog/tags/blockchain"},{"label":"Foundry","permalink":"/blog/tags/foundry"}],"readingTime":1.076,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"}],"frontMatter":{"slug":"What-is-SafeERC20","title":"SafeERC20\u3068\u306f","authors":["Thurendous"],"blogDescription":"Foundry\u306e\u4f7f\u3044\u65b9\u5165\u9580","tags":["Etheruem","blockchain","Foundry"]},"nextItem":{"title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2","permalink":"/blog/EVM-deep-dive-part2"}},"content":"Hello! Everybody!\\n\\n# `SafeERC20` \u306e\u4f7f\u3044\u65b9 - What is and how to use `SafeERC20`\\n\\nOpenZeppelin \u306e SafeERC20 \u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u8da3\u65e8\u306f\u3001ERC20 \u30c8\u30fc\u30af\u30f3\u306b\u306f\u57fa\u6e96\u304c\u3042\u308b\u3082\u306e\u306e\u3001\u57fa\u6e96\u306b\u6cbf\u3063\u3066\u3044\u306a\u3044\u6709\u540d\u306a\u30c8\u30fc\u30af\u30f3\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001BNB \u3084 USDT \u306f bool \u5024\u3092\u8fd4\u3055\u306a\u3044 transfer \u95a2\u6570\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u30c8\u30fc\u30af\u30f3\u3092\u6271\u3046\u3068\u304d\u306b\u3001SafeERC20 \u3092\u4f7f\u3046\u3053\u3068\u3067\u3001bool \u5024\u3092\u8fd4\u3055\u306a\u3044\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3082\u3001\u5931\u6557\u3057\u305f\u5834\u5408\u306b\u306f revert \u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\\n\\n# \u3058\u3083\u6b63\u78ba\u306b\u4f7f\u3046\u306b\u306f\uff1f\\n\\nSafeERC20 \u306e\u4f7f\u7528\u65b9\u6cd5\u306f\u3088\u304f\u8aa4\u89e3\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\\n\\nSafeERC20 \u306f\u3001\u30c8\u30fc\u30af\u30f3\u3092\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b ERC20 \u306e\u62e1\u5f35\u3067\u306f\u3042\u308a\u307e\u305b\u3093\uff08OpenZeppelin \u306e ERC20 \u306f\u3059\u3067\u306b\u5b89\u5168\u3067\u3059\u304c\uff57\uff09\u3002\u4ed6\u4eba\u306e ERC20 \u30c8\u30fc\u30af\u30f3\u3068\u306e\u3084\u308a\u53d6\u308a\u3092\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306e\u88dc\u52a9\u6a5f\u80fd\u3067\u3059\u3002\\n\\n\u3053\u306e\u88dc\u52a9\u6a5f\u80fd\u304c\u884c\u3046\u3053\u3068\u306f\u3001\\n\\n- ERC20 \u64cd\u4f5c\u306e\u30d6\u30fc\u30eb\u5024\u306e\u623b\u308a\u5024\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u5931\u6557\u3057\u305f\u5834\u5408\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092 revert \u3055\u305b\u307e\u3059\u3002\\n- \u540c\u6642\u306b\u3001\u30d6\u30fc\u30eb\u5024\u306e\u623b\u308a\u5024\u3092\u6301\u305f\u306a\u3044\u975e\u6a19\u6e96\u306e ERC20 \u30c8\u30fc\u30af\u30f3\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\\n- \u3055\u3089\u306b\u3001[\u653b\u6483](https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729) \u3092\u7de9\u548c\u3059\u308b\u305f\u3081\u306b\u3001\u627f\u8a8d\u984d\u3092\u5897\u6e1b\u3055\u305b\u308b\u305f\u3081\u306e\u88dc\u52a9\u6a5f\u80fd\u3082\u63d0\u4f9b\u3057\u307e\u3059\u3002\\n\\n\u4f8b\u3068\u3057\u3066\u3001\u30c8\u30fc\u30af\u30f3\u3068\u3084\u308a\u53d6\u308a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5951\u7d04\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u305d\u308c\u306f\u3001\u4eba\u3005\u304c\u4e00\u5b9a\u306e\u4fa1\u683c\u3067\u30c8\u30fc\u30af\u30f3\u3092\u8ca9\u58f2\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3001\u5f8c\u3067\u8cfc\u5165\u8005\u304c\u305d\u308c\u3089\u304b\u3089\u8cfc\u5165\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u3044\u304f\u3064\u304b\u306e\u30c8\u30fc\u30af\u30f3\u306e\u8ee2\u9001\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u305d\u308c\u3089\u306b SafeERC20 \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002IERC20 \u306e\u578b\u306e\u5024\u3067\u5b89\u5168\u306a\u64cd\u4f5c\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u884c\u300cusing SafeERC20 for IERC20\u300d\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f8b\uff1atradingToken.safeTransferFrom\u3002\\n\\n```solidity\\ncontract FixedPriceMarket {\\n using SafeERC20 for IERC20;\\n\\n IERC20 tradingToken = 0x1234...;\\n uint256 price = 128;\\n\\n mapping (address => uint256) selling;\\n\\n function sell(uint256 tokenValue) {\\n tradingToken.safeTransferFrom(msg.sender, this, tokenValue);\\n selling[msg.sender] = selling[msg.sender].add(tokenValue);\\n }\\n\\n function buy(address seller, uint256 tokenValue) {\\n require(msg.value == tokenValue.mul(price));\\n selling[seller] = selling[seller].sub(tokenValue);\\n tradingToken.safeTransfer(msg.sender, tokenValue);\\n seller.transfer(msg.value);\\n }\\n}\\n```\\n\\n## Reference\\n\\n[OpenZeppelin Forum](https://forum.openzeppelin.com/t/safeerc20-tokentimelock-wrappers/396) \\n[SafeERC20 \u306b\u3064\u3044\u3066](https://zenn.dev/retocrooman/articles/20768619a313ae)"},{"id":"EVM-deep-dive-part2","metadata":{"permalink":"/blog/EVM-deep-dive-part2","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md","source":"@site/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md","title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2","description":"Hello, everybody!","date":"2023-05-13T00:00:00.000Z","formattedDate":"2023\u5e745\u670813\u65e5","tags":[{"label":"EVM","permalink":"/blog/tags/evm"},{"label":"opcode","permalink":"/blog/tags/opcode"},{"label":"Etheruem","permalink":"/blog/tags/etheruem"},{"label":"blockchain","permalink":"/blog/tags/blockchain"},{"label":"examples","permalink":"/blog/tags/examples"}],"readingTime":7.626,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"}],"frontMatter":{"slug":"EVM-deep-dive-part2","title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2","authors":["Thurendous"],"blogDescription":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2","tags":["EVM","opcode","Etheruem","blockchain","examples"]},"prevItem":{"title":"SafeERC20\u3068\u306f","permalink":"/blog/What-is-SafeERC20"},"nextItem":{"title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1","permalink":"/blog/EVM-deep-dive-part1"}},"content":"Hello, everybody!\\n\\n# Never Give Up\\n\\n\u4ee5\u524d\u66f8\u3044\u305f\u6642\u304b\u3089\u3001EVM \u306b\u3064\u3044\u3066\u7406\u89e3\u3067\u304d\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u3001\u5f53\u6642\u306f\u8aad\u307f\u3065\u3089\u304b\u3063\u305f\u6280\u8853\u7cfb\u306e\u6587\u7ae0\u3082\u3059\u3089\u3059\u3089\u8aad\u3081\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u305d\u3053\u3067 EVM \u306e\u3053\u3068\u3042\u308b\u3044\u306f\u4ed6\u306e\u306a\u306b\u304b\u3067\u9811\u5f35\u3063\u3066\u3044\u308b\u3042\u306a\u305f\u3082\u3082\u3057\u304b\u3057\u3066\u4f55\u304b\u304c\u3067\u304d\u305a\u306b\u60a9\u3093\u3067\u3044\u308b\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\\n\\n\u3053\u3053\u3067\u884c\u3063\u3066\u304a\u304d\u307e\u3059\u304c\u3001\u50d5\u3082\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3001\u5b89\u5fc3\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u3046\u3061\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3060\u308d\u3046\u3002\\n\\n\u3061\u306a\u307f\u306b\u3001\u3053\u3061\u3089\u306e\u753b\u50cf\u3092\u307f\u3066\u3054\u3089\u3093\u3002\\n\\n\u672c\u5f53\u306b\u7d4c\u9a13\u3057\u305f\u4eba\u3057\u304b\u308f\u304b\u3089\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3057\u3001\u7d4c\u9a13\u3057\u305f\u3068\u3057\u3066\u3082\u3082\u3046\u4e00\u5ea6\u7d4c\u9a13\u3059\u308b\u3068\u3001\u3084\u306f\u308a\u4fe1\u3058\u3089\u308c\u306a\u3044\u6c17\u6301\u3061\u306b\u306a\u308b\u3068\u601d\u3046\u3088\u306d\u3002\\n\\n\u4f55\u304c\u3069\u3046\u306a\u3063\u3066\u3082\u3001\u7d9a\u3051\u308b\u3053\u3068\u304c\u4e00\u756a\u5927\u5207\u3002\\n\\n- \u9045\u304f\u3066\u3082\u3044\u3044\\n\\n![](./0plus1is1.png)\\n\\n- \u7406\u60f3\u3068\u73fe\u5b9f\\n\\n![](./meikyuu.png)\\n\\n- \u300c\u7d9a\u3051\u3066\u3066\u3082\u610f\u5473\u306a\u3044\u300d\\n\\n![](./thisispointless.png)\\n\\n- \u6700\u521d\u306e\u7b2c\u4e00\u6b69\u304c\u4e00\u756a\u3080\u305a\u3044\u3051\u3069\u306d\\n\\n![](./keeptrying.png)\\n\\n- \u4e09\u65e5\u574a\u4e3b VS \u7d9a\u3051\u308b\\n\\n![](./keeptryingallday.png)\\n\\n---\\n\\n\u4eca\u56de\u306f\u3001\u30e1\u30e2\u30ea\u30fc\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002\\n\\nPart 1 \u3067\u306f\u3001EVM \u304c\u3069\u306e\u3088\u3046\u306b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u3069\u3053\u3092\u72d9\u3063\u3066 run \u3055\u305b\u308b\u304b\u3092\u898b\u3066\u304d\u305f\u3002 \u305d\u308c\u306f\u3001\u5916\u90e8\u306e calldata \u3092\u5165\u529b\u3057\u3066\u304d\u3066\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u3069\u306e\u95a2\u6570\u3092\u547c\u3093\u3067\u3044\u308b\u304b\u3092\u5224\u5225\u3057\u3066 run \u3059\u3079\u304d\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u7b87\u6240\u3092\u6c7a\u3081\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002\\n\\n\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u95a2\u6570\u306e\u7f72\u540d\u30fbcall stack\u30fbcalldata\u30fbEVM \u306e\u30aa\u30da\u30b3\u30fc\u30c9 \u306b\u3064\u3044\u3066\u7406\u89e3\u304c\u9032\u3093\u3060\u3068\u601d\u3046\u3002\\n\\nPart 2 \u3067\u306f\u3001EVM \u306b\u304a\u3051\u308b\u30e1\u30e2\u30ea\u30fc\u306b\u3064\u3044\u3066\u8272\u3005\u898b\u3066\u3044\u3053\u3046\u3002\\n\\n# Memory\\n\\nPart1 \u306e\u30b3\u30fc\u30c9\u3092\u601d\u3044\u3060\u3057\u3066\u307f\u3066\u3002`1_Storage.sol`\u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3042\u3063\u305f\u3002\\n\\n```sol\\npragma solidity >=0.7.0 <0.9.0;\\n\\ncontract Storage {\\n\\tuint256 number;\\n\\n\\tfunction store(uint256 num) public {\\n\\t\\tnumber = num;\\n\\t}\\n\\n\\tfunction retrieve() public view returns (uint256) {\\n\\t\\treturn number;\\n\\t}\\n}\\n```\\n\\n\u3053\u308c\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u3068\u3001\u3053\u3046\u306a\u3063\u3066\u3044\u308b\u3002\\n\\n```\\n608060405234801561001057600080fd....\\n```\\n\\n\u4eca\u56de\u306f\u3053\u306e\u90e8\u5206\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u3066\u8aac\u660e\u3057\u305f\u3044\u3068\u601d\u3046\u3002\u4e00\u756a\u6700\u521d\u306e 5bytes \u3060\u3002\\n\\n```\\n6080604052\\n```\\n\\n```\\n60 80 = PUSH1 0x80\\n60 40 = PUSH1 0x40\\n52 = MSTORE\\n```\\n\\n\u3053\u308c\u304c\u805e\u3044\u305f\u3053\u3068\u3042\u308b\u304c\u304b\u3082\u3057\u308c\u306a\u3044\u3051\u3069\u3001\u3044\u308f\u3086\u308b\u300cfree memory pointer\u300d\u3060\u3002\\n\\n\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u30fc\u3092\u7406\u89e3\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002\\n\\n# \u30e1\u30e2\u30ea\u306e\u30c7\u30fc\u30bf\u69cb\u9020\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3046\u3068\u3001byte \u306e array \u3060\u300232bytes(256bit)\u3042\u308b\u3044\u306f 1byte(8bit)\u306e\u5358\u4f4d\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002\u8aad\u307e\u308c\u308b\u3068\u304d\u306b\u306f\u300132bytes(256bit)\u5358\u4f4d\u3054\u3068\u306b\u306a\u308b\u3002\u4e0b\u8a18\u306e\u753b\u50cf\u306f\u8a71\u3057\u305f\u5185\u5bb9\u3092\u5177\u73fe\u5316\u3057\u305f\u3082\u306e\u3002\\n\\n![](memoryImpression.png)\\n\\n\u3053\u306e\u6a5f\u80fd\u306f\uff13\u3064\u306e opcode \u306b\u5de6\u53f3\u3055\u308c\u3066\u3044\u308b\u3002\\n\\n- `MSTORE(x, y)`: 32 byte(256 bit) \u306e\u5024 y \u3092\u30e1\u30e2\u30ea\u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e x \u306b\u4fdd\u5b58\\n- `MLOAD(x)`: 32 byte(256 bit) \u306e\u30e1\u30e2\u30ea\u306e\u5834\u6240\u3092\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 x \u304b\u3089\u8aad\u307f\u51fa\u3057\u3001\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\\n- `MSOTRE8(x, y)`: 1 byte (8 bit)\u306e\u5024 y \u3092\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e x \u306b\u4fdd\u5b58\u3059\u308b\\n\\n\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u3053\u3068\u306f\u3069\u3053\u304b\u3089\u30e1\u30e2\u30ea\u3092\u8aad\u307f\u53d6\u308b/\u66f8\u304d\u8fbc\u3080\u304b\u3092\u6c7a\u3081\u3066\u3044\u308b\u3068\u8003\u3048\u3066\u3088\u3044\u3002\u3082\u3057\u30011byte \u3088\u308a\u591a\u304f\u8aad\u307f\u53d6\u308b/\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3092\u3057\u305f\u3044\u306e\u3067\u3042\u308c\u3070\u3001\u305d\u306e\u307e\u307e\u7d99\u7d9a\u3059\u308c\u3070\u3088\u3044\u3060\u3051\u306e\u8a71\u306b\u306a\u308b\u3002\\n\\n# EVM playground\\n\\n\u3053\u306e [EVM playground](https://www.evm.codes/playground?fork=shanghai) \u306f\u3042\u306a\u305f\u306e\u7406\u89e3\u306e\u624b\u52a9\u3051\u304c\u3067\u304d\u308b\u3060\u308d\u3046\u3002Run \u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u53f3\u4e0a\u306e\u77e2\u5370\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u3088\u3046\u3002\u77e2\u5370\u30dc\u30bf\u30f3\u306f\u30b3\u30fc\u30c9\u306e\u7a3c\u50cd\u30d7\u30ed\u30bb\u30b9\u3092\u305f\u3069\u3063\u3066\u3044\u3063\u3066\u304f\u308c\u308b\u3002\u30b9\u30bf\u30c3\u30af\u3001\u30e1\u30e2\u30ea\u306f\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u306e\u304b\u3082\u308f\u304b\u308b\u3002\u3059\u3054\u304f\u76f4\u611f\u7684\u306a\u30c4\u30fc\u30eb\u3060\u3068\u611f\u5fc3\u3059\u308b\u3002\\n\\n```\\n// MSTORE 32 bytes 0x11...1 at memory location 0\\nPUSH32 0x1111111111111111111111111111111111111111111111111111111111111111\\nPUSH1 0x00\\nMSTORE\\n\\n// MSTORE8 1 byte 0x22 at memory location 32 (0x20 in hex)\\nPUSH1 0x22\\nPUSH1 0x20\\nMSTORE8\\n\\n// MSTORE8 1 byte 0x33 at memory location 33 (0x21 in hex)\\nPUSH1 0x33\\nPUSH1 0x21\\nMSTORE8\\n\\n// MLOAD 32 bytes to the call stack from memory location 0 ie 0-32 bytes of memory\\nPUSH1 0x00\\nMLOAD\\n\\n// MLOAD 32 bytes to the call stack from memory location 32 ie 32-64 bytes of memory\\nPUSH1 0x20\\nMLOAD\\n\\n// MLOAD 32 to the call stack from memory location 33 ie 33-65 bytes of memory\\nPUSH1 0x21\\nMLOAD\\n```\\n\\n![](https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3e29126-2954-40e3-bc1b-7ca5e780fd1c_1500x850.png)\\n\\nopcode \u306b\u3064\u3044\u3066\u3082\u3001\u82f1\u8a9e\u3060\u304c\u8aac\u660e\u6587\u304c\u3064\u3044\u3066\u3044\u308b\u3002\\n\\n\u3084\u3063\u3066\u307f\u3066\u5909\u3060\u306a\u3068\u601d\u3046\u3053\u3068\u306f\u306a\u3044\u306e\u304b\uff1f\\n\u307e\u305a\u3001MSTORE8 \u3092\u4f7f\u3063\u3066 1 byte \u306e 0x22 \u3092\u30e1\u30e2\u30ea\u306e 0x20 \u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u308b\u3064\u3082\u308a\u3060\u304c\u3001\u4f55\u6545\u304b\u30e1\u30e2\u30ea\u306f\u3053\u3053\u304b\u3089\u3001\\n\\n![](https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F954d54e6-0bce-4de3-a61d-dd41fdae49c7_836x152.png)\\n\\n\u3053\u3046\u5909\u308f\u308b\u3093\u3060\u3002\\n\\n![](https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F225fde5a-09bf-4a24-a702-88ad5010951e_836x176.png)\\n\\n\u3053\u306e\u4f59\u5206\u306a\u30bc\u30ed\u3063\u3066\u306a\u3093\u3060\u3068\u601d\u3046\u3060\u308d\u3046\u3002\\n\\n## \u30e1\u30e2\u30ea\u306e\u62e1\u5f35\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30e1\u30e2\u30ea\u3078\u306a\u306b\u304b\u3092\u66f8\u304d\u8fbc\u3080\u969b\u3001byte \u6570\u306b\u5f93\u3063\u3066\u30ac\u30b9\u4ee3\u3092\u652f\u6255\u3063\u3066\u3044\u308b\u3002\u3053\u308c\u304c opcode \u306e\u30b3\u30b9\u30c8\u3068\u8a00\u3046\u3002\u3082\u3057\u3001\u3053\u308c\u307e\u3067\u30e1\u30e2\u30ea\u3078\u66f8\u304d\u8fbc\u3093\u3060\u3053\u3068\u304c\u306a\u3044\u5834\u6240\u3078\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u8ffd\u52a0\u7684\u306b\u30e1\u30e2\u30ea\u62e1\u5f35\u306e\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308b\u3002\\n\\n\u3053\u308c\u307e\u3067\u66f8\u304d\u8fbc\u3093\u3060\u3053\u3068\u304c\u306a\u3044\u7b87\u6240\u3078\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u30e1\u30e2\u30ea\u306f 32bytes(256bit)\u62e1\u5f35\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308b\u3002\\n\\n> \u30e1\u30e2\u30ea\u306e\u30b3\u30b9\u30c8\u306e\u5897\u3048\u65b9\u306b\u95a2\u3057\u3066\u306f\u3001\u6700\u521d\u306e 724bytes \u306f\u7dda\u5f62\u7684\u306b\u5897\u52a0\u3059\u308b\u304c\u3001\u305d\u308c\u4ee5\u964d\u306f\u4e8c\u6b21\u6307\u6570\u95a2\u6570\u7684\u306b\u306a\u308b\u3002\\n\\n\u4e0a\u306e\u4f8b\u3067\u306f\u3001\u307e\u305a 0x00 \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078 32 bytes \u66f8\u304d\u8fbc\u3093\u3060\u304c\u3001\u305d\u3053\u304b\u3089\u3055\u3089\u306b\u66f8\u304d\u8fbc\u3080\u3068\u306a\u308b\u3068\u3001\u30e1\u30e2\u30ea\u62e1\u5f35\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u305a\u3001\u7d50\u679c\u7684\u306b\u3001\u30e1\u30e2\u30ea\u306f 64 bytes \u306b\u306a\u3063\u305f\u3002\\n\\n\u30e1\u30e2\u30ea\u306b\u3042\u308b\u4fdd\u5b58\u9818\u57df\u306e\u6700\u521d\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f\u30bc\u30ed\u3002\u3060\u304b\u3089 2200000000000000000000000000000000000000000000000000000000000000 \u304c\u30e1\u30e2\u30ea\u306b\u8ffd\u52a0\u3055\u308c\u305f\u3002\\n\\n## \u30e1\u30e2\u30ea\u306f byte \u306e Array \u3060\u304b\u3089\\n\\n\u6b21\u306b\u6ce8\u610f\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u306f\u3001\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 33(0x21)\u304b\u3089 MLOAD \u3057\u305f\u3068\u304d\u306b\u3001\u4e0b\u8a18\u306e\u5024\u304c\u8fd4\u3055\u308c\u305f\u3002\\n\\n```\\n3300000000000000000000000000000000000000000000000000000000000000\\n```\\n\\n32 bytes \u305a\u3064\u8aad\u307f\u8fbc\u3093\u3067\u3044\u306a\u304f\u3066\u3082\u3001\u8aad\u307f\u8fbc\u3081\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u3063\u305f\u3002\\n\\nmemory \u306f\u305f\u3060\u306e byte array \u306a\u306e\u3067\u3001\u3069\u3053\u306e\u5834\u6240\u304b\u3089\u3067\u3082\u8aad\u307f\u8fbc\u3081\u308b\u3053\u3068\u3092\u899a\u3048\u3066\u4e0b\u3055\u3044\u300232bytes \u306e\u5236\u9650\u306f\u7279\u306b\u306a\u304f\u3001\u3069\u3053\u304b\u3089\u3067\u3082 byte \u5358\u4f4d\u304b\u3089\u8aad\u307f\u8fbc\u3081\u308b\u3002\\n\\n> \u95a2\u6570\u5185\u3067\u306e\u307f\u65b0\u305f\u306b\u30e1\u30e2\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u308c\u306f\u65b0\u305f\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3055\u308c\u305f\u8907\u96d1\u306a\u578b\uff08\u4f8b\u3048\u3070 `new int[...]` \u306a\u3069\uff09\u3067\u3042\u3063\u305f\u308a\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u53c2\u7167\u5909\u6570\u304b\u3089\u30b3\u30d4\u30fc\u3055\u308c\u305f\u3082\u306e\u3067\u3042\u3063\u305f\u308a\u3057\u307e\u3059\u3002\\n\\n\u73fe\u5728\u3001\u6211\u3005\u306f\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u3064\u3044\u3066\u7406\u89e3\u3067\u304d\u305f\u306e\u3067\u3001free memory \u306e\u8a71\u3078\u623b\u308d\u3046\u3002\\n\\n# Free Memory Pointer\\n\\nFree Memory Pointer \u3068\u306f\u3001\u7c21\u5358\u306b\u3044\u3046\u3068\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30dd\u30a4\u30f3\u30bf\u30fc\u3067\u3042\u308a\u3001Free Memory \u304c\u3069\u3053\u304b\u3089\u30b9\u30bf\u30fc\u30c8\u3059\u3079\u304d\u306a\u306e\u304b\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002\u8a00\u3044\u63db\u3048\u308b\u3068\u3001\u30e1\u30e2\u30ea\u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3069\u3053\u307e\u3067\u66f8\u304d\u8fbc\u307e\u308c\u3066\u3044\u3066\u3001\u3069\u3053\u304b\u3089\u66f8\u304d\u8fbc\u3080\u3079\u304d\u306a\u306e\u304b\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002\\n\\n\u3053\u308c\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30e1\u30e2\u30ea\u3092\u4e0a\u66f8\u304d\u3059\u308b\u306e\u3092\u9632\u3050\u305f\u3081\u3067\u3082\u3042\u308b\u3002\\n\\n\u5909\u6570\u304c\u30e1\u30e2\u30ea\u3078\u66f8\u304d\u8fbc\u3080\u3068\u304d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u307e\u305a Free Memory Pointer \u3092\u53c2\u7167\u3057\u3001\u3069\u3053\u304b\u3089\u66f8\u304d\u8fbc\u3080\u3079\u304d\u304b\u3092\u6c7a\u3081\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002\u305d\u308c\u304b\u3089 Free Memory Pointer \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3001\u6700\u65b0\u306e\u30e1\u30e2\u30ea\u306e\u300c\u5883\u754c\u5024\u300d\u3042\u308b\u3044\u306f\u300c\u30aa\u30d5\u30bb\u30c3\u30c8\u300d\u3092\u8a18\u9332\u3059\u308b\u3002\\n\\n```\\n newFreeMemoryPointer = freeMemoryPointer + dataSizeBytes\\n```\\n\\n## Bytecode\\n\\n\u5148\u7a0b\u306b\u3082\u8a00\u53ca\u3057\u305f\u3088\u3046\u306b\u3001Free Memory Pointer \u306f\u6700\u521d\u306e runtime bytecode \u306e\u3053\u306e\u90e8\u5206\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\u3002\\n\\n```\\n60 80 = PUSH1 0x80\\n60 40 = PUSH1 0x40\\n52 = MSTORE\\n```\\n\\n\u3053\u308c\u306f\u57fa\u672c\u7684\u306b\u4f55\u3092\u8a00\u3063\u3066\u3044\u308b\u304b\u3068\u3044\u3046\u3068\u3001Free Memory Pointer \u306f\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x40(64 in decimal)\u3067\u3001\u5024\u306f 0x80(128 in decimal)\u3068\u306a\u308b\u3002\\n\\n\u3059\u3050\u306b\u7591\u554f\u306b\u601d\u3046\u306e\u306f\u3001\u306a\u305c\u3053\u306e\u6570\u5b57\u306a\u306e\u3068\u3044\u3046\u3053\u3068\u3060\u308d\u3046\u3002\\n\\n\u7b54\u3048\uff1a\\n\\n> 0x00 - 0x3f (64 bytes): scratch space\\n>\\n> 0x40 - 0x5f (32 bytes): free memory pointer\\n>\\n> 0x60 - 0x7f (32 bytes): zero slot\\n\\n0x40 \u306f solidity \u304c\u5b9a\u7fa9\u3057\u305f\u4e00\u756a\u6700\u521d\u306e Free Memory Pointer \u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3060\u3002\u5024 0x80 \u306f\u5358\u306b\u6700\u521d\u306e 4 \u3064\u306e 32 bytes \u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002\\n\\n\u3053\u308c\u3089\u306e\u4e88\u7d04\u3055\u308c\u305f\u30e1\u30e2\u30ea\u306b\u3064\u3044\u3066\\n\\n- Scrach space: inline assembly \u306e\u30cf\u30c3\u30b7\u30f3\u30b0\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u4f7f\u3063\u3066\u3082\u826f\u3044\\n- Free memroy pointer: \u4eca\u306e\u30e1\u30e2\u30ea\u306e\u30b5\u30a4\u30ba\u3001free memory \u306e\u30b9\u30bf\u30fc\u30c8\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3001\u6700\u521d\u306f 0x80\\n- The zero slot: \u52d5\u7684\u306a Memory Array \u306e\u521d\u671f\u5024\u3067\u3042\u308a\u3001\u3069\u3093\u306a\u3068\u304d\u306b\u3067\u3082\u66f8\u304d\u8fbc\u307e\u308c\u308b\u3053\u3068\u306f\u306a\u3044\\n\\n# \u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\\n\\n\u30ea\u30a2\u30eb\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304f\u3068\u3057\u3088\u3046\u304b\u3002\\n\\n\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u4f5c\u6210\u3057\u305f\u3002\u3053\u3044\u3064\u306e\u540d\u306f `MemoryLane`\u3002\u305f\u3063\u305f\u4e00\u500b\u306e\u95a2\u6570\u3092\u6301\u3063\u3066\u304a\u308a\u3001\uff12\u3064\u306e Array \u3092\u6301\u3063\u3066\u3044\u308b\u3002\u305d\u308c\u304b\u3089 b[0]\u306b\u5024 1 \u3092\u4ed8\u4e0e\u3059\u308b\u3002\\n\\n3 \u884c\u7a0b\u5ea6\u306e\u30b3\u30fc\u30c9\u3060\u3051\u3069\u3001\u304b\u306a\u308a\u591a\u304f\u306e\u3053\u3068\u304c\u8d77\u304d\u3066\u3044\u308b\u3088\u3002\\n\\n```sol\\n// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.3;\\n\\ncontract MemoryLane {\\n\\tfunction memoryLane() public pure {\\n\\t\\tbytes32[5] memory a;\\n\\t\\tbytes32[5] memory b;\\n\\t\\tb[0] = bytes32(uint256(1));\\n\\t}\\n}\\n\\n```\\n\\n\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u3082\u3046\u4e00\u5ea6 [remix](https://remix.ethereum.org/) \u3078\u6295\u5165\u3002\\n\\n\u305d\u308c\u304b\u3089\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\\n\\n`memoryLane()`\u95a2\u6570\u3092 run \u3057\u3066\u3001debugging mode \u3078\u5165\u3063\u3066\u304f\u3060\u3055\u3044\u3002\\n\\nopcode \u3092\u5c11\u3057\u305a\u3064\u898b\u3066\u3044\u3053\u3046\u3002\\n\\n\u5c11\u3057\u7c21\u5358\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u3092[EVM playground](https://www.evm.codes/playground?unit=Wei&codeType=Mnemonic&code=%27Vg*%28_I...1W0GJ_%21%21%21%21z00FK22WJQ0Y22z20F8K33W33Q1Y33z21F8d%28v0Z0-Jq00Xd%28vJZJ-64q20Xdv33Z33-65q21Xpp%27%7EN+locatioCzG1_wppVv7o7hBcall+stack+from%7EuIIIIq%28+ofNzp%5Cnj+bytegSTOREdw%29*_+0xZ9BY9Chex%7DzXpM%29W+at%7EV%2F%2F+MQ+%7B0x2N+memoryKwg8+1j_J32I11GpPUSHFpMgCn+Be+9+i7+t*+J%29LOAD%28js%21uu%01%21%28%29*79BCFGIJKNQVWXYZ_dgjpquvwz%7E_&fork=shanghai)\u3078\u5165\u308c\u3066\u3044\u308b\u3002\u305d\u306e opcode \u306f\u305d\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002\\n\\n\u3053\u306e\u7c21\u5358\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u306f opcode \u3092\u9806\u756a\u306b\u69cb\u6210\u3057\u3001JUMP \u306a\u3069\u306e\u30e1\u30e2\u30ea\u64cd\u4f5c\u3068\u95a2\u9023\u3057\u306a\u3044\u3053\u3068\u3092\u9664\u5916\u3057\u305f\u3002\u3044\u308d\u3044\u308d\u30b3\u30e1\u30f3\u30c8\u3082\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u53c2\u7167\u3057\u3066\u307b\u3057\u3044\u3002\\n\\n\u3053\u306e\u30b3\u30fc\u30c9\u306f 6 \u90e8\u5206\u304b\u3089\u69cb\u6210\u3055\u308c\u3066\u3044\u3066\u3001\u3053\u308c\u304b\u3089 dive in \u3059\u308b\u3002\\n\\nplay ground \u3092\u4f7f\u3046\u3053\u3068\u3092\u5f37\u304f\u304a\u3059\u3059\u3081\u3059\u308b\u3002\\n\\n# Free Memory Pointer Initialisation (EVM Playground Lines 1-15)\\n\\n\u307e\u305a\u3001\u201cfree memory pointer initialisation\u201d\u304b\u3089\u3084\u3063\u3066\u3044\u304f\u3002\u4e0a\u8a18\u3067\u3082\u3042\u3063\u305f\u3088\u3046\u306b\u30010x80(128 in decimal)\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3002\u3053\u308c\u306f free memory pointer \u306e\u5024\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002Solidity \u306e memory \u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002\\n\\n![](memory00.png)\\n\\n\u3053\u306e\u6bb5\u968e\u3067\u306f\u3001\u307e\u3060\u30e1\u30e2\u30ea\u306b\u306f\u306a\u306b\u3082\u306a\u3044\u3002\\n\\n![](memory01.png)\\n\\n\u7d9a\u3044\u3066 free memory pointer \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x40(64 in decimal)\u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002\\n\\n\u6700\u5f8c\u306b\u3001MSTORE \u3092\u4f7f\u3063\u3066\u30010x40 \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306b 0x80 \u306e\u5024\u3092\u8a18\u9332\u3002\\n\\n\u3053\u306e\u5f8c\u3001\u30b9\u30bf\u30c3\u30af\u306b\u306f\u4f55\u3082\u306a\u304f\u3001\u30e1\u30e2\u30ea\u306b\u306a\u306b\u304b\u3092\u6b8b\u305b\u305f\u3053\u3068\u306b\u306a\u308b\u3002\u30e1\u30e2\u30ea\u306f 16 \u9032\u6570\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u6570\u5b57\u3054\u3068\u306b 4bit \u306e\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002\\n\\n\u4eca\u3068\u306a\u3063\u3066\u3001192 \u306e 16 \u9032\u6570\u306e\u6570\u5b57\u3068\u306a\u3063\u3066\u3044\u308b\uff08\u6570\u5b57 2 \u6841 = 1 byte = 8 bit\uff09\u3002\\n\\n\u5148\u7a0b\u306e\u5185\u5bb9\u3092\u601d\u3044\u51fa\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6700\u521d\u306e 64bytes \u306f scrach space \u3067\u3001\u6b21\u306e 32bytes \u306f free memory pointer \u306b\u306a\u308b\u3002\u3053\u308c\u306f\u307e\u3055\u306b\u4e0b\u8a18\u306e\u72b6\u614b\u3002\\n\\n![](memory02.png)\\n\\n# Memory Allocation Variable \u201ca\u201d & Free Memory Pointer Update (EVM Playground Lines 16-34)\\n\\n\u6b8b\u308a\u306e\u90e8\u5206\u306b\u3064\u3044\u3066\u306f\u3001\u7c21\u5358\u306b\u3059\u308b\u305f\u3081\u306b\u4e00\u65e6\u6700\u5f8c\u306e\u98db\u3070\u3057\u3066\u30cf\u30a4\u30ec\u30d9\u30eb\u306e\u6982\u8981\u3092\u898b\u3066\u307f\u3088\u3046\u3002\\n\\n\u6b21\u306e\u30e1\u30e2\u30ea\u306b\u95a2\u3057\u3066\u3001\u5909\u6570`a`(bytes32[5])\u306e\u3053\u3068\u3092\u914d\u7f6e\u3057\u3066 free memory pointer \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u304c\u308f\u304b\u308b\u3002\\n\\n\u30b3\u30f3\u30d1\u30a4\u30e9\u306f array size \u306b\u3088\u3063\u3066\u3069\u308c\u304f\u3089\u3044\u306e\u30b9\u30da\u30fc\u30b9\u304c\u5fc5\u8981\u304b\u6c7a\u5b9a\u3059\u308b\u3002\\n\\n> \u30e1\u30e2\u30ea array \u306e\u8981\u7d20\u306e\u5360\u3081\u308b\u9818\u57df\u306f 32 bytes \u306e\u500d\u6570\u306b\u306a\u308b\u3002\u3053\u308c\u306f `bytes1[]`\u306b\u5bfe\u3057\u3066\u3082\u901a\u7528\u3059\u308b\u3002\u305f\u3060\u3057\u3001`bytes` \u3084 `string` \u306f\u9055\u3046\u3002\\n\\narray \u306e\u30b5\u30a4\u30ba \xd732bytes \u3067\u3069\u308c\u304f\u3089\u3044\u306e\u30e1\u30e2\u30ea\u3092\u98df\u3046\u304b\u308f\u304b\u308b\u3002\\n\\n\u3053\u306e\u5834\u5408\u30015 \\\\* 32 bytes \u3067\u30010xa0 (160)\u306b\u306a\u308b\u306e\u3060\u3002\u3057\u305f\u304c\u3063\u3066\u305d\u306e\u5024\u306f stack \u306b\u30d7\u30c3\u30b7\u30e5\u3055\u308c\u3001\u73fe\u5728\u306e free memory pointer \u306b\u4fdd\u5b58\u3055\u308c\u305f\u3002\\n\\n\u3053\u306e\u5f8c\u3001\u524d\u306e free memory pointer \u306e\u5024\u3068\u8db3\u3057\u7b97\u3092\u3057\u3066\u3001\u5024 0x120 (288)\u304c\u751f\u6210\u3055\u308c\u305f\u3002\u3053\u306e\u5024\u304c free memory pointer \u306b\u4fdd\u5b58\u3055\u308c\u305f\u3002\\n\\nstack \u306b\u306f\u5909\u6570`a`\u30e1\u30e2\u30ea\u3092\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 0x80 \u306b\u30ad\u30fc\u30d7\u3057\u3066\u5f8c\u304b\u3089\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u3002`0xffff`\u306f JUMP \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u610f\u5473\u3057\u3066\u304a\u308a\u3001\u95a2\u4fc2\u306a\u3044\u306e\u3067\u5f53\u9762\u306f\u7121\u8996\u3057\u3066\u3088\u3044(stack \u306e underflow \u3092\u9632\u3050\u305f\u3081\u306b\u3042\u308b)\u3002\\n\\n![](memory03.png)\\n\\n# Memory Initialisation Variable \u201ca\u201d (EVM Playground Lines 35-95)\\n\\n\u4eca\u3067\u306f\u30e1\u30e2\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u3066 free memory pointer \u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u305f\u3002\u3053\u3053\u304b\u3089\u306f\u5909\u6570`a`\u306e\u30e1\u30e2\u30ea\u306b\u304a\u3051\u308b\u521d\u671f\u5316\u3092\u3059\u308b\u3002\u5909\u6570\u306f\u5ba3\u8a00\u3055\u308c\u3066\u5024\u4ee3\u5165\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30bc\u30ed\u5024\u306b\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3002\\n\\n\u3053\u308c\u3092\u3059\u308b\u305f\u3081\u306b\u306f\u3001EVM \u306e CALLDATACOPY \u3092\u4f7f\u3063\u3066\u5b9f\u65bd\u3059\u308b\u3002\u3053\u306e opcode \u306f\uff13\u3064\u306e\u5f15\u6570\u304c\u5fc5\u8981\uff1a\\n\\n- memoryOffset\uff08\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078\u30b3\u30d4\u30fc\u3059\u308b\u5834\u6240\uff09\\n- calldataOffset\uff08calldata \u306b\u304a\u3051\u308b byte offset \u306e\u3053\u3068\uff09\\n- size\uff08\u30b3\u30d4\u30fc\u3059\u308b byte size\uff09\\n\\n\u4eca\u56de\u306e\u5834\u5408\u3001memoryOffset \u306f`a`\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 0x80\u3002\\n\\ncalldataOffset \u306f\u5b9f\u969b\u306e calldata \u306e\u30b5\u30a4\u30ba\u3001\u306a\u305c\u306a\u3089\u305d\u3082\u305d\u3082 calldata \u306e copy \u304c\u3044\u3089\u306a\u3044\u3002\u30e1\u30e2\u30ea\u3092\u30bc\u30ed\u5024\u3067\u521d\u671f\u5316\u3057\u305f\u3044\u3002\u7d50\u679c\u7684\u306b\u30b5\u30a4\u30ba\u304c 0xa0 \u3042\u308b\u3044\u306f 160 bytes \u306b\u306a\u308b\u3002\\n\\n\u3053\u3053\u3067\u3001\u30e1\u30e2\u30ea\u304c 288 bytes \u306b\u306a\u3063\u305f\u3068\u308f\u304b\u308b(zero slot \u3082\u542b\u3081\u3066)\u3002stack \u306f\u4eca\u3082\u3046\u4e00\u5ea6\u5909\u6570\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3068 JUMP \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u6301\u3063\u3066\u3044\u308b\u72b6\u614b\u3002\\n\\n\uff08\u305d\u306e\u9593\u306b\u7d30\u304b\u3044\u64cd\u4f5c\u306b\u3064\u3044\u3066\u306f\u3001\u4f55\u5ea6\u3082 pop \u3057\u3066\u3044\u308b\u306e\u304c\u3042\u308b\u304c\u3001\u500b\u4eba\u7684\u306b\u306f\u307e\u3060\u306a\u305e\u3067\u3001\u308f\u304b\u308b\u65b9\u306a\u3089\u6559\u3048\u3066\u4e0b\u3055\u3044\uff09\\n\\n# Memory Allocation Variable \u201cb\u201d & Free Memory Pointer Update (EVM Playground Lines 96-112)\\n\\n\u3053\u3053\u3067\u306e\u64cd\u4f5c\u306f\u4e0a\u8a18\u306e\u6d41\u308c\u3068\u975e\u5e38\u306b\u4f3c\u3066\u3044\u308b\u304c\u3001\u305f\u3060\u3057\u3001\u4eca\u56de\u306f`bytes32[2] memory b`\u3068\u306a\u308b\u3002\\n\\nfree memory pointer \u3092 0x160(352 in decimal)\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b(\u524d\u306e free memory pointer 288 + \u65b0\u3057\u3044\u5909\u6570\u306e\u30b5\u30a4\u30ba 64 bytes)\u3002\\n\\n\u6ce8\u610f\u3068\u3057\u3066\u306f\u3001free memory pointer \u306f\u30e1\u30e2\u30ea\u306b\u3066 0x160 \u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u3001\u305d\u3053\u3067\u73fe\u5728\u306f\u5909\u6570`b`\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3(0x120)\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u3066\u3042\u308b\u3002\\n\\n![](memory04.png)\\n\\n# Memory Initialisation Variable \u201cb\u201d (EVM Playground Lines 113-162)\\n\\n\u7d9a\u3044\u3066\u5909\u6570`b`\u521d\u671f\u5316\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002\\n\\n\u73fe\u5728\u3001\u30e1\u30e2\u30ea\u306f 352bytes \u3078\u62e1\u5f35\u3055\u308c\u305f\u3002\u30b9\u30bf\u30c3\u30af\u306b\u306f\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092 2 \u500b\u6301\u3063\u3066\u3044\u308b\u3002\\n\\n# Assign Value to `b[0]` (EVM Playground Lines 163-207)\\n\\n\u3084\u3063\u3068\u6700\u5f8c\u306e\u6bb5\u968e\u306b\u6765\u308c\u305f\u3002\u6b63\u76f4\u306b\u3044\u3063\u3066\u96e3\u3057\u304b\u3063\u305f\u3002\\n\\n\u3053\u3053\u3067\u306f\u3001array `b` \u306e index `0`\u306b\u5024\u3092\u4ed8\u4e0e\u3057\u305f\u3044\u3002\\n\\n\u30b3\u30fc\u30c9\u3067\u306f b[0] = 1 \u3068\u306a\u3063\u3066\u3044\u308b\u3002\\n\\n\u307e\u305a\u3001\u3053\u306e\u5024\u304c stack \u306b\u7a81\u3063\u8fbc\u307e\u308c\u308b\u3002\u305d\u306e\u5f8c\u3001bit shift \u304c\u8d77\u304d\u308b\u304c\u3001\u3053\u308c\u79fb\u52d5\u3057\u305f\u306e\u306f 0 \u3067\u4f55\u3082\u5909\u308f\u308a\u306f\u306a\u3044\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\\n\\n\u6b21\u306b array \u306e index \u306b\u306f 0x00 \u3078\u66f8\u304d\u8fbc\u307e\u308c\u30010 positon \u3078\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u306e\u969b\u306b\u3001array length \u306e 2 \u3092\u8d85\u3048\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u30c1\u30a7\u30c3\u30af\u3002\u3082\u3057\u6761\u4ef6\u3092\u30af\u30ea\u30a2\u3067\u304d\u306a\u3044\u5834\u5408\u3001\u7570\u306a\u308b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3078\u98db\u3073\u3001\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306e\u90e8\u5206\u3078\u98db\u3070\u3055\u308c\u308b\u3002\\n\\nMUL\u3001ADD opcode \u306f\u30e1\u30e2\u30ea\u3044\u306b\u304a\u3044\u3066\u5024\u304c\u66f8\u304d\u8fbc\u307e\u308c\u308b\u5834\u6240\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002\\n\\n```\\n0x20 (32 in decimal) * 0x00 (0 in decimal) = 0x00\\n```\\n\\n\u30e1\u30e2\u30ea\u306e array \u306f 32 byte \u5358\u4f4d\u3067\u3042\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u3057\u3066\u307b\u3057\u3044\u3002\u3053\u3061\u3089\u306f 0x00 \u306b\u306a\u308b\u306e\u3067\u3001offset \u306f\u4e0d\u8981\u3067\u305d\u306e\u307e\u307e 0 \u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u304b\u3089\u66f8\u7740\u8fbc\u3080\u3002\\n\\n```\\n0x00 + 0x120 = 0x120 (288 in decimal)\\n```\\n\\nADD \u306f offset \u306e\u5024\u3092\u30e1\u30e2\u30ea\u306b\u3042\u308b\u5909\u6570 b \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b\u3088\u3046\u306b\u4f7f\u308f\u308c\u305f\u3002offset \u306f\u4eca\u56de 0 \u306a\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u3001free memory pointer \u306e\u4f4d\u7f6e\u306b\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3068\u306a\u308b\u3002\\n\\n\u4e00\u756a\u6700\u5f8c\u306b\u3001MSTORE \u3092\u4f7f\u3063\u3066\u5024 0x01 \u3092\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x120 \u3078\u66f8\u304d\u8fbc\u3080\u3002\u305d\u3057\u3066\u3001\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u3059\u3079\u3066\u306e\u8981\u7d20\u3092 pop \u3057\u3001\u7d42\u4e86\u3002\\n\\n\u3053\u308c\u3067\u30e1\u30e2\u30ea\u306f`b[0] = 1`\u3068\u306a\u3063\u3066\u3044\u308b\u3002\u4e0b\u304b\u3089 3 \u884c\u76ee\u306e\u3068\u3053\u308d\u306b 1 \u3068\u3044\u3046\u6570\u5b57\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u304c\u308f\u304b\u308b\u3002\\n\\n![](memory05.png)\\n\\n\u4eca\u56de\u306e\u8a18\u4e8b\u306f\u3053\u3053\u307e\u3067\uff01Bye\uff01\\n\\n## Reference\\n\\n[EVM Deep Dives: The Path to Shadowy Super Coder \ud83e\udd77 \ud83d\udcbb - Part 2](https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy-d6b?s=r)"},{"id":"EVM-deep-dive-part1","metadata":{"permalink":"/blog/EVM-deep-dive-part1","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md","source":"@site/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md","title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1","description":"Hello, everybody!","date":"2023-02-26T00:00:00.000Z","formattedDate":"2023\u5e742\u670826\u65e5","tags":[{"label":"EVM","permalink":"/blog/tags/evm"},{"label":"opcode","permalink":"/blog/tags/opcode"},{"label":"Etheruem","permalink":"/blog/tags/etheruem"},{"label":"blockchain","permalink":"/blog/tags/blockchain"},{"label":"examples","permalink":"/blog/tags/examples"}],"readingTime":3.734,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"}],"frontMatter":{"slug":"EVM-deep-dive-part1","title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1","authors":["Thurendous"],"blogDescription":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1","tags":["EVM","opcode","Etheruem","blockchain","examples"]},"prevItem":{"title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2","permalink":"/blog/EVM-deep-dive-part2"},"nextItem":{"title":"CEI\u3068\u306f : Checks Effects Interactions","permalink":"/blog/checks-effects-interactions"}},"content":"Hello, everybody!\\n\\nFirst Principle \u3068\u3044\u3046\u8a00\u8449\u3092\u8033\u306b\u3055\u308c\u305f\u3053\u3068\u306f\u306a\u3044\u3060\u308d\u3046\u304b\u3002\u305d\u308c\u306f\u5965\u6df1\u304f\u7269\u4e8b\u306e\u57fa\u790e\u3092\u7406\u89e3\u3057\u305f\u4e0a\u3067\u3001\u3088\u308a\u3088\u3044\u767a\u60f3\u3092\u751f\u307e\u308c\u308b\u3053\u3068\u3068\u3044\u3046\u6982\u5ff5\u3060\u3002\\n\\n\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u4e16\u754c\u3067\u306f\u3001EVM \u3068\u305d\u306e\u5468\u308a\u306b\u3042\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u95a2\u3057\u3066\u306f\u3001\u307e\u3055\u306b\u3053\u306e First Principle \u3067\u3042\u308b\u3002Solidity \u3042\u308b\u3044\u306f\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u3053\u306e\u57fa\u790e\u306e\u4e0a\u306b\u4f5c\u308b\u69cb\u9020\u7269\u306a\u306e\u3067\u3001EVM \u306e\u3053\u3068\u3092\u7406\u89e3\u305b\u305a\u306b\u306f\u3088\u3044 solidity dev \u3068\u79f0\u3059\u308b\u306b\u306f\u307e\u3060\u65e9\u3044\u3068\u8a00\u3063\u3066\u3088\u3044\u3060\u308d\u3046\u3002\\n\\n## \u57fa\u790e\uff1aSolidity \u2192 Bytecode \u2192 Opcode\\n\\n\u307e\u305a\u3001\u57fa\u790e\u7684\u306a\u90e8\u5206\u306b\u3064\u3044\u3066\u4e00\u5b9a\u7a0b\u5ea6\u306e\u77e5\u8b58\u3092\u6709\u3059\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u308b\u3002\\n\\n- \u304a\u3055\u3089\u3044\uff1a\\n - Bytecode & ABI: \u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u306f EVM \u4e0a\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u30b3\u30fc\u30c9\u3067\u3001ABI \u3068\u306f\u3053\u306e EVM \u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u3084\u308a\u53d6\u308a\u304c\u3067\u304d\u308b\u305f\u3081\u306e interface\u3002\\n - Solidity \u30b3\u30fc\u30c9\u306f\u307e\u305a\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3078\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304b\u3089\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3078\u4e57\u305b\u308b\u3068\u3044\u3046\u6d41\u308c\u306b\u306a\u308b\u3002\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u5b9f\u306f\u8272\u3005\u306a\u30aa\u30da\u30b3\u30fc\u30c9\u3092\u610f\u5473\u3057\u3066\u3044\u308b\u3002\\n\\n\u4eca\u56de\u306f\u57fa\u672c\u7684\u306a solidity \u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u3064\u3044\u3066\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u4e00\u90e8\u3092\u4e00\u7dd2\u306b\u307f\u3066\u3044\u304d\u3001EVM \u304c\u3069\u306e\u3088\u3046\u306b\u95a2\u6570\u3092\u9078\u3093\u3067\u3044\u308b\u304b\u3092\u898b\u3088\u3046\u3002\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304b\u3089\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u305f\u3082\u306e\u3067\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u306f\u3044\u304f\u3064\u304b\u3082\u306e\u95a2\u6570\u304c\u3042\u308b\u3060\u308d\u3046\u3002\\n\\n\u3088\u304f\u3042\u308b\u8cea\u554f\u306f\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u305f\u5f8c\u3001EVM \u306f\u3069\u306e\u3088\u3046\u306b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u3069\u306e\u90e8\u5206\u3092\u5b9f\u884c\u3059\u3079\u304d\u304b\u304c\u308f\u304b\u3063\u305f\u306e\u304b\u3068\u3044\u3046\u306e\u304c\u3042\u308b\u3002\\n\\n## 1_Storage.sol \u30b3\u30f3\u30c8\u30e9\u30af\u30c8\\n\\n```solidity\\npragma solidity >=0.7.0 <0.9.0;\\n\\ncontract Storage {\\n\\tuint256 number;\\n\\n\\tfunction store(uint256 num) public {\\n\\t\\tnumber = num;\\n\\t}\\n\\n\\tfunction retrieve() public view returns (uint256) {\\n\\t\\treturn number;\\n\\t}\\n}\\n```\\n\\n\u4eca\u56de\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u4e0a\u8a18\u306e\u3082\u306e\u3068\u306a\u308b\u3002\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u306f\u4e8c\u500b\u306e\u95a2\u6570\u304c\u3042\u308b\u3002`store()`\u3068 `retrieve()`\u3002\\n\\nruntime \u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\uff1a\\n\\n```\\n608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033\\n```\\n\\n\u4eca\u56de\u30d5\u30a9\u30fc\u30ab\u30b9\u3059\u308b\u306e\u306f\u4ee5\u4e0b\u306e\u90e8\u5206\uff1a\\n\\n```\\n60003560e01c80632e64cec11461003b5780636057361d1461005957\\n```\\n\\n\u3053\u306e\u90e8\u5206\u306f\u5168\u4f53\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u304b\u3089\u629c\u304d\u53d6\u3063\u305f\u3082\u306e\u3002\\n\\n\u95a2\u6570\u306e\u30bb\u30ec\u30af\u30bf\u306e\u30ed\u30b8\u30c3\u30af\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3002\\n\\n\u8a00\u3044\u9045\u308c\u305f\u304c\u3001EVM \u306e\u30aa\u30da\u30b3\u30fc\u30c9\u306b\u95a2\u3057\u3066\u306f\u3001[\u3053\u3053](https://www.ethervm.io/)\u304b\u3089\u78ba\u8a8d\u3067\u304d\u308b\u3002\\n\\n\u30aa\u30da\u30b3\u30fc\u30c9\u306f 1 byte \u306e\u9577\u3055\u306b\u306a\u308b\u3002\u305d\u3046\u3059\u308b\u3068\u81ea\u7136\u306b 256 \u30d1\u30bf\u30fc\u30f3\u304c\u3042\u308b\u3068\u5206\u308b\u3068\u601d\u3046\u3002\\n\\n\u3057\u304b\u3057\u3001\u5b9f\u969b\u306b\u306f 140 \u500b\u306e\u30aa\u30da\u30b3\u30fc\u30c9\u3057\u304b\u5b58\u5728\u3057\u306a\u3044\u3002\\n\\n\u4ee5\u4e0b\u306f\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u95a2\u4fc2\u3059\u308b\u30aa\u30da\u30b3\u30fc\u30c9\u3078\u5909\u63db\u3057\u305f\u3082\u306e\u3002\\n\\n```\\n60 00 = PUSH1 0x00\\n35 = CALLDATALOAD\\n60 e0 = PUSH1 0xe0\\n1c = SHR\\n80 = DUP1\\n63 2e64cec1 = PUSH4 0x2e64cec1\\n14 = EQ\\n61 003b = PUSH2 0x003b\\n57 = JUMPI\\n80 = DUP1\\n63 6057361d = PUSH4 0x6057361d\\n14 = EQ\\n61 0059 = PUSH2 0x0059\\n57 = JUMPI\\n```\\n\\n## \u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084 Calldata\\n\\n\u30aa\u30da\u30b3\u30fc\u30c9\u3078\u30c0\u30a4\u30d6\u3059\u308b\u524d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u306b\u3064\u3044\u3066\u5fa9\u7fd2\u3057\u3088\u3046\u3002\\n\\n\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u306e\u524d\u306b\u3001calldata \u306b\u3001\u95a2\u6570\u306e\u7f72\u540d\u3001\u305d\u3057\u3066\u7d9a\u3044\u3066\u5f15\u6570\u3082\u5165\u308c\u308b\u3002\\n\\nSolidity \u306e\u30b3\u30fc\u30c9\u306b\u8868\u73fe\u3057\u3066\u3082\u3089\u3046\u3068\u3001\u3053\u3046\u306a\u308b\u3060\u308d\u3046\u3002\\n\\n```solidity\\nevent FunctionCalldata(bytes);\\nbytes memory functionCalldata = abi.encodeWithSignature(\'store(uint256)\', 10);\\nemit FunctionCalldata(functionCalldata);\\naddress(storageContract).call(functionCalldata);\\n```\\n\\n\u4eca\u56de\u306e\u5834\u5408\u3001\u50d5\u306f store \u95a2\u6570\u3092\u547c\u3073\u300110 \u5f15\u6570\u3068\u3057\u3066\u4ee3\u5165\u3057\u305f\u3044\u3002\\n\\n```solidity\\n0x6057361d000000000000000000000000000000000000000000000000000000000000000a\\n```\\n\\n\u4e0a\u306e\u9577\u3044\u6570\u5b57\u306e\u914d\u5217\u306f abi.encodeWithSignature(\u201dstore(uint256)\u201d,10)\u306e\u7d50\u679c\u3002\\n\\n\u95a2\u6570\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306f\uff14\u30d0\u30a4\u30c8\u306e Keccak \u30cf\u30c3\u30b7\u30e5\u5024\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u300c0x6057361d\u300d\u3002\\n\\n```\\nkeccak256(\u201cstore(uint256)\u201d) \u2192 first 4 bytes = 6057361d\\n\\nkeccak256(\u201cretrieve()\u201d) \u2192 first 4 bytes = 2e64cec1\\n```\\n\\n\u5148\u7a0b\u306e calldata \u3092\u898b\u308b\u3068\u3001\u5168\u90e8\u3067 36bytes \u3042\u3063\u305f\u3002\u6700\u521d\u306e 4bytes: `6057361d`\u306f\u95a2\u6570\u306e\u30bb\u30ec\u30af\u30bf\u95a2\u9023\u3067\u3001`store(uint256)`\u3068\u95a2\u4fc2\u3059\u308b\u3002\\n\\n\u3054\u81ea\u8eab\u3067\u306f\u30c3\u30b7\u30e5\u3057\u3066\u307f\u3066 \u2192[\u3053\u3053](https://emn178.github.io/online-tools/keccak_256.html)\\n\\n```\\n6057361d = function signature (4 bytes)\\n\\n000000000000000000000000000000000000000000000000000000000000000a = uint256 input (32 bytes)\\n```\\n\\n\u4ee5\u4e0a\u3001calldata \u306e\u6e96\u5099\u3060\u3063\u305f\u3002\\n\\n## \u30aa\u30da\u30b3\u30fc\u30c9\uff06\u30b9\u30bf\u30c3\u30af\\n\\n\u305d\u308c\u3067\u306f\u3001EVM \u30ec\u30d9\u30eb\u3078\u30c0\u30a4\u30d6\u3057\u3066\u3044\u3053\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002\u308f\u304b\u3089\u306a\u3044\u5834\u5408\u306f[\u3053\u308c](https://www.youtube.com/watch?v=FNZ5o9S9prU)\u3092\u898b\u3066\u3002\\n\\n\u5148\u7a0b\u306e\u30aa\u30da\u30b3\u30fc\u30c9\u306f\u3053\u308c\uff1a\\n\\n```\\n60 00 = PUSH1 0x00\\n35 = CALLDATALOAD\\n60 e0 = PUSH1 0xe0\\n1c = SHR\\n80 = DUP1\\n63 2e64cec1 = PUSH4 0x2e64cec1\\n14 = EQ\\n61 003b = PUSH2 0x003b\\n57 = JUMPI\\n80 = DUP1\\n63 6057361d = PUSH4 0x6057361d\\n14 = EQ\\n61 0059 = PUSH2 0x0059\\n57 = JUMPI\\n```\\n\\nPUSH1 \u306f 1byte \u306e\u30c7\u30fc\u30bf\u3092\u30b9\u30bf\u30c3\u30af\u3078\u5165\u308c\u308b\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u3046\u3059\u308b\u3068\u3001\u30b9\u30bf\u30c3\u30af\u306f\u3053\u3046\u306a\u308b\\n\\n```\\nPUSH1 0x00 | 0 |\\n```\\n\\n\u7d9a\u3044\u3066 CALLDATALOAD \u306f\u6700\u521d\u306e stack(0)\u306e\u5024\u3092\u30dd\u30c3\u30d7\u3055\u305b\u308b\u3002\u3053\u306e 0 \u5024\u3092 input \u3068\u3057\u3066\u4f7f\u7528\u3057\u3001offset \u3068\u3057\u3066\u4f7f\u3046\u3002\u30b9\u30bf\u30c3\u30af\u30a2\u30a4\u30c6\u30e0\u306e\u30b5\u30a4\u30ba\u306f 32bytes \u306a\u306e\u306b\u5bfe\u3057\u3001\u4eca\u56de\u306e calldata \u306f 36bytes \u306b\u306a\u3063\u3066\u3044\u308b\u3002\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u306f msg.data[i : i+32]\u3067\u3001i \u306f\u4eca\u56de\u306e input \u5024\u3068\u306a\u308b\u3002\u3053\u308c\u306f\u6bce\u56de\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u304c 32bytes \u306b\u306a\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3067\u304d\u308b\u3002\u540c\u6642\u306b\u3001\u3069\u306e\u90e8\u5206\u306b\u3082\u30a2\u30af\u30bb\u30eb\u3067\u304d\u308b\u3002\\n\\n\u4eca\u56de\u306e\u5834\u5408\u3001offset \u306f\u306a\u304b\u3063\u305f\u306e\u3067\u300132bytes \u306e calldata \u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u306b push \u3057\u305f\u3002\u3055\u304d\u307b\u3069\u7528\u610f\u3057\u305f calldata \u306f\u3053\u308c\u3002\u3084\u3063\u3068\u51fa\u756a\u304c\u304d\u305f\u3002\\n\\n`0x6057361d000000000000000000000000000000000000000000000000000000000000000a`\u3002\\n\\n\u3068\u3044\u3046\u306e\u306f\u3001\u6700\u5f8c\u306e`0000000a`\u304c\u9664\u5916\u3055\u308c\u305f 32bytes \u304c\u4eca\u56de\u306e\u5165\u529b\u3068\u306a\u308b\u3002\\n\\n```\\nCALLDATALOAD | 0x6057361d0...00 |\\n```\\n\\n\u6b21\u306b PUSH1 \u3092\u4f7f\u3063\u3066 hex value \u306e 0xe0 \u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3002\u3053\u308c\u306f\u5341\u9032\u6570\u3060\u3068 224\u3002\\n\\n```\\nPUSH1 0xe0 | 224 |\\n\\t\\t\\t\\t| 0x6057361d0...00 |\\n```\\n\\nSHR \u3092\u4f7f\u3063\u3066\u30e9\u30a4\u30c8\u30b7\u30d5\u30c8\u3055\u305b\u308b\u3002\u4eca\u56de\u306f\u6700\u521d\u306e\u30a2\u30a4\u30c6\u30e0\u3067\u3042\u308b 224 \u3092\u53d6\u308a\u51fa\u3057\u3001input \u3068\u3057\u3066\u6271\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u4e8c\u756a\u76ee\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u3069\u308c\u304f\u3089\u3044\u53f3\u3078\u30e9\u30a4\u30c8\u30b7\u30d5\u30c8\u3055\u305b\u308b\u304b\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u3002256 - 244 = 32 bit \u3068\u308f\u304b\u308b\u3088\u3046\u306b\u3001\u6700\u5f8c\u306b\u306f 4bytes \u306e\u30bb\u30ec\u30af\u30bf\u304c call stack \u306b\u6b8b\u308b\u3002\\n\\n```\\nSHR | 0x6057361d |\\n```\\n\\nDUP1 \u3092\u4f7f\u3063\u3066\u30b9\u30bf\u30c3\u30af\u306e\u4e00\u756a\u4e0a\u306e\u5024\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002\\n\\n```\\nDUP1 | 0x6057361d |\\n\\t\\t| 0x6057361d |\\n```\\n\\nPUSH4 \u3092\u4f7f\u3063\u3066 4byte \u306e\u95a2\u6570\u306e\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306e`retrieve()` (0x2e64cec1) \u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002\\n\\n```\\nPUSH4 0x2e64cec1 | 0x2e64cec1 |\\n\\t\\t\\t\\t\\t| 0x6057361d |\\n\\t\\t\\t\\t\\t| 0x6057361d |\\n```\\n\\nEQ \u306f\u4e8c\u500b\u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u304b\u3089\u51fa\u3057\u3001\u30a4\u30b3\u30fc\u30eb\u306a\u306e\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\u3082\u3057\u30a4\u30b3\u30fc\u30eb\u306a\u3089 1\uff08true\uff09 \u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3001\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f 0\uff08false\uff09 \u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002\\n\\n```\\nEQ \\t\\t| 0 |\\n\\t\\t\\t| 0x6057361d |\\n```\\n\\n\u6b21\u306b PUSH2 \u3092\u4f7f\u3063\u3066\u4e8c\u500b\u306e\u5024\u3092\u30d7\u30c3\u30b7\u30e5\u3002\uff080x003b, \u5341\u9032\u6570\u3060\u3068 59\uff09\\n\\n\u3053\u3053\u3067\u306f\u300159 \u304c\u51fa\u305f\u306e\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u304c\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306b\u6b21\u306e\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u306f\u3069\u3053\u306b\u3042\u308b\u306e\u304b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b\u304b\u3089\u3002\u3053\u306e 59 \u306f retrieve()\u304c\u30b9\u30bf\u30fc\u30c8\u5730\u70b9\u306f 59 \u3092\u610f\u5473\u3057\u3066\u3044\u308b\u3002\\n\\n```\\nPUSH2 0x003b | 59 |\\n\\t\\t\\t\\t| 0 |\\n\\t\\t\\t\\t| 0x6057361d |\\n```\\n\\nJUMPI \u306f\u201djump if\u201d\u3092\u610f\u5473\u3059\u308b\u3002\u4e8c\u500b\u306e\u5024\u3092\u30dd\u30c3\u30d7\u3055\u305b\u3001\u4e00\u500b\u76ee\u306e\u5024\u306f 59 \u3067\u3001\u4e8c\u500b\u76ee\u306f 0\u3002\u4e8c\u500b\u76ee\u306e\u5024\u306f bool \u5024\u3067\u3053\u306e jump \u3092\u5b9f\u884c\u3059\u3079\u304d\u304b\u3092\u78ba\u5b9a\u3057\u3066\u3044\u308b\u30021 = true, 0 = false\u3002\\n\\n\u3082\u3057 true \u306e\u5834\u5408\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u306f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u5b9f\u884c\u306f\u305d\u3061\u3089\u3078 jump \u3059\u308b\u3002\u4eca\u56de\u306f false \u306a\u306e\u3067\u3001\u30b9\u30ad\u30c3\u30d7\u3002\\n\\n```\\nJUMPI | 0x6057361d |\\n```\\n\\nDUP1 again\\n\\n```\\nDUP1 | 0x6057361d |\\n | 0x6057361d |\\n```\\n\\nPUSH4 \u306f 4byte \u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\\n\\n```\\nPUSH4 0x6057361d | 0x6057361d |\\n\\t\\t\\t\\t\\t| 0x6057361d |\\n\\t\\t\\t\\t\\t| 0x6057361d |\\n```\\n\\n\u307e\u305f EQ \u3057\u3066\u3001\u4eca\u56de\u306f true \u306a\u306e\u3067\u3002\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u304c\u5408\u3063\u305f\u3002\\n\\n```\\nEQ | 1 |\\n\\t | 0x6057361d |\\n```\\n\\nJUMPI\u3001\u4eca\u56de\u306f true \u306a\u3093\u3067 jump \u3092\u5b9f\u884c\u3059\u308b\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u306f 89 \u3067\u3001\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u9055\u3046\u5834\u6240\u3078\u79fb\u52d5\u3002\\n\\n```\\nPUSH2 0x0059 | 89 |\\n\\t\\t\\t\\t| 1 |\\n\\t\\t\\t\\t| 0x6057361d |\\n```\\n\\n\u3053\u306e\u5834\u6240\u306b JUMPDEST \u30aa\u30da\u30b3\u30fc\u30c9\u304c\u3042\u308b\u3002\u3053\u308c\u304c\u306a\u3044\u3068\u5931\u6557\u3059\u308b\u3002\\n\\n```\\nJUMPI | 0x6057361d |\\n```\\n\\n\u305d\u3053\u3067\u7d42\u308f\u308a\u3002\u3053\u308c\u3067\u30aa\u30da\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u306f`store(uint156)`\u306e\u5834\u6240\u3078\u79fb\u52d5\u3067\u304d\u305f\u3002\\n\\n\u4eca\u56de\u306f\u4e8c\u500b\u306e\u95a2\u6570\u3057\u304b\u306a\u3044\u3082\u306e\u306e\u3001\u305f\u3068\u3048 20 \u500b\u306e\u95a2\u6570\u304c\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u30d7\u30ed\u30bb\u30b9\u306f\u4e00\u7dd2\u3002\\n\\n\u3053\u306e[\u30ea\u30f3\u30af](https://www.evm.codes/playground?unit=Wei&callData=0x6057361d000000000000000000000000000000000000000000000000000000000000000a&codeType=Mnemonic&code=%27%210%7E0KCALLDATALOAD%7E2z2qw%21E0%7E3KSHR%7E5z2qwDUP1%7E6%28X4_2E64CEC1%7E7KEQ%7E12z5qwX2_3B%7E13%28*I%7E16z3qwDUP1%7E17KX4_6057361D%7E18KEQ%7E23z5qwX2_59%7E24K*I%7E27z3qwkY+wX30_0%7E28KwZGV59z31q%211%7E60+%7BG%7DW%7DKwkYwX26_0%7E62z2qKZstore%7Buint256V89z27q%210+ZContinueW.KK%27%7E+ZOffset+z+%7Bprevious+instruFoccupies+w%5Cnq%29s%7DwkZThes-ar-just+paddingNenabl-usNgetN_+0xZ%2F%2F+Yprogram+counter+59+%26+89XPUSHW+funFexecution...V%7D%29codew*DEST%7EN+to%28wwGretrieve%7BFction+-e+*JUMP%29+byte%28+K%21X1_%01%21%28%29*-FGKNVWXYZ_kqwz%7E_&fork=merge)\u306f\u975e\u5e38\u306b\u304a\u3059\u3059\u3081\u3002\u89e6\u3063\u3066\u307f\u308b\u3068\u5409\u3002\\n\\nEVM \u306e\u30b9\u30bf\u30c3\u30af\u30fb\u30e1\u30e2\u30ea\u30fb\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u3066\u304f\u308c\u308b\u3002\\n\\n## Reference\\n\\n[EVM Deep Dives: The Path to Shadowy Super Coder \ud83e\udd77 \ud83d\udcbb - Part 1](https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy)"},{"id":"checks-effects-interactions","metadata":{"permalink":"/blog/checks-effects-interactions","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/checks-effects-interactions/2023-1-10-checks-effects-interactions.md","source":"@site/blog/checks-effects-interactions/2023-1-10-checks-effects-interactions.md","title":"CEI\u3068\u306f : Checks Effects Interactions","description":"Hello, everybody!","date":"2023-01-10T00:00:00.000Z","formattedDate":"2023\u5e741\u670810\u65e5","tags":[{"label":"checks-effects-interactions","permalink":"/blog/tags/checks-effects-interactions"},{"label":"Etheruem","permalink":"/blog/tags/etheruem"},{"label":"blockchain","permalink":"/blog/tags/blockchain"},{"label":"hack","permalink":"/blog/tags/hack"}],"readingTime":1.954,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"checks-effects-interactions","title":"CEI\u3068\u306f : Checks Effects Interactions","authors":["Thurendous","Polymetis"],"blogDescription":"checks-effects-interactions","tags":["checks-effects-interactions","Etheruem","blockchain","hack"]},"prevItem":{"title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1","permalink":"/blog/EVM-deep-dive-part1"},"nextItem":{"title":"\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u3092\u4e8b\u4f8b\u3067\u7406\u89e3\u3059\u308b","permalink":"/blog/Zero-knowledge-proofs-explained-by-examples"}},"content":"Hello, everybody!\\n\\nEVM \u306e\u30a4\u30f3\u30bf\u30e9\u30af\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u306f\u3001\u5916\u90e8\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u547c\u3073\u51fa\u3059\u3068\u304d\u306b\u3001\u4e3b\u5c0e\u6a29\u306f\u5168\u90e8\u5916\u90e8\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u63e1\u308b\u3053\u3068\u3068\u306a\u308a\u3001\u5371\u967a\u304c\u30b1\u30fc\u30b9\u304c\u3042\u308b\u3002\u3082\u3057\u305d\u306e\u5916\u90e8\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u60aa\u610f\u306e\u3042\u308b\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\u3001\u60aa\u7528\u3055\u308c\u308b\u30ea\u30b9\u30af\u306b\u3055\u3089\u3055\u308c\u308b\u3002\\n\\n![](printmoney.gif)\\n\\nEVM(Ethereum Virtual Machine) \u306e\u4e16\u754c\u3067\u306f\u3001Re-entrancy \u306e\u653b\u6483\u3068\u3044\u3046\u306e\u304c\u3042\u308b\u3002\\n\\n\u307e\u3055\u306b\u3053\u306e\u653b\u6483\u624b\u6cd5\u304c\u53d6\u3089\u308c\u308b\u3053\u3068\u304c\u3042\u308b\u3002\\n\\n\u653b\u6483\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u4f55\u5ea6\u3082\u5165\u308a\u8fbc\u3093\u3067\u3001\u30c1\u30a7\u30c3\u30af\u3059\u308b\u6761\u4ef6\u304c\u53cd\u6620\u3055\u308c\u308b\u524d\u306b\u306a\u3093\u3069\u3082\u540c\u3058\u64cd\u4f5c\u3092\u3055\u308c\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u3084\u308a\u53e3\u3067\u3042\u308b\u3002\u672c\u6765\u306a\u3089\u4e00\u5ea6\u306e\u307f\u547c\u3070\u308c\u308b\u3082\u306e\u304c\u4f55\u5ea6\u3082\u30c1\u30a7\u30c3\u30af\u3092\u629c\u3051\u3066\u547c\u3070\u308c\u308b\u3068\u4e88\u671f\u3057\u306a\u3044\u6319\u52d5\u306b\u306a\u3063\u305f\u308a\u3057\u3066\u3001\u8cc7\u7523\u304c\u76d7\u307e\u308c\u305f\u308a\u3059\u308b\u3002\\n\\n\u3053\u306e\u653b\u6483\u624b\u6cd5\u306f\u6614\u306e [The DAO \u4e8b\u4ef6](https://www.gemini.com/cryptopedia/the-dao-hack-makerdao)\u304c\u3084\u3089\u308c\u305f\u624b\u6cd5\u3067\u3082\u3042\u308b\u3002\u6b74\u53f2\u306b\u6b8b\u308b\u5927\u4e8b\u4ef6\u3060\u3002\\n\\n\u4ed6\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u74b0\u5883\u3067\u306f\u8d77\u3053\u3089\u306a\u3044\u3088\u3046\u8106\u5f31\u6027\u3060\u3002\u3053\u308c\u306f\u65b0\u3057\u3044\u958b\u767a\u8005\u3060\u3068\u3084\u308a\u304c\u3061\u306a\u30df\u30b9\u306b\u306a\u308b\u3002\\n\\n\u3053\u306e\u3088\u3046\u306a\u72b6\u6cc1\u306b\u304a\u3044\u3066\u3001Checks-Effects-Interactions \u3092\u9069\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\\n\\n- \u5916\u90e8\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u547c\u3073\u51fa\u3059\u306e\u306f\u907f\u3051\u3089\u308c\u306a\u3044\\n- Re-entrancy \u653b\u6483\u3092\u907f\u3051\u305f\u3044\\n\\n## \u5b9f\u88c5\\n\\n- \u307e\u305a\u3001check\\n\\n\u95a2\u6570\u3092\u547c\u3073\u51fa\u3057\u3066\u307e\u305a\u5b9f\u884c\u3059\u308b\u6761\u4ef6\u3092\u30c1\u30a7\u30c3\u30af\uff08\u4f8b\u3048\u3070\u5341\u5206\u306a\u8cc7\u91d1\u3092\u3082\u3063\u3066\u3044\u308b\u304b\uff09\u3002\\n\\n- \u6b21\u3001effect\\n\\n\u305d\u306e\u6b21\u306b\u3059\u3079\u3066\u306e\u72b6\u614b\u5909\u6570\u3092\u66f4\u65b0\u3059\u3079\u304d\\n\\n- \u6700\u5f8c\u3001interaction\\n\\n\u6700\u5f8c\u306b\u5916\u90e8\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3068\u306e\u30a4\u30f3\u30bf\u30e9\u30af\u30b7\u30e7\u30f3\u3092\u3059\u3079\u304d\u3002\u5185\u90e8\u306e\u72b6\u614b\u304c\u5b8c\u5168\u306b\u66f4\u65b0\u3055\u308c\u305f\u5f8c\u306b\u3001\u521d\u3081\u3066\u5916\u90e8\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u547c\u3073\u51fa\u3059\u3002\\n\\n\u3053\u306e\u9806\u756a\u3055\u3048\u5b88\u308c\u3070\u3001Re-entrancy \u653b\u6483\u306f\u6700\u521d\u306e\u95a2\u9580\u3092\u304f\u3050\u308a\u306c\u3051\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002\\n\\n\u3082\u3057\u3001\u6700\u5f8c\u306b\u72b6\u614b\u306e\u5909\u66f4\u3092\u3059\u308b\u3068\u306a\u308b\u3068\u3001\u72b6\u614b\u5909\u66f4\u3055\u308c\u308b\u524d\u306b\u4f55\u56de\u3082\u540c\u3058\u95a2\u6570\u306e\u90e8\u5206\u304c\u547c\u3073\u51fa\u3055\u308c\u3066\u3057\u307e\u3044\u3001Re-entrancy \u653b\u6483\u306e\u7f60\u306b\u30cf\u30de\u3063\u3066\u3057\u307e\u3046\u3002\\n\\n## \u5b9f\u4f8b\\n\\n```sol\\npragma solidity 0.8.13;\\n\\n\\ncontract reentrancyVictim{\\n mapping(address => uint256) public balances;\\n uint256 public contractBalance;\\n\\n function payIn() public payable{\\n balances[msg.sender] += msg.value;\\n }\\n\\n function withdraw() public payable{\\n require(balances[msg.sender] > 0, \\"Insufficiant balance\\");\\n payable(msg.sender).call{value: balances[msg.sender]}(\\"\\");\\n balances[msg.sender] = 0;\\n }\\n\\n function updateContractBalance() public{\\n contractBalance = address(this).balance;\\n }\\n}\\n\\n```\\n\\n\u3053\u306e\u30b3\u30fc\u30c9\u306f\u4e00\u898b\u3057\u3066\u5927\u4e08\u592b\u306a\u3088\u3046\u306b\u898b\u3048\u308b\u304c\u3001`withdraw()`\u95a2\u6570\u306e 2 \u884c\u76ee\u306b\u5341\u5206\u306a\u8cc7\u7523\u304c\u3042\u308b\u304b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b\u3002\u6b21\u306b\u30a2\u30bb\u30c3\u30c8\u3092\u30e6\u30fc\u30b6\u30fc\u3078\u9001\u4ed8\u3057\u3066\u3044\u308b\u3002\u6700\u5f8c\u306b\u30d0\u30e9\u30f3\u30b9\u3092\u66f4\u65b0\u3057\u3066\u3044\u308b\u3002\\n\\n\u3053\u308c\u306f check-effect-interaction \u306e\u30eb\u30fc\u30eb\u3092\u5b88\u3063\u3066\u3044\u306a\u3044\u3002\\n\\n- check: ` require(balances[msg.sender] > 0, \\"Insufficiant balance\\");`\\n- interaction: `payable(msg.sender).call{value: balances[msg.sender]}(\\"\\");`\\n- effect: `balances[msg.sender] = 0;`\\n\\n\u3068\u306a\u3063\u3066\u304a\u308a\u3001effect \u3068 interaction \u306e\u9806\u756a\u304c\u9006\u3002\\n\\n\u305d\u306e\u7d50\u679c\u3001Re-entrancy \u653b\u6483\u304c\u53ef\u80fd\u3068\u306a\u308b\u3002\\n\\n\u5177\u4f53\u7684\u306a\u30b9\u30ad\u30fc\u30e0\u306f\u3053\u3093\u306a\u304b\u3093\u3058\uff1a\\n\\n![](reentrancy-attack-1.png)\\n\\nadjust funds \u306e\u524d\u306b\u3001\u4f55\u56de\u3082\u4f55\u56de\u3082\u8cc7\u7523\u304c\u629c\u304d\u51fa\u3055\u308c\u3066\u3001\u6700\u5f8c\u306b\u8cc7\u91d1\u304c\u305d\u3053\u3092\u3064\u304f\u3053\u3068\u306b\u306a\u308b\u3060\u308d\u3046\u3002\\n\\nAttacker \u306e\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\uff1a\\n\\n```sol\\npragma solidity 0.8.13;\\n\\n\\ncontract reentrancyAttack{\\n\\n address public victim;\\n uint256 public amount;\\n uint256 public counter;\\n\\n constructor(address _victim) payable{\\n victim = _victim;\\n amount = msg.value;\\n }\\n\\n receive() external payable{ // \u30a4\u30fc\u30b5\u53d7\u3051\u53d6\u308a\u7528\u306ereceive\u95a2\u6570\\n counter++;\\n attack();\\n }\\n\\n function payIn() public returns (bool success){\\n (bool success, bytes memory data) = payable(victim).call{value: amount}(abi.encodeWithSignature(\\"payIn()\\"));\\n }\\n\\n function withdrawAttack() public{\\n if(counter < 4){\\n // \u3082\u3046\u4e00\u5ea6withdraw\u3092\u547c\u3076\u7528\\n payable(victim).call(abi.encodeWithSignature(\\"withdraw()\\"));\\n }\\n }\\n}\\n```\\n\\n### \u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\\n\\n\u305d\u306e\u5bfe\u7b56\u3068\u3057\u3066\u306f\u3001\u5b9f\u306f\u3082\u306e\u3059\u3054\u304f\u30b7\u30f3\u30d7\u30eb\u306b`withdraw()`\u306e\u7b2c 3, 4 \u884c\u3092\u9006\u8ee2\u3055\u305b\u3066\u3001\u4fee\u6b63\u3092\u52a0\u3048\u308b\u3002\\n\\n```sol\\n function withdraw() public payable{\\n // check\\n require(balances[msg.sender] > 0, \\"Insufficiant balance\\");\\n // effect\\n uint256 payBalance = balances[msg.sender];\\n balances[msg.sender] = 0;\\n // interaction\\n (bool success, bytes memory data) = payable(msg.sender).call{value: payBalance}(\\"\\");\\n if(!success){ // catch the case where the send was unsuccesful\\n balances[msg.sender] = payBalance;\\n }\\n}\\n```\\n\\n\u3082\u3057\u3001success \u304c false \u306e\u5834\u5408\u3001\u30d0\u30e9\u30f3\u30b9\u3092\u5143\u901a\u308a\u306b\u623b\u3059\u64cd\u4f5c\u3092\u3057\u3066\u3044\u308b\u3002\\n// interaction \u306e\u884c\u306b\u304a\u3044\u3066 reenter \u3055\u308c\u3066\u3082\u3001\u3059\u3067\u306b\u30d0\u30e9\u30f3\u30b9\u306f\u30bc\u30ed\u306a\u306e\u3067\u3001revert \u3055\u308c\u3001\u554f\u984c\u306f\u306a\u304f\u306a\u3063\u305f\u3002\\n\\n**THE END**"},{"id":"Zero-knowledge-proofs-explained-by-examples","metadata":{"permalink":"/blog/Zero-knowledge-proofs-explained-by-examples","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/Zero-knowledge-proofs/2023-1-8-zero-knowledge-by-examples.md","source":"@site/blog/Zero-knowledge-proofs/2023-1-8-zero-knowledge-by-examples.md","title":"\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u3092\u4e8b\u4f8b\u3067\u7406\u89e3\u3059\u308b","description":"Hello, everybody!","date":"2023-01-08T00:00:00.000Z","formattedDate":"2023\u5e741\u67088\u65e5","tags":[{"label":"zero-knwoledge","permalink":"/blog/tags/zero-knwoledge"},{"label":"proof","permalink":"/blog/tags/proof"},{"label":"blockchain","permalink":"/blog/tags/blockchain"},{"label":"examples","permalink":"/blog/tags/examples"}],"readingTime":1.872,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"Zero-knowledge-proofs-explained-by-examples","title":"\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u3092\u4e8b\u4f8b\u3067\u7406\u89e3\u3059\u308b","authors":["Thurendous","Polymetis"],"blogDescription":"\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u3092\u4e8b\u4f8b\u3067\u7406\u89e3\u3059\u308b","tags":["zero-knwoledge","proof","blockchain","examples"]},"prevItem":{"title":"CEI\u3068\u306f : Checks Effects Interactions","permalink":"/blog/checks-effects-interactions"},"nextItem":{"title":"opcode\u306b\u3064\u3044\u3066","permalink":"/blog/opcode-basics"}},"content":"Hello, everybody!\\n\\n\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u8a00\u3046\u3068\u4eba\u306b\u79d8\u5bc6\u3092\u30d0\u30e9\u3059\u3053\u3068\u306a\u304f\u3001\u77e5\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u8a3c\u660e\u3067\u304d\u308b\u3053\u3068\u3002\\n\\n\u5999\u306a\u8a00\u3044\u65b9\u3092\u3057\u3066\u3044\u3066\u3001\u81ea\u5206\u3082\u306a\u304b\u306a\u304b\u3068\u3063\u3064\u304d\u306b\u304f\u3044\u3053\u3068\u3060\u3068\u601d\u3044\u307e\u3057\u305f\u3002\u4e8b\u4f8b\u3092\u901a\u3057\u3066\u7406\u89e3\u3059\u308b\u3068\u3001\u30d4\u30f3\u3068\u304f\u308b\u3053\u3068\u3082\u3042\u308b\u306e\u304b\u3082\u3057\u308c\u306a\u3044\u3002\\n![](urnotauthorizedtoknow.png)\\n\\n\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u306f\u975e\u5e38\u306b\u91cd\u8981\u3067\u3001\u3053\u308c\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u306e\u59a5\u5354\u3092\u3059\u308b\u3053\u3068\u306a\u304f\u3001\u306a\u306b\u304b\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\\n\\n- \u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3078\u30ed\u30b0\u30a4\u30f3\uff1a\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u304b\u308f\u308a\u306b\u3001\u81ea\u5206\u304c\u305d\u308c\u3092\u77e5\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u8a3c\u660e\u3059\u308c\u3070\u3088\u3044\\n- \u30a2\u30a4\u30c7\u30f3\u30c6\u30a3\u30c6\u30a3\u306e\u8a8d\u8a3c\uff1a\u672c\u540d\u3092\u30d0\u30e9\u3059\u304b\u308f\u308a\u306b\u3001\u30d7\u30eb\u30fc\u30d5\u3092\u9001\u308b\u3060\u3051\u3067\u6e08\u3080\\n- \u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\uff1a\u304a\u91d1\u3092\u30d1\u30d6\u30ea\u30c3\u30af\u306a\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u4e0a\u3067\u9001\u308b\u3088\u308a\u3082\u3001\u30d7\u30eb\u30fc\u30d5\u3067\u691c\u8a3c\u3059\u308b\u3053\u3068\u3067\u6e08\u3080\u3002\u4f8b\u3048\u3070\u3001Zcash \u306f\u3053\u306e\u4ed5\u7d44\u3067\u3042\u308b\u3002\\n\\n## \u4f8b\uff11\\n\\nAlice and Bob \u306f\u7d75\u672c\u306b\u3044\u308b Waldo \u306e\u5834\u6240\u3092\u63a2\u3059\u306e\u306b\u7af6\u3063\u3066\u3044\u308b\u3068\u3057\u3088\u3046\u3002\\n\\n![](findthisguy.png)\\n\\nAlice \u306f Waldo \u306e\u5c45\u5834\u6240\u306f\u898b\u3064\u304b\u3063\u305f\u3068\u8a00\u3044\u5f35\u3063\u3066\u3044\u308b\u3002\\nAlice \u306f\u5b9f\u969b\u306e\u5c45\u5834\u6240\u3092\u30d0\u30e9\u3059\u3053\u3068\u306a\u304f\u3001\u4f1d\u3048\u305f\u304f\u3066\u8272\u3005\u8003\u3048\u305f\u3002\\n\\n### Proof1\\n\\nAlice \u306f Waldo \u306e\u7834\u7247\u3092\u305d\u306e\u307e\u307e\u5207\u308a\u53d6\u3063\u3066 Bob \u306b\u898b\u305b\u308b\u3002Bob \u306f Alice \u306e\u5207\u308a\u53d6\u3063\u305f\u7834\u7247\u3001\u3042\u308b\u3044\u306f\u5207\u308a\u53d6\u3063\u305f\u5f8c\u306e\u7d75\u672c\u3092\u53c2\u8003\u306b\u7b54\u3048\u3092\u63a2\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002\\n\\n![](alicecutehon.png)\\n\\n### Proof2\\n\\nAlice \u306f\u5225\u306e\u7d19\u3092\u7d75\u672c\u306b\u304b\u3076\u305b\u3066\u3001Bob \u306b Waldo \u3060\u3051\u7a74\u3092\u958b\u3051\u3066\u3092\u898b\u305b\u308b\u3068\u3057\u3088\u3046\u3002\u3053\u306e\u5834\u5408\u3001Waldo \u304c\u5468\u308a\u306e\u6b63\u78ba\u306a\u98a8\u666f\u306b\u3044\u308b\u304b\u306f\u4e0d\u660e\u3067\u3001Alice \u306f\u305d\u306e\u98a8\u666f\u3092\u6b63\u3057\u304f\u8a3c\u660e\u3067\u304d\u308c\u3070\u8a3c\u660e\u3067\u304d\u308b\u3002\\n\\n![](alicecutimage.png)\\n\\n### \u5065\u5168\u6027\u3001\u5b8c\u5168\u6027\u3001\u30bc\u30ed\u77e5\u8b58\u306e\u5c5e\u6027\\n\\n\u3053\u306e\u4e8c\u7a2e\u985e\u306e\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306f\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u306e\uff13\u3064\u306e\u5c5e\u6027\u3067\u3042\u308b\u5065\u5168\u6027\u3001\u5b8c\u5168\u6027\u3001\u30bc\u30ed\u77e5\u8b58\u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u3068\u8a00\u3048\u3088\u3046\u3002\\n\\n1. \u5065\u5168\u6027\uff1a\u8a3c\u660e\u3067\u304d\u305f\u3089\u3001\u672c\u5f53\u306b\u306a\u308b\u3002Alice \u304c\u3082\u3057 Waldo \u306e\u5c45\u5834\u6240\u3092\u63a2\u305b\u306a\u304b\u3063\u305f\u3089\u3001\u30e9\u30f3\u30c0\u30e0\u306a\u30d4\u30fc\u30b9\u306b\u306a\u3063\u305f\u306b\u9055\u3044\u306a\u304f\u3001\u3059\u3050\u306b\u898b\u3064\u304b\u3063\u3066\u3044\u306a\u3044\u3068\u3070\u308c\u308b\u3060\u308d\u3046\u3002\\n2. \u5b8c\u5168\u6027\uff1a\u8a3c\u660e\u3067\u304d\u305f\u5834\u5408\u306f\u5fc5\u305a\u30d7\u30eb\u30fc\u30d5\u304c\u3042\u308b\u3002Waldo \u3092\u63a2\u305b\u305f\u5834\u5408\u3001\u5fc5\u305a Waldo \u3092\u898b\u305b\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002\\n3. \u30bc\u30ed\u77e5\u8b58\uff1a\u8a3c\u660e\u3055\u308c\u305f\u3053\u3068\u304c\u898b\u305b\u3089\u308c\u3066\u3044\u3066\u3001\u4e8b\u5b9f\u305d\u306e\u3082\u306e\u306f\u898b\u305b\u3066\u3044\u306a\u3044\u3002\u552f\u4e00\u898b\u305b\u305f\u4e8b\u5b9f\u306f Waldo \u306f\u898b\u3064\u304b\u3063\u305f\u3088\u3068\u3044\u3046\u3053\u3068\u3060\u3051\u3067\u3001\u3069\u306e\u5834\u6240\u306b\u3044\u308b\u304b\u3068\u304b\u306e\u60c5\u5831\u306f\u958b\u793a\u3057\u3066\u3044\u306a\u3044\u3002\\n\\n## \u4f8b 2\\n\\n\u3082\u3046\u4e00\u3064\u4f8b\u3092\u898b\u3066\u307f\u3088\u3046\u3002Alice \u306f\u8272\u76f2\u3067\u3001Bob \u306f\u305d\u3046\u3067\u306f\u306a\u3044\u3002\u3067\u3082 Alice \u306f Bob \u304c\u81ea\u5206\u306f\u8272\u76f2\u3067\u306a\u3044\u3053\u3068\u3092\u4fe1\u7528\u3067\u304d\u3066\u304a\u3089\u305a\u3001Bob \u306b\u8a3c\u660e\u3057\u3066\u307b\u3057\u3044\u3068\u601d\u3063\u3066\u3044\u308b\u3002\\n\\n\u305d\u3053\u3067\u6697\u53f7\u5c02\u9580\u5bb6\u306e\u5f7c\u5973\u306f\u3046\u307e\u304f\u8003\u3048\u3066\u5b9f\u9a13\u3092\u3057\u3060\u3057\u305f\u3002\\n\\nAlice \u306f\u9752\u3044\u30dc\u30fc\u30eb\u3068\u30ec\u30c3\u30c9\u306e\u30dc\u30fc\u30eb\u3092\u6301\u3063\u3066\u3044\u3066\u3001\u4f53\u306e\u5f8c\u308d\u306b\u3082\u3063\u3066\u3044\u304d\u3001\u30b7\u30e3\u30c3\u30d5\u30eb\u3057\u3066\u304b\u3089 Bob \u306b\u898b\u305b\u3064\u3064\u3001\u30dc\u30fc\u30eb\u304c\u5165\u3063\u3066\u3044\u308b\u624b\u304c\u5909\u308f\u3063\u305f\u306e\u304b\u306b\u3064\u3044\u3066\u5c0b\u306d\u308b\u3002\\n\u3053\u308c\u3092 20 \u56de\u304f\u3089\u3044\u7e70\u308a\u8fd4\u3059\u3053\u3068\u3067\u3001\u3082\u3057 Bob \u304c\u5168\u90e8\u6b63\u89e3\u3057\u3066\u3044\u305f\u3089\u3001\u305f\u307e\u305f\u307e Bob \u304c\u8272\u76f2\u3067\u3042\u308a\u3064\u3064\u3001\u6b63\u89e3\u3067\u304d\u305f\u78ba\u7387\u306f 1/1048576 \u304f\u3089\u3044\u3067\u7121\u8996\u3067\u304d\u308b\u306e\u3067\u3001\u307b\u307c\u4fe1\u983c\u306b\u5024\u3059\u308b\u3060\u308d\u3046\u3068 Alice \u306f\u8003\u3048\u305f\u3002\\n\\n![](AliceBobHandColor.png)\\n\\n**THE END**\\n\\n[0xSage \u3055\u3093\u306e\u8a18\u4e8b](https://medium.com/good-audience/understanding-zero-knowledge-proofs-through-simple-examples-df673f796d99)\u3092\u53c2\u8003\u306b\u629c\u7c8b\u30fb\u7ffb\u8a33\u3057\u305f\u308a\u3057\u3066\u3044\u308b\u3002"},{"id":"opcode-basics","metadata":{"permalink":"/blog/opcode-basics","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/opcode-basics/2023-1-8-opcode-basics.md","source":"@site/blog/opcode-basics/2023-1-8-opcode-basics.md","title":"opcode\u306b\u3064\u3044\u3066","description":"Hi Hi, never give up!","date":"2023-01-08T00:00:00.000Z","formattedDate":"2023\u5e741\u67088\u65e5","tags":[{"label":"opcode","permalink":"/blog/tags/opcode"},{"label":"Etheruem","permalink":"/blog/tags/etheruem"},{"label":"blockchain","permalink":"/blog/tags/blockchain"},{"label":"examples","permalink":"/blog/tags/examples"}],"readingTime":2.122,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"opcode-basics","title":"opcode\u306b\u3064\u3044\u3066","authors":["Thurendous","Polymetis"],"blogDescription":"opcode\u306b\u3064\u3044\u3066","tags":["opcode","Etheruem","blockchain","examples"]},"prevItem":{"title":"\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u3092\u4e8b\u4f8b\u3067\u7406\u89e3\u3059\u308b","permalink":"/blog/Zero-knowledge-proofs-explained-by-examples"},"nextItem":{"title":"ERC1155\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","permalink":"/blog/what-is-ERC1155-with-code-explained"}},"content":"Hi Hi, never give up!\\n\\n\u3053\u3053\u3067\u306f\u3001opcode\uff08\u30aa\u30da\u30ec\u30fc\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\uff09\u306b\u3064\u3044\u3066\u8a9e\u308b\u306b\u306f EVM \u306b\u3064\u3044\u3066\u3082\u8a9e\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\\n\\n\u4ed6\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3068\u540c\u3058\u3088\u3046\u306b\u3001solidity \u306f\u30cf\u30a4\u30ec\u30d9\u30eb\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3042\u308a\u3001\u4eba\u9593\u304c\u8aad\u307f\u3084\u3059\u3044\u4e00\u65b9\u3067\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306f\u7406\u89e3\u3067\u304d\u306a\u3044\u3002\u79c1\u9054\u304c geth \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001\u305d\u308c\u306b\u52a0\u3048\u3066 Ethereum Virtual Machine \u304c\u3064\u304d\u3082\u306e\u3068\u3057\u3066\u3064\u3044\u3066\u304f\u308b\u3002EVM \u3068\u306f\u8efd\u91cf\u7d1a\u306e OS \u307f\u305f\u3044\u306a\u3082\u306e\u3067\u3001\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u30e9\u30f3\u3059\u308b\u74b0\u5883\u3068\u3057\u3066\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u3002\\n\\nSolidity \u306e\u30b3\u30fc\u30c9\u3092 solc \u30b3\u30f3\u30d1\u30a4\u30e9\u3092\u4f7f\u3063\u3066 compile \u3059\u308b\u3068\u304d\u306b\u3001\u30b3\u30fc\u30c9\u3092\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306b\u5909\u63db\u3055\u308c\u308b\u3002EVM \u306f\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u304c\u7406\u89e3\u3067\u304d\u308b\u3002\\n\\n\u4e0b\u8a18\u306e\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u4f8b\u3092\u898b\u3066\u307f\u3088\u3046\u3002\\n\\n```sol\\npragma solidity ^0.4.11;\\ncontract MyContract {\\n uint i = (10 + 2) * 2;\\n}\\n```\\n\\n\u3053\u306e\u5834\u5408\u3001remix browser \u3067\u8d70\u3089\u305b\u305f\u5834\u5408\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e details \u3092\u898b\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u3046\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u60c5\u5831\u304c\u898b\u3048\u3066\u304f\u308b\u3002\\n![](contractdetails.png)\\n\\n\u3053\u306e\u30b1\u30fc\u30b9\u3067\u306f\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u305f\u30b3\u30fc\u30c9\u306f\uff1a\\n\\n```\\n60606040525b600080fd00a165627a7a7230582012c9bd00152fa1c480f6827f81515bb19c3e63bf7ed9ffbb5fda0265983ac7980029\\n```\\n\\n\u3053\u306e\u30c7\u30fc\u30bf\u306f\u30d8\u30af\u30b5\u30c7\u30b7\u30de\u30eb\u30c7\u30fc\u30bf\u3068\u3057\u3066\u73fe\u308c\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u6700\u7d42\u306e\u5f62\u3068\u306a\u3063\u3066\u3044\u308b\u3002\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u547c\u3070\u308c\u3066\u3044\u308b\u3082\u306e\u3060\u3002\\n\\n\u5b9f\u969b\u306b\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3068\u304d\u306b\u306f\u3001\u3053\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u3044\u308b\u3053\u3068\u3068\u30a4\u30b3\u30fc\u30eb\u3002\\n\\n\u30a6\u30a9\u30ec\u30c3\u30c8\u3042\u308b\u3044\u306f\u30a2\u30c9\u30ec\u30b9\u306e\u524d\u306b\u3042\u308b\\"0x\\"\u3068\u306f\u4f55\u3092\u610f\u5473\u3059\u308b\u306e\u3060\u308d\u3046\u304b\u3002\\"0x\\"\u304b\u3089\u30b9\u30bf\u30fc\u30c8\u3059\u308b\u3082\u306e\u306f\u3053\u308c\u306f EVM \u3068\u4f1a\u8a71\u3092\u3059\u308b\u306b\u306f\u3001EVM \u306f\u3069\u3093\u306a\u30c7\u30fc\u30bf\u3067\u3082 16 \u9032\u6570\u306e\u30c7\u30fc\u30bf\u3068\u3057\u3066\u6271\u3046\u306e\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u304b\u3089\u3067\u3042\u308b\u3002\\n\\nopcode \u3082\u3042\u308b\u3002\\n\\n```\\nPUSH1 0x60 PUSH1 0x40 MSTORE PUSH1 0x18 PUSH1 0x0 SSTORE CALLVALUE ISZERO PUSH1 0x13 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST JUMPDEST PUSH1 0x36 DUP1 PUSH1 0x21 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x60 PUSH1 0x40 MSTORE JUMPDEST PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 SLT 0xc9 0xbd STOP ISZERO 0x2f LOG1 0xc4 DUP1 0xf6 DUP3 PUSH32\\n```\\n\\nopcode \u306e\u60c5\u5831\u306b\u3064\u3044\u3066\u306f\u3001[yellow paper](http://gavwood.com/paper.pdf) \u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u3002\\n\\nEVM \u306f\u30b9\u30bf\u30c3\u30af\u30de\u30b7\u30f3\u3067\u3042\u308b\u3002\\n\\n\u7c21\u5358\u306b\u7406\u89e3\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\\n\\n\u307e\u305a\u3053\u306e\u30eb\u30fc\u30eb\u306f\u4f1d\u7d71\u7684\u306a\u30d1\u30bd\u30b3\u30f3\u306e [LIFO](https://techterms.com/definition/filo) \u3068\u540c\u3058\u3067\u3042\u308b\u3002\\n\\n\u901a\u5e38\u306e\u8a08\u7b97\u306e\u5834\u5408\uff1a\\n\\n```\\n10 + 2 * 2\\n// \u7b54\u3048\u306f14\\n\\n```\\n\\n```\\n// stack machine\u306e\u5834\u5408\\n2 2 * 10 +\\n```\\n\\n\u4e0a\u8a18\u306f\u30b9\u30bf\u30c3\u30af\u30de\u30b7\u30f3\u306e\u5834\u5408\u3067\u3001\u307e\u305a\uff12\u3092\u3044\u308c\u3066\u6b21\u306e\uff12\u3092\u5165\u308c\u3066\u3001\u6b21\u306b\u4e57\u6cd5\u8a18\u53f7\u306e\\\\*\u3092\u3044\u308c\u3066\u3001\u8a08\u7b97\u3057 4 \u306b\u306a\u308a\u3001\u6b21\u306b 10\u3001\u6700\u5f8c\u306b\u30d7\u30e9\u30b9\u8a18\u53f7\u3067\u52a0\u6cd5\u8a08\u7b97\u3057\u3066\u300114 \u306b\u306a\u308b\u3002\\n\\n\u3053\u308c\u3067 14 \u306e\u7d50\u679c\u306b\u306a\u308b\u3002\\n\\n\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u547d\u4ee4\u306f`PUSH`\u3068\u3044\u3044\u3001\u30b9\u30bf\u30c3\u30af\u304b\u3089\u9664\u5916\u3059\u308b\u547d\u4ee4\u306f`POP`\u3068\u3044\u3046\u3002\u4e00\u756a\u826f\u304f\u898b\u308b\u30d1\u30bf\u30fc\u30f3\u3068\u3057\u3066\u306f\u3001`PUSH1`\u304c\u3042\u308a\u3001\u305d\u308c\u306f 1byte \u306e\u30c7\u30fc\u30bf\u3092\u30b9\u30bf\u30c3\u30af\u306b\u3044\u308c\u308b\\n\\n```\\nPUSH1 0x60\\n```\\n\\n\u3053\u308c\u306f 1byte \u306e\u30c7\u30fc\u30bf\u3068\u3057\u3066`0x60`\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u3057\u3066\u3001`PUSH1`\u306e 16 \u9032\u6570\u8868\u793a\u306f\u5076\u7136\u306b`0x60`\u3068\u540c\u3058\u3002\u3053\u3053\u3067\u30010x \u3092\u9664\u5916\u3059\u308b\u3068\u3001`6060`\u306b\u306a\u308b\u3002\\n\\n```\\nPUSH1 0x60 PUSH1 0x40 MSTORE\\n```\\n\\nMSTORE \u306f\uff12\u3064\u306e\u5165\u529b\u304c\u6c42\u3081\u3089\u308c\u3001output \u306a\u3057\u3002\u306a\u306e\u3067\u3001\u4e0a\u8a18\u306e\u89e3\u91c8\u3092\u3059\u308b\u3068\u3001\\n\\n1. PUSH1(0x60): put 0x60 in the stack\\n2. PUSH1(0x40): put 0x40 in the stack\\n3. MSTORE(0x52): allocate 0x60 of memory space and move to the 0x40 position\\n\\n\u5b9f\u306f\u3044\u3064\u3082\u540c\u3058\u3088\u3046\u306a\u30de\u30b8\u30c3\u30af\u30ca\u30f3\u30d0\u30fc`6060604052`\u3092\u898b\u308b\u306e\u306f\u3001solidity bytecode \u306e\u8a98\u5c0e\u306e\u59cb\u307e\u308a\u3060\u304b\u3089\u3060\u3002\\n\\n\u307e\u305f\u3001\u5b9f\u306f 16 \u9032\u6570\u3068\u3044\u3046\u3053\u3068\u306f\u300110 \u9032\u6570\u3067\u8003\u3048\u308b\u3068\u300140 \u306f 64 \u3067 60 \u306f 96 \u306b\u306a\u3063\u3066\u3044\u308b\u3002\\n\\n\u201cPUSH1 0x60 PUSH1 0x40 MSTORE\u201d\u304c\u3084\u3063\u3066\u3044\u308b\u306e\u306f\u300196bytes \u306e\u30e1\u30e2\u30ea\u30fc\u3092 allocate \u3057\u3001\u30dd\u30a4\u30f3\u30bf\u30fc\u3092 64 \u500b\u76ee\u306e\u30d0\u30a4\u30c8\u306e\u958b\u59cb\u4f4d\u7f6e\u306b\u79fb\u52d5\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u3002\\n\\n\u3053\u308c\u3067\u300164byte \u306e\u30b9\u30af\u30e9\u30c3\u30c1\u30b9\u30da\u30fc\u30b9\u3068 32byte \u306e\u4e00\u6642\u7684\u306a\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u305f\u3002\\n\\nEVM \u306b\u304a\u3044\u3066\u30013 \u7a2e\u985e\u306e\u30c7\u30fc\u30bf\u4fdd\u5b58\u9818\u57df\u304c\u3042\u308b\u3002\\n\\n- \u4eca\u7d39\u4ecb\u3057\u305f\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u5834\u6240\\n- RAM \u306e\u30e1\u30e2\u30ea\u30fc\u9818\u57df\u3067\u3001MSTORE \u306e opcode \u306e\u3068\u3053\u308d\\n- SSTORE \u306e\u6c38\u4e45\u4fdd\u5b58\u9818\u57df\uff08\u3068\u3066\u3082\u30ac\u30b9\u4ee3\u304c\u304b\u304b\u308b\uff09\\n\\n\u305d\u3057\u3066\u3001Assembly Language \u3092\u4f7f\u3063\u3066\u3001\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u304b\u3051\u308b\u3002\u3053\u308c\u306b\u3088\u3063\u3066 opcode \u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u7d50\u69cb\u96e3\u3057\u3044\u3051\u3069\u3001\u6709\u7528\u306a\u3068\u304d\u3082\u3042\u308b\u3002solidity \u306e\u307f\u3067\u306f\u3067\u304d\u306a\u3044\u3088\u3046\u306a\u3053\u3068\u3082\u3067\u304d\u3066\u3057\u307e\u3046\u3002\\n\\n**THE END**\\n\\n[Bernard \u3055\u3093\u306e\u8a18\u4e8b](https://medium.com/@blockchain101/solidity-bytecode-and-opcode-basics-672e9b1a88c2)\u3092\u53c2\u8003\u306b\u629c\u7c8b\u30fb\u7ffb\u8a33\u3057\u305f\u308a\u3057\u3066\u3044\u308b\u3002"},{"id":"what-is-ERC1155-with-code-explained","metadata":{"permalink":"/blog/what-is-ERC1155-with-code-explained","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/ERC1155/2022-12-25-about-private-var.md","source":"@site/blog/ERC1155/2022-12-25-about-private-var.md","title":"ERC1155\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","description":"BYAC","date":"2022-12-25T00:00:00.000Z","formattedDate":"2022\u5e7412\u670825\u65e5","tags":[{"label":"ERC1155","permalink":"/blog/tags/erc-1155"},{"label":"ERC721","permalink":"/blog/tags/erc-721"},{"label":"NFT","permalink":"/blog/tags/nft"},{"label":"FT","permalink":"/blog/tags/ft"},{"label":"solidity","permalink":"/blog/tags/solidity"}],"readingTime":7.39,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"what-is-ERC1155-with-code-explained","title":"ERC1155\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","authors":["Thurendous","Polymetis"],"blogDescription":"ERC1155\u3068\u306f\u306a\u3093\u305e\u3084","tags":["ERC1155","ERC721","NFT","FT","solidity"]},"prevItem":{"title":"opcode\u306b\u3064\u3044\u3066","permalink":"/blog/opcode-basics"},"nextItem":{"title":"solidity\u306b\u304a\u3044\u3066\u306a\u305cprivate\u306a\u5909\u6570\u306fprivate\u3067\u306f\u306a\u3044\u306e\u304b","permalink":"/blog/private-variable-in-solidity-with-code-explained"}},"content":"![BYAC](whatiserc1155.gif)\\n\\n# TL;DR\\n\\n- ERC721 \u306f\u4e00\u7a2e\u306e NFT \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u306e\u306b\u5bfe\u3057\u3001ERC1155 \u306f\u8907\u6570\u306e NFT \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30a4\u30e1\u30fc\u30b8\u3067\u3059\u3002\\n- ERC1155 \u306e ERC721 \u3068\u306e\u9055\u3044\\n - token id \u306f\u7a2e\u985e\u3092\u898f\u5b9a\u3057\u3001id \u3054\u3068\u306b amount \u3068\u3044\u3046\u6570\u91cf\u3092\u5b9a\u7fa9\u3057\u305f\\n - \u30d0\u30c3\u30c1\u51e6\u7406\u3092\u5b9f\u88c5\u3057\u305f\\n- \u4eca\u56de\u306f ERC1155 \u306e\u30b3\u30fc\u30c9\u89e3\u8aac\u3092\u3057\u305f\\n\\n# EIP1155\\n\\nERC20 \u306b\u3057\u308d ERC721 \u306b\u3057\u308d\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3054\u3068\u306b\u4e00\u7a2e\u306e\u30b3\u30a4\u30f3\u306b\u3057\u304b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001\u6211\u3005\u304c\u30dd\u30b1\u30e2\u30f3\u306e\u30b2\u30fc\u30e0\u3092\u4f5c\u308d\u3046\u3068\u3059\u308b\u3068\u3001ERC21 \u3042\u308b\u3044\u306f ERC721 \u3092\u4f7f\u3046\u3068\u88c5\u5099\u3054\u3068\u306b\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u30c7\u30d7\u30ed\u30a4\u3057\u306a\u3044\u3068\u884c\u3051\u306a\u3044\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u4e00\u5343\u7a2e\u985e\u306e\u30a2\u30a4\u30c6\u30e0\u304c\u3042\u308b\u3068\u3059\u308b\u3068\u3001\u4e00\u5343\u500b\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u4f5c\u3089\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3068\u3093\u3067\u3082\u306a\u3044\u3053\u3068\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u8ab2\u984c\u3092\u89e3\u6c7a\u3059\u304f\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u306e [EIP1155](https://eips.ethereum.org/EIPS/eip-1155) \u3067\u306f\u3001\u4e00\u500b\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u8907\u6570\u306e FT \u3042\u308b\u3044\u306f NFT \u3092\u542b\u3081\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u7279\u306b GameFi \u306e\u30b1\u30fc\u30b9\u3067\u306f\u975e\u5e38\u306b\u6709\u7528\u3067\u3059\u3002\\n\\n\u30b7\u30f3\u30d7\u30eb\u306b\u8a00\u3046\u3068\u3001ERC1155 \u306f\u524d\u306b\u7d39\u4ecb\u3057\u305f NFT \u306e token \u30b9\u30bf\u30f3\u30c0\u30fc\u30c9 ERC721 \u3068\u4f3c\u3066\u3044\u308b\uff1aERC721 \u3067\u306f\u3001token \u3054\u3068\u306b`tokenId`\u3092\u6301\u3063\u3066\u304a\u308a\u3001\u3053\u306e id \u304c\u30e6\u30cb\u30fc\u30af\u3067\u3059\u3002`tokenId`\u306f\u4e00\u500b\u306e token \u3092\u4ee3\u8868\u3057\u3066\u3044\u308b\u3002\u305d\u308c\u306b\u5bfe\u3057\u3066\u3001ERC1155 \u306e\u5834\u5408\u306f\u3001token \u3054\u3068\u306b id \u304c\u30e6\u30cb\u30fc\u30af\u3060\u304c\u3001id \u3054\u3068\u306b\u6570\u91cf\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u3002\u3053\u308c\u3067\u3001\u8907\u6570\u306e\u7a2e\u985e\u306e token \u306f\u540c\u3058\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u5185\u3067\u7ba1\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u69d8\u306b\u306a\u308a\u307e\u3057\u305f\u3002\\n\\n\u7a2e\u985e\u3054\u3068\u306b URI \u304c\u5b58\u5728\u3057\u3066\u3044\u3066\u3001matadata \u3092\u4fdd\u5b58\u3057\u3066\u3044\u307e\u3059\u3002ERC721 \u306e URI \u3068\u985e\u4f3c\u3059\u308b\u304c\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001ERC1155 \u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\uff1a\\n\\n```sol\\n/**\\n * @dev ERC1155\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3001URI()\u3067metadata\u3092\u8fd4\u3059\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev id\u306eURI\u3092\u8fd4\u3059\\n */\\n function uri(uint256 id) external view returns (string memory);\\n```\\n\\n\u3067\u306f\u3001\u3069\u306e\u3088\u3046\u306b\u30c8\u30fc\u30af\u30f3\u306f FT \u304b NFT \u3092\u533a\u5225\u3059\u308b\u306e\u304b\uff1f\u7b54\u3048\u7c21\u5358\u3060\u3001id \u306e\u6570\u91cf\u304c 1 \u306e\u5834\u5408\u3067\u3059\u3068\u3001\u3053\u308c\u306f NFT \u3067\u3042\u308a\u3001ERC721 \u3068\u4f3c\u3066\u3044\u308b\u3002\u3082\u3057 id \u306b\u5bfe\u5fdc\u3059\u308b token \u306e\u6570\u91cf\u304c 1 \u3088\u308a\u5927\u304d\u3044\u5834\u5408\u3001\u305d\u308c\u306f FT \u3068\u306a\u308b\u3002\u540c\u3058 id \u3092\u5171\u6709\u3057\u3066\u3044\u308b\u306e\u3067\u3001ERC20 \u306b\u985e\u4f3c\u3057\u307e\u3059\u3002\\n\\n# IERC1155 \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\\n\\nERC1155 \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306f EIP1155 \u306e\u5b9f\u73fe\u3059\u3079\u304d\u6a5f\u80fd\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u4e2d\u3067\u30014 \u3064\u306e\u30a4\u30d9\u30f3\u30c8\u3068 6 \u500b\u306e\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002ERC721 \u3068\u306e\u9055\u3044\u3068\u3057\u3066\u306f\u3001ERC1155 \u306f\u8907\u6570\u306e\u7a2e\u985e\u306e token \u3092\u542b\u307e\u308c\u307e\u3059\u3002\u307e\u305f\u3001\u30d0\u30c3\u30c1\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3001\u30d0\u30c3\u30c1\u30d0\u30e9\u30f3\u30b9\u30c1\u30a7\u30c3\u30af\u306e\u6a5f\u80fd\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002\\n\\n```sol\\n// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\"https://github.com/AmazingAng/WTF-Solidity/blob/main/40_ERC1155/IERC1155.sol\\";\\n\\n/**\\n * @dev ERC1155\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3001EIP1155\u3067\u6c42\u3081\u3089\u308c\u305f\u6a5f\u80fd\u3092\u5b9a\u7fa9\\n * \u8a73\u7d30\uff1ahttps://eips.ethereum.org/EIPS/eip-1155[EIP].\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev \u5358\u4e00\u306a\u7a2e\u985e\u306etoken\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u30a4\u30d9\u30f3\u30c8\\n * `value`\u500b\u306e`id`\u7a2e\u985e\u306etoken\u304c`operator`\u306b\u3088\u3063\u3066`from`\u304b\u3089`to`\u3078\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u30a4\u30d9\u30f3\u30c8\\n * ids, values\u306f\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3059\u308btoken\u306e\u7a2e\u985e\u3001\u6570\u91cf\u306e\u914d\u5217\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u30a2\u30d7\u30eb\u30fc\u30d6\\n * `account`\u304c\u3059\u3079\u3066\u306e\u6a29\u9650\u3092`operator`\u306b\u79fb\u8b72\u3059\u308b\u3068\u304d\u306b\u653e\u51fa\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev `id`\u306etoken\u306eURI\u304c\u5909\u66f4\u3068\u306a\u3063\u305f\u3068\u304d\u3001\u653e\u51fa\u3002`value`\u306f\u65b0\u305f\u306aURI\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev \u30d0\u30e9\u30f3\u30b9\u3092\u8fd4\u3059\uff0c`account`\u304c\u6301\u3063\u3066\u3044\u308b`id`\u306etoken\u306e\u6b8b\u9ad8\u3092\u8fd4\u3059\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u3067\u8907\u6570\u30d0\u30e9\u30f3\u30b9\u3092\u8fd4\u3059\u3002`accounts`\u306e\u914d\u5217\u3068`ids`\u914d\u5217\u306elength\u304c\u30a4\u30b3\u30fc\u30eb\u3067\u306a\u3044\u3068\u3044\u3051\u306a\u3044\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n returns (uint256[] memory);\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u3067\u8907\u6570\u30a2\u30d7\u30eb\u30fc\u30d6\uff0ccaller\u306etoken\u306e\u6a29\u9650\u3092`operator`\u306b\u6e21\u3059\\n * {ApprovalForAll}\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u3067\u30a2\u30d7\u30eb\u30fc\u30d6\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001bool\u3092\u8fd4\u3059\u3002`operator`\u304c`account`\u306b\u3088\u3063\u3066\u30a2\u30d7\u30eb\u30fc\u30d6\u3055\u308c\u305f\u5834\u5408\uff0c`true`\u3092\u8fd4\u3059\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev \u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3001`amount`\u6570\u91cf\u306e`id`\u7a2e\u985e\u306etoken\\n * {TransferSingle}\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n * \u6761\u4ef6\uff1a\\n * - caller\u304cowner\u3067\u306f\u306a\u3044\u5834\u5408\u3001\u6a29\u9650\u3082\u3063\u3066\u3044\u306a\u3044\u3068\u4f7f\u3048\u306a\u3044\\n * - `from`\u306f\u5341\u5206\u306atoken\u3092\u3082\u3063\u3066\u3044\u308b\\n * - \u9001\u308a\u5148\u304c\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\uff0c`IERC1155Receiver`\u306e`onERC1155Received`\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u306a\u3044\u3068\u901a\u3089\u306a\u3044\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\\n * {TransferBatch}\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n * \u6761\u4ef6\uff1a\\n * - `ids`\u3001`amounts`\u306elength\u304c\u540c\u3058\\n * - \u9001\u308a\u5148\u304c\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\uff0c`IERC1155Receiver`\u306e`onERC1155Received`\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u306a\u3044\u3068\u901a\u3089\u306a\u3044\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\\n```\\n\\n# ERC1155 \u306e\u30a4\u30d9\u30f3\u30c8\\n\\n- `TransferSingle` event: \u5358\u4e00\u306a\u7a2e\u985e\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u30a4\u30d9\u30f3\u30c8\u3001\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u304c\u8d77\u304d\u305f\u3068\u304d\u306b\u653e\u51fa\\n- `TransferBatch` event: \u30d0\u30c3\u30c1\u30c8\u30fc\u30af\u30f3\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306e\u30a4\u30d9\u30f3\u30c8\u3001\u30d0\u30c3\u30c1\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u304c\u8d77\u304d\u305f\u3068\u304d\u306b\u653e\u51fa\\n- `ApprovalForAll` event: \u30d0\u30c3\u30c1\u30a2\u30d7\u30eb\u30fc\u30d6\u306e\u30a4\u30d9\u30f3\u30c8\u3001\u30d0\u30c3\u30c1\u30a2\u30d7\u30eb\u30fc\u30d6\u304c\u8d77\u304d\u305f\u3068\u304d\u306b\u653e\u51fa\\n- `URI` event: metadata \u306e\u30a2\u30c9\u30ec\u30b9\u5909\u66f4\u306e\u30a4\u30d9\u30f3\u30c8\u3001`uri`\u5909\u66f4\u6642\u306b\u653e\u51fa\\n\\n# IERC1155\\n\\n- `balanceOf()`: \u5358\u4e00\u306a\u7a2e\u985e\u306e\u6b8b\u9ad8\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002`account`\u306e\u6301\u3063\u3066\u3044\u308b`id`\u7a2e\u985e\u306e token \u306e\u30d0\u30e9\u30f3\u30b9\\n- `balanceOfBatch()`: \u591a\u7a2e\u985e\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u30c1\u30a7\u30c3\u30af\u3002\u30c1\u30a7\u30c3\u30af\u3059\u308b`accounts`\u304c`ids`\u3068\u306e length \u304c\u540c\u3058\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308b\\n- `setApprovalForAll()`: \u30d0\u30c3\u30c1\u30a2\u30d7\u30eb\u30fc\u30d6\u3001caller \u306e token \u3092 operator \u306b\u6a29\u9650\u3092\u79fb\u8b72\u3059\u308b\\n- `isApprovalForAll()`: \u30d0\u30c3\u30c1\u30a2\u30d7\u30eb\u30fc\u30d6\u306e\u60c5\u5831\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002`operator`\u304c`account`\u306b\u3088\u3063\u3066\u6a29\u9650\u3092\u3082\u3089\u3063\u3066\u3044\u308b\u5834\u5408\u306f`true`\u3092\u8fd4\u3059\\n- `safeTransferFrom()`: \u30bb\u30fc\u30d5\u306a\u5358\u4e00\u306e token \u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3002`amount`\u6570\u91cf\u306e`id`\u7a2e\u985e\u306e token \u3092`from`\u304b\u3089\u3001`to`\u3078\u9001\u308b\u3002`to`\u304c\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\u3001`onERC1155BatchReceived()`\u95a2\u6570\u306e\u5b9f\u88c5\u304c\u3042\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3055\u308c\u308b\u3002\\n\\n# ERC1155 \u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306b\u3001\u7528\u610f\u3059\u308b\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5f62\\n\\n`ERC721`\u3068\u540c\u3058\u3088\u3046\u306b\u3001NFT \u3092\u9001\u3063\u3066\u30ed\u30c3\u30af\u3055\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u3001`ERC1155`\u306f\u53d7\u3051\u53d6\u308b\u5074\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b`IERC1155Receiver`\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u7d99\u627f\u3057\u30012 \u3064\u306e\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002\\n\\n- `onERC1155Recieved()`: \u5358\u4e00\u306a\u7a2e\u985e\u306e token \u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306e\u95a2\u6570\u3002ERC1155 \u306e\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3067\u3042\u308b`safeTransferFrom`\u95a2\u6570\u304b\u3089\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3092\u53d7\u3051\u308b\u305f\u3081\u306b\u306f\u3001\u81ea\u5206\u81ea\u8eab\u306e selector \u3067\u3042\u308b`0xf23a6e61`\u3092\u8fd4\u3059\\n- `onERC1155BatchReceived()`: \u8907\u6570\u7a2e\u985e\u306e token \u3092\u53d7\u3051\u53d6\u308b\u7528\u306e\u95a2\u6570\u3002`ERC1155`\u306e\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1`safeBatchTransferFrom`\u304b\u3089\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306b\u3001\u81ea\u5206\u81ea\u8eab\u3067 selector`0xbc197c81`\u3092\u8fd4\u3059\u5fc5\u8981\u304c\u3042\u308b\u3002\\n\\n```sol\\n// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\"https://github.com/AmazingAng/WTFSolidity/blob/main/34_ERC721/IERC165.sol\\";\\n\\n/**\\n * @dev ERC1155\u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3001ERC1155\u306etoken\u3092\u53d7\u3051\u53d6\u308b\u306b\u306f\u3053\u308c\u3092\u5b9f\u88c5\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev ERC1155\u306e`safeTransferFrom`\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3092\u53d7\u3051\u308b\\n * 0xf23a6e61 \u3042\u308b\u3044\u306f `bytes4(keccak256(\\"onERC1155Received(address,address,uint256,uint256,bytes)\\"))`\u3092\u8fd4\u3059\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev ERC1155\u306e`safeBatchTransferFrom`\u3092\u53d7\u3051\u308b\\n * 0xbc197c81 \u3042\u308b\u3044\u306f `bytes4(keccak256(\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\"))`\u3092\u8fd4\u3059\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n```\\n\\n# ERC1155 \u306e\u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\\n\\n\u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f`IERC1155`\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u898f\u5b9a\u306e\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002\u307e\u305f\u3001\u5358\u4e00\u306a\u7a2e\u985e/\u8907\u6570\u306e\u7a2e\u985e\u306e token \u306e\u30df\u30f3\u30c8\u3001\u30d0\u30fc\u30f3\u95a2\u6570\u3082\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002\\n\\n## \u72b6\u614b\u5909\u6570\u306f\uff14\u3064\\n\\n- `name`: token \u540d\\n- `symbol`: token \u30b7\u30f3\u30dc\u30eb\\n- `_balances`: token \u30d0\u30e9\u30f3\u30b9\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u3002`id`\u306e owner \u306e\u30a2\u30c9\u30ec\u30b9\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u8a18\u9332\\n- `_operatorApprovals`: \u30d0\u30c3\u30c1\u3067\u30a2\u30d7\u30eb\u30fc\u30d6\u3092\u3059\u308b\u305f\u3081\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u3002\u6b8b\u9ad8\u3092\u6301\u3063\u3066\u3044\u308b\u30a2\u30c9\u30ec\u30b9\u306e\u30a2\u30d7\u30eb\u30fc\u30d6\u72b6\u614b\u3092\u8a18\u9332\\n\\n## ERC1155 \u95a2\u6570\\n\\n\u5168\u90e8\u3067 16 \u500b\u306e\u95a2\u6570\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 \u3082\u3061\u308d\u3093\u3001`ERC1155`\u898f\u5b9a\u306e\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u307e\u3059\u3002\\n\\n- `constructor`: \u5f15\u6570\u306f name, symbol\\n- `supportsInterface()`: `ERC165`\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u3092\u5b9f\u73fe\u3001support \u3059\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u8fd4\u3059\u3002\u4ed6\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30c1\u30a7\u30c3\u30af\u3059\u308b\u7528\u306b\u6e96\u5099\u3059\u308b\\n- `balanceOf()`: `IERC1166`\u306e\u6b8b\u9ad8\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u95a2\u6570\u3002`ERC721`\u3068\u9055\u3046\u306e\u306f\u3001\u5f15\u6570\u306f`account`\u53ca\u3073`id`\u3002\\n- `balanceOfBatch()`: \u30d0\u30c3\u30c1\u3067\u8907\u6570\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u8fd4\u3059\u95a2\u6570\\n- `setApprovalForAll()`: \u30d0\u30c3\u30c1\u3067\u8907\u6570\u306e\u30a2\u30d7\u30eb\u30fc\u30d6\u3092\u3059\u308b\u95a2\u6570\u3002`ApprovalForAll`\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\u3059\u308b\\n- `isApprovedForAll()`: \u5168\u90e8\u306e\u6a29\u9650\u3092\u6301\u3063\u3066\u3044\u308b\u30a2\u30c9\u30ec\u30b9\u306a\u306e\u304b\u306e\u78ba\u8a8d\u3092\u3059\u308b\u95a2\u6570\u3002\\n- `safeTransferFrom()`: \u5358\u4e00\u306a\u7a2e\u985e\u306e token \u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3092\u3059\u308b\u95a2\u6570\u3002`TransferSingle`\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\u3002`ERC721`\u3068\u9055\u3046\u306e\u306f\u3001\u5f15\u6570\u306f`from`, `to`, `id`\u4ee5\u5916\u306b\u3082\u3001`amount`\u3068\u3044\u3046\u306e\u304c\u5fc5\u8981\u3068\u306a\u308b\u3002\\n- `safeBatchTransferFrom()`: \u8907\u6570\u7a2e\u985e\u306e token \u3092\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3059\u308b\u95a2\u6570\u3002`TransferBatch`\u3092\u653e\u51fa\u3002\\n- `_mint()`: \u4e00\u7a2e\u985e\u306e token \u3092\u92f3\u9020\\n- `_mintBatch()`: \u8907\u6570\u7a2e\u985e\u306e token \u3092\u92f3\\n- `_burn()`: \u4e00\u7a2e\u985e\u306e token \u3092 burn \u3059\u308b\\n- `_burBatch()`: \u8907\u6570\u7a2e\u985e\u306e token \u3092 burn \u3059\u308b\\n- `doSafeTransferAcceptanceCheck()`: \u4e00\u7a2e\u985e\u306e token \u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306e\u30bb\u30fc\u30d5\u30c1\u30a7\u30c3\u30af\u3002`safeTransferFrom()`\u306b\u3088\u3063\u3066\u4f7f\u308f\u308c\u308b\u3002`onERC1155received()`\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\\n- `uri()`: `ERC1155`\u306e`id`\u306e\u7a2e\u985e\u306e metadata \u306e\u30ea\u30f3\u30af\u3092\u8fd4\u3059\u3002`ERC721`\u306e`tokenURI`\u3068\u4f3c\u3066\u3044\u308b\u3002\\n- `baseURI()`: `baseURI`\u3092\u8fd4\u3059\u3002uri \u306f`baseURI`\u3001`id`\u3092\u63a5\u7d9a\u3059\u308b\u306e\u3067\u3001\u901a\u5e38\u306f\u958b\u767a\u8005\u304c\u66f8\u304d\u63db\u3048\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\\n\\n```sol\\n// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\"./IERC1155.sol\\";\\nimport \\"./IERC1155Receiver.sol\\";\\nimport \\"./IERC1155MetadataURI.sol\\";\\nimport \\"https://github.com/AmazingAng/WTFSolidity/blob/main/34_ERC721/Address.sol\\";\\nimport \\"https://github.com/AmazingAng/WTFSolidity/blob/main/34_ERC721/String.sol\\";\\nimport \\"https://github.com/AmazingAng/WTFSolidity/blob/main/34_ERC721/IERC165.sol\\";\\n\\n/**\\n * @dev ERC1155\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306eimplementation\\n * \u8a73\u7d30\u306fhttps://eips.ethereum.org/EIPS/eip-1155\\n */\\ncontract ERC1155 is IERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address; // library Address\\n using Strings for uint256; // library Strings\\n // Token\u540d\\n string public name;\\n // Token\u30b7\u30f3\u30dc\u30eb\\n string public symbol;\\n // token\u7a2e\u985e\u306eid \u2192 account \u2192 balances \u306e\u30de\u30c3\u30d4\u30f3\u30b0\u3001\u6b8b\u9ad8\u3092\u8a18\u9332\u3059\u308b\u7528\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n // address \u2192 adderss \u306e\u5168\u6a29\u79fb\u8b72\u306e\u8a18\u9332\u3092\u3059\u308b\u30de\u30c3\u30d4\u30f3\u30b0\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3001\u521d\u671f\u5316\u306e\u5024`name` \u3001`symbol`\\n */\\n constructor(string memory name_, string memory symbol_) {\\n name = name_;\\n symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n interfaceId == type(IERC165).interfaceId;\\n }\\n\\n /**\\n * @dev \u30d0\u30e9\u30f3\u30b9\u3092\u8fd4\u3059\u95a2\u6570\u3001IERC1155\u306ebalanceOf\u3002account\u306eid\u7a2e\u985e\u306etoken\u6570\u3092\u8fd4\u3059\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\"ERC1155: address zero is not a valid owner\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev \u8907\u6570\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u8fd4\u3059\\n * \u6761\u4ef6:\\n * - `accounts` \u3001 `ids` \u306elength\u304c\u540c\u3058\u3067\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public view virtual override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\"ERC1155: accounts and ids length mismatch\\");\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n return batchBalances;\\n }\\n\\n /**\\n * @dev \u8907\u6570\u306e\u30a2\u30d7\u30eb\u30fc\u30d6\u3092\u3059\u308b\u95a2\u6570\u3002caller\u306foperator\u306b\u5168\u6a29\u79fb\u8b72\u3092\u3059\u308b\\n * {ApprovalForAll}\u30aa\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n * \u6761\u4ef6\uff1amsg.sender != operator\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n require(msg.sender != operator, \\"ERC1155: setting approval status for self\\");\\n _operatorApprovals[msg.sender][operator] = approved;\\n emit ApprovalForAll(msg.sender, operator, approved);\\n }\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u78ba\u8a8d\u3001\u8907\u6570\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev \u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\uff0c`amount`\u6570\u91cf\u306e`id`token\u3092`from`\u304b\u3089`to`\u3078\u9001\u308b\u95a2\u6570\\n * {TransferSingle} \u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n * \u6761\u4ef6\uff1a\\n * - to \u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306a\u3044\u3053\u3068\\n * - from\u30a2\u30c9\u30ec\u30b9\u306f\u5341\u5206\u306atoken\u6570\u3092\u6301\u3063\u3066\u304a\u308a\u3001caller\u306f\u6a29\u9650\u3092\u6301\u3063\u3066\u3044\u308b\u3053\u3068\\n * - to \u304c\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\u3001IERC1155Receiver-onERC1155Received\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u3053\u3068\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n address operator = msg.sender;\\n // owner\u304b\u3001\u6a29\u9650\u3092\u3082\u3089\u3063\u3066\u3044\u308b\u304b\u306e\u30c1\u30a7\u30c3\u30af\\n require(\\n from == operator || isApprovedForAll(from, operator),\\n \\"ERC1155: caller is not token owner nor approved\\"\\n );\\n require(to != address(0), \\"ERC1155: transfer to the zero address\\");\\n // from\u306f\u5341\u5206\u306atoken\u6570\u3092\u6301\u3063\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\"ERC1155: insufficient balance for transfer\\");\\n // \u30d0\u30e9\u30f3\u30b9\u3092\u66f4\u65b0\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n // \u30a4\u30d9\u30f3\u30c8\u653e\u51fa\\n emit TransferSingle(operator, from, to, id, amount);\\n // \u30bb\u30fc\u30d5\u306a\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306e\u30c1\u30a7\u30c3\u30af\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u3067\u8907\u6570\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\uff0c`amounts`\u3068\u3044\u3046\u6570\u91cf\u306e\u914d\u5217\u3001`ids`\u3068\u3044\u3046toke\u7a2e\u985e\u306e\\n * \u914d\u5217\u3092\u4f7f\u3063\u3066`from`\u304b\u3089`to`\u3078\u9001\u308b\\n * {TransferSingle} \u30a4\u30d9\u30f3\u30c8\\n * \u6761\u4ef6:\\n * - to \u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306a\u3044\\n * - from\u30a2\u30c9\u30ec\u30b9\u306f\u5341\u5206\u306atoken\u6570\u3092\u6301\u3063\u3066\u304a\u308a\u3001caller\u306f\u6a29\u9650\u3092\u6301\u3063\u3066\u3044\u308b\u3053\u3068\\n * - to \u304c\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\u3001IERC1155Receiver-onERC1155Received\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u3053\u3068\\n * - ids\u3001amounts\u306e\u914d\u5217\u306elength\u304c\u540c\u3058\u3067\u3042\u308b\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n address operator = msg.sender;\\n // owner\u304b\u3001\u6a29\u9650\u3092\u3082\u3089\u3063\u3066\u3044\u308b\u304b\u306e\u30c1\u30a7\u30c3\u30af\\n require(\\n from == operator || isApprovedForAll(from, operator),\\n \\"ERC1155: caller is not token owner nor approved\\"\\n );\\n // \u914d\u5217\u306e\u9577\u3055\u304c\u4e00\u7dd2\u3067\u3042\u308b\\n require(ids.length == amounts.length, \\"ERC1155: ids and amounts length mismatch\\");\\n // \u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306a\u3044\u3053\u3068\\n require(to != address(0), \\"ERC1155: transfer to the zero address\\");\\n\\n // for loop\u3067\u30d0\u30e9\u30f3\u30b9\u3092\u66f4\u65b0\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\"ERC1155: insufficient balance for transfer\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n // \u30bb\u30fc\u30d5\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30c1\u30a7\u30c3\u30af\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev mint\u92f3\u9020\u95a2\u6570\\n * {TransferSingle} \u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\"ERC1155: mint to the zero address\\");\\n\\n address operator = msg.sender;\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u3067\u92f3\u9020\\n * \u91ca\u653e {TransferBatch} \u4e8b\u4ef6.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\"ERC1155: mint to the zero address\\");\\n require(ids.length == amounts.length, \\"ERC1155: ids and amounts length mismatch\\");\\n\\n address operator = msg.sender;\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev \u30d0\u30fc\u30f3\u95a2\u6570\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\"ERC1155: burn from the zero address\\");\\n\\n address operator = msg.sender;\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\"ERC1155: burn amount exceeds balance\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n }\\n\\n /**\\n * @dev \u30d0\u30fc\u30f3\u95a2\u6570\uff1a\u8907\u6570\u3092\u540c\u6642\u306b\u5b9f\u884c\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\"ERC1155: burn from the zero address\\");\\n require(ids.length == amounts.length, \\"ERC1155: ids and amounts length mismatch\\");\\n\\n address operator = msg.sender;\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\"ERC1155: burn amount exceeds balance\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n }\\n\\n // @dev ERC1155\u306e\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306e\u30c1\u30a7\u30c3\u30af\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\"ERC1155: ERC1155Receiver rejected tokens\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\"ERC1155: transfer to non-ERC1155Receiver implementer\\");\\n }\\n }\\n }\\n\\n // @dev ERC1155\u306e\u8907\u6570\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306e\u30c1\u30a7\u30c3\u30af\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\"ERC1155: ERC1155Receiver rejected tokens\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\"ERC1155: transfer to non-ERC1155Receiver implementer\\");\\n }\\n }\\n }\\n\\n /**\\n * @dev ERC1155\u306eid\u306euri\u3092\u8fd4\u3059\u3001metadata\u3001ERC721\u306etokenURI\u306b\u540c\u3058\\n */\\n function uri(uint256 id) public view virtual override returns (string memory) {\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, id.toString())) : \\"\\";\\n }\\n\\n /**\\n * {uri}\u306eBaseURI\u3092\u8fd4\u3059\uff0curi\u306fbaseURI\u3001tokenId\u3092\u3064\u306a\u3044\u3060\u3082\u306e\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\"\\";\\n }\\n}\\n\\n```\\n\\n# remix \u3067\u4f5c\u6210\\n\\n\u4eca\u56de remix \u3067\u4f5c\u308b\u306e\u306f ERC1155 \u7248\u306e BAYC\u3002\\n\\n```sol\\n// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\"./ERC1155.sol\\";\\n\\ncontract BAYC1155 is ERC1155{\\nuint256 constant MAX_ID = 10000;\\n// \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\\nconstructor() ERC1155(\\"BAYC1155\\", \\"BAYC1155\\"){\\n}\\n\\n //BAYC\u306ebaseURI\u306f\u3053\u308c\uff1aipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/\\n function _baseURI() internal pure override returns (string memory) {\\n return \\"ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/\\";\\n }\\n\\n // \u30df\u30f3\u30c8\u95a2\u6570\\n function mint(address to, uint256 id, uint256 amount) external {\\n // id \u306f10,000\u3092\u8d85\u3048\u3066\u306f\u306a\u3089\u306a\u3044\\n require(id < MAX_ID, \\"id overflow\\");\\n _mint(to, id, amount, \\"\\");\\n }\\n\\n // \u30d0\u30c3\u30c1\u3067\u30df\u30f3\u30c8\\n function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts) external {\\n // id \u306f10,000\u3092\u8d85\u3048\u3066\u306f\u306a\u3089\u306a\u3044\\n for (uint256 i = 0; i < ids.length; i++) {\\n require(ids[i] < MAX_ID, \\"id overflow\\");\\n }\\n _mintBatch(to, ids, amounts, \\"\\");\\n }\\n\\n}\\n\\n```\\n\\n\u5b9f\u969b\u306e remix \u306b\u3064\u3044\u3066\u306f\u3001\u307e\u305f\u4eca\u5ea6\u306e\u6a5f\u4f1a\u306b\u66f8\u304d\u307e\u3059\u306e\u3067\u3001\u4eca\u56de\u306f\u5272\u611b\u3002\\n\\n# \u6700\u5f8c\u306b\\n\\n\u4eca\u56de\u306f`ERC1155`\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3057\u305f\u3002\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002\u3053\u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306f\u540c\u3058\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u8907\u6570\u306e NFT \u3084 FT \u306e\u5171\u5b58\u3092\u8a31\u3057\u305f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u53ef\u80fd\u306b\u3057\u305f\u306e\u3067\u3001\u500b\u4eba\u7684\u306b\u306f\u5927\u304d\u306a\u30b9\u30c6\u30c3\u30d7\u3060\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001BYAC \u306e\u6539\u9020\u3092\u3057\u3066\u7121\u7406\u3084\u308a`ERC1155`\u306b\u3057\u307e\u3057\u305f\u3002\u307b\u3093\u3058\u3083\u3001\u307e\u305f\u306d\u3002\\n\\n**THE END**\\n\\n![](yay-yas.gif)"},{"id":"private-variable-in-solidity-with-code-explained","metadata":{"permalink":"/blog/private-variable-in-solidity-with-code-explained","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/About-private-var/2022-12-22-about-private-var.md","source":"@site/blog/About-private-var/2022-12-22-about-private-var.md","title":"solidity\u306b\u304a\u3044\u3066\u306a\u305cprivate\u306a\u5909\u6570\u306fprivate\u3067\u306f\u306a\u3044\u306e\u304b","description":"Hello, everybody!","date":"2022-12-22T00:00:00.000Z","formattedDate":"2022\u5e7412\u670822\u65e5","tags":[{"label":"private","permalink":"/blog/tags/private"},{"label":"variable","permalink":"/blog/tags/variable"},{"label":"solidity","permalink":"/blog/tags/solidity"},{"label":"\u5909\u6570","permalink":"/blog/tags/\u5909\u6570"}],"readingTime":2.146,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"private-variable-in-solidity-with-code-explained","title":"solidity\u306b\u304a\u3044\u3066\u306a\u305cprivate\u306a\u5909\u6570\u306fprivate\u3067\u306f\u306a\u3044\u306e\u304b","authors":["Thurendous","Polymetis"],"blogDescription":"\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306a\u5909\u6570\u306f\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3067\u306f\u306a\u3044","tags":["private","variable","solidity","\u5909\u6570"]},"prevItem":{"title":"ERC1155\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","permalink":"/blog/what-is-ERC1155-with-code-explained"},"nextItem":{"title":"NFT\u3001ERC721\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","permalink":"/blog/what-is-ERC721-and-NFT-with-code-explained"}},"content":"![](hffgf.gif)\\n\\nHello, everybody!\\n\\n# TL;DR\uff1a\\n\\n\u7d50\u8ad6\u3092\u8a00\u3063\u3066\u304a\u304d\u307e\u3059\u3068\u3001\u79d8\u5bc6\u3092\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u306b\u4e57\u305b\u308b\u306a\u3002private \u3068\u3044\u3046\u4fee\u98fe\u5b50\u3082\u79d8\u5bc6\u3092\u4fdd\u6301\u3059\u308b\u306e\u306b\u3001\u610f\u5473\u3092\u306a\u3055\u306a\u3044\u3002\\n\\n# \u52d8\u9055\u3044\u3057\u3066\u3044\u307e\u305b\u3093\u304b\\n\\nsolidity \u306b\u89e6\u308b\u3068\u3001private \u3068\u3044\u3046\u4fee\u98fe\u5b50\u306b\u3067\u3042\u3046\u3053\u3068\u304c\u3042\u308b\u304b\u3068\u601d\u3046\u3093\u3067\u3059\u304c\u3001\u305d\u308c\u306f\u6642\u306b\u306f\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3068\u3044\u3046\u4fee\u98fe\u5b50\u3092\u3064\u3051\u3066\u3042\u308b\u306e\u3067\u3001\u3088\u308a\u79d8\u5bc6\u6027\u3092\u6301\u3063\u3066\u3044\u308b\u5909\u6570\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3068\u304b\u3092\u4fdd\u5b58\u3059\u308c\u3070\u3088\u304f\u306d\uff1f\u3068\u52d8\u9055\u3044\u3092\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u7d50\u8ad6\u304b\u3089\u3044\u3046\u3068\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3068\u3044\u3046\u3082\u306e\u306f\u5168\u304f\u3068\u8a00\u3063\u3066\u3044\u3044\u304f\u3089\u3044\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u304c\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3001\u79d8\u5bc6\u3092\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u306b\u4fdd\u5b58\u3059\u308b\u306e\u306f\u8ad6\u5916\u3060\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\\n\\n# \u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306a\u5909\u6570\u3092\u547c\u3073\u51fa\u3057\u3066\u307f\u308b\\n\\n\u3055\u3066\u3001\u5b9f\u6f14\u3092\u4f34\u3063\u3066\u884c\u304d\u305f\u3044\u306e\u3067\u3001\u30b3\u30fc\u30c9\u3092\u5b9f\u969b\u306b\u52d5\u304b\u3057\u3066\u307f\u3066\u884c\u304d\u307e\u3057\u3087\u3046\u304b\u3002\\n\\n![](hackableson.gif)\\n\\n\u4eca\u56de\u306e\u4f7f\u3046\u30ec\u30dd\u30b8\u30c8\u30ea\u306f[\u3053\u3061\u3089](https://github.com/thurendous/private-var)\u3067\u3059\u3002\\n\\n\u30ec\u30dd\u30b8\u30c8\u30ea\u306e\u7d50\u679c\u3092\u898b\u305f\u3044\u65b9\u306f\u3053\u306e\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002\\n\\n```\\ngit clone https://github.com/thurendous/private-var\\nyarn install\\nyarn hardhat test\\n```\\n\\n\u3053\u308c\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002\\n\\n![imageOfTerminalwithResult](./ScreenShot2022-12-2223.15.42.png)\\n\\n\u4eca\u56de\u4f7f\u3063\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306f`test`\u3068`contracts`\u306e\u307f\u3067\u3059\u3002\\n\\n\u305d\u306e\u8a73\u7d30\u3092\u8aac\u660e\u3057\u307e\u3059\u3002\\n\\n\u4eca\u56de\u306f\u3053\u3093\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002\\n\u4e2d\u8eab\u306f\u81f3\u3063\u3066\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3002\\n\\n- `LoginContract`\u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u5ba3\u8a00\\n- private \u306a\u5909\u6570\u306e userName, password \u3092\u4f5c\u308a\u307e\u3057\u305f\u3002\\n \u3053\u306e\uff12\u3064\u306e\u5909\u6570\u3092\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067\u521d\u671f\u5316\u3057\u3066\u3044\u307e\u3059\u3002\\n\\n```sol\\n// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.9;\\n\\n// Uncomment this line to use console.log\\n// import \\"hardhat/console.sol\\";\\n\\ncontract LoginContract {\\n bytes32 private userName;\\n bytes32 private password;\\n\\n constructor(bytes32 _username, bytes32 _password) {\\n userName = _username;\\n password = _password;\\n }\\n}\\n```\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u5358\u4f4d\u306f `slot` \u3068\u8a00\u308f\u308c\u307e\u3059\u3002\u3053\u306e\u30b9\u30ed\u30c3\u30c8\u3092\u5b9f\u306f\u4f55\u3089\u304b\u306e\u65b9\u6cd5\u3067\u8aad\u307f\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u3002\\n\\n\u7d9a\u3044\u3066\u3001`test`\u30d5\u30a9\u30eb\u30c0\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002\\n\\n\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002\\n\\n- \u30c6\u30b9\u30c8\u306e\u30d5\u30a9\u30eb\u30c0\u306f\u66f8\u3044\u305f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30c6\u30b9\u30c8\u3092\u3059\u308b\u305f\u3081\u306e\u30d5\u30a9\u30eb\u30c0\\n\\n\u4eca\u56de\u306f\u30c6\u30b9\u30c8\u3092\u3059\u308b\u3068\u3044\u3046\u304b\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u30b9\u30ed\u30c3\u30c8\u3092\u8aad\u307f\u53d6\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002\\n\\n```javascript\\nconst {\\n time,\\n loadFixture,\\n} = require(\'@nomicfoundation/hardhat-network-helpers\')\\nconst { anyValue } = require(\'@nomicfoundation/hardhat-chai-matchers/withArgs\')\\nconst { expect } = require(\'chai\')\\nconst { ethers } = require(\'hardhat\')\\n\\ndescribe(\'LoginContract\', function () {\\n // this is the test we run to reveal the private variable\\n it(\'should show us private variable data\', async function () {\\n const LoginContract = await ethers.getContractFactory(\'LoginContract\')\\n\\n const userName = ethers.utils.formatBytes32String(\'calvin\')\\n const password = ethers.utils.formatBytes32String(\\n \'passwordIsMyBigSecret\'\\n )\\n\\n const loginContract = await LoginContract.deploy(userName, password)\\n\\n await loginContract.deployed() // wait for it to be deployed\\n\\n const slot0 = await ethers.provider.getStorageAt(\\n loginContract.address,\\n 0\\n )\\n const slot1 = await ethers.provider.getStorageAt(\\n loginContract.address,\\n 1\\n )\\n const formatUsername = await ethers.utils.parseBytes32String(slot0)\\n const formatPassword = await ethers.utils.parseBytes32String(slot1)\\n\\n console.log(\'userName should be ->\', formatUsername)\\n console.log(\'password should be ->\', formatPassword)\\n })\\n})\\n```\\n\\n\u7d50\u69cb\u305f\u304f\u3055\u3093\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u5c11\u3057\u305a\u3064\u3054\u8aac\u660e\u3057\u307e\u3059\u3002\\n\\n\u30c6\u30b9\u30c8\u306e\u5927\u304d\u306a\u5358\u4f4d\u3001\u300cLoginContract \u3068\u3044\u3046\u30c6\u30b9\u30c8\u3092\u3059\u308b\u3088\u300d\u3068\u3044\u3046\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002\\n\\n```javascript\\ndescribe(\'LoginContract\', function () {\\n\\n}\\n```\\n\\n\u30c6\u30b9\u30c8\u306e\u3088\u308a\u5c0f\u3055\u306a\u5358\u4f4d\u3001\u6587\u5b57\u5217\u306e\u90e8\u5206\u306f\u81ea\u7531\u306b\u8a18\u8f09\u3057\u3066 OK\u3002\u81ea\u5206\u304c\u66f8\u3044\u305f\u306e\u306f\u300c\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306a\u5024\u3092\u51fa\u3057\u3066\u304f\u308c\u308b\u3088\u300d\u3068\u3044\u3046\u3053\u3068\u3092\u610f\u5473\u3059\u308b\\n\\n```javascript\\n it(\'should show us private variable data\', async function () {\\n\\n}\\n```\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\\n\\n```javascript\\nconst LoginContract = await ethers.getContractFactory(\'LoginContract\')\\n```\\n\\n`sername`, `password` \u3092\u4f5c\u6210\u3057\u3066\u304a\u304d\u307e\u3059\u3002\\n\\n```javascript\\nconst userName = ethers.utils.formatBytes32String(\'calvin\')\\nconst password = ethers.utils.formatBytes32String(\'passwordIsMyBigSecret\')\\n```\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3057\u307e\u3059\u3002\u305d\u306e\u3068\u304d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b\u5165\u3063\u3066\u3044\u308b\u5f15\u6570\u3001\u5148\u7a0b\u4f5c\u3063\u305f `username`, `password` \u3082\u4ee3\u5165\u3057\u307e\u3059\u3002\\n\\n```javascript\\nconst loginContract = await LoginContract.deploy(userName, password)\\n```\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30c7\u30d7\u30ed\u30a4\u3092\u5f85\u3061\u307e\u3059\u3002\\n\\n```javascript\\nawait loginContract.deployed() // wait for it to be deployed\\n```\\n\\n\u7d9a\u3044\u3066\u3001\u809d\u5fc3\u306a\u3068\u3053\u308d\u3067\u3059\u3002\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30b9\u30ed\u30c3\u30c8\u3092\u8aad\u307f\u53d6\u308a\u307e\u3059\u3002\u30dd\u30b8\u30b7\u30e7\u30f3\u306f\u305d\u308c\u305e\u308c 0, 1 \u3067\u3059\u3002\u3053\u308c\u306f`userName`, `password`\u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3068\u540c\u3058\u3067\u3059\u3002\\n\\n```javascript\\nconst slot0 = await ethers.provider.getStorageAt(loginContract.address, 0)\\nconst slot1 = await ethers.provider.getStorageAt(loginContract.address, 1)\\n```\\n\\n\u8aad\u307f\u53d6\u3063\u305f\u5024\u3092\u6574\u5f62\u3057\u307e\u3059\u3002\\n\\n```javascript\\nconst formatUsername = await ethers.utils.parseBytes32String(slot0)\\nconst formatPassword = await ethers.utils.parseBytes32String(slot1)\\n```\\n\\n\u30bf\u30fc\u30df\u30ca\u30eb\u3078\u8868\u793a\u3055\u305b\u307e\u3059\u3002\\n\\n```javascript\\nconsole.log(\'userName should be ->\', formatUsername)\\nconsole.log(\'password should be ->\', formatPassword)\\n```\\n\\n\u3053\u308c\u3067\u5148\u7a0b\u306e\u7d50\u679c\u306e\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u3066\u3001\u8aad\u307f\u53d6\u3089\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u306d\u3002\\n\\n```shell\\n LoginContract\\nuserName should be -> calvin\\npassword should be -> passwordIsMyBigSecret\\n \u2714 should show us private variable data (668ms)\\n\\n\\n 1 passing (670ms)\\n```\\n\\n\u3060\u304b\u3089\u3001private \u306a\u5909\u6570\u3060\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u79d8\u5bc6\u306a\u3053\u3068\u306f\u4f55\u4e00\u3064\u306d\u3048\u3088\u3002\\n\\n**THE END**"},{"id":"what-is-ERC721-and-NFT-with-code-explained","metadata":{"permalink":"/blog/what-is-ERC721-and-NFT-with-code-explained","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/ERC721/2022-12-22-about-private-var.md","source":"@site/blog/ERC721/2022-12-22-about-private-var.md","title":"NFT\u3001ERC721\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","description":"Hello, everybody!","date":"2022-12-22T00:00:00.000Z","formattedDate":"2022\u5e7412\u670822\u65e5","tags":[{"label":"ERC721","permalink":"/blog/tags/erc-721"},{"label":"NFT","permalink":"/blog/tags/nft"},{"label":"solidity","permalink":"/blog/tags/solidity"}],"readingTime":6.672,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"what-is-ERC721-and-NFT-with-code-explained","title":"NFT\u3001ERC721\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","authors":["Thurendous","Polymetis"],"blogDescription":"ERC721\u3068\u306f\u306a\u3093\u305e\u3084","tags":["ERC721","NFT","solidity"]},"prevItem":{"title":"solidity\u306b\u304a\u3044\u3066\u306a\u305cprivate\u306a\u5909\u6570\u306fprivate\u3067\u306f\u306a\u3044\u306e\u304b","permalink":"/blog/private-variable-in-solidity-with-code-explained"},"nextItem":{"title":"Web3 Term Dictionary","permalink":"/blog/web3-term-dictionary"}},"content":"Hello, everybody!\\n\\n# TL;DR\\n\\n- NFT \u306f\u975e\u4ee3\u66ff\u6027\u30c8\u30fc\u30af\u30f3\u306e\u3053\u3068\\n- \u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3046\u3068\u30c7\u30b8\u30bf\u30eb\u6240\u6709\u6a29\u306e\u3053\u3068\\n- \u30b3\u30fc\u30c9\u3067\u7406\u89e3\u3057\u307e\u3057\u3087\u3046\\n\\n![](nft-nfts.gif)\\n\\nBTC \u3084 ETH \u306e\u3088\u3046\u306a\u30c8\u30fc\u30af\u30f3\u306f FT \u3068\u547c\u3070\u308c\u3001\u4ee3\u66ff\u6027\u30c8\u30fc\u30af\u30f3\u306e\u3053\u3068\u3067\u3059\u3002\u7279\u5fb4\u3068\u3057\u3066\u306f\u3001\u304a\u4e92\u3044\u306b\u4ea4\u63db\u53ef\u80fd\u3067\u5927\u304d\u306a\u9055\u3044\u306f\u306a\u3044\u3053\u3068\u3067\u3059\uff08\u53b3\u5bc6\u306b\u306f\u9055\u3044\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u306f\u305d\u306e\u8b70\u8ad6\u3092\u3057\u306a\u3044\uff09\u3002\u307e\u305f\u3001\u30a2\u30fc\u30c8\u3001\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3001\u4e0d\u52d5\u7523\u306a\u3069\u306e\u3088\u3046\u306a\u304a\u4e92\u3044\u9055\u3044\u3092\u304b\u306a\u308a\u6301\u3063\u3066\u3044\u308b\u3088\u3046\u306a\u3082\u306e\u306f\u975e\u4ee3\u66ff\u6027\u30c8\u30fc\u30af\u30f3\u3067\u4ee3\u8868\u3055\u308c\u308b\u3053\u3068\u304c\u307b\u3068\u3093\u3069\u3067\u3059\u3002\\n\\n\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u3067\u306f EIP721 \u304c\u63d0\u6848\u3055\u308c\u3066\u3001ERC721 \u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u304c\u5f62\u6210\u3055\u308c\u307e\u3057\u305f\u3002\\n\\n# EIP, ERC \u3068\u306f\\n\\n\u7d50\u8ad6\uff1aEIP \u304c ERC \u3092\u542b\u3093\u3067\u3044\u308b\\n\\n\u307e\u305a\u3001\u7406\u89e3\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u306f\u3001[ERC721](https://eips.ethereum.org/EIPS/eip-721) \u3067\u3059\u3002\u3053\u306e\uff12\u3064\u306e\u9593\u306b\u306f\u306a\u3093\u306e\u95a2\u4fc2\u304c\u3042\u308b\u306e\u3067\u3057\u3087\u3046\u304b\u3002EIP \u3068\u306f\u3001Ethereum Improvement Proposals \u306e\u3053\u3068\u3067\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304c\u63d0\u6848\u3057\u305f\u30d7\u30ed\u30c8\u30b3\u30eb\u306a\u3069\u3092\u6539\u5584\u3059\u308b\u305f\u3081\u306e\u63d0\u6848\u306e\u3053\u3068\u3067\u3059\u3002EIP \u306f\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u306e\u4e2d\u306e\u4efb\u610f\u306e\u5206\u91ce\u306e\u6539\u5584\u3067\u3001\u4f8b\u3048\u3070\u65b0\u305f\u306a\u6a5f\u80fd\u3001ERC\u3001\u30d7\u30ed\u30c8\u30b3\u30eb\u6539\u5584\u306a\u3069\u304c\u3042\u308a\u307e\u3059\u3002\\n\\nERC \u3068\u306f\u3001Ethereum Request For Comment \u306e\u3053\u3068\u3067\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u4e0a\u306e\u5404\u7a2e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d7\u30ed\u30c8\u30b3\u30eb\u3068\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306e\u3053\u3068\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u5178\u578b\u7684\u306a ERC20, ERC721\u3001\u3042\u308b\u3044\u306f URI \u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9 ERC67\u3001\u3042\u308b\u3044\u306f\u30a6\u30a9\u30ec\u30c3\u30c8\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8 EIP75, EIP85 \u306a\u3069\u304c\u3042\u308b\u3002\\n\\nERC \u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306f\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u306e\u767a\u5c55\u306b\u304a\u3051\u308b\u91cd\u8981\u306a\u69cb\u6210\u8981\u7d20\u3067\u3001ERC20, ERC721, ERC223, ERC777 \u306a\u3069\u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u304c\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u306e\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u306b\u591a\u5927\u306a\u5f71\u97ff\u3092\u4e0e\u3048\u3066\u3044\u307e\u3057\u305f\u3002\\n\\n# ERC165\\n\\n\u307e\u305a ERC165 \u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u307e\u3057\u3087\u3046\u3002\\n\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5ba3\u8a00\u3057\u3066\u4ed6\u306e\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30c1\u30a7\u30c3\u30af\u3059\u308b\u305f\u3081\u306b\u3084\u3063\u3066\u3044\u308b\u306e\u304c ERC165 \u306e\u3053\u3068\u3067\u3059\u3002\\n\\n\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3046\u3068\u3001`ERC165` \u3092\u901a\u3057\u3066\u3068\u3042\u308b\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c `ERC721`, `ERC1155` \u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3067\u304d\u308b\u3068\u3044\u3046\u4ed5\u7d44\u307f\u3067\u3059\u3002\\n\\n```sol\\ninterface IERC165 {\\n /**\\n * @dev \u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u5f53\u8a72\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306e`interfaceId`\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308c\u3070true\u3092\u8fd4\u3059\\n * \u8a73\u7d30\u306f\u3053\u3061\u3089\uff1ahttps://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n *\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n```\\n\\n\u6b21\u306b\u5b9f\u969b\u306b\u306f ERC721 \u304c\u3069\u306e\u3088\u3046\u306b `supportsInterface()`\u3092\u5b9f\u73fe\u3057\u305f\u306e\u304b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\\n\\n```sol\\nfunction supportsInterface(bytes4 interfaceId) external pure override returns (bool)\\n {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC165).interfaceId;\\n }\\n```\\n\\n\u3053\u306e\u95a2\u6570`supportsInterface`\u306f IERC721 \u3042\u308b\u3044\u306f IERC165 \u306e interfaceId \u304c\u5f15\u6570\u3068\u3057\u3066\u5165\u529b\u3055\u308c\u305f\u5834\u5408\u306b\u3001`true`\u3092\u8fd4\u3057\u3001\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f`false`\u3092\u8fd4\u3057\u307e\u3059\u3002\\n\\n# IERC721\\n\\n`IERC721`\u306e\u4e2d\u8eab\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\\n`IERC721`\u306f`ERC721`\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3067\u3001ERC721 \u304c\u5b9f\u73fe\u3059\u3079\u304d\u4e00\u822c\u7684\u306a\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u307e\u3059\u3002`tokenId`\u3092\u4f7f\u3063\u3066\u975e\u4ee3\u66ff\u6027\u30c8\u30fc\u30af\u30f3\u3092\u4ee3\u8868\u3057\u3066\u3044\u307e\u3059\u3002\u30a2\u30d7\u30eb\u30fc\u30d6\u3042\u308b\u3044\u306f\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306b\u969b\u3057\u3066\u3001`tokenId`\u306f\u5fc5\u305a\u51fa\u756a\u304c\u3042\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u3001ERC20 \u306f\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306b\u304a\u3051\u308b\u6570\u91cf\u3060\u3051\u3092\u5b9a\u7fa9\u3059\u308c\u3070\u3088\u304f\u3066\u3001tokenId \u306f\u3042\u308a\u307e\u305b\u3093\u3002\\n\\n```sol\\n/**\\n * @dev ERC721\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\\n */\\ninterface IERC721 is IERC165 {\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n function approve(address to, uint256 tokenId) external;\\n\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n```\\n\\n# IERC721 \u306e event\\n\\n3 \u3064\u306e event \u3092\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002`Transfer`\u3001`Approval`\u306f ERC20 \u306b\u3082\u5b58\u5728\u3057\u307e\u3059\u3002\\n\\n- `Transfer`: \u30c8\u30fc\u30af\u30f3\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306e\u3068\u304d\u306b\u653e\u51fa\u3002\u9001\u308a\u5143`from`\u3001\u9001\u308a\u5148`to`\u3001`tokenId`\u3002\\n- `Approvel`: \u30a2\u30d7\u30eb\u30fc\u30d6\u3059\u308b\u3068\u304d\u306b\u653e\u51fa\u3002\u30a2\u30d7\u30eb\u30fc\u30d6\u3059\u308b\u5074\u306e\u30a2\u30c9\u30ec\u30b9`owner`\u3001\u30a2\u30d7\u30eb\u30fc\u30d6\u3057\u305f\u5148\u306e\u30a2\u30c9\u30ec\u30b9`approved`\u3001`tokenId`\u3002\\n- `ApprovalForAll`: \u4e00\u6c17\u306b\u5927\u91cf\u306b\u30a2\u30d7\u30eb\u30fc\u30d6\u3059\u308b\u3068\u304d\u306b\u653e\u51fa\u3059\u308b\u30a4\u30d9\u30f3\u30c8\u3002\u30a2\u30d7\u30eb\u30fc\u30d6\u3059\u308b\u5074\u306e\u30a2\u30c9\u30ec\u30b9`owner`\u3001\u30a2\u30d7\u30eb\u30fc\u30d6\u3055\u308c\u308b\u5074\u306e\u30a2\u30c9\u30ec\u30b9`operator`\u3001\u30a2\u30d7\u30eb\u30fc\u30d6\u3059\u308b\u5834\u5408`approved`\u306f true \u3067\u3001\u9006\u306b\u6a29\u9650\u3092\u5265\u596a\u3059\u308b\u5834\u5408\u3001`approved`\u306f false \u306b\u3059\u308b\\n\\n# IERC721 \u95a2\u6570\\n\\n- `balanceOf`: \u3068\u3042\u308b\u30a2\u30c9\u30ec\u30b9\u306e\u6301\u3063\u3066\u3044\u308b NFT \u306e\u6570\u91cf\u3092\u8fd4\u3059\\n- `ownerOf`: tokenId \u306e\u30aa\u30fc\u30ca\u30fc\u3092\u8fd4\u3059\\n- `transferFrom`: \u666e\u901a\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3001\u5f15\u6570\u306f `from` \u306f\u9001\u308a\u5143\u3067\u3001`to` \u306f\u9001\u308a\u5148\u3001`tokenId `\u3082\u5fc5\u8981\\n- `safeTransferFrom`:\u5b89\u5168\u306a\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3001\u3082\u3057\u53d7\u3051\u308b\u5074\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\u3001`ERC721Receiver`\u306e\u5b9f\u88c5\u304c\u6c42\u3081\u3089\u308c\u308b\u3002\u5f15\u6570\u306f\u9001\u308a\u5143\u306e`from`\u3001\u9001\u308a\u5148\u306e`to`\u3001`tokenId`\\n- `approve`: \u4ed6\u306e\u30a2\u30c9\u30ec\u30b9\u306b\u3042\u306a\u305f\u306e NFT \u3092\u4f7f\u7528\u3059\u308b\u6a29\u5229\u3092\u6e21\u3059\u3002\u6a29\u5229\u3092\u4ed8\u4e0e\u3059\u308b\u30a2\u30c9\u30ec\u30b9\u306f`to`\u3001\u305d\u3057\u3066`tokenId`\u3082\u5f15\u6570\u306b\\n- `getApproved`: `tokenId`\u304c\u3069\u306e\u30a2\u30c9\u30ec\u30b9\u306b\u6a29\u9650\u3092\u4ed8\u4e0e\u3057\u305f\u306e\u304b\u78ba\u8a8d\u3059\u308b\\n- `setApprovalFroAll`: \u81ea\u5206\u306e\u6301\u3063\u3066\u3044\u308b\u3053\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u3059\u3079\u3066\u306e NFT \u3092\u3068\u3042\u308b\u30a2\u30c9\u30ec\u30b9\u306b\u5bfe\u3057\u3066\u5168\u6a29\u79fb\u8b72\u3059\u308b\\n- `isApprovedForAll`: \u5168\u6a29\u79fb\u8b72\u3057\u3066\u3044\u308b\u30a2\u30c9\u30ec\u30b9\u304c\u3042\u308b\u304b\u78ba\u8a8d\u3059\u308b\\n- safeTransferFrom`: \u5b89\u5168\u306a\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u95a2\u6570\u306e\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u95a2\u6570\u3001\u5f15\u6570\u306b`data`\u304c\u542b\u307e\u308c\u3066\u3044\u308b\\n\\n# IERC721Receiver\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3082\u3057 ERC721 \u306e\u5b9f\u73fe\u3092\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u9001\u3089\u308c\u3066\u304d\u305f NFT \u306f\u30d6\u30e9\u30c3\u30af\u30db\u30fc\u30eb\u306b\u9001\u3063\u305f\u3088\u3046\u306b\u3001\u6c38\u9060\u306b\u53d6\u308a\u51fa\u305b\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u9632\u6b62\u3059\u308b\u305f\u3081\u306b\u3001ERC721 \u306f`safetransferFrom()`\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u3002\u30bf\u30fc\u30b2\u30c3\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c`IERCReceiver`\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u5834\u5408\u306e\u307f\u3001ERC721 \u30c8\u30fc\u30af\u30f3\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f`revert`\u3055\u308c\u307e\u3059\u3002IERC721Receiver \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306f\u4e00\u500b\u306e`onERC721Receiver()`\u95a2\u6570\u3057\u304b\u3042\u308a\u307e\u305b\u3093\u3002\\n\\n```sol\\n// ERC721Receiver\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\uff1a\u3000\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u3053\u308c\u3092\u5b9f\u88c5\u3057\u3066\u5b89\u5168\u306a\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3092\u53d7\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u308b\\ninterface IERC721Receiver {\\n function onERC721Received(\\n address operator,\\n address from,\\n uint tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\\n```\\n\\n\u6b21\u306b`ERC721`\u304c\u3069\u3046\u3084\u3063\u3066`_checkOnERC721Received`\u3092\u4f7f\u3063\u3066\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c`onERC721Receiver()`\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b\u306e\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\\n\\n```sol\\nfunction _checkOnERC721Received(\\n address from,\\n address to,\\n uint tokenId,\\n bytes memory _data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n return\\n IERC721Receiver(to).onERC721Received(\\n msg.sender,\\n from,\\n tokenId,\\n _data\\n ) == IERC721Receiver.onERC721Received.selector;\\n } else {\\n return true;\\n }\\n }\\n```\\n\\n# IERC721Metadata\\n\\nIERC721Metadata \u306f ERC721 \u306e\u62e1\u5f35\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3002\uff13\u3064\u306e metadata \u7528\u95a2\u6570\u3092\u7528\u3044\u3066\u3044\u308b\u3002\\n\\n- `name()`\uff1a\u30c8\u30fc\u30af\u30f3\u540d\u3092\u8fd4\u3059\\n- `symbol()`:\u30c8\u30fc\u30af\u30f3\u7b26\u53f7\\n- `tokenURI()`:tokenId \u3092\u4f7f\u3063\u3066 metadata \u306e url \u3092\u3068\u3063\u3066\u304f\u308b\u3002ERC721 \u7279\u6709\u306e\u95a2\u6570\\n\\n```sol\\ninterface Ierc721Metadata is IERC721 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\\n```\\n\\n# ERC721 \u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\\n\\n`ERC721` \u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f `IERC721`, `IERC165`, `IERC721Metadata` \u306e\u3059\u3079\u3066\u306e\u6a5f\u80fd\u3092\u5b9a\u7fa9\u3057\u305f\u30024 \u3064\u306e\u72b6\u614b\u5909\u6570\u300117 \u500b\u306e\u95a2\u6570\u3092\u542b\u307e\u308c\u3066\u3044\u308b\u3002\u30b7\u30f3\u30d7\u30eb\u306b\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u3002\u8a73\u7d30\u306f\u30b3\u30e1\u30f3\u30c8\u3092\u8aad\u3093\u3067\u304f\u3060\u3055\u3044\u3002\\n\\n```sol\\n// SPDX-License-Identifier: MIT\\n// by 0xAA\\npragma solidity ^0.8.4;\\n\\nimport \\"./IERC165.sol\\";\\nimport \\"./IERC721.sol\\";\\nimport \\"./IERC721Receiver.sol\\";\\nimport \\"./IERC721Metadata.sol\\";\\nimport \\"./Address.sol\\";\u3000// library\\nimport \\"./String.sol\\"; // library\\n\\ncontract ERC721 is IERC721, IERC721Metadata{\\n using Address for address; // Address library\u3092\u4f7f\u3046\uff08isContract\u3092\u4f7f\u3046\u305f\u3081\uff09\\n using Strings for uint256; // String library\\n\\n // Token\u540d\\n string public override name;\\n // Token\u30b7\u30f3\u30dc\u30eb\\n string public override symbol;\\n // tokenId -> owner address \u306e\u30de\u30c3\u30d4\u30f3\u30b0\\n mapping(uint => address) private _owners;\\n // address -> \u30d0\u30e9\u30f3\u30b9\u306e\u30de\u30c3\u30d4\u30f3\u30b0\\n mapping(address => uint) private _balances;\\n // tokenID -> \u30a2\u30d7\u30eb\u30fc\u30d6\u3055\u308c\u305f\u30a2\u30c9\u30ec\u30b9\u306e\u30de\u30c3\u30d4\u30f3\u30b0\\n mapping(uint => address) private _tokenApprovals;\\n // owner -> operator\u30a2\u30c9\u30ec\u30b9 -> bool\uff08\u6a29\u9650\u6e21\u3057\u305f\u5834\u5408\u306ftrue\uff09\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * constructor, name, symbol\u3092\u521d\u671f\u5316\u3059\u308b\\n */\\n constructor(string memory name_, string memory symbol_) {\\n name = name_;\\n symbol = symbol_;\\n }\\n\\n // ERC165\u306esupportsInterface\u95a2\u6570\\n function supportsInterface(bytes4 interfaceId)\\n external\\n pure\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC165).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId;\\n }\\n\\n // IERC721\u306ebalanceOf\u95a2\u6570\u3001_balances\u3092\u4f7f\u3063\u3066\u8abf\u3079\u305f\u3044\u30a2\u30c9\u30ec\u30b9\u306e\u6b8b\u9ad8\u3092\u8fd4\u3059\\n function balanceOf(address owner) external view override returns (uint) {\\n require(owner != address(0), \\"owner = zero address\\");\\n return _balances[owner];\\n }\\n\\n // IERC721\u306eownerOf\u95a2\u6570\u3001_owners\u5909\u6570\u3092\u4f7f\u3063\u3066tokenId\u306eowner\u3092\u8fd4\u3059\\n function ownerOf(uint tokenId) public view override returns (address owner) {\\n owner = _owners[tokenId];\\n require(owner != address(0), \\"token doesn\'t exist\\");\\n }\\n\\n // IERC721\u306eisApprovedForAll\u3001_operatorApprovals\u5909\u6570\u3092\\n // \u4f7f\u3063\u3066owner\u304coperator\u306b\u6a29\u9650\u3092\u79fb\u8b72\u3057\u305f\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\\n // \u6a29\u9650\u79fb\u8b72\u3057\u305f\u5834\u5408\u306ftrue\u3092\u8fd4\u3059\\n function isApprovedForAll(address owner, address operator)\\n external\\n view\\n override\\n returns (bool)\\n {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n // IERC721\u306esetApprovalForAll\u3092\u5b9f\u88c5\u3002\u6301\u3063\u3066\u3044\u308b\u30c8\u30fc\u30af\u30f3\u3092\u3059\u3079\u3066operator\u306b\u6a29\u9650\u3092\u6e21\u3059(true),\\n // \u3042\u308b\u3044\u306foperator\u306e\u6a29\u9650\u3092\u5265\u596a\u3059\u308b(false)\u3002_setApprovalForAll\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3002\\n function setApprovalForAll(address operator, bool approved) external override {\\n _operatorApprovals[msg.sender][operator] = approved;\\n emit ApprovalForAll(msg.sender, operator, approved);\\n }\\n\\n // \u5b9e\u73b0IERC721\u7684getApproved\uff0c\u5229\u7528_tokenApprovals\u53d8\u91cf\u67e5\u8be2tokenId\u7684\u6388\u6743\u5730\u5740\u3002\\n function getApproved(uint tokenId) external view override returns (address) {\\n require(_owners[tokenId] != address(0), \\"token doesn\'t exist\\");\\n return _tokenApprovals[tokenId];\\n }\\n\\n // _approve\u95a2\u6570\u3002_tokenApprovals\u3092\u66f8\u304d\u63db\u3048\u3066\uff0cto\u30a2\u30c9\u30ec\u30b9\u306b tokenId\u3092\u3044\u3058\u308b\u6a29\u9650\u3092\u6e21\u3059\u3002\\n // Approval\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\u3002\\n function _approve(\\n address owner,\\n address to,\\n uint tokenId\\n ) private {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(owner, to, tokenId);\\n }\\n\\n // IERC721\u306eapprove\u95a2\u6570\uff0ctokenId\u306e\u6a29\u9650\u3092 to \u30a2\u30c9\u30ec\u30b9\u306b\u6e21\u3059\u3002\\n // \u6761\u4ef6\uff1ato\u306fowner\u3067\u306f\u306a\u3044\u3053\u3068\uff0c\u304b\u3064msg.sender\u306fowner\u3042\u308b\u3044\u306fapprove\u3055\u308c\u305f\u30a2\u30c9\u30ec\u30b9\u3002\\n // _approve\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\\n function approve(address to, uint tokenId) external override {\\n address owner = _owners[tokenId];\\n require(\\n msg.sender == owner || _operatorApprovals[owner][msg.sender],\\n \\"not owner nor approved for all\\"\\n );\\n _approve(owner, to, tokenId);\\n }\\n\\n // spender\u30a2\u30c9\u30ec\u30b9\u304ctokenId\u3092\u4f7f\u3046\u6a29\u9650\u304c\u3042\u308b\u304b\u306a\u3044\u304b\u3092\u8abf\u3079\u308b\u3002\uff08\u3042\u308b\u306e\u306fowner\u304b\\n // approve\u3055\u308c\u305f\u304b\u306e\u3044\u305a\u308c\u3060\u3002approve\u3055\u308c\u305f\u5834\u5408\u306f\u901a\u5e38\u306eapprove\u3042\u308b\u3044\u306f\\n // setApprovalForAll\u306e2\u30d1\u30bf\u30fc\u30f3\uff09\\n function _isApprovedOrOwner(\\n address owner,\\n address spender,\\n uint tokenId\\n ) private view returns (bool) {\\n return (spender == owner ||\\n _tokenApprovals[tokenId] == spender ||\\n _operatorApprovals[owner][spender]);\\n }\\n\\n /*\\n * \u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u95a2\u6570\u3002_balances\u3001_owner\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u8abf\u6574\u3057\u3066 tokenId \u3092 from \u304b\u3089 to\u306b\\n * \u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3059\u308b\u3002\u540c\u6642\u306bTransfer\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\u3002\\n * \u524d\u63d0\u6761\u4ef6:\\n * 1. tokenId \u306f from \u306b\u3088\u3063\u3066\u6240\u6709\u3055\u308c\u3066\u3044\u308b\\n * 2. to \u306f\u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306a\u3044\\n * \u6761\u4ef6\u3092\u6e80\u305f\u3055\u306a\u3044\u5834\u5408\u306frevert\\n */\\n function _transfer(\\n address owner,\\n address from,\\n address to,\\n uint tokenId\\n ) private {\\n require(from == owner, \\"not owner\\");\\n require(to != address(0), \\"transfer to the zero address\\");\\n\\n _approve(owner, address(0), tokenId); // \u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3059\u308b\u306e\u3067\u6a29\u9650\u3092\u30ea\u30bb\u30c3\u30c8\u3059\u308b\\n\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n // IERC721\u306etransferFrom\u95a2\u6570\u306e\u5b9f\u88c5\uff0c\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3067\u306f\u306a\u3044\u306e\u3067\u3001\\n // \u3053\u306e\u95a2\u6570\u3092\u4f7f\u3046\u306e\u306f\u63a8\u5968\u3055\u308c\u3066\u3044\u306a\u3044\u3002\\n function transferFrom(\\n address from,\\n address to,\\n uint tokenId\\n ) external override {\\n address owner = ownerOf(tokenId);\\n require(\\n _isApprovedOrOwner(owner, msg.sender, tokenId),\\n \\"not owner nor approved\\"\\n );\\n _transfer(owner, from, to, tokenId);\\n }\\n\\n /**\\n * \u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\uff0c\u5b89\u5168\u306btokenId\u3092from\u304b\u3089to\u3078\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3059\u308b\u3002\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\\n * erc721\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u305f\u4e0a\u3067\u3001\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3092\u3059\u308b\u306e\u3067\u3001NFT\u304c\u6c38\u9060\u306b\\n * \u30ed\u30c3\u30af\u3055\u308c\u308b\u5b9f\u614b\u3092\u56de\u907f\u3059\u308b\u3002_transfer\u3001_checkOnERC721Received\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3002\\n * \u6761\u4ef6\uff1a\\n * from \u306f\u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306f\u306a\u3044\\n * to \u306f\u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306f\u306a\u3044\\n * tokenId \u304c\u5b58\u5728\u3057\u3066\u3057\u304b\u3082from\u30a2\u30c9\u30ec\u30b9\u304c\u6240\u6709\\n * to\u304c\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\u3001\u5fc5\u305aIERC721Receiver-onERC721Received\u3092\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\\n * \u3053\u3068\u304c\u6c42\u3081\u3089\u308c\u308b\\n */\\n function _safeTransfer(\\n address owner,\\n address from,\\n address to,\\n uint tokenId,\\n bytes memory _data\\n ) private {\\n _transfer(owner, from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, _data), \\"not ERC721Receiver\\");\\n }\\n\\n /**\\n * IERC721\u306esafeTransferFrom\u3092\u5b9f\u88c5\u3002\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u95a2\u6570\uff0c_safeTransfer\u95a2\u6570\u3092\u547c\u3073\u51fa\u3057\u3066\u3044\u308b\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint tokenId,\\n bytes memory _data\\n ) public override {\\n address owner = ownerOf(tokenId);\\n require(\\n _isApprovedOrOwner(owner, msg.sender, tokenId),\\n \\"not owner nor approved\\"\\n );\\n _safeTransfer(owner, from, to, tokenId, _data);\\n }\\n\\n // safeTransferFrom\u306e\u30aa\u30fc\u30d0\u30e9\u30a4\u30c9\u95a2\u6570\u3001\u5f15\u6570\u304c\u9055\u3046\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint tokenId\\n ) external override {\\n safeTransferFrom(from, to, tokenId, \\"\\");\\n }\\n\\n /**\\n * mint\u95a2\u6570\u3002_balances\u3001_owners\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u3044\u3058\u308b\u3053\u3068\u3067\u3001tokenId\u3092to\u3078\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3059\u308b\u3002\\n * \u540c\u6642\u306bTransfer\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\u3059\u308b\u3002\\n * \u73fe\u5728\u306e\u72b6\u614b\u3067\u306f\u3001\u8ab0\u3067\u3082\u30df\u30f3\u30c8\u3067\u304d\u308b\u306e\u3067\u3001\u958b\u767a\u8005\u306f\u666e\u901a\u3053\u306e\u95a2\u6570\u3092\u66f8\u304d\u63db\u3048\u308b\\n * \u6761\u4ef6:\\n * 1. tokenId\u304c\u307e\u3060\u5b58\u5728\u3057\u306a\u3044\\n * 2. to\u306f\u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306a\u3044\\n */\\n function _mint(address to, uint tokenId) internal virtual {\\n require(to != address(0), \\"mint to zero address\\");\\n require(_owners[tokenId] == address(0), \\"token already minted\\");\\n\\n _balances[to] += 1;\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n // \u30d0\u30fc\u30f3\u95a2\u6570\uff0c_balances\u3001_owners\u5909\u6570\u3092\u8abf\u6574\u3057\u3066tokenId\u3092\u30d0\u30fc\u30f3\u3059\u308b\u3002\u540c\u6642\u306bTransfer\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n // \u6761\u4ef6\uff1atokenId\u5b58\u5728\u3002\\n function _burn(uint tokenId) internal virtual {\\n address owner = ownerOf(tokenId);\\n require(msg.sender == owner, \\"not owner of token\\");\\n\\n _approve(owner, address(0), tokenId); // \u6a29\u9650\u3092\u66f4\u65b0\\n\\n _balances[owner] -= 1;\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n }\\n\\n // _checkOnERC721Received\uff1aIERC721Receiver-onERC721Received\u95a2\u6570, \u9001\u308a\u5148\u306fERC721\u4e92\u63db\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u305f\u3081\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint tokenId,\\n bytes memory _data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n return\\n IERC721Receiver(to).onERC721Received(\\n msg.sender,\\n from,\\n tokenId,\\n _data\\n ) == IERC721Receiver.onERC721Received.selector;\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * IERC721Metadata\u306etokenURI\u95a2\u6570\uff0cmetadata\u3092\u8fd4\u3059\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n require(_owners[tokenId] != address(0), \\"Token Not Exist\\");\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\"\\";\\n }\\n\\n /**\\n * {tokenURI}\u306eBaseURI\u3002tokenURI\u306fbaseURI\u3001tokenId\u3092\u3064\u306a\u3044\u3067\u3067\u304d\u305f\u3082\u306e\u3002\\n * \u958b\u767a\u8005\u304c\u3053\u306e\u95a2\u6570\u3092\u66f8\u304d\u304b\u3048\u308b\\n * \u4f8b\u3048\u3070BAYC\u306ebaseURI\u306fipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\"\\";\\n }\\n}\\n\\n```\\n\\n# free mint \u306e APE \u3092\u4f5c\u308d\u3046\\n\\n\u305d\u308c\u3067\u306f\u3001free mint \u306e APE \u3092\u4f5c\u308a\u307e\u3057\u3087\u3046\u304b\u3002totalSupply \u3092 10000 \u500b\u306b\u3057\u3066\u3001mint \u95a2\u6570\u3084 baseURI \u3092\u66f8\u304d\u63db\u3048\u308b\u3060\u3051\u3067\u6e08\u307f\u307e\u3059\u3002\\n\\nbaseURI()\u306e\u8a2d\u5b9a\u3092 BAYS \u3068\u5168\u304f\u540c\u3058\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u3001BAYC \u306e\u733f\u304c\u8868\u793a\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u3002\\n\\n```sol\\n\\n// SPDX-License-Identifier: MIT\\n// by 0xAA\\npragma solidity ^0.8.4;\\n\\nimport \\"./ERC721.sol\\";\\n\\ncontract OmaenoApe is ERC721{\\n uint public MAX_APES = 10000; // \u7dcf\u6570\\n\\n // \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\\n constructor(string memory name_, string memory symbol_) ERC721(name_, symbol_){\\n }\\n\\n //BAYC\u306ebaseURI\u306fipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/\\n function _baseURI() internal pure override returns (string memory) {\\n return \\"ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/\\";\\n }\\n\\n // mint\u95a2\u6570\\n function mint(address to, uint tokenId) external {\\n require(tokenId >= 0 && tokenId < MAX_APES, \\"tokenId out of range\\");\\n _mint(to, tokenId);\\n }\\n}\\n```\\n\\n\u305d\u308c\u3067\u306f remix \u3092\u958b\u3044\u3066\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u307e\u3057\u3087\u3046\u3002\\n\\n# ERC721 \u3092\u767a\u884c\u3057\u3088\u3046\\n\\nERC721 \u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u304c\u3042\u308c\u3070\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u3066 NFT \u3092\u767a\u884c\u3059\u308b\u3053\u3068\u306f\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306b\u306a\u308a\u307e\u3059\u3002\\n\u4eca\u3001\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u304c\u3067\u304d\u305f\u306e\u3067\u3001remix \u306b\u3066\u767a\u884c\u3057\u307e\u3057\u3087\u3046\u3002\\n\\n\u5b9f\u969b\u306e\u624b\u9806\u306f\u307e\u305f\u306e\u6a5f\u4f1a\u3067\u66f8\u304d\u307e\u3059\u3002\\n\\n# ERC165 \u3068 ERC721\\n\\nNFT \u3092 NFT \u306b\u3064\u3044\u3066\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3067\u304d\u306a\u3044\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3078\u9001\u4ed8\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u6c38\u9060\u306b\u6d88\u5931\u3057\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u3053\u308c\u3092\u9632\u3050\u305f\u3081\u306b`ERC721TokenReceiver`\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306e\u5b9f\u88c5\u304c\u6c42\u3081\u3089\u308c\u307e\u3059\u3002\\n\\n```sol\\ninterface ERC721TokenReceiver {\\n function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes _data) external returns(bytes4);\\n}\\n```\\n\\n\u5b9f\u306f\u3053\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3068\u306f\u3001\u3053\u306e `onERC721REceived` \u95a2\u6570\u306e\u3053\u3068\u3067\u3059\u3002\u3053\u306e\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308c\u3070\u3001NFT \u3092\u51e6\u7406\u3059\u308b\u80fd\u529b\u304c\u3042\u308b\u3068\u3044\u3046\u5ba3\u8a00\u306b\u306a\u308a\u307e\u3059\u3002\\n\\n**THE END**\\n\\n![](ethereum-eth.gif)"},{"id":"web3-term-dictionary","metadata":{"permalink":"/blog/web3-term-dictionary","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/Web3-term-dict/2022-09-29-web3-term-dictionary.md","source":"@site/blog/Web3-term-dict/2022-09-29-web3-term-dictionary.md","title":"Web3 Term Dictionary","description":"Hello, everybody!","date":"2022-09-29T00:00:00.000Z","formattedDate":"2022\u5e749\u670829\u65e5","tags":[{"label":"\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","permalink":"/blog/tags/\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3"},{"label":"Web3","permalink":"/blog/tags/web-3"},{"label":"about","permalink":"/blog/tags/about"}],"readingTime":3.85,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"web3-term-dictionary","title":"Web3 Term Dictionary","authors":["Thurendous","Polymetis"],"blogDescription":"Web3\u7528\u8a9e\u8f9e\u66f8","tags":["\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","Web3","about"]},"prevItem":{"title":"NFT\u3001ERC721\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","permalink":"/blog/what-is-ERC721-and-NFT-with-code-explained"},"nextItem":{"title":"Why Crypto is the Future","permalink":"/blog/why-crypto-is-the-future"}},"content":"Hello, everybody!\\n\\n## Web3 \u6d41\u884c\u8a9e\\n\\n\u300cgm \u3063\u3066\u4f55\u300d\u3068\u3088\u304f\u805e\u304b\u308c\u308b\u306e\u3067\u3001Web3 \u306e\u6d41\u884c\u8a9e\u3092\u65e5\u672c\u8a9e\u3067\u307e\u3068\u3081\u3066\u7c21\u5358\u306b\u8abf\u3079\u3089\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3001Web3 \u306e\u8a00\u8a9e\u6587\u5316\u3092\u5e83\u3081\u3066\u3044\u3063\u3066\u308f\u304b\u308a\u3084\u3059\u304f\u306a\u3063\u305f\u3089\u3044\u3044\u306a\u3068\u601d\u3063\u3066\u4f5c\u308a\u307e\u3057\u305f\u3002\\nweb3 \u696d\u754c\u3078\u306e\u30cf\u30fc\u30c9\u30eb\u304c\u4e0b\u304c\u3063\u3066\u3001\u3082\u3063\u3068\u305f\u304f\u3055\u3093\u306e\u4eba\u304c\u53c2\u52a0\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u76db\u308a\u4e0a\u3052\u3066\u3044\u3051\u308c\u3070\u826f\u3044\u306a\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002\\n\\n### A\\n\\nABI: Application Binary Interface \u306f\u3001API \u3068\u4f3c\u3066\u3044\u3066 2 \u3064\u306e\u30d0\u30a4\u30ca\u30ea\u30d7\u30ed\u30b0\u30e9\u30e0\u30e2\u30b8\u30e5\u30fc\u30eb\u9593\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306e\u3053\u3068\\n\\naddress: \u30a6\u30a9\u30ec\u30c3\u30c8/\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30a2\u30c9\u30ec\u30b9\\n\\nAlpha\uff1a\u30a2\u30eb\u30d5\u30a1\u3001\u3059\u3054\u3044\u53ce\u76ca\u306e\u30c1\u30e3\u30f3\u30b9\u306e\u3053\u3068\u3002\\n\\nAMA\uff1aAsk Me Anything\u3001\u300c\u306a\u3093\u3067\u3082\u805e\u3044\u3066\u304f\u3060\u3055\u3044\u300d\u306e\u30a4\u30d9\u30f3\u30c8\u3067\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5074\u304c\u5b9f\u65bd\u3059\u308b\u4e00\u822c\u53c2\u52a0\u8005\u306e\u8cea\u554f\u3078\u306e\u56de\u7b54\u3092\u884c\u3046\u30a4\u30d9\u30f3\u30c8\u306e\u3053\u3068\\n\\nAMM\uff1aAutonomous Market Making \u306e\u7565\u3067\u3001\u81ea\u52d5\u7684\u306b\u884c\u308f\u308c\u308b\u30de\u30fc\u30b1\u30c3\u30c8\u30e1\u30a4\u30ad\u30f3\u30b0\u3001\u5206\u6563\u578b\u53d6\u5f15\u6240\u306b\u304a\u3051\u308b\u5171\u901a\u6280\u8853\\n\\nape: All in \u3059\u308b\u3053\u3068\u3001\u3059\u3079\u3066\u3092\u8ced\u3051\u3066\u3084\u308b\\n\\nATH\uff1aAll Time High\u3001\u53f2\u4e0a\u6700\u9ad8\u5024\u306e\u3053\u3068\\n\\n### B\\n\\nBlockchain\uff1a\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\\n\\nBridge\uff1a\u30af\u30ed\u30b9\u30c1\u30a7\u30fc\u30f3\u306e\u30d6\u30ea\u30c3\u30b8\u3001\u7570\u306a\u308b\u30d1\u30d6\u30ea\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u4e0a\u306e\u30a2\u30bb\u30c3\u30c8\u3092\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3002\u8907\u96d1\u3055\u304c\u3086\u3048\u306b\u8106\u5f31\u6027\u304c\u3088\u304f\u767a\u898b\u3055\u308c\u308b\\n\\nBuy the fucking dip\uff1a\u4eee\u60f3\u901a\u8ca8\u3092\u5b89\u3044\u5024\u6bb5\u3067\u62fe\u3046\uff08\u8cb7\u3046\uff09\u3053\u3068\\n\\n### C\\n\\nCeFi\uff1aCentralized Finance \u306e\u7565\u3067\u3001DeFi \u306e\u9006\\n\\nCex: Centralized Exchange\uff08\u30bb\u30f3\u30c8\u30e9\u30eb\u30fb\u30a8\u30af\u30b9\u30c1\u30a7\u30f3\u30b8\uff09\u3067\u3001Binance\u3001Coincheck \u306a\u3069\u306e\u53d6\u5f15\u6240\\n\\nctf: Capture The Flag\u3001\u30b5\u30a4\u30d0\u30fc\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u6280\u8853\u30b3\u30f3\u30c6\u30b9\u30c8\u3002\\n\\nchad\uff1a \u3059\u3054\u3044\u4eba\uff08\u4e00\u822c\u7684\u306b\u306f\u7537\u6027\uff09\\n\\n### D\\n\\nDAO: Decentralized Autonomous Organization\uff08\u5206\u6563\u578b\u81ea\u5f8b\u7d44\u7e54\uff09\\n\\nDapp\uff1a\u5206\u6563\u578b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3001Decentralized Application \u306e\u7565\\n\\nDeFi: Decentralized Finance\uff08\u5206\u6563\u578b\u91d1\u878d\uff09\u306e\u7565\\n\\ndegen\uff1a\u30ae\u30e3\u30f3\u30d6\u30eb\u4e2d\u6bd2\u8005\u3067\u3084\u305f\u3089\u3068 ape in \u3059\u308b\u4eba\\n\\ndelist: \u30ea\u30b9\u30c6\u30a3\u30f3\u30b0\u304b\u3089\u9664\u5916\u3059\u308b\u3053\u3068\\n\\nDeSci: Decentralized Science\u3001[\u5206\u6563\u578b\u30b5\u30a4\u30a8\u30f3\u30b9](https://note.com/hirotaiyohamada/n/n82e5c7d22c31)\u3002\\n\\nDeSoc\uff1a\u5206\u6563\u578b\u793e\u4f1a\u3001Decentralized Society\\n\\nDex\uff1aDecentralized Exchange\u3001\u5206\u6563\u578b\u53d6\u5f15\u6240\\n\\nDiamond hands\uff1a\u30c0\u30a4\u30e4\u30e2\u30f3\u30c9\u30cf\u30f3\u30c9\u3001\u30c8\u30fc\u30af\u30f3/NFT \u3092\u9577\u671f\u306b\u6e21\u3063\u3066\u4fdd\u6709\u3067\u304d\u308b\u4eba\\n\\nDID: Decentralized Identity\uff08\u5206\u6563\u578b\u30a2\u30a4\u30c7\u30f3\u30c6\u30a3\u30c6\u30a3\uff09\\n\\ndiscord\uff1a\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306e\u305f\u3081\u306e\u5171\u901a\u60c5\u5831\u767a\u4fe1\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\uff08\u30e9\u30a4\u30f3\u306b\u306b\u3066\u3044\u308b\u304c\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u7279\u5316\u3057\u3066\u3044\u308b\uff09\\n\\ndm: \u30c0\u30a4\u30ec\u30af\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3001\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\\n\\nDYOR\uff1aDo Your Own Research\uff08\u81ea\u5206\u3067\u8abf\u3079\u3066\u81ea\u5206\u3067\u8cac\u4efb\u3092\u3068\u308c\uff09\\n\\nDue diligence\uff1a\u30c7\u30e5\u30fc\u30c7\u30a3\u30ea\u30b8\u30a7\u30f3\u30b9\uff08\u6295\u8cc7\u3092\u884c\u3046\u306b\u3042\u305f\u3063\u3066\u6295\u8cc7\u5bfe\u8c61\u3068\u306a\u308b\u4f01\u696d\u3084\u6295\u8cc7\u5148\u306e\u4fa1\u5024\u3084\u30ea\u30b9\u30af\u306a\u3069\u3092\u8abf\u67fb\u3059\u308b\u9069\u6b63\u306a\u52aa\u529b\u306e\u3053\u3068\uff09\\n\\n### E\\n\\nEOA: Externally Owned Accounts\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u500b\u3005\u306e\u30e6\u30fc\u30b6\u30fc\u3067\u3001\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30a2\u30c9\u30ec\u30b9\u3067\u306f\u306a\u3044\u3053\u3068\u3001\u666e\u901a\u306e\u30a6\u30a9\u30ec\u30c3\u30c8\u306e\u3053\u3068\\n\\nERC20\uff1aEther \u4e0a\u306e\u30c8\u30fc\u30af\u30f3\u3092\u5747\u8cea\u5316\u3059\u308b\u305f\u3081\u306e\u898f\u683c\\n\\nERC721: Ether \u4e0a\u306e\u975e\u5747\u8cea\u306a\u30c8\u30fc\u30af\u30f3\u898f\u683c\u3002\\n\\nEthereum\uff1a\u5206\u6563\u578b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u3042\u308b\u30a4\u30fc\u30b5\u3001\u304a\u3088\u3073\u305d\u306e\u30cd\u30a4\u30c6\u30a3\u30d6\u30c8\u30fc\u30af\u30f3\u306e\u540d\u79f0\u3002\\n\\nEVM\uff1aEthereum Virtual Machine \u306e\u7565\u3067\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u958b\u767a\u8005\u304c\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u4e0a\u306b\u5206\u6563\u578b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\uff08Dapp\uff09\u3092\u5c55\u958b\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3059\u3002\\n\\n### F\\n\\nFT\uff1a\u30d5\u30a1\u30f3\u30b8\u30d6\u30eb\u30c8\u30fc\u30af\u30f3\\n\\nfam\uff1a\u5bb6\u65cf\u306e\u3053\u3068\\n\\nfloor price\uff1a\u30d5\u30ed\u30a2\u30d7\u30e9\u30a4\u30b9\u3001\u30b9\u30bf\u30fc\u30c8\u306e\u4fa1\u683c\u306e\u3053\u3068\\n\\nfren\uff1afriend\uff0c\u53cb\u9054\u3001\u53cb\\n\\nFomo\uff1aFear of Missing Out\u3001\u6a5f\u4f1a\u3092\u9003\u3059\u3053\u3068\u304c\u6016\u304f\u3066\u76f2\u76ee\u7684\u306b ape in \u3059\u308b\u3053\u3068\\n\\nFud\uff1aFear\uff08\u6050\u6016\uff09\u3001Uncertainty\uff08\u4e0d\u78ba\u5b9f\u6027\uff09\u3001Doubt\uff08\u7591\u3044\uff09\u3067\u3001\u5e02\u5834\u306e\u60aa\u3044\u9762\u3092\u717d\u308b\u60c5\u5831\\n\\nFYI\uff1afor your information\uff08\u3054\u53c2\u8003\u307e\u3067\u306b\uff09\\n\\nFull Send\uff1a\u30d1\u30ef\u30fc\u5168\u958b\u3067\\n\\n### G\\n\\ngas\uff1a\u30ac\u30b9\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u4e0a\u3067\u53d6\u5f15\u3092\u5b8c\u4e86\u3055\u305b\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u30ac\u30b9\u306e\u3053\u3068\\n\\ngas fee\uff1a\u30ac\u30b9\u4ee3\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u4e0a\u3067\u53d6\u5f15\u3092\u5b8c\u4e86\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u30ac\u30b9\u4ee3\uff08\u5358\u4f4d\u306f ETH\uff09\u2192 (gas fee) = gas \xd7 (gas price)\\n\\ngas limit\uff1a1 \u56de\u306e\u53d6\u5f15\u3067\u6d88\u8cbb\u3067\u304d\u308b\u30ac\u30b9\u306e\u6700\u5927\u5024\\n\\ngas price\uff1a\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u304a\u3051\u308b\u30ac\u30b9\u306e\u5358\u4f4d\u3042\u305f\u308a\u306e\u4fa1\u683c\\n\\ngas war\uff1a\u4eba\u6c17\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u3088\u308b\u30ac\u30b9\u4ee3\u306e\u9ad8\u9a30\u3002\\n\\ngm\uff1a\u304a\u306f\u3088\u3046\u3054\u3056\u3044\u307e\u3059\u3002web3 \u306b\u304a\u3051\u308b\u65e5\u5e38\u7684\u306a\u6328\u62f6\\n\\ngn\uff1a\u304a\u3084\u3059\u307f\u306a\u3055\u3044\\n\\ngg\uff1a\u30b0\u30c3\u30c9\u30b2\u30fc\u30e0\u3001\u30b2\u30fc\u30e0\u4ef2\u9593\u304c\u3088\u304f\u4f7f\u3046\u6328\u62f6\\n\\n### H\\n\\nhacked: \u30cf\u30c3\u30ad\u30f3\u30b0\u3055\u308c\u305f\\n\\nHODL\uff1ahodl on dear love\u3001\u30c0\u30a4\u30e4\u30e2\u30f3\u30c9\u30cf\u30f3\u30c9\u3001\u9577\u671f\u306b\u6e21\u3063\u3066\u30db\u30fc\u30eb\u30c9\u3059\u308b\u3053\u3068\\n\\n### I\\n\\nIRL\uff1aIn Real Life \u306e\u7565\\n\\nifykyk: \u308f\u304b\u308b\u4eba\u306b\u306f\u308f\u304b\u308b\\n\\n### L\\n\\nlayer2: \u65e2\u5b58\u306e\u30d1\u30d6\u30ea\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u305f\u30ec\u30a4\u30e4\u30fc 2 \u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3001\u901a\u5e38\u306f\u30ec\u30a4\u30e4\u30fc\uff11\u3088\u308a\u9ad8\u901f\u3067\u5b89\u4fa1\u306a\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u767a\u884c\u3067\u304d\u3001\u3088\u308a UX \u304c\u3088\u3044\\n\\nLFG\uff1aLet\'s Fucking Go\uff01Ape in \u3059\u308b\u3053\u3068\\n\\nLGTM\uff1aLooking good to me, \u898b\u305f\u611f\u3058\u306f\u3044\u3044\u306d\\n\\nliquidity\uff1a \u6d41\u52d5\u6027\\n\\nLMAO\uff1a\u30af\u30bd\u7b11\u3063\u305f\\n\\n### M\\n\\nmaxi\uff1a\u30de\u30af\u30b7\u3001\u4f55\u304b\u3092\u3082\u306e\u3059\u3054\u3044\u4fe1\u4ef0\u3057\u3066\u3044\u308b\u4eba\\n\\nmeme\uff1a\u30df\u30fc\u30e0\u3001\u30cd\u30bf\u753b\u50cf\u306a\u3069\\n\\nMempool: \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30d0\u30c3\u30d5\u30a1\u30d7\u30fc\u30eb\u3002\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u9001\u4fe1\u3055\u308c\u305f\u5f8c\u306b mempool \u306b\u306f\u8868\u793a\u3055\u308c\u308b\u304c\u3001\u307e\u3060\u30c1\u30a7\u30fc\u30f3\u4e0a\u306b\u306e\u3063\u3066\u3044\u306a\u3044\u72b6\u614b\\n\\nMerkle Tree\uff1a\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u304c\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u5b89\u5168\u306b\u691c\u8a3c\u30fb\u96c6\u7d04\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3002\\n\\nMEV\uff1aMiner Extractable Value \u307e\u305f\u306f Maximal Extractable Value \u306e\u7565\u3067\u3001\u30d6\u30ed\u30c3\u30af\u5185\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u542b\u3081\u305f\u308a\u3001\u9664\u5916\u3057\u305f\u308a\u3001\u4e26\u3073\u66ff\u3048\u305f\u308a\u3059\u308b\u3053\u3068\u3067\u30de\u30a4\u30ca\u30fc\u304c\u5f97\u308b\u3053\u3068\u306e\u3067\u304d\u308b\u5229\u76ca\u306e\u3053\u3068\\n\\nMint\uff1aMint NFT/ERC20\u3001\u30df\u30f3\u30c8\u3059\u308b\u3001\u92f3\u9020\u3059\u308b\\n\\nMoon\uff1a\u4fa1\u683c\u304c\u6025\u9a30\u3057\u3066\u6708\u307e\u3067\u98db\u3076\u3001to the moon\\n\\n### N\\n\\nnfa: Not Financial Advice\u3001\u300c\u30d5\u30a3\u30ca\u30f3\u30b7\u30e3\u30eb\u30a2\u30c9\u30d0\u30a4\u30b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u300d\\n\\nNFT: Non-Fungible Token\u3001\u30ce\u30f3\u30d5\u30a1\u30f3\u30b8\u30d6\u30eb\u30c8\u30fc\u30af\u30f3\u3067\u3059\u3002\\n\\nngmi: not gonna make it, \u300c\u3060\u3081\u3060\u3001\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u300d\\n\\nNoob\uff1a\u30eb\u30fc\u30ad\u30fc\u3001\u65b0\u4eba\u3001\u304f\u305d\u7d20\u4eba\\n\\nNonce: \u91cd\u8907\u3092\u9632\u3050\u305f\u3081\u306b\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u53d6\u5f15\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u756a\u53f7\u3067\u3001\u5404\u53d6\u5f15\u306b 1 \u3064\u305a\u3064\u8ffd\u52a0\u3055\u308c\u308b\u3002\u5404 Nonce \u306f 1 \u5ea6\u3060\u3051\u4f7f\u7528\u3067\u304d\u308b\\n\\n### O\\n\\nOG\uff1aOriginal Gangster\u3001\u53e4\u53c2\u306e\u4eba\\n\\non-chain\uff1a\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u306e\u3063\u3066\u3044\u308b\\n\\noff-chain\uff1a\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u3067\u306f\u306a\u304f\u3001\u30aa\u30d5\u30c1\u30a7\u30fc\u30f3\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u306e\u3063\u3066\u3044\u306a\u3044\\n\\noptimistic rollups: \u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u306e layer2 \u306e\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u4e00\u3064\\n\\noracle\uff1a[\u30aa\u30e9\u30af\u30eb](https://zenn.dev/jpyc/articles/a8b3710676c433)\u3001\u975e\u4e2d\u592e\u96c6\u6a29\u7684\u306b\u30c7\u30fc\u30bf\u3092\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u306b\u6301\u3063\u3066\u3053\u308c\u308b\u4f55\u304b\\n\\n### P\\n\\npaper hands: \u30c0\u30a4\u30e4\u30e2\u30f3\u30c9\u306e\u624b\u306e\u53cd\u5bfe\u8a9e\u3067\u3001\u5168\u304f\u30db\u30fc\u30eb\u30c9\u3067\u304d\u306a\u3044\u4eba\\n\\npfp: \u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u753b\u50cf\\n\\nPoS\uff1aProof of Stake \u306e\u7565\u3067\u3001\u53c2\u52a0\u8005\u306f POW \u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u30d1\u30ef\u30fc\u306e\u4ee3\u308f\u308a\u306b\u30c8\u30fc\u30af\u30f3\u306e staking \u306b\u3088\u3063\u3066\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u6b63\u5e38\u306a\u6a5f\u80fd\u3092\u7dad\u6301\u3055\u305b\u308b\\n\\nPoW\uff1aProof of Work\uff08\u30d7\u30eb\u30fc\u30d5\u30fb\u30aa\u30d6\u30fb\u30ef\u30fc\u30af\uff09\u306e\u7565\u3067\u3001\u53c2\u52a0\u8005\u304c\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u30d1\u30ef\u30fc\u3068\u30a8\u30cd\u30eb\u30ae\u30fc\u3092\u6d88\u8cbb\u3057\u3066\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u30fb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u6b63\u5e38\u306a\u6a5f\u80fd\u3092\u7dad\u6301\u3055\u305b\u308b\\n\\nprolly nothing: Probbably Nothing\u3001\u300c\u4f55\u3082\u8d77\u3053\u3089\u306a\u3044\u304b\u3082\u3060\u3051\u3069\u300d\\n\\n### R\\n\\nReFi\uff1aRegenerative Finance\u3001\u518d\u751f\u53ef\u80fd\u30fb\u6301\u7d9a\u53ef\u80fd\u306a\u91d1\u878d\u3002\\n\\nrekt\uff1a\u5927\u7834\u3001\u7d42\u4e86\u3001\u7834\u7523\u3001\u30b2\u30fc\u30e0\u30aa\u30fc\u30d0\u30fc\\n\\nroadmap\uff1a\u30ed\u30fc\u30c9\u30de\u30c3\u30d7\\n\\nRT\uff1aTwitter \u3092\u30ea\u30c4\u30a4\u30fc\u30c8\u3059\u308b\\n\\nrug\uff1a\u30e9\u30b0\u30d7\u30fc\u30eb\u3001\u9003\u3052\u308b\uff0f\u30bc\u30ed\u306b\u306a\u308b\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5074\u304c\u5168\u3066\u306e\u8cc7\u91d1\u3092\u629c\u304d\u53d6\u3063\u3066\u7d42\u4e86\u3059\u308b\\n\\n### S\\n\\nSandwich Attack\uff1a\u30b5\u30f3\u30c9\u30a4\u30c3\u30c1\u653b\u6483\u3001mempool \u3067\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306f\u8ab0\u3067\u3082\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3053\u3068\u304b\u3089\u3001\u88ab\u5bb3\u8005\u306f\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u3067\u8cfc\u5165\u6ce8\u6587\u3092\u51fa\u3059\u3068\u3001\u653b\u6483\u8005\u306f\u305d\u308c\u3092\u5229\u7528\u3057\u3066\u88ab\u5bb3\u8005\u306e\u8cfc\u5165\u6ce8\u6587\u306e\u524d\u5f8c\u306b\u53d6\u5f15\u3092\u4ed5\u639b\u3051\u3066\u88ab\u5bb3\u8005\u306b\u52b9\u7387\u306e\u60aa\u3044\u53d6\u5f15\u3092\u5f37\u3044\u3066\u3001\u5229\u76ca\u3092\u53d6\u308d\u3046\u3068\u3059\u308b\u653b\u6483\u306e\u3053\u3068\u3002\u3053\u3046\u3044\u3046\u3053\u3068\u304c\u3042\u308b\u3053\u3068\u304b\u3089\u3001\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u306e\u4e16\u754c\u306f\u5f31\u8089\u5f37\u98df\u306e\u30d6\u30e9\u30c3\u30af\u30d5\u30a9\u30ec\u30b9\u30c8\u3068\u3082\u547c\u3070\u308c\u3066\u3044\u308b\\n\\nSBT\uff1aSoulbound Token\u3001\u9b42\u304c\u5bbf\u3063\u305f\u30c8\u30fc\u30af\u30f3\u3001\u3064\u307e\u308a\u3042\u306a\u305f\u306e\u9b42\u3068\u30d0\u30f3\u30c9\u30eb\u3068\u306a\u3063\u3066\u53d6\u5f15\u3067\u304d\u306a\u3044 NFT \u306e\u3053\u3068\u3001\u305f\u3060\u3057\u3001\u81ea\u5206\u306f\u81ea\u5206\u306e SBT \u3092 burn \u3067\u304d\u308b\\n\\nshilling: \u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u3001\u55b6\u696d\u3059\u308b\\n\\nSmart Contracts\uff1a\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u4e0a\u3067\u52d5\u4f5c\u3059\u308b\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u3053\u3068\u3067\u3001\u901a\u5e38\u306f\u4e00\u65e6\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3068\u3001\u6b62\u3081\u3089\u308c\u308b\u3053\u3068\u306f\u306a\u3044\\n\\nsolidity: \u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u4e0a\u3067\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u8a18\u8ff0\u3059\u308b\u305f\u3081\u306e\u8a00\u8a9e\\n\\nSend it: \u4e86\u89e3\\n\\n### T\\n\\nTokenomics\uff1a\u30c8\u30fc\u30af\u30f3\u30a8\u30b3\u30ce\u30df\u30fc\\n\\ntradfi: \u4f1d\u7d71\u7684\u306a\u91d1\u878d\u30b7\u30b9\u30c6\u30e0\u306e\u3053\u3068\\n\\nTVL: Total Value Locked\u3001\u30d7\u30ed\u30c8\u30b3\u30eb\u306b\u30ed\u30c3\u30af\u3055\u308c\u305f\u8cc7\u91d1\u306e\u5408\u8a08\\n\\n### U\\n\\nUp Only\uff1a\u4fa1\u683c\u304c\u4e0a\u304c\u308a\u7d9a\u3051\u308b\uff08\u5927\u4f53\u306f\u7686\u306e\u7406\u60f3\u306a\u9858\u671b\u306a\u3060\u3051\uff09\\n\\n### W\\n\\nwagmi\uff1aWe are gonna make it, \u79c1\u9054\u306f\u5fc5\u305a\u6210\u529f\u3059\u308b\u3002 \u307e\u305f\u3001\u591a\u304f\u306e\u5171\u901a\u30d5\u30c3\u30af\u3092\u542b\u3093\u3060 web3 react \u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u540d\u524d\u3067\u3082\u3042\u308b \u2192 \u3053\u308c\u306f\u304a\u3082\u3057\u308d\u3044\\n\\nwallet\uff1a\u30a6\u30a9\u30ec\u30c3\u30c8\\n\\nweb3.0: Web1.0 \u3084 Web2.0 \u3068\u306f\u5bfe\u7167\u7684\u306a\u3082\u306e\u3067\u3001\u5206\u6563\u5316\u3001\u975e\u4e2d\u592e\u96c6\u6a29\u5316\u3068\u30c7\u30b8\u30bf\u30eb\u6240\u6709\u6a29\u306b\u3088\u3063\u3066\u7279\u5fb4\u3065\u3051\u3089\u308c\u308b\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306e\u3053\u3068\\n\\nwen\uff1a\u3044\u3064\uff1f\\n\\nwen token\uff1a\u3044\u3064\u30a8\u30a2\u30c9\u30ed\u3059\u3093\u306e\uff1f\\n\\nWETH\uff1aWrapped Ethereum\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30c8\u30fc\u30af\u30f3\u306e ERC20 \u30d0\u30fc\u30b8\u30e7\u30f3\\n\\nwhale\uff1a\u304f\u3058\u3089\u3001\u5927\u91cf\u306e\u304a\u91d1\u30fb\u30c8\u30fc\u30af\u30f3\u3092\u4fdd\u6709\u3059\u308b\u4eba\\n\\nWL\uff1aWhite list\u3001\u30db\u30ef\u30a4\u30c8\u30ea\u30b9\u30c8\u3002\u7279\u6a29\u306e\u3042\u308b\u30e6\u30fc\u30b6\u30fc\u7fa4\u306e\u3053\u3068\\n\\n### Z\\n\\nzk: zero-knowledge proof, \u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u306e\u3053\u3068\u3001\u8ab0\u304b\u304c\u3042\u308b\u79d8\u5bc6\u3092\u3057\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u3001\u305d\u306e\u79d8\u5bc6\u81ea\u4f53\u3092\u660e\u304b\u3055\u305a\u306b\u8a3c\u660e\u3067\u304d\u308b"},{"id":"why-crypto-is-the-future","metadata":{"permalink":"/blog/why-crypto-is-the-future","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/Why-crypto-is-the-future/2022-09-20-what-is-Scaricity.md","source":"@site/blog/Why-crypto-is-the-future/2022-09-20-what-is-Scaricity.md","title":"Why Crypto is the Future","description":"Crypto is the future","date":"2022-09-20T00:00:00.000Z","formattedDate":"2022\u5e749\u670820\u65e5","tags":[{"label":"\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","permalink":"/blog/tags/\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3"},{"label":"\u30af\u30ea\u30d7\u30c8","permalink":"/blog/tags/\u30af\u30ea\u30d7\u30c8"},{"label":"\u672a\u6765","permalink":"/blog/tags/\u672a\u6765"},{"label":"\u6b74\u53f2","permalink":"/blog/tags/\u6b74\u53f2"},{"label":"\u30e1\u30bf\u30d0\u30fc\u30b9","permalink":"/blog/tags/\u30e1\u30bf\u30d0\u30fc\u30b9"}],"readingTime":8.092,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"why-crypto-is-the-future","title":"Why Crypto is the Future","authors":["Thurendous","Polymetis"],"blogDescription":"\u306a\u305c\u30af\u30ea\u30d7\u30c8\u306f\u672a\u6765\u304b","tags":["\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","\u30af\u30ea\u30d7\u30c8","\u672a\u6765","\u6b74\u53f2","\u30e1\u30bf\u30d0\u30fc\u30b9"]},"prevItem":{"title":"Web3 Term Dictionary","permalink":"/blog/web3-term-dictionary"},"nextItem":{"title":"About Scaricity","permalink":"/blog/about-scaricity"}},"content":"## Crypto is the future\\n\\n\u7d50\u8ad6\u304b\u3089\u8a00\u3044\u307e\u3059\u3002\u307c\u304f\u306f\u30af\u30ea\u30d7\u30c8\u304c\u672a\u6765\u3060\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002\\n\\n\u305d\u306e\u7406\u7531\u3092\u8a9e\u308b\u306b\u306f\u3001\u7d50\u69cb\u306a\u52b4\u529b\u3068\u6642\u9593\u304c\u5fc5\u8981\u306a\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u8a00\u8a9e\u5316\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u81ea\u5206\u306e\u982d\u306e\u6574\u7406\u306b\u3082\u306a\u308b\u306e\u3067\u3001\u3053\u3053\u3067\u50d5\u306f\u305d\u308c\u306b\u6311\u6226\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\\n\\n\u5c11\u3057\u60f3\u50cf\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002\\n\\n> \u73fe\u5b9f\u4e16\u754c\u306e\u3069\u3093\u306a\u3082\u306e\u3067\u3082\uff08\u30b5\u30fc\u30d3\u30b9\u3001\u4e0d\u52d5\u7523\u3001\u50b5\u6a29\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3001\u8cb7\u3044\u7269\u3001\u56fd\u50b5\u3001\u30b4\u30fc\u30eb\u30c9\u3001\u30db\u30c6\u30eb\u306e\u3044\u3061\u65e5\u6cca\u307e\u308b\u6a29\u5229\u3001\u306a\u3069\u306a\u3069\u3042\u308a\u3068\u3042\u3089\u3086\u308b\u3082\u306e\uff09\u3001\u307e\u305f\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u306b\u3042\u308b\u3069\u3093\u306a\u3082\u306e\u3067\u3082\uff08\u30b2\u30fc\u30e0\u30a2\u30a4\u30c6\u30e0\u3001\u97f3\u697d\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u306e\u571f\u5730\u3001\u30b2\u30fc\u30e0\u30ad\u30e3\u30e9\u306e\u30b9\u30ad\u30f3\u306a\u3069\u306a\u3069\uff09\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u3067\u30dc\u30fc\u30c0\u30ec\u30b9\u306b\u30df\u30c9\u30eb\u30de\u30f3\u306a\u3057\u3067\u3001\u30aa\u30fc\u30d7\u30f3\u306b\u516c\u5e73\u306b\u53d6\u5f15\u304c\u3067\u304d\u308b\u6642\u4ee3\\n>\\n> \u56fd\u5883\u306a\u3069\u95a2\u4fc2\u306a\u3057\u306b\u30b9\u30e0\u30fc\u30ba\u306b\u591a\u6587\u5316\u591a\u8a00\u8a9e\u5354\u529b\u95a2\u4fc2\u306e\u7d44\u7e54\u3092\u7bc9\u3051\u3066\u3001\u305d\u3057\u3066\u5831\u916c\u3092\u76f4\u63a5\u7684\u306b\u81ea\u5206\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u3082\u3089\u3048\u308b\u3002\u306a\u306b\u304b\u6ca1\u982d\u3067\u304d\u308b\u3088\u3046\u306a\u3053\u3068\u306b\u95a2\u3057\u3066\u30b0\u30ed\u30fc\u30d0\u30eb\u306b\u52df\u96c6\u3057\u3066\u7d44\u7e54\u3092\u4e00\u77ac\u306b\u4f5c\u3063\u3066\u4f55\u304b\u3092\u3084\u3063\u305f\u308a\u3001\u53ce\u76ca\u5316\u3067\u304d\u305f\u308a\\n\\n\u3053\u308c\u304c\u50d5\u304c\u8003\u3048\u305f\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u8fd1\u672a\u6765\u3067\u3059\u3002\u3082\u3061\u308d\u3093\u3001\u69d8\u3005\u306a\u58c1\u3084\u30cf\u30fc\u30c9\u30eb\u304c\u7acb\u3061\u306f\u3060\u304b\u3063\u3066\u3044\u308b\u306e\u306f\u9593\u9055\u3044\u306a\u3044\u3067\u3059\u3002\u3051\u308c\u3069\u3001\u305d\u308c\u304c\u4f55\u5e74\u304b\u304b\u308b\u304b\u308f\u304b\u308a\u307e\u305b\u3093\u304c\u3001\u8fd1\u3044\u3046\u3061\u305d\u308c\u306b\u8fd1\u3044\u5f62\u614b\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u306a\u305c\u306a\u3089\u3001\u305d\u3046\u3044\u3063\u305f\u30a4\u30f3\u30d5\u30e9\u306f\u3059\u3067\u306b\u3067\u304d\u3066\u304d\u3066\u6539\u5584\u3082\u3069\u3093\u3069\u3093\u3055\u308c\u3066\u3044\u3063\u3066\u3044\u308b\u6642\u4ee3\u306a\u306e\u3067\u3001\u305d\u3046\u306a\u3063\u3066\u3044\u304f\u306e\u306f\u76ee\u306b\u898b\u3048\u305f\u304b\u3089\u3067\u3059\u3002\\n\\n\u307e\u305f\u3001\u81ea\u5206\u304c\u8003\u3048\u305f\u4e16\u754c\u306b\u6bd4\u3079\u3066\u5b9f\u969b\u306b\u306f\u3082\u3063\u3068\u9032\u3093\u3067\u3044\u308b\u53ef\u80fd\u6027\u304c\u7d50\u69cb\u9ad8\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u306a\u305c\u304b\u3068\u3044\u3046\u3068\u3001\u4eba\u9593\u306f\u7dda\u5f62\u7684\u306b\u7269\u4e8b\u3092\u8003\u3048\u304c\u3061\u3067\u3042\u308a\u3001\u4eca\u306e\u72b6\u6cc1\u304c\u3088\u308a\u3088\u3044\u72b6\u6cc1\u306b\u306a\u308b\u3068\u3044\u3046\u60f3\u50cf\u3057\u304b\u3067\u304d\u307e\u305b\u3093\u3002\u5b9f\u969b\u306b\u306f\u4eca\u3067\u306f\u8003\u3048\u305f\u3053\u3068\u306e\u306a\u3044\u72b6\u6cc1\u306b\u306a\u3063\u305f\u308a\u3059\u308b\u306e\u3082\u3042\u308a\u5f97\u307e\u3059\u3002\u81ea\u5206\u304c\u60f3\u50cf\u529b\u306b\u6b20\u3051\u308b\u306e\u3082\u7121\u7406\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3001\u73fe\u6642\u70b9\u306b\u57fa\u3065\u3044\u3066\u4e88\u6e2c\u3092\u3057\u306a\u3044\u3068\u4f55\u3082\u59cb\u307e\u308a\u307e\u305b\u3093\u3088\u306d\u3002\\n\\n\u7d50\u679c\u3092\u8a00\u3063\u305f\u306e\u306f\u3044\u3044\u3051\u3069\u3001\u306a\u3093\u3067\u305d\u3046\u306a\u308b\u3093\u3060\uff1f\u3068\u601d\u3046\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u3053\u304b\u3089\u8ff0\u3079\u3066\u3044\u304d\u307e\u3059\u3002\u8a00\u3044\u305f\u3044\u3053\u3068\u304c\u5c71\u7a0b\u3042\u308b\u306e\u3067\u3001\u8a18\u4e8b\u306f\u30b7\u30ea\u30fc\u30ba\u5316\u3057\u307e\u3059\u3002\\n\\n## \u30ea\u30a2\u30eb\u304b\u3089\u30d0\u30fc\u30c1\u30e3\u30eb\u3078\\n\\n\u5927\u304d\u306a\u7406\u7531\u3068\u3057\u3066\u306f\u3001\u4eba\u9593\u793e\u4f1a\u306f\u30ea\u30a2\u30eb\u304b\u3089\u30d0\u30fc\u30c1\u30e3\u30eb\u3078\u9077\u79fb\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u5927\u304d\u306a\u7406\u7531\u3067\u3059\u3002\\n\\n### Metaverse\\n\\n\u6700\u8fd1\u3060\u3068\u3001\u30e1\u30bf\u30d0\u30fc\u30b9\u3068\u3044\u3046\u30ef\u30fc\u30c9\u304c\u304b\u306a\u308a\u8033\u306b\u5165\u3063\u3066\u304f\u308b\u69d8\u306b\u306a\u3063\u305f\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002\u30e1\u30bf\u30d0\u30fc\u30b9\u3068\u805e\u304f\u3068\u3001\u308f\u3051\u304c\u308f\u304b\u3089\u306a\u3044\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u81ea\u5206\u306e\u7406\u89e3\u3067\u3059\u3068\u3001\u3053\u306e\u30ef\u30fc\u30c9\u306f\u307e\u3060\u610f\u5473\u304c\u5b9a\u307e\u3063\u3066\u3044\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u3042\u3048\u3066\u610f\u898b\u3092\u8a00\u308f\u305b\u3066\u3082\u3089\u3046\u3068\u3001\u30e1\u30bf\u30d0\u30fc\u30b9\u306f\u3044\u308f\u3086\u308b\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u305d\u306e\u3082\u306e\u306e\u5b9a\u7fa9\u306b\u306a\u308a\u307e\u3059\u3002\u8ab0\u3067\u3082\u4f5c\u308c\u307e\u3059\u3057\u3001\u3059\u3067\u306b\u3042\u308b\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u305d\u306e\u3082\u306e\u3082\u5e83\u7fa9\u7684\u306b\u30e1\u30bf\u30d0\u30fc\u30b9\u306a\u306e\u3067\u3059\u3002\\n\\n\u4f8b\u3048\u3070\u3001\u3059\u3067\u306b\u50d5\u9054\u306e\u30b0\u30fc\u30b0\u30eb\u30a2\u30ab\u30a6\u30f3\u30c8\u3042\u308b\u3044\u306f\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30a6\u30a9\u30ec\u30c3\u30c8\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3068\u304b\u304c\u30e1\u30bf\u30d0\u30fc\u30b9\u306e\u50d5\u9054\u306e\u5206\u8eab\u3068\u7406\u89e3\u3057\u3066\u3082\u3088\u3044\u3067\u3057\u3087\u3046\u3002\u305f\u3060\u3001\u3053\u306e\u30e1\u30bf\u30d0\u30fc\u30b9\u306f\u307e\u3060\u307e\u3060\u521d\u6b69\u7684\u306a\u6bb5\u968e\u306a\u306e\u3067\u3001\u672c\u5f53\u306b\u4f7f\u3048\u308b\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u3068\u8a00\u3048\u308b\u306e\u304b\u3068\u3044\u3046\u3068\u3053\u308d\u304c\u78ba\u304b\u306b\u3042\u308a\u307e\u3059\u3002\\n\\n### \\"Software is eating the world\\"\\n\\n\u82f1\u8a9e\u570f\u3067\u306f\u3068\u3066\u3082\u6709\u540d\u306a\u8a00\u8449\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u308c\u306f\u3053\u306e\u300cSoftware is eating the world. (\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306f\u4e16\u754c\u3092\u98f2\u307f\u8fbc\u3093\u3067\u3044\u308b)\u300d\u3068\u3044\u3046\u8a00\u8449\u3067\u3059\u3002\\n\\n\u3053\u308c\u306f 2011 \u5e74\u306b A16Z \u3068\u3044\u3046\u3068\u3066\u3082\u5148\u9032\u7684\u306a\u8996\u91ce\u3092\u6301\u3064[ VC \u306e\u30d5\u30a1\u30f3\u30c0\u30fc\u304c\u8a71\u3057\u305f\u8a00\u8449](https://a16z.com/2011/08/20/why-software-is-eating-the-world/)\u3067\u3059\u3002\u305d\u306e\u5f8c\u306e\u4e16\u754c\u306f\u3054\u5b58\u77e5\u306e\u901a\u308a\u3001\u5f7c\u304c\u8a00\u3063\u305f\u901a\u308a\u306b\u306a\u308a\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306f\u4e16\u754c\u3092\u98f2\u307f\u8fbc\u3093\u3067\u3044\u304d\u307e\u3057\u305f\u3002\\n\\n### Companies\' market cap ranking\\n\\n![](worldranking1989-2022.png)\\n\\n\u4e0a\u306e\u753b\u50cf\u3067\u308f\u304b\u308b\u3088\u3046\u306b\u3001\u305d\u306e\u904e\u7a0b\u3067\u306f\u4e16\u754c\u6642\u4fa1\u7dcf\u984d\u30e9\u30f3\u30ad\u30f3\u30b0\u306e\u4e0a\u4f4d\u306f\u307b\u3068\u3093\u3069\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4f01\u696d\u3001\u3044\u308f\u3086\u308b FANG \u307e\u305f\u306f GAFA \u3068\u547c\u3070\u308c\u308b\u4f01\u696d\u306b\u72ec\u5360\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\\n\\n\u4e00\u6614\u524d\u65e5\u672c\u4f01\u696d\u304c\u3042\u308c\u3060\u3051\u72ec\u5360\u3057\u3066\u3044\u305f\u30e9\u30f3\u30ad\u30f3\u30b0\u3067\u3059\u304c\u3001\u65e5\u672c\u304c\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306e\u6ce2\u3092\u5b8c\u5168\u306b\u9003\u3057\u305f\u305b\u3044\u3067\u3001\u4eca\u3084\u30e9\u30f3\u30ad\u30f3\u30b0\u306e\u4e0b\u4f4d\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u30a2\u30e1\u30ea\u30ab\u306e\u4f01\u696d\u304c\u307b\u3068\u3093\u3069\u3067\u3001\u305f\u307e\u306b\u4e2d\u56fd\u3084\u97d3\u56fd\u306e\u4f01\u696d\u304c\u73fe\u308c\u3066\u300131 \u4f4d\u306b\u306a\u3063\u3066\u521d\u3081\u3066\u30c8\u30e8\u30bf\u304c\u51fa\u3066\u304d\u3066\u3044\u307e\u3059\u3002\u4e16\u306e\u4e2d\u306e\u6642\u6d41\u306f\u3082\u306e\u3065\u304f\u308a\u6642\u4ee3\u304b\u3089\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u6642\u4ee3\u306b\u306a\u3063\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\\n\\n\u3053\u3046\u3044\u3063\u305f\u4f01\u696d\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u3063\u305f\u3053\u3068\u304c\u3042\u308b\u65b9\u306f\u308f\u304b\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u3068\u3066\u3082\u5f79\u306b\u7acb\u3063\u3066\u3044\u3066\u3001\u4e00\u5ea6\u4f7f\u3046\u3068\u306a\u304b\u306a\u304b\u305d\u306e\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u629c\u3051\u51fa\u305b\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306b\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u304c\u4e16\u754c\u3092\u98f2\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u3053\u308c\u3067\u306f\u7d42\u308f\u3089\u306a\u3044\u306e\u3067\u3059\u3002\\n\\n\u3053\u308c\u306f\u898b\u65b9\u3092\u5909\u3048\u308b\u3068\u3001\u4eba\u985e\u304c\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u3078\u9032\u3093\u3060\u7b2c\u4e00\u6b69\u306b\u904e\u304e\u305a\u3001\u307e\u3060\u307e\u3060\u9053\u306e\u308a\u306f\u9577\u3044\u3067\u3059\u3002\u73fe\u5728\u3053\u3046\u3044\u3063\u305f\u5927\u4f01\u696d\u304c\u4f5c\u3063\u3066\u3044\u308b\u521d\u6b69\u7684\u306a\u300c\u30e1\u30bf\u30d0\u30fc\u30b9\u300d\u306e\u4e16\u754c\u306f\u3053\u308c\u306f\u3053\u308c\u3067\u30a4\u30f3\u30d5\u30a9\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u30c7\u30b8\u30bf\u30eb\u5316\u3059\u308b\u3053\u3068\u306b\u6210\u529f\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u307e\u3060\u304a\u91d1\u3068\u3044\u3046\u3082\u306e\u306f\u73fe\u5b9f\u4e16\u754c\u304b\u3089\u5207\u308a\u96e2\u3057\u305f\u5f62\u3067\u30c7\u30b8\u30bf\u30eb\u5316\u3067\u304d\u3066\u3044\u307e\u305b\u3093\u3002\uff08\u4f8b\u3048\u3070 paypay \u3068\u304b\u306f\u304a\u91d1\u3068\u540c\u7b49\u306a\u3088\u3046\u306b\u601d\u308f\u308c\u307e\u3059\u304c\u3001\u72ec\u7acb\u3057\u305f\u5f62\u3067\u304a\u91d1\u3068\u3044\u3046\u3082\u306e\u3067\u306f\u306a\u304f\u3001\u7d50\u5c40\u306f\u65e5\u672c\u5186\u306e\u5206\u8eab\u3067\u3042\u308a\u3001paypay \u306e\u904b\u7528\u4f1a\u793e\u306b\u5927\u304d\u304f\u4f9d\u5b58\u3057\u305f\u5f62\u3067\u3059 \u2192 \u904b\u7528\u4f1a\u793e\u306f\u305d\u306e\u4e16\u754c\u306e\u795e\u69d8\u3067\u3059\uff09\\n\\n### \u795e\u69d8\u306e\u3044\u306a\u3044\uff08\u975e\u4e2d\u592e\u96c6\u6a29\u7684\u306a\uff09\u4e16\u754c\\n\\n\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306f\u3053\u308c\u3092\u89e3\u6c7a\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306f\u4eca\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u304a\u3051\u308b\u306a\u3093\u3067\u3082\u30b3\u30d4\u30fc\u3067\u304d\u3066\u3057\u307e\u3046\u554f\u984c\u3092\u89e3\u6c7a\u3057\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u306a\u3082\u306e\u306b\u30ea\u30a2\u30eb\u4e16\u754c\u3068\u540c\u3058\u3088\u3046\u306a\u8ab0\u306b\u3082\u95a2\u4e0e\u3055\u308c\u306a\u3044\u5e0c\u5c11\u6027\u3001\u6539\u3056\u3093\u8010\u6027\u3092\u4e0e\u3048\u3066\u3001\u521d\u3081\u3066\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u3092\u300c\u4e16\u754c\u300d\u3068\u3057\u3066\u6210\u308a\u7acb\u305f\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u3002\u5148\u7a0b\u3001\u795e\u69d8\u3068\u3044\u3063\u305f\u306e\u306f\u4f8b\u3048\u3070\u3042\u306a\u305f\u306e\u751f\u304d\u308b\u4e16\u754c\u306b\u795e\u69d8\u304c\u3069\u3053\u304b\u306e\u4eba\u9593\u306b\u306a\u308b\u3068\u3001\u6016\u304f\u3042\u308a\u307e\u305b\u3093\u304b\uff1f\u305d\u306e\u4eba\u306e\u6c7a\u5b9a\u3067\u4f55\u3082\u304b\u3082\u5909\u308f\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u6975\u7aef\u306a\u8a71\u3001\u751f\u5b58\u306e\u6a29\u5229\u3055\u3048\u3082\u596a\u308f\u308c\u308b\u30ea\u30b9\u30af\u304c\u6f5c\u3093\u3067\u3044\u307e\u3059\u3002\u305d\u3093\u306a\u4e16\u754c\u3063\u3066\u30c7\u30a3\u30b9\u30c8\u30d4\u30a2\u3067\u5acc\u3067\u3059\u3088\u306d\uff1f\\n\\n\u3059\u3067\u306b\u6c17\u3065\u3044\u3066\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u4eca\u50d5\u9054\u306f\u307e\u3055\u306b\u3053\u306e\u795e\u69d8\u304c\u3044\u308b\uff08\u4e2d\u592e\u96c6\u6a29\u7684\u306a\uff09\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e16\u754c\u306b\u4f4f\u3093\u3067\u3044\u307e\u3059\u3002youtuber \u3055\u3093\u306f\u308f\u3051\u304c\u306a\u304f\u30c1\u30e3\u30f3\u30cd\u30eb\u505c\u6b62\u3055\u308c\u308b\u3057\u3001\u30a2\u30de\u30be\u30f3\u3067\u306f\u660e\u78ba\u306a\u7406\u7531\u304c\u4e0e\u3048\u3089\u308c\u305a\u51fa\u5e97\u505c\u6b62\u51e6\u5206\u306b\u306a\u3063\u305f\u308a\u3057\u307e\u3059\u3002\u30c4\u30a4\u30c3\u30bf\u30fc\u3060\u3063\u3066\u30c8\u30e9\u30f3\u30d7\u3055\u3093\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u304c\u30d0\u30f3\u3055\u308c\u305f\u3053\u3068\u3067\u6709\u540d\u3067\u3057\u305f\u306d\u3002\\n\\n\u3082\u3061\u308d\u3093\u3001\u60aa\u3055\u3092\u3057\u3066\u30d0\u30f3\u3055\u308c\u305f\u3089\u305d\u308c\u306f\u305d\u308c\u3067\u4ed5\u65b9\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u305f\u3060\u4f1a\u793e\u5074\u306e\u4e00\u4efb\u3067\u3059\u3079\u3066\u304c\u6c7a\u5b9a\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u306f\u679c\u305f\u3057\u3066\u6b63\u7fa9\u306a\u306e\u304b\u3069\u3046\u304b\u306f\u8b70\u8ad6\u306e\u4f59\u5730\u304c\u3042\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\uff1f\\n\\n\u5b9f\u969b\u306b\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u306e\u5275\u59cb\u8005\u3067\u3042\u308b\u30d3\u30bf\u30ea\u30c3\u30af\u6c0f\u306f\u30ef\u30fc\u30eb\u30c9\u30aa\u30d6\u30ef\u30fc\u30af\u30e9\u30d5\u30c8\u306e MMO \u30b2\u30fc\u30e0\u5185\u306e\u597d\u304d\u306a\u30ad\u30e3\u30e9\u30af\u30bf\u304c\u5f31\u4f53\u5316\u3055\u308c\u305f\u3053\u3068\u3067\u5acc\u6c17\u304c\u5dee\u3057\u305f\u306e\u304c\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u3068\u3044\u3046\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u59cb\u307e\u308a\u3060\u3068\u3082\u8a00\u308f\u308c\u3066\u3044\u307e\u3059\u3002\u795e\u69d8\u306e\u3044\u306a\u3044\u4e16\u754c\u306f\u4eba\u985e\u53f2\u4e0a\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u3055\u305e\u304b\u3057\u30d3\u30bf\u30ea\u30c3\u30af\u6c0f\u306f\u4f5c\u308a\u305f\u304b\u3063\u305f\u3093\u3060\u308d\u3046\u306d\u3002\\n\\n\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3067\u3042\u308c\u3070\u3001\u795e\u69d8\u306e\u3044\u306a\u3044\u4e16\u754c\u304c\u4f5c\u308c\u308b\u3068\u3044\u3046\u70b9\u304c\u975e\u5e38\u306b\u5927\u304d\u3044\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u3063\u3066\u4e07\u4eba\u5e73\u7b49\u3067\u540c\u3058\u30eb\u30fc\u30eb\u306b\u5247\u3063\u305f\u4e16\u754c\u304c\u69cb\u7bc9\u3067\u304d\u308b\u69d8\u306b\u306a\u3063\u305f\u3068\u3044\u3048\u307e\u3059\u3002\\n\\n\u305f\u3060\u3001\u4eca\u306f\u3053\u306e\u5927\u304d\u306a\u8ab2\u984c\u89e3\u6c7a\u306e\u73fe\u5728\u9032\u884c\u7cfb\u3067\u3042\u308a\u3001\u3042\u308c\u3084\u3053\u308c\u306e\u4e0d\u5177\u5408\u3084\u6e80\u8db3\u306e\u884c\u304b\u306a\u3044\u70b9\u304c\u305f\u304f\u3055\u3093\u3042\u308b\u3067\u3057\u3087\u3046\u3002\\n\\n\u305d\u3046\u3044\u3063\u305f\u3068\u304d\u306b\u306f\u3001\u50d5\u306e\u610f\u898b\u3068\u3057\u3066\u306f\u672a\u6765\u5fd7\u5411\u304c\u3044\u3044\u3067\u3059\u3002\u672a\u6765\u5fd7\u5411\u306f\u4f55\u304b\u3068\u3044\u3046\u3068\u3001\u30af\u30ec\u30fc\u30de\u30fc\u306b\u306a\u3089\u305a\u6696\u304b\u304f\u898b\u5b88\u3063\u3066\u3042\u3052\u3066\u4e00\u7dd2\u306b\u6210\u9577\u3059\u308b\u306e\u304c\u30d9\u30b9\u30c8\u3060\u3068\u601d\u3044\u307e\u3059\u3002\u30af\u30ec\u30fc\u30de\u30fc\u306b\u306a\u308b\u306e\u306f\u7c21\u5358\u3067\u3042\u308a\u3001\u8ab2\u984c\u3092\u89e3\u6c7a\u3059\u308b\u5074\u306b\u56de\u3063\u3066\u8272\u3005\u8003\u3048\u3066\u884c\u52d5\u3059\u308b\u3053\u3068\u3053\u305d\u793e\u4f1a\u304c\u9032\u5316\u3057\u3066\u3044\u304f\u529b\u3068\u306a\u3063\u3066\u3044\u304f\u306e\u3067\u3001\u7d50\u5c40\u306f\u307f\u3093\u306a\u30a6\u30a3\u30f3\u30a6\u30a3\u30f3\u306b\u306a\u308b\u308f\u3051\u3067\u3059\u3002\\n\\n\u8a71\u304c\u305d\u308c\u307e\u3057\u305f\u304c\u3001\u4eba\u9593\u793e\u4f1a\u306f\u30ea\u30a2\u30eb\u304b\u3089\u30d0\u30fc\u30c1\u30e3\u30eb\u3078\u3068\u3044\u3046\u5927\u304d\u306a\u65b9\u5411\u6027\u306f\u9593\u9055\u3044\u304c\u306a\u304f\u3001\u3059\u3067\u306b\u81ea\u5206\u305f\u3061\u306e\u6d3b\u52d5\u306f\u305f\u304f\u3055\u3093\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3078\u79fb\u690d\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u304c\u52a0\u901f\u3057\u3066\u3044\u304d\u307e\u3059\u3002\\n\\n### Human society\'s GDP\\n\\n![](./human_history_GDP.png)\\n_[\u51fa\u5178](https://www.weforum.org/agenda/2017/09/over-2000-years-of-economic-history-in-one-chart)_\\n\\n\\n\u4eba\u985e\u306e\u6b74\u53f2\u306b\u304a\u3051\u308b \u4e00\u4eba\u5f53\u305f\u308a\u306e GDP \u306f\u4e0a\u306e\u30b0\u30e9\u30d5\u3092\u898b\u3066\u4e0b\u3055\u3044\u3002\u308f\u304b\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u6307\u6570\u95a2\u6570\u7684\u306b\u5897\u52a0\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u3053\u308c\u306e\u4e3b\u306a\u8981\u56e0\u306b\u306f\u3001\u4e00\u3064\u3068\u3057\u3066\u30ea\u30a2\u30eb\u306a\u4e16\u754c\u3067\u306f\u30ea\u30a2\u30eb\u306a\u8cc7\u6e90\u306e\u958b\u767a\u304c\u3067\u304d\u308b\u90e8\u5206\u304c\u305f\u304f\u3055\u3093\u3042\u3063\u305f\u3053\u3068\u3068\u3001\u6280\u8853\u7684\u306a\u9032\u6b69\u304c\u7206\u767a\u7684\u306b\u5897\u52a0\u3057\u305f\u3068\u601d\u3044\u307e\u3059\u3002\u7523\u696d\u9769\u547d\u4ee5\u5f8c\u3001\u4eba\u985e\u306f\u30d1\u30f3\u30c9\u30e9\u306e\u30dc\u30c3\u30af\u30b9\u3092\u958b\u3044\u305f\u3088\u3046\u306b\u3001\u77e5\u306e\u96c6\u5408\u4f53\u3068\u3057\u3066\u5927\u304d\u304f\u6210\u9577\u3057\u3001\u3082\u306f\u3084\u7523\u696d\u9769\u547d\u306e\u3068\u304d\u307f\u305f\u3044\u306b\u4e00\u7a2e\u306e\u6280\u8853\u9032\u6b69\u3067\u5927\u304d\u304f\u4eba\u985e\u304c\u524d\u9032\u3059\u308b\u3068\u3044\u3046\u72b6\u6cc1\u3067\u306f\u306a\u304f\u306a\u3063\u3066\u3044\u307e\u3059\u3002\\n\\n\u4eca\u73fe\u5728\u3060\u3051\u3067\u3082\u3001\u81ea\u5206\u306e\u8a8d\u8b58\u3057\u3066\u3044\u308b\u7bc4\u56f2\u3067\u3059\u3068\u30015G\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3001AI\u3001Iot \u306a\u3069\u3001\u69d8\u3005\u306a\u6280\u8853\u304c\u96e8\u5f8c\u306e\u7b4d\u306e\u3088\u3046\u306b\u73fe\u308c\u3066\u304d\u3066\u3001\u540c\u6642\u306b\u9032\u5316\u3057\u3066\u878d\u5408\u3057\u3064\u3064\u3001\u6b21\u306e\u7523\u696d\u9769\u547d\u3068\u3057\u3066\u4eba\u985e\u793e\u4f1a\u3092\u7206\u767a\u7684\u306b\u524d\u9032\u3055\u305b\u308b\u3067\u3057\u3087\u3046\u3002\u60f3\u50cf\u3092\u7d76\u3059\u308b\u3088\u3046\u306a\u4e16\u754c\u304c\u307e\u305f 10 \u5e74 20 \u5e74\u5f8c\u306b\u306f\u73fe\u308c\u3066\u4eba\u9593\u793e\u4f1a\u306e\u3053\u308c\u307e\u3067\u306e\u77e5\u8b58\u3001\u7d4c\u9a13\u3001\u54f2\u5b66\u3084\u4fa1\u5024\u89b3\u3092\u3059\u3079\u3066\u8003\u3048\u76f4\u3055\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u4eca\u306f\u3053\u308c\u3060\u3051\u9032\u5316\u306e\u901f\u5ea6\u304c\u65e9\u304f\u3066\u3001\u6bce\u65e5\u304c\u65b0\u305f\u306a\u6b74\u53f2\u306e\u30da\u30fc\u30b8\u3092\u3081\u304f\u3063\u3066\u3044\u308b\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002\\n\\n### Why human will go virtual\\n\\n\u307e\u305f\u3001\u306a\u305c\u30d0\u30fc\u30c1\u30e3\u30eb\u304c\u826f\u3044\u306e\u304b\u3068\u3044\u3046\u7591\u554f\u3082\u3042\u308d\u3046\u304b\u3068\u601d\u3044\u307e\u3059\u3002\\n\\n\u6614\u30de\u30eb\u30af\u30b9\u306e\u4eba\u53e3\u8ad6\u3067\u3082\u6709\u540d\u3067\u3059\u304c\u3001\u4eba\u985e\u306e\u767a\u5c55\u306f\u3044\u305a\u308c\u73fe\u5b9f\u4e16\u754c\u306e\u9650\u754c\u3092\u8fce\u3048\u3066\u3057\u307e\u3044\u3001\u6e1b\u901f\u3057\u3066\u3057\u307e\u3046\u3067\u3057\u3087\u3046\u3068\u3044\u3046\u7406\u8ad6\u3067\u3059\u3002\u81ea\u5206\u306f\u4eba\u9593\u793e\u4f1a\u306e GDP \u306f\u307e\u3059\u307e\u3059\u5897\u52a0\u3057\u3066\u3044\u304f\u3053\u3068\u306f\u9593\u9055\u3044\u306a\u3044\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002\u306a\u305c\u306a\u3089\u73fe\u5b9f\u4e16\u754c\u306f\u5236\u7d04\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u7a7a\u9593\u306f\u5236\u7d04\u304c\u5c11\u306a\u3044\u304b\u3089\u3067\u3059\u3002\\n\\n\u4eba\u9593\u306f\u5927\u822a\u6d77\u6642\u4ee3\u4ee5\u6765\u3001\u5f71\u97ff\u7bc4\u56f2\u3092\u62e1\u5927\u3057\u3088\u3046\u3068\u3001\u5730\u7403\u3092\u305f\u304f\u3055\u3093\u63a2\u7d22\u3057\u7d9a\u3051\u958b\u767a\u3057\u3066\u304d\u307e\u3057\u305f\u3002\u4eca\u3084\u5b87\u5b99\u3078\u884c\u3053\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u3001\u5b87\u5b99\u958b\u767a\u306f\u305d\u3046\u7c21\u5358\u306b\u3067\u304d\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u5b87\u5b99\u306e\u958b\u767a\u3092\u7a81\u7834\u3059\u308b\u306b\u306f\u6642\u9593\u3068\u7a7a\u9593\u3068\u3044\u3046\u3068\u3066\u3064\u3082\u306a\u304f\u56f0\u96e3\u306a\u58c1\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u305d\u3053\u3067\u3001\u3053\u306e\u5236\u9650\u304c\u304b\u304b\u3063\u3066\u3044\u306a\u3044\u30d0\u30fc\u30c1\u30e3\u30eb\u7a7a\u9593\u306e\u958b\u767a\u304c\u5bb9\u6613\u306a\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u666e\u901a\u306f\u8003\u3048\u307e\u3059\u3002\u30d0\u30fc\u30c1\u30e3\u30eb\u306a\u4e16\u754c\u306b\u3044\u308b\u3068\u3001\u77ac\u9593\u79fb\u52d5\u3082\u3067\u304d\u3066\u30b9\u30da\u30fc\u30b9\u306e\u554f\u984c\u3082\u89e3\u6c7a\u3055\u308c\u307e\u3059\u3002\\n\\nWeb3 \u304c\u6765\u308b\u3068\u4eba\u985e\u306e\u30d0\u30fc\u30c1\u30e3\u30eb\u5316\u304c\u66f4\u306b\u52a0\u901f\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u4fa1\u5024\u304c\u5bb9\u6613\u306b\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u5185\u3067\u3084\u308a\u53d6\u308a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u3001\u6a5f\u68b0\u3068\u6a5f\u68b0\u304c\u30df\u30c9\u30eb\u30de\u30f3\u306a\u3057\u3067\u4fa1\u5024\u306e\u3084\u308a\u53d6\u308a\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u5c11\u3057\u4e88\u8a00\u3057\u307e\u3059\u304c\u3001\u5c06\u6765\u306f\u3053\u306e\u6a5f\u68b0\u9593\u306e\u4fa1\u5024\u306e\u4ea4\u63db\u304c\u30e1\u30a4\u30f3\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002\u3044\u308f\u3086\u308b\u304a\u91d1\u306b\u3064\u3044\u3066\u306f\u3001\u307e\u3059\u307e\u3059\u30d7\u30ed\u30b0\u30e9\u30de\u30d6\u30eb\u30de\u30cd\u30fc\uff08\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u5236\u5fa1\u3067\u304d\u308b\u304a\u91d1\uff09\u306b\u306a\u3063\u3066\u3044\u304f\u308f\u3051\u3067\u3059\u3002\\n\\n\u30d0\u30fc\u30c1\u30e3\u30eb\u306a\u4e16\u754c\u3067\u751f\u304d\u3066\u3044\u308b\u4eba\u9593\u306b\u3068\u3063\u3066\u306f\u5f53\u7136\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u30cd\u30a4\u30c6\u30a3\u30d6\u306a\u8cc7\u7523\u304c\u751f\u307e\u308c\u3066\u3082\u304a\u304b\u3057\u304f\u306a\u3044\u3067\u3057\u3087\u3046\u3002\u305d\u308c\u304c\u30af\u30ea\u30d7\u30c8\uff08\u4eee\u60f3\u901a\u8ca8\uff09\u3067\u3059\u3002\\n\\n## Why people cannot understand this trend?\\n\\n\u3053\u306e\u8a71\u306f\u3081\u3061\u3083\u3081\u3061\u3083\u91cd\u8981\u3067\u3001\u306a\u305c\u6c17\u3065\u3044\u3066\u3044\u306a\u3044\u4eba\u3005\u304c\u591a\u3044\u306e\u304b\uff1f\u3068\u3044\u3046\u7591\u554f\u3092\u62b1\u304f\u3068\u601d\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3064\u3044\u3066\u306f\u3001\u307e\u3042\u3044\u308d\u3044\u308d\u306a\u7406\u7531\u304c\u3042\u308b\u3067\u3057\u3087\u3046\u3002\u3067\u3082\u3053\u308c\u3092\u77e5\u3063\u3066\u3082\u3089\u3063\u305f\u3042\u306a\u305f\u306b\u306f\u3053\u306e\u30c8\u30ec\u30f3\u30c9\u306e\u3053\u3068\u3092\u899a\u3048\u3066\u307b\u3057\u3044\u3067\u3059\u3002\\n\\n\u6280\u8853\u3068\u3044\u3046\u3082\u306e\u306f\u6b74\u53f2\u306b\u304a\u3044\u3066\u6bce\u56de\u4f55\u304b\u3092\u4e00\u65b0\u3057\u3066\u3001\u65e2\u5f97\u6a29\u76ca\u8005\u306e\u5229\u76ca\u306b\u89e6\u308c\u307e\u3059\u3002\u305d\u3046\u3059\u308b\u3068\u5fc5\u305a\u53cd\u767a\u3092\u53d7\u3051\u307e\u3059\u3002\\n\\n\u3060\u3051\u3069\u3001\u77ed\u671f\u7684\u306b\u306f\u65e2\u5f97\u6a29\u76ca\u306e\u307b\u3046\u304c\u52dd\u3064\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u9577\u671f\u7684\u306b\u306f\u52dd\u3066\u307e\u305b\u3093\u3002\u6642\u4ee3\u306e\u30c8\u30ec\u30f3\u30c9\u3068\u3044\u3046\u306e\u306f\u9006\u3089\u3046\u3053\u3068\u304c\u307b\u307c\u4e0d\u53ef\u80fd\u306a\u306e\u3067\u3059\u3002\\n\\n\u82f1\u8a9e\u3067\u306f\u3088\u304f\u8a00\u308f\u308c\u308b\u8a00\u8449\u3068\u3057\u3066\u4ee5\u4e0b\u304c\u3042\u308a\u307e\u3059\u3002\\n\\n> First they ignore you, then they laugh at you, then they fight you, then you win.\\n\\n\u3053\u308c\u306f\u30af\u30ea\u30d7\u30c8\u306e\u696d\u754c\u3067\u3082\u3081\u3061\u3083\u304f\u3061\u3083\u3074\u3093\u3068\u304f\u308b\u8a00\u8449\u3067\u3059\u3002\u300c\u6700\u521d\u306b\u5f7c\u3089\u3042\u306a\u305f\u3092\u7121\u8996\u3057\u3001\u305d\u308c\u304b\u3089\u3042\u3056\u7b11\u308f\u3044\u3001\u305d\u308c\u304b\u3089\u6297\u3044\u3001\u6700\u7d42\u7684\u306b\u306f\u3042\u306a\u305f\u306e\u52dd\u5229\u300d\u3068\u3044\u3046\u3088\u3046\u306a\u611f\u3058\u3067\u3001\u6b74\u53f2\u306b\u304a\u3044\u3066\u306f\u69d8\u3005\u306a\u30c8\u30ec\u30f3\u30c9\u304c\u305f\u3069\u3063\u3066\u304d\u305f\u904b\u547d\u306a\u306e\u3067\u3059\u3002\\n\\n\u8eca\u306e\u6b74\u53f2\u3082\u305d\u3046\u3067\u3059\u3057\u3001\u767a\u660e\u3055\u308c\u305f\u5f53\u521d\u3001\u3081\u3061\u3083\u304f\u3061\u3083\u52b9\u7387\u304c\u60aa\u304f\u30c7\u30b6\u30a4\u30f3\u3082\u826f\u304f\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u99ac\u8eca\u306e\u307b\u3046\u304c\u5168\u7136\u3044\u3044\u3068\u601d\u3063\u3066\u3044\u305f\u4eba\u304c\u5c11\u306a\u304b\u3089\u305a\u3044\u307e\u3057\u305f\u3002\u307e\u305f\u3001\u305d\u306e\u3042\u3068\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3082\u767a\u660e\u3055\u308c\u305f\u5f53\u521d\u306f\u8ab0\u306b\u3082\u7406\u89e3\u3055\u308c\u305a\u3001\u30d3\u30eb\u30fb\u30b2\u30a4\u30c4\u304c\u30c6\u30ec\u30d3\u3067\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3092\u7d39\u4ecb\u3057\u3066\u3044\u305f\u3068\u304d\u306b\u306f\u89b3\u5ba2\u3068\u53f8\u4f1a\u8005\u306e\u65b9\u304b\u3089\u5927\u3044\u306b\u7b11\u308f\u308c\u3066\u3044\u307e\u3057\u305f\u3002\u4eca\u3060\u304b\u3089\u8a00\u3048\u308b\u306e\u3067\u3059\u304c\u3001\u5f53\u521d\u306e\u30d3\u30eb\u30fb\u30b2\u30a4\u30c4\u304c\u60f3\u50cf\u3057\u305f\u4e16\u754c\u3088\u308a\u3082\u9065\u304b\u306b\u9032\u3093\u3060\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u793e\u4f1a\u304c\u3067\u304d\u3066\u3044\u307e\u3059\u3002\\n\\n> \\"History Doesn\u2019t Repeat Itself, but It Often Rhymes\\" - Mark Twain\\n\\nMark Twain \u6c0f\u304c\u8a00\u3063\u3066\u3044\u308b\u901a\u308a\u3067\u3059\u3002\\n\\n\u305d\u3053\u3067\u3001\u4eca\u5ea6\u306f\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u756a\u3067\u3059\u3002\u300c\u30c7\u30a3\u30b9\u3089\u308c\u308b\u3001\u6012\u3089\u308c\u308b\u3001\u8efd\u8511\u3055\u308c\u308b\u3001\u7121\u8996\u3055\u308c\u308b\u3001\u305d\u308c\u3067\u3082\u9032\u5316\u3057\u7d9a\u3051\u3066\u793e\u4f1a\u3092\u5909\u3048\u3066\u3044\u304d\u3001\u6211\u3005\u306e\u751f\u304d\u65b9\u3082\u5909\u3048\u3066\u304f\u308c\u308b\u300d\u3001\u3053\u308c\u304c\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002\\n\\n\u3060\u3089\u3060\u3089\u3068\u66f8\u3044\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u304c\u3001\u666e\u6bb5\u53cb\u4eba\u306b\u805e\u304b\u308c\u3066\u8aac\u660e\u3059\u308b\u3068\u7d50\u69cb\u306a\u6642\u9593\u3092\u304b\u3051\u3066\u8aac\u660e\u3067\u304d\u305f\u308a\u3057\u307e\u3059\u304c\u3001\u3044\u3056\u66f8\u304f\u3068\u306a\u308b\u3068\u3046\u307e\u304f\u66f8\u3051\u306a\u3044\u3093\u3067\u3059\u306d\u3002\u307e\u3060\u66f8\u304d\u304d\u308c\u306a\u3044\u307b\u3069\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u307e\u305f\u6b21\u56de\u3092\u304a\u697d\u3057\u307f\u306b\uff01\\n\\n### _\u514d\u8cac\u4e8b\u9805_\\n\\n_\u672c website \u306b\u304b\u304b\u308c\u3066\u3044\u308b\u5185\u5bb9\u306f\u3042\u304f\u307e\u3067\u500b\u4eba\u7684\u306a\u898b\u89e3\u3067\u3042\u308a\u3001Financial advice \u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002_"},{"id":"about-scaricity","metadata":{"permalink":"/blog/about-scaricity","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/What-is-Scaricity/2022-09-02-what-is-Scaricity.md","source":"@site/blog/What-is-Scaricity/2022-09-02-what-is-Scaricity.md","title":"About Scaricity","description":"\u3042\u306a\u305f\u306f\u3001\u300c\u5e0c\u5c11\u6027\u304c\u3042\u308b\u300d\u300c\u5e0c\u5c11\u6027\u304c\u7121\u3044\u300d\u3068\u3044\u3046\u3053\u3068\u3092\u8003\u3048\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u304b\uff1f","date":"2022-09-02T00:00:00.000Z","formattedDate":"2022\u5e749\u67082\u65e5","tags":[{"label":"\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","permalink":"/blog/tags/\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3"},{"label":"scaricity","permalink":"/blog/tags/scaricity"},{"label":"\u5e0c\u5c11\u6027","permalink":"/blog/tags/\u5e0c\u5c11\u6027"}],"readingTime":5.178,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"about-scaricity","title":"About Scaricity","authors":["Thurendous","Polymetis"],"blogDescription":"\u306a\u305c\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u8a18\u4e8b\u3092\u304b\u304f\u306e\u304b","tags":["\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","scaricity","\u5e0c\u5c11\u6027"]},"prevItem":{"title":"Why Crypto is the Future","permalink":"/blog/why-crypto-is-the-future"},"nextItem":{"title":"Fundamental Knowledge","permalink":"/blog/fundamental-knowledge"}},"content":"\u3042\u306a\u305f\u306f\u3001\u300c\u5e0c\u5c11\u6027\u304c\u3042\u308b\u300d\u300c\u5e0c\u5c11\u6027\u304c\u7121\u3044\u300d\u3068\u3044\u3046\u3053\u3068\u3092\u8003\u3048\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u304b\uff1f\\n\\n\u300c\u5e0c\u5c11\u6027\u300d\u3068\u306f\u4f55\u3067\u3057\u3087\u3046\uff1f\\n\\n\u300c\u5e0c\u5c11\u6027\u300d\u306f\u3001\u6b32\u6c42\u306b\u5bfe\u3057\u3066\u91cf\u3084\u6570\u304c\u6975\u3081\u3066\u5c11\u306a\u3044\u3001\u3042\u308b\u610f\u5473\u5ba2\u89b3\u7684\u4e8b\u5b9f\u3067\u3059\u3002\\n\\n\u307e\u305f\u3001\u305d\u306e\u305f\u3081\u306b\u751f\u3058\u308b\u4fa1\u5024\u306e\u3053\u3068\u3092\u300c\u5e0c\u5c11\u4fa1\u5024\u300d\u3068\u3044\u3044\u307e\u3059\u3002\\n\\n\u666e\u6bb5\u306e\u751f\u6d3b\u306b\u304a\u3044\u3066\u306f\u6211\u3005\u306f\u5b9f\u306f\u7121\u610f\u8b58\u306e\u3046\u3061\u306b\u4fa1\u5024\u306e\u5224\u65ad\u3092\u6bce\u65e5\u3057\u3066\u3044\u307e\u3059\u3002\u300c\u3053\u308c\u306f\u79c1\u306b\u3068\u3063\u3066\u4fa1\u5024\u304c\u3042\u308b\u300d\u3001\u300c\u305d\u308c\u306f\u4fa1\u5024\u304c\u306a\u3044\u300d\u306a\u3069\u3068\u8272\u3005\u8003\u3048\u3066\u884c\u52d5\u3092\u3057\u3066\u3001\u4eba\u9593\u306e\u4e00\u3064\u4e00\u3064\u306e\u5c0f\u3055\u306a\u884c\u52d5\u30d1\u30bf\u30fc\u30f3\u304c\u5e02\u5834\u3092\u6c7a\u3081\u3066\u3044\u308b\u306e\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u6211\u3005\u306e\u611f\u899a\u7684\u306a\u4fa1\u5024\u306e\u5224\u65ad\u306f\u5b9f\u306f\u5c11\u3057\u7acb\u3061\u623b\u3063\u3066\u8003\u3048\u308b\u3068\u3001\u591a\u5c11\u305a\u308c\u305f\u611f\u899a\u3067\u3042\u308a\u3001\u3042\u307e\u308a\u306b\u3082\u77ed\u8996\u7684\u306b\u7269\u4e8b\u3092\u898b\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3068\u601d\u3044\u307e\u3059\u3002\\n\\n\u4eca\u56de\u306f\u5e0c\u5c11\u6027\u306e\u8a71\u3092\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u7d50\u8ad6\u3092\u3044\u304d\u306a\u308a\u8a00\u3063\u3066\u3057\u307e\u3046\u3068\u3059\u3054\u304f\u7591\u554f\u306b\u601d\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u306e\u3067\u3001\u3086\u3063\u304f\u308a\u8a71\u3092\u8aad\u3093\u3067\u3082\u3089\u3048\u308c\u3070\u3001\u79c1\u306e\u4e3b\u5f35\u304c\u5f53\u305f\u308a\u524d\u306e\u3088\u3046\u306b\u601d\u3048\u3066\u304f\u308b\u3067\u3057\u3087\u3046\u3002\\n\\n![](moneything.jpeg)\\n\\n## \u5e0c\u5c11\u6027\u3092\u8003\u3048\u308b\\n\\n\u4e16\u306e\u4e2d\u3067\u4f55\u306b\u5e0c\u5c11\u6027\u304c\u3042\u308b\u304b\u3068\u3044\u3046\u3053\u3068\u306f\u3088\u304f\u3088\u304f\u8003\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u3082\u3061\u308d\u3093\u3001\u4ee3\u66ff\u3067\u304d\u306a\u3044\u3082\u306e\u304c\u4e00\u756a\u5e0c\u5c11\u6027\u304c\u3042\u308b\u3067\u3057\u3087\u3046\u3002\u305d\u306e\u6700\u305f\u308b\u3082\u306e\u306f\u3042\u306a\u305f\u306e\u547d\u3067\u3059\u3002\u305d\u308c\u306f\u81ea\u5206\u81ea\u8eab\u306b\u3068\u3063\u3066\u306f\u304b\u3051\u304c\u3048\u306e\u306a\u3044\u4fa1\u5024\u3092\u6301\u3063\u3066\u3044\u308b\u306e\u306f\u81ea\u660e\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u3088\u304f\u8003\u3048\u308b\u3068\u305d\u308c\u306f\u8d64\u306e\u4ed6\u4eba\u306b\u3068\u3063\u3066\u3069\u308c\u304f\u3089\u3044\u306e\u4fa1\u5024\u304c\u3042\u308b\u306e\u304b\uff1f\u3042\u307e\u308a\u306a\u3044\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3057\u3001\u7d50\u69cb\u3042\u308b\u5834\u5408\u3082\u3042\u308b\u3067\u3057\u3087\u3046\u3002\\n\\n\u3053\u3046\u3044\u3046\u4e3b\u89b3\u306b\u3088\u3063\u3066\u4fa1\u5024\u304c\u5909\u308f\u308b\u3082\u306e\u304c\u4e16\u306e\u4e2d\u306b\u306f\u5b58\u5728\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u753b\u5bb6\u306b\u3088\u308b\u7d75\u753b\u304c\u305d\u3046\u3067\u3059\u3002\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u4e16\u754c\u3067\u3044\u3046\u3068 NFT \u306b\u76f8\u5f53\u3057\u307e\u3059\u3002\u4eba\u306b\u3088\u3063\u3066\u306f\u3082\u306e\u3059\u3054\u3044\u4fa1\u5024\u3092\u6301\u3064\u3057\u3001\u4fa1\u5024\u304c\u30bc\u30ed\u306e\u5834\u5408\u3082\u3042\u308b\u3067\u3057\u3087\u3046\u3002\\n\\n\u3057\u304b\u3057\u3001\u4eca\u56de\u8b70\u8ad6\u3057\u305f\u3044\u306e\u306f\u3053\u3046\u3044\u3046\u985e\u306e\u3082\u306e\u3067\u306f\u306a\u304f\u3001\u666e\u904d\u7684\u306b\u7686\u3055\u3093\u306b\u3068\u3063\u3066\u4fa1\u5024\u304c\u3042\u308a\u3001\u5c1a\u4e14\u3064\u4ea4\u63db\u3057\u3084\u3059\u3044\u3082\u306e\u306e\u5e0c\u5c11\u6027\u3092\u8003\u3048\u3066\u307b\u3057\u3044\u306e\u3067\u3059\u3002\\n\\n\u307e\u305a\u8a00\u3063\u3066\u304a\u304d\u305f\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u524d\u63d0\u3068\u3057\u3066\u3001\u3082\u3057\u3042\u306a\u305f\u304c\u5d07\u62dd\u3057\u3066\u3044\u308b\u8cc7\u7523\u304c\u3042\u308c\u3070\u3001\u305d\u306e\u8003\u3048\u3092\u6368\u3066\u3066\u307b\u3057\u3044\u3067\u3059\u3002\u5148\u5165\u89b3\u306a\u3057\u3067\u5e73\u7b49\u306b\u5ba2\u89b3\u7684\u306b\u5224\u65ad\u3092\u3057\u3066\u521d\u3081\u3066\u5e0c\u5c11\u6027\u306b\u3064\u3044\u3066\u6c17\u4ed8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002\\n\\n\u7269\u4e8b\u306e\u5024\u6bb5\u3068\u3044\u3046\u306e\u306f\u4f1d\u7d71\u7684\u306a\u7d4c\u6e08\u306e\u7406\u8ad6\u306e\u4e2d\u3067\u9700\u8981\u3068\u4f9b\u7d66\u306e\u30d0\u30e9\u30f3\u30b9\u3067\u6c7a\u307e\u308b\u3068\u3044\u3046\u524d\u63d0\u304c\u3042\u308a\u3001\u5e0c\u5c11\u6027\u3068\u4e0d\u53ef\u5206\u3067\u3059\u3002\u5e0c\u5c11\u4fa1\u5024\u304c\u3042\u308b\u304b\u5426\u304b\u306e\u5224\u65ad\u57fa\u6e96\u3068\u3057\u3066\u306f\u3001\u9700\u8981\u304c\u3042\u307e\u308a\u6e1b\u3089\u305a\u3001\u4f9b\u7d66\u3082\u3042\u307e\u308a\u5897\u3048\u306a\u3044\u3053\u3068\u3060\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002\u5e0c\u5c11\u4fa1\u5024\u304c\u3042\u308b\u3082\u306e\u306f\u9ad8\u4fa1\u683c\u3067\u3042\u308b\u3001\u3042\u308b\u3044\u306f\u5c06\u6765\u7684\u306b\u9ad8\u4fa1\u683c\u306b\u306a\u308a\u3046\u308b\u3082\u306e\u3068\u8a00\u3048\u307e\u3059\u3002\\n\\n\u305d\u308c\u3067\u306f\u3001\u5e0c\u5c11\u6027\u306e\u3042\u308b\u3082\u306e\u306b\u3064\u3044\u3066\u4e00\u500b\u305a\u3064\u8003\u3048\u307e\u3057\u3087\u3046\u3002\\n\\n## Japanese Yen\\n\\n![](japanyen.jpg)\\n\\n\u4fa1\u5024\u3068\u3044\u3046\u3082\u306e\u306b\u3064\u3044\u3066\u8003\u3048\u305f\u6642\u306b\u4e00\u756a\u6700\u521d\u306b\u601d\u3044\u6d6e\u304b\u3076\u3082\u306e\u306f\u65e5\u672c\u5186\u3067\u3057\u3087\u3046\u3002\u3057\u304b\u3057\u3001\u65e5\u672c\u5186\u306f\u679c\u305f\u3057\u3066\u3069\u308c\u304f\u3089\u3044\u5e0c\u5c11\u6027\u304c\u3042\u308b\u306e\u304b\u3002\\n\\n\u65e5\u672c\u5186\u306f\u653f\u5e9c\u306e\u4fe1\u983c\u306b\u57fa\u3065\u3044\u3066\u767a\u884c\u3055\u308c\u3066\u304a\u308a\u3001\u653f\u5e9c\u306f\u4fe1\u983c\u3055\u308c\u3066\u304d\u3061\u3093\u3068\u5186\u306e\u5e0c\u5c11\u6027\u3092\u62c5\u4fdd\u3057\u3066\u304f\u308c\u308b\u3068\u4fe1\u3058\u3066\u3044\u308b\u65b9\u304c\u5c11\u306a\u304f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u5b9f\u969b\u306b\u306f\u672a\u3060\u306b\u65e5\u672c\u5186\u306f\u7d9a\u3005\u3068\u5237\u3089\u308c\u3066\u5e02\u5834\u3078\u653e\u51fa\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u304c\u3044\u308f\u3086\u308b\u666e\u6bb5\u8033\u306b\u3059\u308b\u300c\u91d1\u878d\u7de9\u548c\u300d\u3068\u3044\u3046\u8a00\u8449\u3067\u3059\u3002\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3046\u3068\u304a\u91d1\u3092\u5927\u91cf\u306b\u5237\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u3002\\n\\n\u3053\u3093\u306a\u3082\u306e\u306b\u5e0c\u5c11\u6027\u304c\u3042\u308b\u306e\u304b\u751a\u3060\u7591\u554f\u3067\u3059\u3002\\n\\n## Real Estate\\n\\n![](realestate.jpg)\\n\\n\u4e0d\u52d5\u7523\u3068\u3044\u3046\u306e\u306f\u3001\u5927\u8846\u7684\u306b\u7279\u306b\u4e2d\u56fd\u3042\u308b\u3044\u306f\u6614\u306e\u65e5\u672c\u306e\u3088\u3046\u306a\u6025\u6210\u9577\u3057\u305f\u56fd\u3067\u306f\u795e\u8a71\u306e\u3088\u3046\u306a\u8cc7\u7523\u3068\u3057\u3066\u8a9e\u3089\u308c\u304c\u3061\u3067\u3059\u3002\u305d\u3046\u3044\u3046\u56fd\u3067\u306f\u3001\u6c38\u9060\u306b\u4fa1\u5024\u304c\u4e0a\u304c\u308b\u3082\u306e\u3068\u3057\u3066\u898b\u3089\u308c\u3066\u304d\u307e\u3057\u305f\u3002\u4f55\u5341\u5e74\u3082\u4e8b\u5b9f\u3068\u3057\u3066\u6210\u308a\u7acb\u3063\u3066\u3044\u308b\u3082\u306e\u306f\u795e\u8a71\u3068\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u305d\u308c\u3082\u3044\u305a\u308c\u7d42\u7109\u3092\u8fce\u3048\u308b\u306e\u3067\u3059\u3002\\n\\n\u4e0d\u52d5\u7523\u3092\u9700\u8981\u3068\u4f9b\u7d66\u306e\u30d0\u30e9\u30f3\u30b9\u306e\u89b3\u70b9\u304b\u3089\u8a71\u3059\u3068\u3001\u6c7a\u3057\u3066\u5e0c\u5c11\u6027\u306e\u3042\u308b\u8cc7\u7523\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u306a\u305c\u306a\u3089\u3001\u307e\u305a\u9700\u8981\u306f\u4eba\u53e3\u3084\u666f\u6c17\u306b\u6bd4\u4f8b\u3057\u3001\u4f9b\u7d66\u306f\u4e0d\u52d5\u7523\u306e\u958b\u767a\u898f\u6a21\u306b\u4f9d\u5b58\u3059\u308b\u304b\u3089\u3067\u3059\u3002\u57fa\u672c\u7684\u306b\u4e0d\u52d5\u7523\u958b\u767a\u306e\u898f\u6a21\u306f\u3001\u3082\u3057\u9700\u8981\u304c\u5897\u3048\u308c\u3070\u5897\u52a0\u3055\u305b\u308b\u3053\u3068\u3067\u4fa1\u683c\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\\n\\n\u4e0d\u52d5\u7523\u958b\u767a\u306e\u898f\u6a21\u306f\u3042\u308b\u7a0b\u5ea6\u307e\u3067\u306f\u7121\u9650\u306b\u5897\u9577\u3067\u304d\u307e\u3059\u3002\u6975\u7aef\u306a\u8a71\u3067\u3059\u304c\u3001\u5730\u7403\u4e0a\u306b\u571f\u5730\u304c\u306a\u304f\u306a\u3063\u3066\u3082\u5b87\u5b99\u958b\u767a\u3092\u3059\u308b\u4eba\u9593\u793e\u4f1a\u306f\u3001\u4f8b\u3048\u3070\u706b\u661f\u3078\u5f15\u3063\u8d8a\u3057\u3057\u3066\u4e0d\u52d5\u7523\u958b\u767a\u3092\u3059\u308c\u3070\u3001\u4f9b\u7d66\u306f\u4e00\u6c17\u306b\u5897\u3048\u308b\u3067\u3057\u3087\u3046\u3002\u307e\u3057\u3066\u3084\u73fe\u5728\u306e\u4eba\u9593\u793e\u4f1a\u306f\u30ea\u30a2\u30eb\u4e16\u754c\u304b\u3089\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u3078\u9032\u3093\u3067\u3044\u308b\u3053\u3068\u304b\u3089\u3001\u4e0d\u52d5\u7523\u306b\u4ee3\u8868\u3055\u308c\u308b\u30ea\u30a2\u30eb\u4e16\u754c\u306e\u7d4c\u6e08\u898f\u6a21\u3068\u3044\u3046\u306e\u306f\u9577\u671f\u7684\u306b\u898b\u308b\u3068\u3001\u3069\u3053\u307e\u3067\u3082\u7121\u9650\u306b\u5897\u9577\u53ef\u80fd\u306a\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u3068\u6bd4\u8f03\u3057\u3066\u3001\u4f38\u3073\u3057\u308d\u304c\u7e2e\u5c0f\u3059\u308b\u50be\u5411\u306b\u3042\u308a\u307e\u3059\u3002\\n\\n\u5c11\u306a\u304f\u3068\u3082\u4e0d\u52d5\u7523\u306b\u306f\u3042\u307e\u308a\u5e0c\u5c11\u6027\u304c\u3042\u308a\u307e\u305b\u3093\u3002\\n\\n## Stocks\\n\\n\u682a\u306f\u4f1a\u793e\u304c\u767a\u884c\u3057\u3066\u3044\u308b\u3082\u306e\u3067\u3059\u3002\u3044\u304f\u3089\u3067\u3082\u518d\u767a\u884c\u3084\u8ffd\u52a0\u767a\u884c\u3067\u304d\u3001\u3057\u304b\u3082\u5012\u7523\u306e\u30ea\u30b9\u30af\u3082\u3042\u308a\u307e\u3059\u3002\u5f53\u7136\u3067\u3059\u304c\u3001\u3042\u307e\u308a\u5e0c\u5c11\u6027\u306f\u3042\u308a\u307e\u305b\u3093\u3002\\n\\n## GOLD\\n\\n![](gold1.jpg)\\n\\n\u7d9a\u3044\u3066\u306f\u6b74\u53f2\u304c\u9577\u3044\u30b4\u30fc\u30eb\u30c9\u306b\u3064\u3044\u3066\u8a71\u3092\u3057\u307e\u3059\u3002\\n\\n\u3053\u3046\u3044\u3046\u8cb4\u91d1\u5c5e\u306b\u306f\u5e0c\u5c11\u6027\u304c\u3042\u308b\u3068\u601d\u3046\u3067\u3057\u3087\u3046\u3002\u30b4\u30fc\u30eb\u30c9\u306f\u9577\u3044\u6b74\u53f2\u306e\u4e2d\u3067\u4f9b\u7d66\u3082\u3042\u307e\u308a\u5897\u3048\u305a\u3001\u306a\u304b\u306a\u304b\u30ec\u30a2\u306a\u3082\u306e\u3067\u3042\u308a\u3001\u304a\u91d1\u3068\u3057\u3066\u898b\u3089\u308c\u3066\u304d\u305f\u306e\u3067\u3001\u305f\u3057\u304b\u306b\u5e0c\u5c11\u6027\u304c\u3042\u308b\u3088\u3046\u306b\u601d\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002\\n\\n\u3057\u304b\u3057\u3001\u9700\u8981\u3068\u4f9b\u7d66\u306e\u8a71\u3092\u3059\u308b\u3068\u3001\u9700\u8981\u306f\u9577\u3044\u6b74\u53f2\u306e\u4e2d\u3067\u5f62\u6210\u3055\u308c\u3066\u304d\u305f\u306e\u3067\u3042\u308b\u306e\u306f\u9593\u9055\u3044\u3042\u308a\u307e\u305b\u3093\u3002\u3067\u3059\u304c\u4f9b\u7d66\u5074\u3067\u3044\u3046\u3068\u3001\u81ea\u7136\u306a\u9271\u7269\u3060\u3068\u3059\u308b\u3068\u3001\u9271\u5c71\u3092\u3044\u3063\u3071\u3044\u767a\u898b\u3059\u308c\u3070\u4f9b\u7d66\u304c\u305d\u308c\u3060\u3051\u5897\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002\\n\\n\u4e00\u65b9\u3067\u3082\u3057\u9700\u8981\u304c\u305f\u304f\u3055\u3093\u3042\u308b\u5834\u5408\u3001\u9271\u5c71\u3092\u898b\u3064\u3051\u308b\u305f\u3081\u306e\u30a4\u30f3\u30bb\u30f3\u30c6\u30a3\u30d6\u304c\u50cd\u3044\u3066\u305f\u304f\u3055\u3093\u9271\u5c71\u304c\u898b\u3064\u304b\u308b\u3067\u3057\u3087\u3046\u3002\u307e\u305f\u3001\u3055\u3089\u306b\u5b87\u5b99\u9032\u51fa\u3092\u3057\u3066\u3044\u308b\u4eba\u9593\u304c\u5b87\u5b99\u3067\u305f\u304f\u3055\u3093\u306e\u30b4\u30fc\u30eb\u30c9\u3092\u624b\u306b\u5165\u308c\u305f\u3089\u3001\u30b4\u30fc\u30eb\u30c9\u306e\u5e0c\u5c11\u6027\u306b\u307e\u3064\u308f\u308b\u795e\u8a71\u3082\u7d42\u308f\u308a\u3092\u544a\u3052\u308b\u3067\u3057\u3087\u3046\u3002\\n\\n\u4e00\u5b9a\u6761\u4ef6\u306e\u3082\u3068\u3067\u306f\u3001\u30b4\u30fc\u30eb\u30c9\u306f\u5e0c\u5c11\u6027\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u9577\u671f\u7684\u306b\u8003\u3048\u308b\u3068\u3042\u307e\u308a\u5e0c\u5c11\u6027\u306f\u3042\u308a\u307e\u305b\u3093\u3002\\n\\n\u30b4\u30fc\u30eb\u30c9\u3067\u3055\u3048\u3082\u5e0c\u5c11\u6027\u304c\u3042\u307e\u308a\u306a\u3044\u3068\u3044\u3046\u306a\u3089\u3001\u4f55\u306b\u5e0c\u5c11\u6027\u304c\u3042\u308b\u3093\u3060\u3088\u3068\u601d\u3046\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u3002\\n\\n\u3067\u306f\u3053\u3053\u3067\u91cd\u8981\u306a\u7d50\u8ad6\u3092\u8a71\u3057\u307e\u3059\u3002\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u5143\u7956\u3067\u3042\u308b\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3\u3067\u3059\u3002\\n\\n\u3053\u3053\u3067\u3044\u3046\u306e\u306f\u4ee3\u8868\u683c\u306e Bitcoin \u3092\u8a00\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u5225\u306b\u305d\u306e\u4ed6\u306e\u30a2\u30eb\u30c8\u30b3\u30a4\u30f3\u306b\u5e0c\u5c11\u6027\u304c\u7121\u3044\u3068\u3044\u3046\u610f\u5473\u3067\u306f\u306a\u3044\u3068\u7406\u89e3\u3057\u3066\u304f\u3060\u3055\u3044\u3002\\n\\n## Bitcoin\\n\\n![](bitcoin.jpg)\\n\\n\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3\u306f\u30cf\u30fc\u30c9\u30ad\u30e3\u30c3\u30d7(\u4e0a\u9650\u3068\u306a\u308b\u767a\u884c\u91cf)\u3067\u3042\u308b 2100 \u4e07\u500b\u3068\u3044\u3046\u4eba\u985e\u793e\u4f1a\u306e\u30b3\u30f3\u30bb\u30f3\u30b5\u30b9\u304c\u3042\u308b\u3053\u3068\u304b\u3089\u3001\u4eba\u5de5\u7684\u306b\u4f5c\u3063\u305f\u3042\u307e\u308a\u5909\u3048\u3089\u308c\u306a\u3044\u6570\u306e\u4f9b\u7d66\u304c\u6210\u308a\u7acb\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\uff11\u56fd\u5bb6\u3060\u308d\u3046\u304c\u3060\u308c\u3067\u3042\u308d\u3046\u304c\u3001\u3053\u306e\u30cf\u30fc\u30c9\u30ad\u30e3\u30c3\u30d7\u306b\u5bfe\u3059\u308b\u30b3\u30f3\u30bb\u30f3\u30b5\u30b9\u3092\u52d5\u304b\u3059\u306e\u306f\u7d50\u69cb\u306a\u30cf\u30fc\u30c9\u30eb\u304c\u3042\u308a\u307e\u3059\u3002\\n\\n\u307e\u305f\u3001\u9700\u8981\u9762\u304b\u3089\u3044\u3046\u3068\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u30ea\u30c6\u30e9\u30b7\u30fc\u304c\u5897\u52a0\u306e\u4e00\u9014\u3092\u305f\u3069\u3063\u3066\u304a\u308a\u3001\u4eca\u3084Web3\u306f\u65e5\u672c\u306e\u56fd\u5bb6\u6226\u7565\u3068\u304b\u306b\u306a\u3063\u305f\u308a\u3057\u3066\u3044\u3066\u3001\u305d\u306e\u30a4\u30f3\u30d5\u30e9\u3067\u3042\u308b\u3053\u3068\u304b\u3089\u307e\u3059\u307e\u3059\u591a\u304f\u306e\u4eba\u3005\u304c\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3078\u306e\u7406\u89e3\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002\u307e\u305f\u3001\u4eba\u9593\u793e\u4f1a\u304c\u30ea\u30a2\u30eb\u4e16\u754c\u304b\u3089\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u3078\u3044\u304f\u306e\u306f\u76ee\u306b\u898b\u3048\u3066\u3044\u308b\u3057\u3001\u73fe\u5b9f\u4e16\u754c\u306e\u4fa1\u5024\u306e\u30a2\u30f3\u30ab\u30fc(\u57fa\u790e)\u306f\u30b4\u30fc\u30eb\u30c9\u3060\u3068\u3059\u308b\u3068\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u306e\u4fa1\u5024\u306e\u30a2\u30f3\u30ab\u30fc\u306f\u307b\u307c\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3\u4e00\u629e\u3067\u3059\u3002\u9700\u8981\u304c\u5897\u3048\u308b\u3053\u3068\u3082\u9593\u9055\u3044\u306a\u3044\u3067\u3057\u3087\u3046\u3002\\n\\n\u3057\u305f\u304c\u3063\u3066\u3001\u7b46\u8005\u306f\u3053\u308c\u307e\u3067\u8272\u3005\u898b\u3066\u304d\u305f\u666e\u904d\u7684\u306a\u4fa1\u5024\u3092\u6301\u3064\u3082\u306e\u306e\u4e2d\u3067\u3001bitcoin \u306e\u3088\u3046\u306a\u4eba\u5de5\u7684\u306a\u3082\u306e\u3060\u3051\u304c\u9577\u671f\u306b\u6e21\u3063\u3066\u7d76\u5bfe\u7684\u306a\u5e0c\u5c11\u6027\u304c\u6210\u7acb\u3057\u307e\u3059\u3002\\n\\n## PS\\n\\n\u6b63\u76f4\u3001\u5e0c\u5c11\u6027\u306e\u3042\u308b\u666e\u904d\u7684\u306a\u3082\u306e\u3068\u3044\u3046\u306e\u306f\u3042\u307e\u308a\u3042\u308a\u307e\u305b\u3093\u3002\u3069\u3093\u306a\u7269\u8cea\u3067\u3042\u308d\u3046\u304c\u9811\u5f35\u308c\u3070\u624b\u306b\u5165\u308b\u304b\u3001\u3042\u308b\u3044\u306f\u91cf\u3092\u5897\u3084\u305b\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u4eca\u307e\u3067\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u304a\u3044\u3066\u306f\u30c7\u30fc\u30bf\u306f\u30b3\u30d4\u30fc\u3067\u304d\u308b\u3068\u3044\u3046\u30c1\u30fc\u30c8\u6280\u3092\u4f7f\u3048\u3070\u5e0c\u5c11\u6027\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\\n\\n### _\u514d\u8cac\u4e8b\u9805_\\n\\n_\u672c website \u306b\u304b\u304b\u308c\u3066\u3044\u308b\u5185\u5bb9\u306f\u3042\u304f\u307e\u3067\u500b\u4eba\u7684\u306a\u898b\u89e3\u3067\u3042\u308a\u3001Financial advice \u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002_"},{"id":"fundamental-knowledge","metadata":{"permalink":"/blog/fundamental-knowledge","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/Basics/2022-08-28-what-is-Blockchain.md","source":"@site/blog/Basics/2022-08-28-what-is-Blockchain.md","title":"Fundamental Knowledge","description":"Blockchain","date":"2022-08-28T00:00:00.000Z","formattedDate":"2022\u5e748\u670828\u65e5","tags":[],"readingTime":0.01,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"fundamental-knowledge","title":"Fundamental Knowledge","authors":["Thurendous","Polymetis"],"blogDescription":"Blockchain\u306e\u57fa\u790e\u77e5\u8b58","tags":[]},"prevItem":{"title":"About Scaricity","permalink":"/blog/about-scaricity"},"nextItem":{"title":"About Knowledge","permalink":"/blog/about-why-I-write-about"}},"content":"# What is Blockchain\\n\\nBlockchain"},{"id":"about-why-I-write-about","metadata":{"permalink":"/blog/about-why-I-write-about","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/About-this-blog/2022-08-25-why-I-write-about-blockchain.md","source":"@site/blog/About-this-blog/2022-08-25-why-I-write-about-blockchain.md","title":"About Knowledge","description":"Preface","date":"2022-08-25T00:00:00.000Z","formattedDate":"2022\u5e748\u670825\u65e5","tags":[{"label":"\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","permalink":"/blog/tags/\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3"},{"label":"about","permalink":"/blog/tags/about"}],"readingTime":2.922,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"about-why-I-write-about","title":"About Knowledge","authors":["Thurendous","Polymetis"],"blogDescription":"\u306a\u305c\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u8a18\u4e8b\u3092\u304b\u304f\u306e\u304b","tags":["\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","about"]},"prevItem":{"title":"Fundamental Knowledge","permalink":"/blog/fundamental-knowledge"}},"content":"## Preface\\n\\n\u3053\u3093\u306b\u3061\u308f\uff01Thurendous \u3067\u3059\u3002\\n\\n\u305d\u3082\u305d\u3082\u672c Website \u3092\u4f5c\u308d\u3046\u3068\u601d\u3063\u305f\u306e\u306f\u3001\u81ea\u5206\u306f 2017 \u5e74\u304b\u3089\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u71c3\u3048\u59cb\u3081\u3066\u304b\u3089\u3001\u5468\u308a\u306e\u65b9\u305f\u3061\u306f\u8208\u5473\u3092\u793a\u3059\u3069\u3053\u308d\u304b\u3001\u7591\u7fa9\u306e\u5ff5\u3092\u62b1\u3044\u3066\u3044\u308b\u65b9\u304c\u5c11\u306a\u304b\u3089\u305a\u3044\u305f\u3053\u3068\u304c\u304d\u3063\u304b\u3051\u3067\u3001\u305d\u308c\u304b\u3089\u60b6\u3005\u3068\u306a\u306b\u304b\u3092\u3084\u3063\u3066\u3084\u308d\u3046\u3058\u3083\u306a\u3044\u304b\u3068\u8272\u3005\u601d\u3044\u3092\u62b1\u3044\u3066\u304d\u307e\u3057\u305f\u3002\\n\\n\u4eca\u73fe\u5728\u306b\u81f3\u308b\u307e\u3067\u3001\u3060\u3044\u3076\u6642\u9593\u304c\u7d4c\u3061\u307e\u3057\u305f\u3057\u3001\u8272\u3005\u306a\u8003\u3048\u3082\u6210\u719f\u3057\u3066\u304d\u3066\u3044\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u52c9\u5f37\u3082\u7d9a\u3051\u3066\u304d\u3066\u304a\u308a\u3001\u305d\u308c\u304c\u7d42\u308f\u308a\u306e\u306a\u3044\u30de\u30e9\u30bd\u30f3\u306e\u3088\u3046\u3067\u3059\u304c\u3001\u7d76\u3048\u305a\u7d9a\u3051\u3066\u3044\u304f\u6240\u5b58\u3067\u3059\u3002\u672c Website \u306f\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u7d20\u4eba\u306e\u3042\u306a\u305f\u306b\u3068\u3063\u3066\u306e\u3059\u3079\u3066\u306e\u7591\u554f\u306b\u7b54\u3048\u3001\u9577\u5e74\u306b\u6e21\u3063\u3066\u8ffd\u3063\u3066\u304d\u305f\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u696d\u754c\u306e\u89b3\u5bdf\u8005\u3067\u3042\u308b\u81ea\u5206\u81ea\u8eab\u304c\u3053\u306e\u696d\u754c\u306e\u5c06\u6765\u306b\u5bfe\u3059\u308b\u30d3\u30b8\u30e7\u30f3\u3092\u5171\u6709\u3067\u304d\u308c\u3070\u5e78\u3044\u3060\u3068\u8003\u3048\u3066\u304a\u308a\u307e\u3059\u3002\\n\\n\u672c\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092\u304d\u3063\u304b\u3051\u306b\u5c11\u3057\u3067\u3082\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u7406\u89e3\u306e\u4fc3\u9032\u3001Web3 \u306e\u7406\u89e3\u3001\u30e1\u30bf\u30d0\u30fc\u30b9\u3078\u306e\u8208\u5473\u3092\u6301\u3061\u59cb\u3081\u3066\u3082\u3089\u3048\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\u3002\\n\\n\u3072\u3044\u3066\u306f\u71b1\u72c2\u7684\u306b\u8208\u5473\u3092\u6301\u3063\u3066\u3082\u3089\u3048\u308b\u3088\u3046\u306a\u4eba\u304c\u751f\u307e\u308c\u3066\u304d\u3066\u3001Web3 \u696d\u754c\u306b\u3066\u8d77\u696d\u3057\u305f\u308a\u793e\u4f1a\u3092\u5909\u9769\u3055\u305b\u305f\u308a\u3001\u3053\u308c\u307e\u3067\u306e\u56fa\u5b9a\u89b3\u5ff5\u3001\u5e38\u8b58\u3092\u53d6\u308a\u58ca\u3057\u3001\u65b0\u305f\u306a\u6b69\u307f\u3001\u5bcc\u3092\u5275\u9020\u3057\u3066\u3001\u4eba\u3005\u3092\u81ea\u7531\u3092\u4e0e\u3048\u3001\u793e\u4f1a\u3092\u958b\u653e\u3057\u3066\u3044\u304f\u3068\u304b\u3001\u305d\u3046\u3044\u3046\u3053\u3068\u306f\u9858\u3063\u3066\u3084\u307f\u307e\u305b\u3093\uff01\\n\\n## Big Trend\\n\\n\u81ea\u5206\u306f\u3082\u3068\u3082\u3068\u6d77\u5916\u51fa\u8eab\u304b\u3064\u7406\u7cfb\u51fa\u8eab\u3067\u3059\u304c\u3001\u6587\u7cfb\u3082\u5927\u597d\u304d\u3067\u3057\u305f\u3002\u305d\u308c\u304c\u539f\u56e0\u306a\u306e\u304b\u308f\u304b\u308a\u307e\u305b\u3093\u304c\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u51fa\u4f1a\u3063\u3066\u304b\u3089\u305d\u306e\u8003\u3048\u65b9\u304c\u7406\u7cfb\u3067\u3082\u3067\u304d\u3066\u6587\u7cfb\u3067\u3082\u3067\u304d\u308b\u3068\u3053\u308d\u3001\u307e\u305f\u6df1\u304f\u8003\u3048\u308c\u3070\u8003\u3048\u308b\u307b\u3069\u3001\u697d\u3057\u304f\u306a\u3063\u3066\u3044\u304f\u3053\u3068\u304c\u5927\u597d\u304d\u3067\u3057\u305f\u3002\\n\\n\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3092\u8003\u3048\u308b\u3068\u304d\u306b\u3001\u6295\u8cc7\u306e\u4e16\u754c\u3067\u3059\u3068\u3001\u3069\u3046\u3057\u3066\u3082\u77ed\u671f\u7684\u306b\u7269\u4e8b\u3092\u4fa1\u683c\u7684\u3001\u3042\u308b\u3044\u306f\u6295\u6a5f\u7684\u306a\u8996\u70b9\u3067\u898b\u304c\u3061\u3067\u3059\u304c\u3001\u81ea\u5206\u306f\u3069\u3061\u3089\u304b\u3068\u3044\u3046\u3068\u3001\u5c11\u3057\u539f\u70b9\u306b\u7acb\u3061\u623b\u3063\u3066\u5927\u304d\u306a\u8996\u70b9\u304b\u3089\u898b\u308b\u306e\u304c\u597d\u304d\u3067\u3059\u3002\\n\\n\u500b\u4eba\u3068\u3057\u3066\u884c\u52d5\u3092\u8d77\u3053\u3059\u4e0a\u3067\u3001\u5927\u304d\u306a\u65b9\u5411\u3068\u3057\u3066\u9593\u9055\u3048\u306a\u3051\u308c\u3070\u3001\u4f55\u304b\u65b9\u5411\u6027\u3092\u7591\u3046\u3088\u3046\u306a\u4e8b\u4ef6\u304c\u8d77\u304d\u305f\u3068\u3057\u3066\u3082\u500b\u4eba\u7684\u306b\u306f\u8a31\u5bb9\u7bc4\u56f2\u306a\u306e\u304b\u306a\u3063\u3066\u601d\u3063\u3066\u307e\u3059\u3002\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u5bfe\u3057\u3066\u7591\u7fa9\u306e\u5ff5\u3092\u62b1\u3044\u3066\u308b\u4eba\u304c\u7d50\u69cb\u3044\u307e\u3059\u304c\u3001\u5927\u304d\u306a\u30c8\u30ec\u30f3\u30c9\u3068\u3057\u3066\u5206\u6790\u3059\u308b\u3068\u3001\u8272\u3005\u660e\u3089\u304b\u306b\u306a\u308b\u3053\u3068\u304c\u591a\u3044\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002\\n\\n\u3053\u308c\u304b\u3089\u3001\u5927\u304d\u306a\u30c8\u30ec\u30f3\u30c9\u306e\u8a71\u3092\u3044\u304f\u3064\u304b\u8a18\u4e8b\u306b\u5206\u3051\u3066\u66f8\u3044\u3066\u3044\u3053\u3046\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002\u3053\u3046\u3044\u3063\u305f\u8a18\u4e8b\u3092\u8aad\u3093\u3067\u3044\u305f\u3060\u3051\u308c\u3070\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u696d\u754c\u3092\u9577\u5e74\u89b3\u5bdf\u3057\u3066\u304d\u3066\u3001\u306a\u305c\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u71b1\u72c2\u7684\u306b\u81ea\u5206\u306f\u306a\u3063\u305f\u306e\u304b\u3001\u306a\u305c\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u696d\u754c\u306f\u3059\u3054\u3044\u306e\u304b\u3068\u3044\u3063\u305f\u8cea\u554f\u306b\u7b54\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002\\n\\n\u3082\u3061\u308d\u3093\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u696d\u754c\u306b\u5bfe\u3057\u3066\u7591\u7fa9\u306e\u5ff5\u3092\u3042\u306a\u305f\u306f\u62b1\u3044\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u305d\u3053\u306f\u3086\u3063\u304f\u308a\u541f\u5473\u3057\u3066\u3044\u305f\u3060\u3044\u3066\u3001\u79c1\u306f\u7d20\u4eba\u3067\u3042\u308a\u306a\u304c\u3089\u3082\u3001\u666e\u901a\u306e\u4eba\u304c\u8003\u3048\u305f\u3053\u3068\u306e\u306a\u3044\u3001\u3042\u308b\u3044\u306f\u77e5\u308d\u3046\u3068\u3057\u306a\u3044\u3053\u3068\u3092\u9577\u3044\u5e74\u6708\u3068\u7d4c\u9a13\u3092\u7d4c\u3066\u591a\u8a00\u8a9e\u7684\u306b\u60c5\u5831\u3092\u53ce\u96c6\u3057\u52c9\u5f37\u3057\u3066\u304d\u3066\u4eca\u306b\u81f3\u3063\u3066\u3044\u307e\u3059\u3002\\n\\n\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u3064\u3044\u3066\u306f\u3082\u306e\u3059\u3054\u3044\u697d\u89b3\u8996\u3057\u3066\u3044\u308b\u306e\u306f\u305d\u308c\u306a\u308a\u306e\u7406\u7531\u3084\u80cc\u666f\u77e5\u8b58\u3092\u9811\u5f35\u3063\u3066\u624b\u306b\u5165\u308c\u305f\u304b\u3089\u3067\u3059\u3002\u6839\u62e0\u304c\u3042\u3063\u3066\u4eca\u306e\u8a8d\u8b58\u304c\u3042\u308b\u308f\u3051\u3067\u3059\u3002\u3086\u3063\u304f\u308a\u3068\u3054\u89a7\u306b\u306a\u3063\u3066\u8003\u3048\u3066\u307f\u3066\u307b\u3057\u3044\u3067\u3059\u3002\\n\\n\u4e00\u5ea6\u306b\u66f8\u304f\u3068\u66f8\u304d\u304d\u308c\u306a\u3044\u3053\u3068\u3067\u3059\u306e\u3067\u3001\u81ea\u5206\u3068\u3057\u3066\u3082\u3086\u3063\u304f\u308a\u6574\u7406\u3057\u3066\u8907\u6570\u306e\u8a18\u4e8b\u306b\u3057\u3066\u5168\u90e8\u66f8\u3044\u3066\u3044\u304d\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002\u4f55\u304b\u304a\u5f79\u306b\u7acb\u3063\u305f\u306e\u3067\u3042\u308c\u3070\u5e78\u3044\u3067\u3059\uff01\\n\\n# What to Write\\n\\n\u5c0f\u96e3\u3057\u3044\u3053\u3068\u3092\u66f8\u304f\u3068\u591a\u5206\u7406\u89e3\u3055\u308c\u307e\u305b\u3093\u306e\u3067\u3001\u3042\u308b\u610f\u5473\u81ea\u5206\u304c\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3092\u7406\u89e3\u3057\u3066\u304d\u305f\u4e2d\u3067\u3001\u5b9f\u751f\u6d3b\u306e\u4e8b\u4f8b\u3068\u304b\u3001\u666e\u6bb5\u306e\u611f\u899a\u3068\u304b\u305d\u3046\u3044\u3063\u305f\u3082\u306e\u3092\u4f7f\u3044\u3064\u3064\u3001\u76f4\u611f\u7684\u306b\u308f\u304b\u3063\u3066\u3082\u3089\u3048\u308b\u3088\u3046\u306b\u5185\u5bb9\u3092\u66f8\u3044\u3066\u3044\u3051\u308c\u3070\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002\u3068\u3044\u3046\u306e\u3082\u81ea\u5206\u306f\u305d\u3046\u3044\u3063\u305f\u7d4c\u7def\u3092\u305f\u3069\u3063\u305f\u7d4c\u9a13\u304c\u3042\u308a\u307e\u3057\u305f\u306e\u3067\u3001\u305d\u3046\u3057\u3088\u3046\u3068\u8003\u3048\u305f\u306e\u3067\u3059\u3002\\n\\n- \u30de\u30af\u30ed\u306a\u8996\u70b9\u304b\u3089\u898b\u305f blockchain\\n\\n - \u6b74\u53f2\u306e\u8a71\u304b\u3089\u3001\u304a\u91d1\u306e\u8a71\u304b\u3089\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306e\u6b74\u53f2\uff08\u30d0\u30fc\u30c1\u30e3\u30eb\u3078\uff09\\n - software is eating the world\\n - \u6280\u8853\u306e\u9032\u6b69\u306b\u3064\u3044\u3066\u306e\u73fe\u72b6\\n - \u4e16\u754c\u7d4c\u6e08\u306e\u898f\u6a21\\n - \u4eee\u60f3\u901a\u8ca8\u306f\u5024\u4e0a\u304c\u308a\u3059\u308b\u306e\uff1f\\n - \u5c06\u6765\u306e\u7d4c\u6e08\u767a\u5c55\u306e\u5272\u5408\\n - \u793e\u4f1a\u306e\u5909\u8c8c\uff08\u975e\u4e2d\u592e\u96c6\u6a29\u3078\uff09\\n\\n- Web3 \u3063\u3066\u306a\u306b\\n- DeFi \u3063\u3066\u306a\u306b\\n- \u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3063\u3066\u306a\u306b\\n- \u4eee\u60f3\u901a\u8ca8\u306f\u672c\u8cea\u7684\u306a\u4fa1\u5024\u304c\u306a\u3044\u3068\u3088\u304f\u8a00\u308f\u308c\u308b\u306e\u3067\u5927\u4e08\u592b\u304b\\n- \u4eee\u60f3\u901a\u8ca8\u306f\u6295\u6a5f\u3070\u304b\u308a\u3067\u3059\u3088\u306d\uff1f\\n\\n- \u5e0c\u5c11\u6027\u306e\u8a71\\n- \u4eba\u9593\u306e\u672c\u6027\\n- \u56fd\u5883\u304c\u306a\u3044\u4e16\u754c\\n- blockchain \u306e\u4ed5\u7d44\u307f\\n- \u4eba\u53e3\u5206\u5e03\u306e\u95a2\u4fc2\\n- \u6280\u8853\u7cfb\u95a2\u9023\u306e solidity \u306a\u3069\u306e\u8a18\u4e8b"}]}')}}]); \ No newline at end of file diff --git a/assets/js/b2f554cd.4949ac4e.js b/assets/js/b2f554cd.4949ac4e.js deleted file mode 100644 index 8bd46b15..00000000 --- a/assets/js/b2f554cd.4949ac4e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[1477],{10:n=>{n.exports=JSON.parse('{"blogPosts":[{"id":"EVM-deep-dive-part2","metadata":{"permalink":"/blog/EVM-deep-dive-part2","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md","source":"@site/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md","title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2","description":"Hello, everybody!","date":"2023-05-13T00:00:00.000Z","formattedDate":"2023\u5e745\u670813\u65e5","tags":[{"label":"EVM","permalink":"/blog/tags/evm"},{"label":"opcode","permalink":"/blog/tags/opcode"},{"label":"Etheruem","permalink":"/blog/tags/etheruem"},{"label":"blockchain","permalink":"/blog/tags/blockchain"},{"label":"examples","permalink":"/blog/tags/examples"}],"readingTime":7.626,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"}],"frontMatter":{"slug":"EVM-deep-dive-part2","title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2","authors":["Thurendous"],"blogDescription":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2","tags":["EVM","opcode","Etheruem","blockchain","examples"]},"nextItem":{"title":"SafeERC20\u3068\u306f","permalink":"/blog/What is SafeERC20"}},"content":"Hello, everybody!\\n\\n# Never Give Up\\n\\n\u4ee5\u524d\u66f8\u3044\u305f\u6642\u304b\u3089\u3001EVM \u306b\u3064\u3044\u3066\u7406\u89e3\u3067\u304d\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u3001\u5f53\u6642\u306f\u8aad\u307f\u3065\u3089\u304b\u3063\u305f\u6280\u8853\u7cfb\u306e\u6587\u7ae0\u3082\u3059\u3089\u3059\u3089\u8aad\u3081\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u305d\u3053\u3067 EVM \u306e\u3053\u3068\u3042\u308b\u3044\u306f\u4ed6\u306e\u306a\u306b\u304b\u3067\u9811\u5f35\u3063\u3066\u3044\u308b\u3042\u306a\u305f\u3082\u3082\u3057\u304b\u3057\u3066\u4f55\u304b\u304c\u3067\u304d\u305a\u306b\u60a9\u3093\u3067\u3044\u308b\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\\n\\n\u3053\u3053\u3067\u884c\u3063\u3066\u304a\u304d\u307e\u3059\u304c\u3001\u50d5\u3082\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3001\u5b89\u5fc3\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u3046\u3061\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3060\u308d\u3046\u3002\\n\\n\u3061\u306a\u307f\u306b\u3001\u3053\u3061\u3089\u306e\u753b\u50cf\u3092\u307f\u3066\u3054\u3089\u3093\u3002\\n\\n\u672c\u5f53\u306b\u7d4c\u9a13\u3057\u305f\u4eba\u3057\u304b\u308f\u304b\u3089\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3057\u3001\u7d4c\u9a13\u3057\u305f\u3068\u3057\u3066\u3082\u3082\u3046\u4e00\u5ea6\u7d4c\u9a13\u3059\u308b\u3068\u3001\u3084\u306f\u308a\u4fe1\u3058\u3089\u308c\u306a\u3044\u6c17\u6301\u3061\u306b\u306a\u308b\u3068\u601d\u3046\u3088\u306d\u3002\\n\\n\u4f55\u304c\u3069\u3046\u306a\u3063\u3066\u3082\u3001\u7d9a\u3051\u308b\u3053\u3068\u304c\u4e00\u756a\u5927\u5207\u3002\\n\\n- \u9045\u304f\u3066\u3082\u3044\u3044\\n\\n![](./0plus1is1.png)\\n\\n- \u7406\u60f3\u3068\u73fe\u5b9f\\n\\n![](./meikyuu.png)\\n\\n- \u300c\u7d9a\u3051\u3066\u3066\u3082\u610f\u5473\u306a\u3044\u300d\\n\\n![](./thisispointless.png)\\n\\n- \u6700\u521d\u306e\u7b2c\u4e00\u6b69\u304c\u4e00\u756a\u3080\u305a\u3044\u3051\u3069\u306d\\n\\n![](./keeptrying.png)\\n\\n- \u4e09\u65e5\u574a\u4e3b VS \u7d9a\u3051\u308b\\n\\n![](./keeptryingallday.png)\\n\\n---\\n\\n\u4eca\u56de\u306f\u3001\u30e1\u30e2\u30ea\u30fc\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002\\n\\nPart 1 \u3067\u306f\u3001EVM \u304c\u3069\u306e\u3088\u3046\u306b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u3069\u3053\u3092\u72d9\u3063\u3066 run \u3055\u305b\u308b\u304b\u3092\u898b\u3066\u304d\u305f\u3002 \u305d\u308c\u306f\u3001\u5916\u90e8\u306e calldata \u3092\u5165\u529b\u3057\u3066\u304d\u3066\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u3069\u306e\u95a2\u6570\u3092\u547c\u3093\u3067\u3044\u308b\u304b\u3092\u5224\u5225\u3057\u3066 run \u3059\u3079\u304d\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u7b87\u6240\u3092\u6c7a\u3081\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002\\n\\n\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u95a2\u6570\u306e\u7f72\u540d\u30fbcall stack\u30fbcalldata\u30fbEVM \u306e\u30aa\u30da\u30b3\u30fc\u30c9 \u306b\u3064\u3044\u3066\u7406\u89e3\u304c\u9032\u3093\u3060\u3068\u601d\u3046\u3002\\n\\nPart 2 \u3067\u306f\u3001EVM \u306b\u304a\u3051\u308b\u30e1\u30e2\u30ea\u30fc\u306b\u3064\u3044\u3066\u8272\u3005\u898b\u3066\u3044\u3053\u3046\u3002\\n\\n# Memory\\n\\nPart1 \u306e\u30b3\u30fc\u30c9\u3092\u601d\u3044\u3060\u3057\u3066\u307f\u3066\u3002`1_Storage.sol`\u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3042\u3063\u305f\u3002\\n\\n```sol\\npragma solidity >=0.7.0 <0.9.0;\\n\\ncontract Storage {\\n\\tuint256 number;\\n\\n\\tfunction store(uint256 num) public {\\n\\t\\tnumber = num;\\n\\t}\\n\\n\\tfunction retrieve() public view returns (uint256) {\\n\\t\\treturn number;\\n\\t}\\n}\\n```\\n\\n\u3053\u308c\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u3068\u3001\u3053\u3046\u306a\u3063\u3066\u3044\u308b\u3002\\n\\n```\\n608060405234801561001057600080fd....\\n```\\n\\n\u4eca\u56de\u306f\u3053\u306e\u90e8\u5206\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u3066\u8aac\u660e\u3057\u305f\u3044\u3068\u601d\u3046\u3002\u4e00\u756a\u6700\u521d\u306e 5bytes \u3060\u3002\\n\\n```\\n6080604052\\n```\\n\\n```\\n60 80 = PUSH1 0x80\\n60 40 = PUSH1 0x40\\n52 = MSTORE\\n```\\n\\n\u3053\u308c\u304c\u805e\u3044\u305f\u3053\u3068\u3042\u308b\u304c\u304b\u3082\u3057\u308c\u306a\u3044\u3051\u3069\u3001\u3044\u308f\u3086\u308b\u300cfree memory pointer\u300d\u3060\u3002\\n\\n\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u30fc\u3092\u7406\u89e3\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002\\n\\n# \u30e1\u30e2\u30ea\u306e\u30c7\u30fc\u30bf\u69cb\u9020\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3046\u3068\u3001byte \u306e array \u3060\u300232bytes(256bit)\u3042\u308b\u3044\u306f 1byte(8bit)\u306e\u5358\u4f4d\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002\u8aad\u307e\u308c\u308b\u3068\u304d\u306b\u306f\u300132bytes(256bit)\u5358\u4f4d\u3054\u3068\u306b\u306a\u308b\u3002\u4e0b\u8a18\u306e\u753b\u50cf\u306f\u8a71\u3057\u305f\u5185\u5bb9\u3092\u5177\u73fe\u5316\u3057\u305f\u3082\u306e\u3002\\n\\n![](memoryImpression.png)\\n\\n\u3053\u306e\u6a5f\u80fd\u306f\uff13\u3064\u306e opcode \u306b\u5de6\u53f3\u3055\u308c\u3066\u3044\u308b\u3002\\n\\n- `MSTORE(x, y)`: 32 byte(256 bit) \u306e\u5024 y \u3092\u30e1\u30e2\u30ea\u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e x \u306b\u4fdd\u5b58\\n- `MLOAD(x)`: 32 byte(256 bit) \u306e\u30e1\u30e2\u30ea\u306e\u5834\u6240\u3092\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 x \u304b\u3089\u8aad\u307f\u51fa\u3057\u3001\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\\n- `MSOTRE8(x, y)`: 1 byte (8 bit)\u306e\u5024 y \u3092\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e x \u306b\u4fdd\u5b58\u3059\u308b\\n\\n\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u3053\u3068\u306f\u3069\u3053\u304b\u3089\u30e1\u30e2\u30ea\u3092\u8aad\u307f\u53d6\u308b/\u66f8\u304d\u8fbc\u3080\u304b\u3092\u6c7a\u3081\u3066\u3044\u308b\u3068\u8003\u3048\u3066\u3088\u3044\u3002\u3082\u3057\u30011byte \u3088\u308a\u591a\u304f\u8aad\u307f\u53d6\u308b/\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3092\u3057\u305f\u3044\u306e\u3067\u3042\u308c\u3070\u3001\u305d\u306e\u307e\u307e\u7d99\u7d9a\u3059\u308c\u3070\u3088\u3044\u3060\u3051\u306e\u8a71\u306b\u306a\u308b\u3002\\n\\n# EVM playground\\n\\n\u3053\u306e [EVM playground](https://www.evm.codes/playground?fork=shanghai) \u306f\u3042\u306a\u305f\u306e\u7406\u89e3\u306e\u624b\u52a9\u3051\u304c\u3067\u304d\u308b\u3060\u308d\u3046\u3002Run \u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u53f3\u4e0a\u306e\u77e2\u5370\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u3088\u3046\u3002\u77e2\u5370\u30dc\u30bf\u30f3\u306f\u30b3\u30fc\u30c9\u306e\u7a3c\u50cd\u30d7\u30ed\u30bb\u30b9\u3092\u305f\u3069\u3063\u3066\u3044\u3063\u3066\u304f\u308c\u308b\u3002\u30b9\u30bf\u30c3\u30af\u3001\u30e1\u30e2\u30ea\u306f\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u306e\u304b\u3082\u308f\u304b\u308b\u3002\u3059\u3054\u304f\u76f4\u611f\u7684\u306a\u30c4\u30fc\u30eb\u3060\u3068\u611f\u5fc3\u3059\u308b\u3002\\n\\n```\\n// MSTORE 32 bytes 0x11...1 at memory location 0\\nPUSH32 0x1111111111111111111111111111111111111111111111111111111111111111\\nPUSH1 0x00\\nMSTORE\\n\\n// MSTORE8 1 byte 0x22 at memory location 32 (0x20 in hex)\\nPUSH1 0x22\\nPUSH1 0x20\\nMSTORE8\\n\\n// MSTORE8 1 byte 0x33 at memory location 33 (0x21 in hex)\\nPUSH1 0x33\\nPUSH1 0x21\\nMSTORE8\\n\\n// MLOAD 32 bytes to the call stack from memory location 0 ie 0-32 bytes of memory\\nPUSH1 0x00\\nMLOAD\\n\\n// MLOAD 32 bytes to the call stack from memory location 32 ie 32-64 bytes of memory\\nPUSH1 0x20\\nMLOAD\\n\\n// MLOAD 32 to the call stack from memory location 33 ie 33-65 bytes of memory\\nPUSH1 0x21\\nMLOAD\\n```\\n\\n![](https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3e29126-2954-40e3-bc1b-7ca5e780fd1c_1500x850.png)\\n\\nopcode \u306b\u3064\u3044\u3066\u3082\u3001\u82f1\u8a9e\u3060\u304c\u8aac\u660e\u6587\u304c\u3064\u3044\u3066\u3044\u308b\u3002\\n\\n\u3084\u3063\u3066\u307f\u3066\u5909\u3060\u306a\u3068\u601d\u3046\u3053\u3068\u306f\u306a\u3044\u306e\u304b\uff1f\\n\u307e\u305a\u3001MSTORE8 \u3092\u4f7f\u3063\u3066 1 byte \u306e 0x22 \u3092\u30e1\u30e2\u30ea\u306e 0x20 \u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u308b\u3064\u3082\u308a\u3060\u304c\u3001\u4f55\u6545\u304b\u30e1\u30e2\u30ea\u306f\u3053\u3053\u304b\u3089\u3001\\n\\n![](https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F954d54e6-0bce-4de3-a61d-dd41fdae49c7_836x152.png)\\n\\n\u3053\u3046\u5909\u308f\u308b\u3093\u3060\u3002\\n\\n![](https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F225fde5a-09bf-4a24-a702-88ad5010951e_836x176.png)\\n\\n\u3053\u306e\u4f59\u5206\u306a\u30bc\u30ed\u3063\u3066\u306a\u3093\u3060\u3068\u601d\u3046\u3060\u308d\u3046\u3002\\n\\n## \u30e1\u30e2\u30ea\u306e\u62e1\u5f35\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30e1\u30e2\u30ea\u3078\u306a\u306b\u304b\u3092\u66f8\u304d\u8fbc\u3080\u969b\u3001byte \u6570\u306b\u5f93\u3063\u3066\u30ac\u30b9\u4ee3\u3092\u652f\u6255\u3063\u3066\u3044\u308b\u3002\u3053\u308c\u304c opcode \u306e\u30b3\u30b9\u30c8\u3068\u8a00\u3046\u3002\u3082\u3057\u3001\u3053\u308c\u307e\u3067\u30e1\u30e2\u30ea\u3078\u66f8\u304d\u8fbc\u3093\u3060\u3053\u3068\u304c\u306a\u3044\u5834\u6240\u3078\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u8ffd\u52a0\u7684\u306b\u30e1\u30e2\u30ea\u62e1\u5f35\u306e\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308b\u3002\\n\\n\u3053\u308c\u307e\u3067\u66f8\u304d\u8fbc\u3093\u3060\u3053\u3068\u304c\u306a\u3044\u7b87\u6240\u3078\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u30e1\u30e2\u30ea\u306f 32bytes(256bit)\u62e1\u5f35\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308b\u3002\\n\\n> \u30e1\u30e2\u30ea\u306e\u30b3\u30b9\u30c8\u306e\u5897\u3048\u65b9\u306b\u95a2\u3057\u3066\u306f\u3001\u6700\u521d\u306e 724bytes \u306f\u7dda\u5f62\u7684\u306b\u5897\u52a0\u3059\u308b\u304c\u3001\u305d\u308c\u4ee5\u964d\u306f\u4e8c\u6b21\u6307\u6570\u95a2\u6570\u7684\u306b\u306a\u308b\u3002\\n\\n\u4e0a\u306e\u4f8b\u3067\u306f\u3001\u307e\u305a 0x00 \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078 32 bytes \u66f8\u304d\u8fbc\u3093\u3060\u304c\u3001\u305d\u3053\u304b\u3089\u3055\u3089\u306b\u66f8\u304d\u8fbc\u3080\u3068\u306a\u308b\u3068\u3001\u30e1\u30e2\u30ea\u62e1\u5f35\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u305a\u3001\u7d50\u679c\u7684\u306b\u3001\u30e1\u30e2\u30ea\u306f 64 bytes \u306b\u306a\u3063\u305f\u3002\\n\\n\u30e1\u30e2\u30ea\u306b\u3042\u308b\u4fdd\u5b58\u9818\u57df\u306e\u6700\u521d\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f\u30bc\u30ed\u3002\u3060\u304b\u3089 2200000000000000000000000000000000000000000000000000000000000000 \u304c\u30e1\u30e2\u30ea\u306b\u8ffd\u52a0\u3055\u308c\u305f\u3002\\n\\n## \u30e1\u30e2\u30ea\u306f byte \u306e Array \u3060\u304b\u3089\\n\\n\u6b21\u306b\u6ce8\u610f\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u306f\u3001\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 33(0x21)\u304b\u3089 MLOAD \u3057\u305f\u3068\u304d\u306b\u3001\u4e0b\u8a18\u306e\u5024\u304c\u8fd4\u3055\u308c\u305f\u3002\\n\\n```\\n3300000000000000000000000000000000000000000000000000000000000000\\n```\\n\\n32 bytes \u305a\u3064\u8aad\u307f\u8fbc\u3093\u3067\u3044\u306a\u304f\u3066\u3082\u3001\u8aad\u307f\u8fbc\u3081\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u3063\u305f\u3002\\n\\nmemory \u306f\u305f\u3060\u306e byte array \u306a\u306e\u3067\u3001\u3069\u3053\u306e\u5834\u6240\u304b\u3089\u3067\u3082\u8aad\u307f\u8fbc\u3081\u308b\u3053\u3068\u3092\u899a\u3048\u3066\u4e0b\u3055\u3044\u300232bytes \u306e\u5236\u9650\u306f\u7279\u306b\u306a\u304f\u3001\u3069\u3053\u304b\u3089\u3067\u3082 byte \u5358\u4f4d\u304b\u3089\u8aad\u307f\u8fbc\u3081\u308b\u3002\\n\\n> \u95a2\u6570\u5185\u3067\u306e\u307f\u65b0\u305f\u306b\u30e1\u30e2\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u308c\u306f\u65b0\u305f\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3055\u308c\u305f\u8907\u96d1\u306a\u578b\uff08\u4f8b\u3048\u3070 `new int[...]` \u306a\u3069\uff09\u3067\u3042\u3063\u305f\u308a\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u53c2\u7167\u5909\u6570\u304b\u3089\u30b3\u30d4\u30fc\u3055\u308c\u305f\u3082\u306e\u3067\u3042\u3063\u305f\u308a\u3057\u307e\u3059\u3002\\n\\n\u73fe\u5728\u3001\u6211\u3005\u306f\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u3064\u3044\u3066\u7406\u89e3\u3067\u304d\u305f\u306e\u3067\u3001free memory \u306e\u8a71\u3078\u623b\u308d\u3046\u3002\\n\\n# Free Memory Pointer\\n\\nFree Memory Pointer \u3068\u306f\u3001\u7c21\u5358\u306b\u3044\u3046\u3068\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30dd\u30a4\u30f3\u30bf\u30fc\u3067\u3042\u308a\u3001Free Memory \u304c\u3069\u3053\u304b\u3089\u30b9\u30bf\u30fc\u30c8\u3059\u3079\u304d\u306a\u306e\u304b\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002\u8a00\u3044\u63db\u3048\u308b\u3068\u3001\u30e1\u30e2\u30ea\u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3069\u3053\u307e\u3067\u66f8\u304d\u8fbc\u307e\u308c\u3066\u3044\u3066\u3001\u3069\u3053\u304b\u3089\u66f8\u304d\u8fbc\u3080\u3079\u304d\u306a\u306e\u304b\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002\\n\\n\u3053\u308c\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30e1\u30e2\u30ea\u3092\u4e0a\u66f8\u304d\u3059\u308b\u306e\u3092\u9632\u3050\u305f\u3081\u3067\u3082\u3042\u308b\u3002\\n\\n\u5909\u6570\u304c\u30e1\u30e2\u30ea\u3078\u66f8\u304d\u8fbc\u3080\u3068\u304d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u307e\u305a Free Memory Pointer \u3092\u53c2\u7167\u3057\u3001\u3069\u3053\u304b\u3089\u66f8\u304d\u8fbc\u3080\u3079\u304d\u304b\u3092\u6c7a\u3081\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002\u305d\u308c\u304b\u3089 Free Memory Pointer \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3001\u6700\u65b0\u306e\u30e1\u30e2\u30ea\u306e\u300c\u5883\u754c\u5024\u300d\u3042\u308b\u3044\u306f\u300c\u30aa\u30d5\u30bb\u30c3\u30c8\u300d\u3092\u8a18\u9332\u3059\u308b\u3002\\n\\n```\\n newFreeMemoryPointer = freeMemoryPointer + dataSizeBytes\\n```\\n\\n## Bytecode\\n\\n\u5148\u7a0b\u306b\u3082\u8a00\u53ca\u3057\u305f\u3088\u3046\u306b\u3001Free Memory Pointer \u306f\u6700\u521d\u306e runtime bytecode \u306e\u3053\u306e\u90e8\u5206\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\u3002\\n\\n```\\n60 80 = PUSH1 0x80\\n60 40 = PUSH1 0x40\\n52 = MSTORE\\n```\\n\\n\u3053\u308c\u306f\u57fa\u672c\u7684\u306b\u4f55\u3092\u8a00\u3063\u3066\u3044\u308b\u304b\u3068\u3044\u3046\u3068\u3001Free Memory Pointer \u306f\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x40(64 in decimal)\u3067\u3001\u5024\u306f 0x80(128 in decimal)\u3068\u306a\u308b\u3002\\n\\n\u3059\u3050\u306b\u7591\u554f\u306b\u601d\u3046\u306e\u306f\u3001\u306a\u305c\u3053\u306e\u6570\u5b57\u306a\u306e\u3068\u3044\u3046\u3053\u3068\u3060\u308d\u3046\u3002\\n\\n\u7b54\u3048\uff1a\\n\\n> 0x00 - 0x3f (64 bytes): scratch space\\n>\\n> 0x40 - 0x5f (32 bytes): free memory pointer\\n>\\n> 0x60 - 0x7f (32 bytes): zero slot\\n\\n0x40 \u306f solidity \u304c\u5b9a\u7fa9\u3057\u305f\u4e00\u756a\u6700\u521d\u306e Free Memory Pointer \u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3060\u3002\u5024 0x80 \u306f\u5358\u306b\u6700\u521d\u306e 4 \u3064\u306e 32 bytes \u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002\\n\\n\u3053\u308c\u3089\u306e\u4e88\u7d04\u3055\u308c\u305f\u30e1\u30e2\u30ea\u306b\u3064\u3044\u3066\\n\\n- Scrach space: inline assembly \u306e\u30cf\u30c3\u30b7\u30f3\u30b0\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u4f7f\u3063\u3066\u3082\u826f\u3044\\n- Free memroy pointer: \u4eca\u306e\u30e1\u30e2\u30ea\u306e\u30b5\u30a4\u30ba\u3001free memory \u306e\u30b9\u30bf\u30fc\u30c8\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3001\u6700\u521d\u306f 0x80\\n- The zero slot: \u52d5\u7684\u306a Memory Array \u306e\u521d\u671f\u5024\u3067\u3042\u308a\u3001\u3069\u3093\u306a\u3068\u304d\u306b\u3067\u3082\u66f8\u304d\u8fbc\u307e\u308c\u308b\u3053\u3068\u306f\u306a\u3044\\n\\n# \u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\\n\\n\u30ea\u30a2\u30eb\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304f\u3068\u3057\u3088\u3046\u304b\u3002\\n\\n\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u4f5c\u6210\u3057\u305f\u3002\u3053\u3044\u3064\u306e\u540d\u306f `MemoryLane`\u3002\u305f\u3063\u305f\u4e00\u500b\u306e\u95a2\u6570\u3092\u6301\u3063\u3066\u304a\u308a\u3001\uff12\u3064\u306e Array \u3092\u6301\u3063\u3066\u3044\u308b\u3002\u305d\u308c\u304b\u3089 b[0]\u306b\u5024 1 \u3092\u4ed8\u4e0e\u3059\u308b\u3002\\n\\n3 \u884c\u7a0b\u5ea6\u306e\u30b3\u30fc\u30c9\u3060\u3051\u3069\u3001\u304b\u306a\u308a\u591a\u304f\u306e\u3053\u3068\u304c\u8d77\u304d\u3066\u3044\u308b\u3088\u3002\\n\\n```sol\\n// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.3;\\n\\ncontract MemoryLane {\\n\\tfunction memoryLane() public pure {\\n\\t\\tbytes32[5] memory a;\\n\\t\\tbytes32[5] memory b;\\n\\t\\tb[0] = bytes32(uint256(1));\\n\\t}\\n}\\n\\n```\\n\\n\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u3082\u3046\u4e00\u5ea6 [remix](https://remix.ethereum.org/) \u3078\u6295\u5165\u3002\\n\\n\u305d\u308c\u304b\u3089\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u304f\u3060\u3055\u3044\u3002\\n\\n`memoryLane()`\u95a2\u6570\u3092 run \u3057\u3066\u3001debugging mode \u3078\u5165\u3063\u3066\u304f\u3060\u3055\u3044\u3002\\n\\nopcode \u3092\u5c11\u3057\u305a\u3064\u898b\u3066\u3044\u3053\u3046\u3002\\n\\n\u5c11\u3057\u7c21\u5358\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u3092[EVM playground](https://www.evm.codes/playground?unit=Wei&codeType=Mnemonic&code=%27Vg*%28_I...1W0GJ_%21%21%21%21z00FK22WJQ0Y22z20F8K33W33Q1Y33z21F8d%28v0Z0-Jq00Xd%28vJZJ-64q20Xdv33Z33-65q21Xpp%27%7EN+locatioCzG1_wppVv7o7hBcall+stack+from%7EuIIIIq%28+ofNzp%5Cnj+bytegSTOREdw%29*_+0xZ9BY9Chex%7DzXpM%29W+at%7EV%2F%2F+MQ+%7B0x2N+memoryKwg8+1j_J32I11GpPUSHFpMgCn+Be+9+i7+t*+J%29LOAD%28js%21uu%01%21%28%29*79BCFGIJKNQVWXYZ_dgjpquvwz%7E_&fork=shanghai)\u3078\u5165\u308c\u3066\u3044\u308b\u3002\u305d\u306e opcode \u306f\u305d\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002\\n\\n\u3053\u306e\u7c21\u5358\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u306f opcode \u3092\u9806\u756a\u306b\u69cb\u6210\u3057\u3001JUMP \u306a\u3069\u306e\u30e1\u30e2\u30ea\u64cd\u4f5c\u3068\u95a2\u9023\u3057\u306a\u3044\u3053\u3068\u3092\u9664\u5916\u3057\u305f\u3002\u3044\u308d\u3044\u308d\u30b3\u30e1\u30f3\u30c8\u3082\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u53c2\u7167\u3057\u3066\u307b\u3057\u3044\u3002\\n\\n\u3053\u306e\u30b3\u30fc\u30c9\u306f 6 \u90e8\u5206\u304b\u3089\u69cb\u6210\u3055\u308c\u3066\u3044\u3066\u3001\u3053\u308c\u304b\u3089 dive in \u3059\u308b\u3002\\n\\nplay ground \u3092\u4f7f\u3046\u3053\u3068\u3092\u5f37\u304f\u304a\u3059\u3059\u3081\u3059\u308b\u3002\\n\\n# Free Memory Pointer Initialisation (EVM Playground Lines 1-15)\\n\\n\u307e\u305a\u3001\u201cfree memory pointer initialisation\u201d\u304b\u3089\u3084\u3063\u3066\u3044\u304f\u3002\u4e0a\u8a18\u3067\u3082\u3042\u3063\u305f\u3088\u3046\u306b\u30010x80(128 in decimal)\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3002\u3053\u308c\u306f free memory pointer \u306e\u5024\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002Solidity \u306e memory \u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002\\n\\n![](memory00.png)\\n\\n\u3053\u306e\u6bb5\u968e\u3067\u306f\u3001\u307e\u3060\u30e1\u30e2\u30ea\u306b\u306f\u306a\u306b\u3082\u306a\u3044\u3002\\n\\n![](memory01.png)\\n\\n\u7d9a\u3044\u3066 free memory pointer \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x40(64 in decimal)\u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002\\n\\n\u6700\u5f8c\u306b\u3001MSTORE \u3092\u4f7f\u3063\u3066\u30010x40 \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306b 0x80 \u306e\u5024\u3092\u8a18\u9332\u3002\\n\\n\u3053\u306e\u5f8c\u3001\u30b9\u30bf\u30c3\u30af\u306b\u306f\u4f55\u3082\u306a\u304f\u3001\u30e1\u30e2\u30ea\u306b\u306a\u306b\u304b\u3092\u6b8b\u305b\u305f\u3053\u3068\u306b\u306a\u308b\u3002\u30e1\u30e2\u30ea\u306f 16 \u9032\u6570\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u6570\u5b57\u3054\u3068\u306b 4bit \u306e\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002\\n\\n\u4eca\u3068\u306a\u3063\u3066\u3001192 \u306e 16 \u9032\u6570\u306e\u6570\u5b57\u3068\u306a\u3063\u3066\u3044\u308b\uff08\u6570\u5b57 2 \u6841 = 1 byte = 8 bit\uff09\u3002\\n\\n\u5148\u7a0b\u306e\u5185\u5bb9\u3092\u601d\u3044\u51fa\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6700\u521d\u306e 64bytes \u306f scrach space \u3067\u3001\u6b21\u306e 32bytes \u306f free memory pointer \u306b\u306a\u308b\u3002\u3053\u308c\u306f\u307e\u3055\u306b\u4e0b\u8a18\u306e\u72b6\u614b\u3002\\n\\n![](memory02.png)\\n\\n# Memory Allocation Variable \u201ca\u201d & Free Memory Pointer Update (EVM Playground Lines 16-34)\\n\\n\u6b8b\u308a\u306e\u90e8\u5206\u306b\u3064\u3044\u3066\u306f\u3001\u7c21\u5358\u306b\u3059\u308b\u305f\u3081\u306b\u4e00\u65e6\u6700\u5f8c\u306e\u98db\u3070\u3057\u3066\u30cf\u30a4\u30ec\u30d9\u30eb\u306e\u6982\u8981\u3092\u898b\u3066\u307f\u3088\u3046\u3002\\n\\n\u6b21\u306e\u30e1\u30e2\u30ea\u306b\u95a2\u3057\u3066\u3001\u5909\u6570`a`(bytes32[5])\u306e\u3053\u3068\u3092\u914d\u7f6e\u3057\u3066 free memory pointer \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u304c\u308f\u304b\u308b\u3002\\n\\n\u30b3\u30f3\u30d1\u30a4\u30e9\u306f array size \u306b\u3088\u3063\u3066\u3069\u308c\u304f\u3089\u3044\u306e\u30b9\u30da\u30fc\u30b9\u304c\u5fc5\u8981\u304b\u6c7a\u5b9a\u3059\u308b\u3002\\n\\n> \u30e1\u30e2\u30ea array \u306e\u8981\u7d20\u306e\u5360\u3081\u308b\u9818\u57df\u306f 32 bytes \u306e\u500d\u6570\u306b\u306a\u308b\u3002\u3053\u308c\u306f `bytes1[]`\u306b\u5bfe\u3057\u3066\u3082\u901a\u7528\u3059\u308b\u3002\u305f\u3060\u3057\u3001`bytes` \u3084 `string` \u306f\u9055\u3046\u3002\\n\\narray \u306e\u30b5\u30a4\u30ba \xd732bytes \u3067\u3069\u308c\u304f\u3089\u3044\u306e\u30e1\u30e2\u30ea\u3092\u98df\u3046\u304b\u308f\u304b\u308b\u3002\\n\\n\u3053\u306e\u5834\u5408\u30015 \\\\* 32 bytes \u3067\u30010xa0 (160)\u306b\u306a\u308b\u306e\u3060\u3002\u3057\u305f\u304c\u3063\u3066\u305d\u306e\u5024\u306f stack \u306b\u30d7\u30c3\u30b7\u30e5\u3055\u308c\u3001\u73fe\u5728\u306e free memory pointer \u306b\u4fdd\u5b58\u3055\u308c\u305f\u3002\\n\\n\u3053\u306e\u5f8c\u3001\u524d\u306e free memory pointer \u306e\u5024\u3068\u8db3\u3057\u7b97\u3092\u3057\u3066\u3001\u5024 0x120 (288)\u304c\u751f\u6210\u3055\u308c\u305f\u3002\u3053\u306e\u5024\u304c free memory pointer \u306b\u4fdd\u5b58\u3055\u308c\u305f\u3002\\n\\nstack \u306b\u306f\u5909\u6570`a`\u30e1\u30e2\u30ea\u3092\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 0x80 \u306b\u30ad\u30fc\u30d7\u3057\u3066\u5f8c\u304b\u3089\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u3002`0xffff`\u306f JUMP \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u610f\u5473\u3057\u3066\u304a\u308a\u3001\u95a2\u4fc2\u306a\u3044\u306e\u3067\u5f53\u9762\u306f\u7121\u8996\u3057\u3066\u3088\u3044(stack \u306e underflow \u3092\u9632\u3050\u305f\u3081\u306b\u3042\u308b)\u3002\\n\\n![](memory03.png)\\n\\n# Memory Initialisation Variable \u201ca\u201d (EVM Playground Lines 35-95)\\n\\n\u4eca\u3067\u306f\u30e1\u30e2\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u3066 free memory pointer \u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u305f\u3002\u3053\u3053\u304b\u3089\u306f\u5909\u6570`a`\u306e\u30e1\u30e2\u30ea\u306b\u304a\u3051\u308b\u521d\u671f\u5316\u3092\u3059\u308b\u3002\u5909\u6570\u306f\u5ba3\u8a00\u3055\u308c\u3066\u5024\u4ee3\u5165\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30bc\u30ed\u5024\u306b\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3002\\n\\n\u3053\u308c\u3092\u3059\u308b\u305f\u3081\u306b\u306f\u3001EVM \u306e CALLDATACOPY \u3092\u4f7f\u3063\u3066\u5b9f\u65bd\u3059\u308b\u3002\u3053\u306e opcode \u306f\uff13\u3064\u306e\u5f15\u6570\u304c\u5fc5\u8981\uff1a\\n\\n- memoryOffset\uff08\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078\u30b3\u30d4\u30fc\u3059\u308b\u5834\u6240\uff09\\n- calldataOffset\uff08calldata \u306b\u304a\u3051\u308b byte offset \u306e\u3053\u3068\uff09\\n- size\uff08\u30b3\u30d4\u30fc\u3059\u308b byte size\uff09\\n\\n\u4eca\u56de\u306e\u5834\u5408\u3001memoryOffset \u306f`a`\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 0x80\u3002\\n\\ncalldataOffset \u306f\u5b9f\u969b\u306e calldata \u306e\u30b5\u30a4\u30ba\u3001\u306a\u305c\u306a\u3089\u305d\u3082\u305d\u3082 calldata \u306e copy \u304c\u3044\u3089\u306a\u3044\u3002\u30e1\u30e2\u30ea\u3092\u30bc\u30ed\u5024\u3067\u521d\u671f\u5316\u3057\u305f\u3044\u3002\u7d50\u679c\u7684\u306b\u30b5\u30a4\u30ba\u304c 0xa0 \u3042\u308b\u3044\u306f 160 bytes \u306b\u306a\u308b\u3002\\n\\n\u3053\u3053\u3067\u3001\u30e1\u30e2\u30ea\u304c 288 bytes \u306b\u306a\u3063\u305f\u3068\u308f\u304b\u308b(zero slot \u3082\u542b\u3081\u3066)\u3002stack \u306f\u4eca\u3082\u3046\u4e00\u5ea6\u5909\u6570\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3068 JUMP \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u6301\u3063\u3066\u3044\u308b\u72b6\u614b\u3002\\n\\n\uff08\u305d\u306e\u9593\u306b\u7d30\u304b\u3044\u64cd\u4f5c\u306b\u3064\u3044\u3066\u306f\u3001\u4f55\u5ea6\u3082 pop \u3057\u3066\u3044\u308b\u306e\u304c\u3042\u308b\u304c\u3001\u500b\u4eba\u7684\u306b\u306f\u307e\u3060\u306a\u305e\u3067\u3001\u308f\u304b\u308b\u65b9\u306a\u3089\u6559\u3048\u3066\u4e0b\u3055\u3044\uff09\\n\\n# Memory Allocation Variable \u201cb\u201d & Free Memory Pointer Update (EVM Playground Lines 96-112)\\n\\n\u3053\u3053\u3067\u306e\u64cd\u4f5c\u306f\u4e0a\u8a18\u306e\u6d41\u308c\u3068\u975e\u5e38\u306b\u4f3c\u3066\u3044\u308b\u304c\u3001\u305f\u3060\u3057\u3001\u4eca\u56de\u306f`bytes32[2] memory b`\u3068\u306a\u308b\u3002\\n\\nfree memory pointer \u3092 0x160(352 in decimal)\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b(\u524d\u306e free memory pointer 288 + \u65b0\u3057\u3044\u5909\u6570\u306e\u30b5\u30a4\u30ba 64 bytes)\u3002\\n\\n\u6ce8\u610f\u3068\u3057\u3066\u306f\u3001free memory pointer \u306f\u30e1\u30e2\u30ea\u306b\u3066 0x160 \u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u3001\u305d\u3053\u3067\u73fe\u5728\u306f\u5909\u6570`b`\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3(0x120)\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u3066\u3042\u308b\u3002\\n\\n![](memory04.png)\\n\\n# Memory Initialisation Variable \u201cb\u201d (EVM Playground Lines 113-162)\\n\\n\u7d9a\u3044\u3066\u5909\u6570`b`\u521d\u671f\u5316\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002\\n\\n\u73fe\u5728\u3001\u30e1\u30e2\u30ea\u306f 352bytes \u3078\u62e1\u5f35\u3055\u308c\u305f\u3002\u30b9\u30bf\u30c3\u30af\u306b\u306f\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092 2 \u500b\u6301\u3063\u3066\u3044\u308b\u3002\\n\\n# Assign Value to `b[0]` (EVM Playground Lines 163-207)\\n\\n\u3084\u3063\u3068\u6700\u5f8c\u306e\u6bb5\u968e\u306b\u6765\u308c\u305f\u3002\u6b63\u76f4\u306b\u3044\u3063\u3066\u96e3\u3057\u304b\u3063\u305f\u3002\\n\\n\u3053\u3053\u3067\u306f\u3001array `b` \u306e index `0`\u306b\u5024\u3092\u4ed8\u4e0e\u3057\u305f\u3044\u3002\\n\\n\u30b3\u30fc\u30c9\u3067\u306f b[0] = 1 \u3068\u306a\u3063\u3066\u3044\u308b\u3002\\n\\n\u307e\u305a\u3001\u3053\u306e\u5024\u304c stack \u306b\u7a81\u3063\u8fbc\u307e\u308c\u308b\u3002\u305d\u306e\u5f8c\u3001bit shift \u304c\u8d77\u304d\u308b\u304c\u3001\u3053\u308c\u79fb\u52d5\u3057\u305f\u306e\u306f 0 \u3067\u4f55\u3082\u5909\u308f\u308a\u306f\u306a\u3044\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\\n\\n\u6b21\u306b array \u306e index \u306b\u306f 0x00 \u3078\u66f8\u304d\u8fbc\u307e\u308c\u30010 positon \u3078\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u306e\u969b\u306b\u3001array length \u306e 2 \u3092\u8d85\u3048\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u30c1\u30a7\u30c3\u30af\u3002\u3082\u3057\u6761\u4ef6\u3092\u30af\u30ea\u30a2\u3067\u304d\u306a\u3044\u5834\u5408\u3001\u7570\u306a\u308b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3078\u98db\u3073\u3001\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306e\u90e8\u5206\u3078\u98db\u3070\u3055\u308c\u308b\u3002\\n\\nMUL\u3001ADD opcode \u306f\u30e1\u30e2\u30ea\u3044\u306b\u304a\u3044\u3066\u5024\u304c\u66f8\u304d\u8fbc\u307e\u308c\u308b\u5834\u6240\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002\\n\\n```\\n0x20 (32 in decimal) * 0x00 (0 in decimal) = 0x00\\n```\\n\\n\u30e1\u30e2\u30ea\u306e array \u306f 32 byte \u5358\u4f4d\u3067\u3042\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u3057\u3066\u307b\u3057\u3044\u3002\u3053\u3061\u3089\u306f 0x00 \u306b\u306a\u308b\u306e\u3067\u3001offset \u306f\u4e0d\u8981\u3067\u305d\u306e\u307e\u307e 0 \u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u304b\u3089\u66f8\u7740\u8fbc\u3080\u3002\\n\\n```\\n0x00 + 0x120 = 0x120 (288 in decimal)\\n```\\n\\nADD \u306f offset \u306e\u5024\u3092\u30e1\u30e2\u30ea\u306b\u3042\u308b\u5909\u6570 b \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b\u3088\u3046\u306b\u4f7f\u308f\u308c\u305f\u3002offset \u306f\u4eca\u56de 0 \u306a\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u3001free memory pointer \u306e\u4f4d\u7f6e\u306b\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3068\u306a\u308b\u3002\\n\\n\u4e00\u756a\u6700\u5f8c\u306b\u3001MSTORE \u3092\u4f7f\u3063\u3066\u5024 0x01 \u3092\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x120 \u3078\u66f8\u304d\u8fbc\u3080\u3002\u305d\u3057\u3066\u3001\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u3059\u3079\u3066\u306e\u8981\u7d20\u3092 pop \u3057\u3001\u7d42\u4e86\u3002\\n\\n\u3053\u308c\u3067\u30e1\u30e2\u30ea\u306f`b[0] = 1`\u3068\u306a\u3063\u3066\u3044\u308b\u3002\u4e0b\u304b\u3089 3 \u884c\u76ee\u306e\u3068\u3053\u308d\u306b 1 \u3068\u3044\u3046\u6570\u5b57\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u304c\u308f\u304b\u308b\u3002\\n\\n![](memory05.png)\\n\\n\u4eca\u56de\u306e\u8a18\u4e8b\u306f\u3053\u3053\u307e\u3067\uff01Bye\uff01\\n\\n## Reference\\n\\n[EVM Deep Dives: The Path to Shadowy Super Coder \ud83e\udd77 \ud83d\udcbb - Part 2](https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy-d6b?s=r)"},{"id":"What is SafeERC20","metadata":{"permalink":"/blog/What is SafeERC20","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/2023-8-12-What-is-safeERC20/2023-2-26-EVM-deep-dive-part1.md","source":"@site/blog/2023-8-12-What-is-safeERC20/2023-2-26-EVM-deep-dive-part1.md","title":"SafeERC20\u3068\u306f","description":"Hello! Everybody!","date":"2023-02-26T00:00:00.000Z","formattedDate":"2023\u5e742\u670826\u65e5","tags":[{"label":"Etheruem","permalink":"/blog/tags/etheruem"},{"label":"blockchain","permalink":"/blog/tags/blockchain"},{"label":"Foundry","permalink":"/blog/tags/foundry"}],"readingTime":1.076,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"}],"frontMatter":{"slug":"What is SafeERC20","title":"SafeERC20\u3068\u306f","authors":["Thurendous"],"blogDescription":"Foundry\u306e\u4f7f\u3044\u65b9\u5165\u9580","tags":["Etheruem","blockchain","Foundry"]},"prevItem":{"title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2","permalink":"/blog/EVM-deep-dive-part2"},"nextItem":{"title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1","permalink":"/blog/EVM-deep-dive-part1"}},"content":"Hello! Everybody!\\n\\n# `SafeERC20` \u306e\u4f7f\u3044\u65b9 - What is and how to use `SafeERC20`\\n\\nOpenZeppelin \u306e SafeERC20 \u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u8da3\u65e8\u306f\u3001ERC20 \u30c8\u30fc\u30af\u30f3\u306b\u306f\u57fa\u6e96\u304c\u3042\u308b\u3082\u306e\u306e\u3001\u57fa\u6e96\u306b\u6cbf\u3063\u3066\u3044\u306a\u3044\u6709\u540d\u306a\u30c8\u30fc\u30af\u30f3\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001BNB \u3084 USDT \u306f bool \u5024\u3092\u8fd4\u3055\u306a\u3044 transfer \u95a2\u6570\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u30c8\u30fc\u30af\u30f3\u3092\u6271\u3046\u3068\u304d\u306b\u3001SafeERC20 \u3092\u4f7f\u3046\u3053\u3068\u3067\u3001bool \u5024\u3092\u8fd4\u3055\u306a\u3044\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3082\u3001\u5931\u6557\u3057\u305f\u5834\u5408\u306b\u306f revert \u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\\n\\n# \u3058\u3083\u6b63\u78ba\u306b\u4f7f\u3046\u306b\u306f\uff1f\\n\\nSafeERC20 \u306e\u4f7f\u7528\u65b9\u6cd5\u306f\u3088\u304f\u8aa4\u89e3\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\\n\\nSafeERC20 \u306f\u3001\u30c8\u30fc\u30af\u30f3\u3092\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b ERC20 \u306e\u62e1\u5f35\u3067\u306f\u3042\u308a\u307e\u305b\u3093\uff08OpenZeppelin \u306e ERC20 \u306f\u3059\u3067\u306b\u5b89\u5168\u3067\u3059\u304c\uff57\uff09\u3002\u4ed6\u4eba\u306e ERC20 \u30c8\u30fc\u30af\u30f3\u3068\u306e\u3084\u308a\u53d6\u308a\u3092\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306e\u88dc\u52a9\u6a5f\u80fd\u3067\u3059\u3002\\n\\n\u3053\u306e\u88dc\u52a9\u6a5f\u80fd\u304c\u884c\u3046\u3053\u3068\u306f\u3001\\n\\n- ERC20 \u64cd\u4f5c\u306e\u30d6\u30fc\u30eb\u5024\u306e\u623b\u308a\u5024\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u5931\u6557\u3057\u305f\u5834\u5408\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092 revert \u3055\u305b\u307e\u3059\u3002\\n- \u540c\u6642\u306b\u3001\u30d6\u30fc\u30eb\u5024\u306e\u623b\u308a\u5024\u3092\u6301\u305f\u306a\u3044\u975e\u6a19\u6e96\u306e ERC20 \u30c8\u30fc\u30af\u30f3\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\\n- \u3055\u3089\u306b\u3001[\u653b\u6483](https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729) \u3092\u7de9\u548c\u3059\u308b\u305f\u3081\u306b\u3001\u627f\u8a8d\u984d\u3092\u5897\u6e1b\u3055\u305b\u308b\u305f\u3081\u306e\u88dc\u52a9\u6a5f\u80fd\u3082\u63d0\u4f9b\u3057\u307e\u3059\u3002\\n\\n\u4f8b\u3068\u3057\u3066\u3001\u30c8\u30fc\u30af\u30f3\u3068\u3084\u308a\u53d6\u308a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5951\u7d04\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u305d\u308c\u306f\u3001\u4eba\u3005\u304c\u4e00\u5b9a\u306e\u4fa1\u683c\u3067\u30c8\u30fc\u30af\u30f3\u3092\u8ca9\u58f2\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3001\u5f8c\u3067\u8cfc\u5165\u8005\u304c\u305d\u308c\u3089\u304b\u3089\u8cfc\u5165\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u3044\u304f\u3064\u304b\u306e\u30c8\u30fc\u30af\u30f3\u306e\u8ee2\u9001\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u305d\u308c\u3089\u306b SafeERC20 \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002IERC20 \u306e\u578b\u306e\u5024\u3067\u5b89\u5168\u306a\u64cd\u4f5c\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u884c\u300cusing SafeERC20 for IERC20\u300d\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f8b\uff1atradingToken.safeTransferFrom\u3002\\n\\n```solidity\\ncontract FixedPriceMarket {\\n using SafeERC20 for IERC20;\\n\\n IERC20 tradingToken = 0x1234...;\\n uint256 price = 128;\\n\\n mapping (address => uint256) selling;\\n\\n function sell(uint256 tokenValue) {\\n tradingToken.safeTransferFrom(msg.sender, this, tokenValue);\\n selling[msg.sender] = selling[msg.sender].add(tokenValue);\\n }\\n\\n function buy(address seller, uint256 tokenValue) {\\n require(msg.value == tokenValue.mul(price));\\n selling[seller] = selling[seller].sub(tokenValue);\\n tradingToken.safeTransfer(msg.sender, tokenValue);\\n seller.transfer(msg.value);\\n }\\n}\\n```\\n\\n## Reference\\n\\n[OpenZeppelin Forum](https://forum.openzeppelin.com/t/safeerc20-tokentimelock-wrappers/396)\\n[SafeERC20 \u306b\u3064\u3044\u3066](https://zenn.dev/retocrooman/articles/20768619a313ae)"},{"id":"EVM-deep-dive-part1","metadata":{"permalink":"/blog/EVM-deep-dive-part1","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md","source":"@site/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md","title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1","description":"Hello, everybody!","date":"2023-02-26T00:00:00.000Z","formattedDate":"2023\u5e742\u670826\u65e5","tags":[{"label":"EVM","permalink":"/blog/tags/evm"},{"label":"opcode","permalink":"/blog/tags/opcode"},{"label":"Etheruem","permalink":"/blog/tags/etheruem"},{"label":"blockchain","permalink":"/blog/tags/blockchain"},{"label":"examples","permalink":"/blog/tags/examples"}],"readingTime":3.734,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"}],"frontMatter":{"slug":"EVM-deep-dive-part1","title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1","authors":["Thurendous"],"blogDescription":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1","tags":["EVM","opcode","Etheruem","blockchain","examples"]},"prevItem":{"title":"SafeERC20\u3068\u306f","permalink":"/blog/What is SafeERC20"},"nextItem":{"title":"CEI\u3068\u306f : Checks Effects Interactions","permalink":"/blog/checks-effects-interactions"}},"content":"Hello, everybody!\\n\\nFirst Principle \u3068\u3044\u3046\u8a00\u8449\u3092\u8033\u306b\u3055\u308c\u305f\u3053\u3068\u306f\u306a\u3044\u3060\u308d\u3046\u304b\u3002\u305d\u308c\u306f\u5965\u6df1\u304f\u7269\u4e8b\u306e\u57fa\u790e\u3092\u7406\u89e3\u3057\u305f\u4e0a\u3067\u3001\u3088\u308a\u3088\u3044\u767a\u60f3\u3092\u751f\u307e\u308c\u308b\u3053\u3068\u3068\u3044\u3046\u6982\u5ff5\u3060\u3002\\n\\n\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u4e16\u754c\u3067\u306f\u3001EVM \u3068\u305d\u306e\u5468\u308a\u306b\u3042\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u95a2\u3057\u3066\u306f\u3001\u307e\u3055\u306b\u3053\u306e First Principle \u3067\u3042\u308b\u3002Solidity \u3042\u308b\u3044\u306f\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u3053\u306e\u57fa\u790e\u306e\u4e0a\u306b\u4f5c\u308b\u69cb\u9020\u7269\u306a\u306e\u3067\u3001EVM \u306e\u3053\u3068\u3092\u7406\u89e3\u305b\u305a\u306b\u306f\u3088\u3044 solidity dev \u3068\u79f0\u3059\u308b\u306b\u306f\u307e\u3060\u65e9\u3044\u3068\u8a00\u3063\u3066\u3088\u3044\u3060\u308d\u3046\u3002\\n\\n## \u57fa\u790e\uff1aSolidity \u2192 Bytecode \u2192 Opcode\\n\\n\u307e\u305a\u3001\u57fa\u790e\u7684\u306a\u90e8\u5206\u306b\u3064\u3044\u3066\u4e00\u5b9a\u7a0b\u5ea6\u306e\u77e5\u8b58\u3092\u6709\u3059\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u308b\u3002\\n\\n- \u304a\u3055\u3089\u3044\uff1a\\n - Bytecode & ABI: \u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u306f EVM \u4e0a\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u30b3\u30fc\u30c9\u3067\u3001ABI \u3068\u306f\u3053\u306e EVM \u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u3084\u308a\u53d6\u308a\u304c\u3067\u304d\u308b\u305f\u3081\u306e interface\u3002\\n - Solidity \u30b3\u30fc\u30c9\u306f\u307e\u305a\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3078\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304b\u3089\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3078\u4e57\u305b\u308b\u3068\u3044\u3046\u6d41\u308c\u306b\u306a\u308b\u3002\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u5b9f\u306f\u8272\u3005\u306a\u30aa\u30da\u30b3\u30fc\u30c9\u3092\u610f\u5473\u3057\u3066\u3044\u308b\u3002\\n\\n\u4eca\u56de\u306f\u57fa\u672c\u7684\u306a solidity \u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u3064\u3044\u3066\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u4e00\u90e8\u3092\u4e00\u7dd2\u306b\u307f\u3066\u3044\u304d\u3001EVM \u304c\u3069\u306e\u3088\u3046\u306b\u95a2\u6570\u3092\u9078\u3093\u3067\u3044\u308b\u304b\u3092\u898b\u3088\u3046\u3002\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304b\u3089\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u305f\u3082\u306e\u3067\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u306f\u3044\u304f\u3064\u304b\u3082\u306e\u95a2\u6570\u304c\u3042\u308b\u3060\u308d\u3046\u3002\\n\\n\u3088\u304f\u3042\u308b\u8cea\u554f\u306f\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u305f\u5f8c\u3001EVM \u306f\u3069\u306e\u3088\u3046\u306b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u3069\u306e\u90e8\u5206\u3092\u5b9f\u884c\u3059\u3079\u304d\u304b\u304c\u308f\u304b\u3063\u305f\u306e\u304b\u3068\u3044\u3046\u306e\u304c\u3042\u308b\u3002\\n\\n## 1_Storage.sol \u30b3\u30f3\u30c8\u30e9\u30af\u30c8\\n\\n```solidity\\npragma solidity >=0.7.0 <0.9.0;\\n\\ncontract Storage {\\n\\tuint256 number;\\n\\n\\tfunction store(uint256 num) public {\\n\\t\\tnumber = num;\\n\\t}\\n\\n\\tfunction retrieve() public view returns (uint256) {\\n\\t\\treturn number;\\n\\t}\\n}\\n```\\n\\n\u4eca\u56de\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u4e0a\u8a18\u306e\u3082\u306e\u3068\u306a\u308b\u3002\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u306f\u4e8c\u500b\u306e\u95a2\u6570\u304c\u3042\u308b\u3002`store()`\u3068 `retrieve()`\u3002\\n\\nruntime \u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\uff1a\\n\\n```\\n608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033\\n```\\n\\n\u4eca\u56de\u30d5\u30a9\u30fc\u30ab\u30b9\u3059\u308b\u306e\u306f\u4ee5\u4e0b\u306e\u90e8\u5206\uff1a\\n\\n```\\n60003560e01c80632e64cec11461003b5780636057361d1461005957\\n```\\n\\n\u3053\u306e\u90e8\u5206\u306f\u5168\u4f53\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u304b\u3089\u629c\u304d\u53d6\u3063\u305f\u3082\u306e\u3002\\n\\n\u95a2\u6570\u306e\u30bb\u30ec\u30af\u30bf\u306e\u30ed\u30b8\u30c3\u30af\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3002\\n\\n\u8a00\u3044\u9045\u308c\u305f\u304c\u3001EVM \u306e\u30aa\u30da\u30b3\u30fc\u30c9\u306b\u95a2\u3057\u3066\u306f\u3001[\u3053\u3053](https://www.ethervm.io/)\u304b\u3089\u78ba\u8a8d\u3067\u304d\u308b\u3002\\n\\n\u30aa\u30da\u30b3\u30fc\u30c9\u306f 1 byte \u306e\u9577\u3055\u306b\u306a\u308b\u3002\u305d\u3046\u3059\u308b\u3068\u81ea\u7136\u306b 256 \u30d1\u30bf\u30fc\u30f3\u304c\u3042\u308b\u3068\u5206\u308b\u3068\u601d\u3046\u3002\\n\\n\u3057\u304b\u3057\u3001\u5b9f\u969b\u306b\u306f 140 \u500b\u306e\u30aa\u30da\u30b3\u30fc\u30c9\u3057\u304b\u5b58\u5728\u3057\u306a\u3044\u3002\\n\\n\u4ee5\u4e0b\u306f\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u95a2\u4fc2\u3059\u308b\u30aa\u30da\u30b3\u30fc\u30c9\u3078\u5909\u63db\u3057\u305f\u3082\u306e\u3002\\n\\n```\\n60 00 = PUSH1 0x00\\n35 = CALLDATALOAD\\n60 e0 = PUSH1 0xe0\\n1c = SHR\\n80 = DUP1\\n63 2e64cec1 = PUSH4 0x2e64cec1\\n14 = EQ\\n61 003b = PUSH2 0x003b\\n57 = JUMPI\\n80 = DUP1\\n63 6057361d = PUSH4 0x6057361d\\n14 = EQ\\n61 0059 = PUSH2 0x0059\\n57 = JUMPI\\n```\\n\\n## \u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084 Calldata\\n\\n\u30aa\u30da\u30b3\u30fc\u30c9\u3078\u30c0\u30a4\u30d6\u3059\u308b\u524d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u306b\u3064\u3044\u3066\u5fa9\u7fd2\u3057\u3088\u3046\u3002\\n\\n\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u306e\u524d\u306b\u3001calldata \u306b\u3001\u95a2\u6570\u306e\u7f72\u540d\u3001\u305d\u3057\u3066\u7d9a\u3044\u3066\u5f15\u6570\u3082\u5165\u308c\u308b\u3002\\n\\nSolidity \u306e\u30b3\u30fc\u30c9\u306b\u8868\u73fe\u3057\u3066\u3082\u3089\u3046\u3068\u3001\u3053\u3046\u306a\u308b\u3060\u308d\u3046\u3002\\n\\n```solidity\\nevent FunctionCalldata(bytes);\\nbytes memory functionCalldata = abi.encodeWithSignature(\'store(uint256)\', 10);\\nemit FunctionCalldata(functionCalldata);\\naddress(storageContract).call(functionCalldata);\\n```\\n\\n\u4eca\u56de\u306e\u5834\u5408\u3001\u50d5\u306f store \u95a2\u6570\u3092\u547c\u3073\u300110 \u5f15\u6570\u3068\u3057\u3066\u4ee3\u5165\u3057\u305f\u3044\u3002\\n\\n```solidity\\n0x6057361d000000000000000000000000000000000000000000000000000000000000000a\\n```\\n\\n\u4e0a\u306e\u9577\u3044\u6570\u5b57\u306e\u914d\u5217\u306f abi.encodeWithSignature(\u201dstore(uint256)\u201d,10)\u306e\u7d50\u679c\u3002\\n\\n\u95a2\u6570\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306f\uff14\u30d0\u30a4\u30c8\u306e Keccak \u30cf\u30c3\u30b7\u30e5\u5024\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u300c0x6057361d\u300d\u3002\\n\\n```\\nkeccak256(\u201cstore(uint256)\u201d) \u2192 first 4 bytes = 6057361d\\n\\nkeccak256(\u201cretrieve()\u201d) \u2192 first 4 bytes = 2e64cec1\\n```\\n\\n\u5148\u7a0b\u306e calldata \u3092\u898b\u308b\u3068\u3001\u5168\u90e8\u3067 36bytes \u3042\u3063\u305f\u3002\u6700\u521d\u306e 4bytes: `6057361d`\u306f\u95a2\u6570\u306e\u30bb\u30ec\u30af\u30bf\u95a2\u9023\u3067\u3001`store(uint256)`\u3068\u95a2\u4fc2\u3059\u308b\u3002\\n\\n\u3054\u81ea\u8eab\u3067\u306f\u30c3\u30b7\u30e5\u3057\u3066\u307f\u3066 \u2192[\u3053\u3053](https://emn178.github.io/online-tools/keccak_256.html)\\n\\n```\\n6057361d = function signature (4 bytes)\\n\\n000000000000000000000000000000000000000000000000000000000000000a = uint256 input (32 bytes)\\n```\\n\\n\u4ee5\u4e0a\u3001calldata \u306e\u6e96\u5099\u3060\u3063\u305f\u3002\\n\\n## \u30aa\u30da\u30b3\u30fc\u30c9\uff06\u30b9\u30bf\u30c3\u30af\\n\\n\u305d\u308c\u3067\u306f\u3001EVM \u30ec\u30d9\u30eb\u3078\u30c0\u30a4\u30d6\u3057\u3066\u3044\u3053\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002\u308f\u304b\u3089\u306a\u3044\u5834\u5408\u306f[\u3053\u308c](https://www.youtube.com/watch?v=FNZ5o9S9prU)\u3092\u898b\u3066\u3002\\n\\n\u5148\u7a0b\u306e\u30aa\u30da\u30b3\u30fc\u30c9\u306f\u3053\u308c\uff1a\\n\\n```\\n60 00 = PUSH1 0x00\\n35 = CALLDATALOAD\\n60 e0 = PUSH1 0xe0\\n1c = SHR\\n80 = DUP1\\n63 2e64cec1 = PUSH4 0x2e64cec1\\n14 = EQ\\n61 003b = PUSH2 0x003b\\n57 = JUMPI\\n80 = DUP1\\n63 6057361d = PUSH4 0x6057361d\\n14 = EQ\\n61 0059 = PUSH2 0x0059\\n57 = JUMPI\\n```\\n\\nPUSH1 \u306f 1byte \u306e\u30c7\u30fc\u30bf\u3092\u30b9\u30bf\u30c3\u30af\u3078\u5165\u308c\u308b\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u3046\u3059\u308b\u3068\u3001\u30b9\u30bf\u30c3\u30af\u306f\u3053\u3046\u306a\u308b\\n\\n```\\nPUSH1 0x00 | 0 |\\n```\\n\\n\u7d9a\u3044\u3066 CALLDATALOAD \u306f\u6700\u521d\u306e stack(0)\u306e\u5024\u3092\u30dd\u30c3\u30d7\u3055\u305b\u308b\u3002\u3053\u306e 0 \u5024\u3092 input \u3068\u3057\u3066\u4f7f\u7528\u3057\u3001offset \u3068\u3057\u3066\u4f7f\u3046\u3002\u30b9\u30bf\u30c3\u30af\u30a2\u30a4\u30c6\u30e0\u306e\u30b5\u30a4\u30ba\u306f 32bytes \u306a\u306e\u306b\u5bfe\u3057\u3001\u4eca\u56de\u306e calldata \u306f 36bytes \u306b\u306a\u3063\u3066\u3044\u308b\u3002\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u306f msg.data[i : i+32]\u3067\u3001i \u306f\u4eca\u56de\u306e input \u5024\u3068\u306a\u308b\u3002\u3053\u308c\u306f\u6bce\u56de\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u304c 32bytes \u306b\u306a\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3067\u304d\u308b\u3002\u540c\u6642\u306b\u3001\u3069\u306e\u90e8\u5206\u306b\u3082\u30a2\u30af\u30bb\u30eb\u3067\u304d\u308b\u3002\\n\\n\u4eca\u56de\u306e\u5834\u5408\u3001offset \u306f\u306a\u304b\u3063\u305f\u306e\u3067\u300132bytes \u306e calldata \u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u306b push \u3057\u305f\u3002\u3055\u304d\u307b\u3069\u7528\u610f\u3057\u305f calldata \u306f\u3053\u308c\u3002\u3084\u3063\u3068\u51fa\u756a\u304c\u304d\u305f\u3002\\n\\n`0x6057361d000000000000000000000000000000000000000000000000000000000000000a`\u3002\\n\\n\u3068\u3044\u3046\u306e\u306f\u3001\u6700\u5f8c\u306e`0000000a`\u304c\u9664\u5916\u3055\u308c\u305f 32bytes \u304c\u4eca\u56de\u306e\u5165\u529b\u3068\u306a\u308b\u3002\\n\\n```\\nCALLDATALOAD | 0x6057361d0...00 |\\n```\\n\\n\u6b21\u306b PUSH1 \u3092\u4f7f\u3063\u3066 hex value \u306e 0xe0 \u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3002\u3053\u308c\u306f\u5341\u9032\u6570\u3060\u3068 224\u3002\\n\\n```\\nPUSH1 0xe0 | 224 |\\n\\t\\t\\t\\t| 0x6057361d0...00 |\\n```\\n\\nSHR \u3092\u4f7f\u3063\u3066\u30e9\u30a4\u30c8\u30b7\u30d5\u30c8\u3055\u305b\u308b\u3002\u4eca\u56de\u306f\u6700\u521d\u306e\u30a2\u30a4\u30c6\u30e0\u3067\u3042\u308b 224 \u3092\u53d6\u308a\u51fa\u3057\u3001input \u3068\u3057\u3066\u6271\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u4e8c\u756a\u76ee\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u3069\u308c\u304f\u3089\u3044\u53f3\u3078\u30e9\u30a4\u30c8\u30b7\u30d5\u30c8\u3055\u305b\u308b\u304b\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u3002256 - 244 = 32 bit \u3068\u308f\u304b\u308b\u3088\u3046\u306b\u3001\u6700\u5f8c\u306b\u306f 4bytes \u306e\u30bb\u30ec\u30af\u30bf\u304c call stack \u306b\u6b8b\u308b\u3002\\n\\n```\\nSHR | 0x6057361d |\\n```\\n\\nDUP1 \u3092\u4f7f\u3063\u3066\u30b9\u30bf\u30c3\u30af\u306e\u4e00\u756a\u4e0a\u306e\u5024\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002\\n\\n```\\nDUP1 | 0x6057361d |\\n\\t\\t| 0x6057361d |\\n```\\n\\nPUSH4 \u3092\u4f7f\u3063\u3066 4byte \u306e\u95a2\u6570\u306e\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306e`retrieve()` (0x2e64cec1) \u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002\\n\\n```\\nPUSH4 0x2e64cec1 | 0x2e64cec1 |\\n\\t\\t\\t\\t\\t| 0x6057361d |\\n\\t\\t\\t\\t\\t| 0x6057361d |\\n```\\n\\nEQ \u306f\u4e8c\u500b\u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u304b\u3089\u51fa\u3057\u3001\u30a4\u30b3\u30fc\u30eb\u306a\u306e\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\u3082\u3057\u30a4\u30b3\u30fc\u30eb\u306a\u3089 1\uff08true\uff09 \u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3001\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f 0\uff08false\uff09 \u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002\\n\\n```\\nEQ \\t\\t| 0 |\\n\\t\\t\\t| 0x6057361d |\\n```\\n\\n\u6b21\u306b PUSH2 \u3092\u4f7f\u3063\u3066\u4e8c\u500b\u306e\u5024\u3092\u30d7\u30c3\u30b7\u30e5\u3002\uff080x003b, \u5341\u9032\u6570\u3060\u3068 59\uff09\\n\\n\u3053\u3053\u3067\u306f\u300159 \u304c\u51fa\u305f\u306e\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u304c\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306b\u6b21\u306e\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u306f\u3069\u3053\u306b\u3042\u308b\u306e\u304b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b\u304b\u3089\u3002\u3053\u306e 59 \u306f retrieve()\u304c\u30b9\u30bf\u30fc\u30c8\u5730\u70b9\u306f 59 \u3092\u610f\u5473\u3057\u3066\u3044\u308b\u3002\\n\\n```\\nPUSH2 0x003b | 59 |\\n\\t\\t\\t\\t| 0 |\\n\\t\\t\\t\\t| 0x6057361d |\\n```\\n\\nJUMPI \u306f\u201djump if\u201d\u3092\u610f\u5473\u3059\u308b\u3002\u4e8c\u500b\u306e\u5024\u3092\u30dd\u30c3\u30d7\u3055\u305b\u3001\u4e00\u500b\u76ee\u306e\u5024\u306f 59 \u3067\u3001\u4e8c\u500b\u76ee\u306f 0\u3002\u4e8c\u500b\u76ee\u306e\u5024\u306f bool \u5024\u3067\u3053\u306e jump \u3092\u5b9f\u884c\u3059\u3079\u304d\u304b\u3092\u78ba\u5b9a\u3057\u3066\u3044\u308b\u30021 = true, 0 = false\u3002\\n\\n\u3082\u3057 true \u306e\u5834\u5408\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u306f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u5b9f\u884c\u306f\u305d\u3061\u3089\u3078 jump \u3059\u308b\u3002\u4eca\u56de\u306f false \u306a\u306e\u3067\u3001\u30b9\u30ad\u30c3\u30d7\u3002\\n\\n```\\nJUMPI | 0x6057361d |\\n```\\n\\nDUP1 again\\n\\n```\\nDUP1 | 0x6057361d |\\n | 0x6057361d |\\n```\\n\\nPUSH4 \u306f 4byte \u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\\n\\n```\\nPUSH4 0x6057361d | 0x6057361d |\\n\\t\\t\\t\\t\\t| 0x6057361d |\\n\\t\\t\\t\\t\\t| 0x6057361d |\\n```\\n\\n\u307e\u305f EQ \u3057\u3066\u3001\u4eca\u56de\u306f true \u306a\u306e\u3067\u3002\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u304c\u5408\u3063\u305f\u3002\\n\\n```\\nEQ | 1 |\\n\\t | 0x6057361d |\\n```\\n\\nJUMPI\u3001\u4eca\u56de\u306f true \u306a\u3093\u3067 jump \u3092\u5b9f\u884c\u3059\u308b\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u306f 89 \u3067\u3001\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u9055\u3046\u5834\u6240\u3078\u79fb\u52d5\u3002\\n\\n```\\nPUSH2 0x0059 | 89 |\\n\\t\\t\\t\\t| 1 |\\n\\t\\t\\t\\t| 0x6057361d |\\n```\\n\\n\u3053\u306e\u5834\u6240\u306b JUMPDEST \u30aa\u30da\u30b3\u30fc\u30c9\u304c\u3042\u308b\u3002\u3053\u308c\u304c\u306a\u3044\u3068\u5931\u6557\u3059\u308b\u3002\\n\\n```\\nJUMPI | 0x6057361d |\\n```\\n\\n\u305d\u3053\u3067\u7d42\u308f\u308a\u3002\u3053\u308c\u3067\u30aa\u30da\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u306f`store(uint156)`\u306e\u5834\u6240\u3078\u79fb\u52d5\u3067\u304d\u305f\u3002\\n\\n\u4eca\u56de\u306f\u4e8c\u500b\u306e\u95a2\u6570\u3057\u304b\u306a\u3044\u3082\u306e\u306e\u3001\u305f\u3068\u3048 20 \u500b\u306e\u95a2\u6570\u304c\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u30d7\u30ed\u30bb\u30b9\u306f\u4e00\u7dd2\u3002\\n\\n\u3053\u306e[\u30ea\u30f3\u30af](https://www.evm.codes/playground?unit=Wei&callData=0x6057361d000000000000000000000000000000000000000000000000000000000000000a&codeType=Mnemonic&code=%27%210%7E0KCALLDATALOAD%7E2z2qw%21E0%7E3KSHR%7E5z2qwDUP1%7E6%28X4_2E64CEC1%7E7KEQ%7E12z5qwX2_3B%7E13%28*I%7E16z3qwDUP1%7E17KX4_6057361D%7E18KEQ%7E23z5qwX2_59%7E24K*I%7E27z3qwkY+wX30_0%7E28KwZGV59z31q%211%7E60+%7BG%7DW%7DKwkYwX26_0%7E62z2qKZstore%7Buint256V89z27q%210+ZContinueW.KK%27%7E+ZOffset+z+%7Bprevious+instruFoccupies+w%5Cnq%29s%7DwkZThes-ar-just+paddingNenabl-usNgetN_+0xZ%2F%2F+Yprogram+counter+59+%26+89XPUSHW+funFexecution...V%7D%29codew*DEST%7EN+to%28wwGretrieve%7BFction+-e+*JUMP%29+byte%28+K%21X1_%01%21%28%29*-FGKNVWXYZ_kqwz%7E_&fork=merge)\u306f\u975e\u5e38\u306b\u304a\u3059\u3059\u3081\u3002\u89e6\u3063\u3066\u307f\u308b\u3068\u5409\u3002\\n\\nEVM \u306e\u30b9\u30bf\u30c3\u30af\u30fb\u30e1\u30e2\u30ea\u30fb\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u3066\u304f\u308c\u308b\u3002\\n\\n## Reference\\n\\n[EVM Deep Dives: The Path to Shadowy Super Coder \ud83e\udd77 \ud83d\udcbb - Part 1](https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy)"},{"id":"checks-effects-interactions","metadata":{"permalink":"/blog/checks-effects-interactions","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/checks-effects-interactions/2023-1-10-checks-effects-interactions.md","source":"@site/blog/checks-effects-interactions/2023-1-10-checks-effects-interactions.md","title":"CEI\u3068\u306f : Checks Effects Interactions","description":"Hello, everybody!","date":"2023-01-10T00:00:00.000Z","formattedDate":"2023\u5e741\u670810\u65e5","tags":[{"label":"checks-effects-interactions","permalink":"/blog/tags/checks-effects-interactions"},{"label":"Etheruem","permalink":"/blog/tags/etheruem"},{"label":"blockchain","permalink":"/blog/tags/blockchain"},{"label":"hack","permalink":"/blog/tags/hack"}],"readingTime":1.954,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"checks-effects-interactions","title":"CEI\u3068\u306f : Checks Effects Interactions","authors":["Thurendous","Polymetis"],"blogDescription":"checks-effects-interactions","tags":["checks-effects-interactions","Etheruem","blockchain","hack"]},"prevItem":{"title":"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1","permalink":"/blog/EVM-deep-dive-part1"},"nextItem":{"title":"\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u3092\u4e8b\u4f8b\u3067\u7406\u89e3\u3059\u308b","permalink":"/blog/Zero-knowledge-proofs-explained-by-examples"}},"content":"Hello, everybody!\\n\\nEVM \u306e\u30a4\u30f3\u30bf\u30e9\u30af\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u306f\u3001\u5916\u90e8\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u547c\u3073\u51fa\u3059\u3068\u304d\u306b\u3001\u4e3b\u5c0e\u6a29\u306f\u5168\u90e8\u5916\u90e8\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u63e1\u308b\u3053\u3068\u3068\u306a\u308a\u3001\u5371\u967a\u304c\u30b1\u30fc\u30b9\u304c\u3042\u308b\u3002\u3082\u3057\u305d\u306e\u5916\u90e8\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u60aa\u610f\u306e\u3042\u308b\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\u3001\u60aa\u7528\u3055\u308c\u308b\u30ea\u30b9\u30af\u306b\u3055\u3089\u3055\u308c\u308b\u3002\\n\\n![](printmoney.gif)\\n\\nEVM(Ethereum Virtual Machine) \u306e\u4e16\u754c\u3067\u306f\u3001Re-entrancy \u306e\u653b\u6483\u3068\u3044\u3046\u306e\u304c\u3042\u308b\u3002\\n\\n\u307e\u3055\u306b\u3053\u306e\u653b\u6483\u624b\u6cd5\u304c\u53d6\u3089\u308c\u308b\u3053\u3068\u304c\u3042\u308b\u3002\\n\\n\u653b\u6483\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u4f55\u5ea6\u3082\u5165\u308a\u8fbc\u3093\u3067\u3001\u30c1\u30a7\u30c3\u30af\u3059\u308b\u6761\u4ef6\u304c\u53cd\u6620\u3055\u308c\u308b\u524d\u306b\u306a\u3093\u3069\u3082\u540c\u3058\u64cd\u4f5c\u3092\u3055\u308c\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u3084\u308a\u53e3\u3067\u3042\u308b\u3002\u672c\u6765\u306a\u3089\u4e00\u5ea6\u306e\u307f\u547c\u3070\u308c\u308b\u3082\u306e\u304c\u4f55\u5ea6\u3082\u30c1\u30a7\u30c3\u30af\u3092\u629c\u3051\u3066\u547c\u3070\u308c\u308b\u3068\u4e88\u671f\u3057\u306a\u3044\u6319\u52d5\u306b\u306a\u3063\u305f\u308a\u3057\u3066\u3001\u8cc7\u7523\u304c\u76d7\u307e\u308c\u305f\u308a\u3059\u308b\u3002\\n\\n\u3053\u306e\u653b\u6483\u624b\u6cd5\u306f\u6614\u306e [The DAO \u4e8b\u4ef6](https://www.gemini.com/cryptopedia/the-dao-hack-makerdao)\u304c\u3084\u3089\u308c\u305f\u624b\u6cd5\u3067\u3082\u3042\u308b\u3002\u6b74\u53f2\u306b\u6b8b\u308b\u5927\u4e8b\u4ef6\u3060\u3002\\n\\n\u4ed6\u306e\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u74b0\u5883\u3067\u306f\u8d77\u3053\u3089\u306a\u3044\u3088\u3046\u8106\u5f31\u6027\u3060\u3002\u3053\u308c\u306f\u65b0\u3057\u3044\u958b\u767a\u8005\u3060\u3068\u3084\u308a\u304c\u3061\u306a\u30df\u30b9\u306b\u306a\u308b\u3002\\n\\n\u3053\u306e\u3088\u3046\u306a\u72b6\u6cc1\u306b\u304a\u3044\u3066\u3001Checks-Effects-Interactions \u3092\u9069\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002\\n\\n- \u5916\u90e8\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u547c\u3073\u51fa\u3059\u306e\u306f\u907f\u3051\u3089\u308c\u306a\u3044\\n- Re-entrancy \u653b\u6483\u3092\u907f\u3051\u305f\u3044\\n\\n## \u5b9f\u88c5\\n\\n- \u307e\u305a\u3001check\\n\\n\u95a2\u6570\u3092\u547c\u3073\u51fa\u3057\u3066\u307e\u305a\u5b9f\u884c\u3059\u308b\u6761\u4ef6\u3092\u30c1\u30a7\u30c3\u30af\uff08\u4f8b\u3048\u3070\u5341\u5206\u306a\u8cc7\u91d1\u3092\u3082\u3063\u3066\u3044\u308b\u304b\uff09\u3002\\n\\n- \u6b21\u3001effect\\n\\n\u305d\u306e\u6b21\u306b\u3059\u3079\u3066\u306e\u72b6\u614b\u5909\u6570\u3092\u66f4\u65b0\u3059\u3079\u304d\\n\\n- \u6700\u5f8c\u3001interaction\\n\\n\u6700\u5f8c\u306b\u5916\u90e8\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3068\u306e\u30a4\u30f3\u30bf\u30e9\u30af\u30b7\u30e7\u30f3\u3092\u3059\u3079\u304d\u3002\u5185\u90e8\u306e\u72b6\u614b\u304c\u5b8c\u5168\u306b\u66f4\u65b0\u3055\u308c\u305f\u5f8c\u306b\u3001\u521d\u3081\u3066\u5916\u90e8\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u547c\u3073\u51fa\u3059\u3002\\n\\n\u3053\u306e\u9806\u756a\u3055\u3048\u5b88\u308c\u3070\u3001Re-entrancy \u653b\u6483\u306f\u6700\u521d\u306e\u95a2\u9580\u3092\u304f\u3050\u308a\u306c\u3051\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002\\n\\n\u3082\u3057\u3001\u6700\u5f8c\u306b\u72b6\u614b\u306e\u5909\u66f4\u3092\u3059\u308b\u3068\u306a\u308b\u3068\u3001\u72b6\u614b\u5909\u66f4\u3055\u308c\u308b\u524d\u306b\u4f55\u56de\u3082\u540c\u3058\u95a2\u6570\u306e\u90e8\u5206\u304c\u547c\u3073\u51fa\u3055\u308c\u3066\u3057\u307e\u3044\u3001Re-entrancy \u653b\u6483\u306e\u7f60\u306b\u30cf\u30de\u3063\u3066\u3057\u307e\u3046\u3002\\n\\n## \u5b9f\u4f8b\\n\\n```sol\\npragma solidity 0.8.13;\\n\\n\\ncontract reentrancyVictim{\\n mapping(address => uint256) public balances;\\n uint256 public contractBalance;\\n\\n function payIn() public payable{\\n balances[msg.sender] += msg.value;\\n }\\n\\n function withdraw() public payable{\\n require(balances[msg.sender] > 0, \\"Insufficiant balance\\");\\n payable(msg.sender).call{value: balances[msg.sender]}(\\"\\");\\n balances[msg.sender] = 0;\\n }\\n\\n function updateContractBalance() public{\\n contractBalance = address(this).balance;\\n }\\n}\\n\\n```\\n\\n\u3053\u306e\u30b3\u30fc\u30c9\u306f\u4e00\u898b\u3057\u3066\u5927\u4e08\u592b\u306a\u3088\u3046\u306b\u898b\u3048\u308b\u304c\u3001`withdraw()`\u95a2\u6570\u306e 2 \u884c\u76ee\u306b\u5341\u5206\u306a\u8cc7\u7523\u304c\u3042\u308b\u304b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b\u3002\u6b21\u306b\u30a2\u30bb\u30c3\u30c8\u3092\u30e6\u30fc\u30b6\u30fc\u3078\u9001\u4ed8\u3057\u3066\u3044\u308b\u3002\u6700\u5f8c\u306b\u30d0\u30e9\u30f3\u30b9\u3092\u66f4\u65b0\u3057\u3066\u3044\u308b\u3002\\n\\n\u3053\u308c\u306f check-effect-interaction \u306e\u30eb\u30fc\u30eb\u3092\u5b88\u3063\u3066\u3044\u306a\u3044\u3002\\n\\n- check: ` require(balances[msg.sender] > 0, \\"Insufficiant balance\\");`\\n- interaction: `payable(msg.sender).call{value: balances[msg.sender]}(\\"\\");`\\n- effect: `balances[msg.sender] = 0;`\\n\\n\u3068\u306a\u3063\u3066\u304a\u308a\u3001effect \u3068 interaction \u306e\u9806\u756a\u304c\u9006\u3002\\n\\n\u305d\u306e\u7d50\u679c\u3001Re-entrancy \u653b\u6483\u304c\u53ef\u80fd\u3068\u306a\u308b\u3002\\n\\n\u5177\u4f53\u7684\u306a\u30b9\u30ad\u30fc\u30e0\u306f\u3053\u3093\u306a\u304b\u3093\u3058\uff1a\\n\\n![](reentrancy-attack-1.png)\\n\\nadjust funds \u306e\u524d\u306b\u3001\u4f55\u56de\u3082\u4f55\u56de\u3082\u8cc7\u7523\u304c\u629c\u304d\u51fa\u3055\u308c\u3066\u3001\u6700\u5f8c\u306b\u8cc7\u91d1\u304c\u305d\u3053\u3092\u3064\u304f\u3053\u3068\u306b\u306a\u308b\u3060\u308d\u3046\u3002\\n\\nAttacker \u306e\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\uff1a\\n\\n```sol\\npragma solidity 0.8.13;\\n\\n\\ncontract reentrancyAttack{\\n\\n address public victim;\\n uint256 public amount;\\n uint256 public counter;\\n\\n constructor(address _victim) payable{\\n victim = _victim;\\n amount = msg.value;\\n }\\n\\n receive() external payable{ // \u30a4\u30fc\u30b5\u53d7\u3051\u53d6\u308a\u7528\u306ereceive\u95a2\u6570\\n counter++;\\n attack();\\n }\\n\\n function payIn() public returns (bool success){\\n (bool success, bytes memory data) = payable(victim).call{value: amount}(abi.encodeWithSignature(\\"payIn()\\"));\\n }\\n\\n function withdrawAttack() public{\\n if(counter < 4){\\n // \u3082\u3046\u4e00\u5ea6withdraw\u3092\u547c\u3076\u7528\\n payable(victim).call(abi.encodeWithSignature(\\"withdraw()\\"));\\n }\\n }\\n}\\n```\\n\\n### \u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\\n\\n\u305d\u306e\u5bfe\u7b56\u3068\u3057\u3066\u306f\u3001\u5b9f\u306f\u3082\u306e\u3059\u3054\u304f\u30b7\u30f3\u30d7\u30eb\u306b`withdraw()`\u306e\u7b2c 3, 4 \u884c\u3092\u9006\u8ee2\u3055\u305b\u3066\u3001\u4fee\u6b63\u3092\u52a0\u3048\u308b\u3002\\n\\n```sol\\n function withdraw() public payable{\\n // check\\n require(balances[msg.sender] > 0, \\"Insufficiant balance\\");\\n // effect\\n uint256 payBalance = balances[msg.sender];\\n balances[msg.sender] = 0;\\n // interaction\\n (bool success, bytes memory data) = payable(msg.sender).call{value: payBalance}(\\"\\");\\n if(!success){ // catch the case where the send was unsuccesful\\n balances[msg.sender] = payBalance;\\n }\\n}\\n```\\n\\n\u3082\u3057\u3001success \u304c false \u306e\u5834\u5408\u3001\u30d0\u30e9\u30f3\u30b9\u3092\u5143\u901a\u308a\u306b\u623b\u3059\u64cd\u4f5c\u3092\u3057\u3066\u3044\u308b\u3002\\n// interaction \u306e\u884c\u306b\u304a\u3044\u3066 reenter \u3055\u308c\u3066\u3082\u3001\u3059\u3067\u306b\u30d0\u30e9\u30f3\u30b9\u306f\u30bc\u30ed\u306a\u306e\u3067\u3001revert \u3055\u308c\u3001\u554f\u984c\u306f\u306a\u304f\u306a\u3063\u305f\u3002\\n\\n**THE END**"},{"id":"Zero-knowledge-proofs-explained-by-examples","metadata":{"permalink":"/blog/Zero-knowledge-proofs-explained-by-examples","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/Zero-knowledge-proofs/2023-1-8-zero-knowledge-by-examples.md","source":"@site/blog/Zero-knowledge-proofs/2023-1-8-zero-knowledge-by-examples.md","title":"\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u3092\u4e8b\u4f8b\u3067\u7406\u89e3\u3059\u308b","description":"Hello, everybody!","date":"2023-01-08T00:00:00.000Z","formattedDate":"2023\u5e741\u67088\u65e5","tags":[{"label":"zero-knwoledge","permalink":"/blog/tags/zero-knwoledge"},{"label":"proof","permalink":"/blog/tags/proof"},{"label":"blockchain","permalink":"/blog/tags/blockchain"},{"label":"examples","permalink":"/blog/tags/examples"}],"readingTime":1.872,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"Zero-knowledge-proofs-explained-by-examples","title":"\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u3092\u4e8b\u4f8b\u3067\u7406\u89e3\u3059\u308b","authors":["Thurendous","Polymetis"],"blogDescription":"\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u3092\u4e8b\u4f8b\u3067\u7406\u89e3\u3059\u308b","tags":["zero-knwoledge","proof","blockchain","examples"]},"prevItem":{"title":"CEI\u3068\u306f : Checks Effects Interactions","permalink":"/blog/checks-effects-interactions"},"nextItem":{"title":"opcode\u306b\u3064\u3044\u3066","permalink":"/blog/opcode-basics"}},"content":"Hello, everybody!\\n\\n\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u8a00\u3046\u3068\u4eba\u306b\u79d8\u5bc6\u3092\u30d0\u30e9\u3059\u3053\u3068\u306a\u304f\u3001\u77e5\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u8a3c\u660e\u3067\u304d\u308b\u3053\u3068\u3002\\n\\n\u5999\u306a\u8a00\u3044\u65b9\u3092\u3057\u3066\u3044\u3066\u3001\u81ea\u5206\u3082\u306a\u304b\u306a\u304b\u3068\u3063\u3064\u304d\u306b\u304f\u3044\u3053\u3068\u3060\u3068\u601d\u3044\u307e\u3057\u305f\u3002\u4e8b\u4f8b\u3092\u901a\u3057\u3066\u7406\u89e3\u3059\u308b\u3068\u3001\u30d4\u30f3\u3068\u304f\u308b\u3053\u3068\u3082\u3042\u308b\u306e\u304b\u3082\u3057\u308c\u306a\u3044\u3002\\n![](urnotauthorizedtoknow.png)\\n\\n\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u306f\u975e\u5e38\u306b\u91cd\u8981\u3067\u3001\u3053\u308c\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u306e\u59a5\u5354\u3092\u3059\u308b\u3053\u3068\u306a\u304f\u3001\u306a\u306b\u304b\u3092\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\\n\\n- \u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3078\u30ed\u30b0\u30a4\u30f3\uff1a\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u304b\u308f\u308a\u306b\u3001\u81ea\u5206\u304c\u305d\u308c\u3092\u77e5\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u8a3c\u660e\u3059\u308c\u3070\u3088\u3044\\n- \u30a2\u30a4\u30c7\u30f3\u30c6\u30a3\u30c6\u30a3\u306e\u8a8d\u8a3c\uff1a\u672c\u540d\u3092\u30d0\u30e9\u3059\u304b\u308f\u308a\u306b\u3001\u30d7\u30eb\u30fc\u30d5\u3092\u9001\u308b\u3060\u3051\u3067\u6e08\u3080\\n- \u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\uff1a\u304a\u91d1\u3092\u30d1\u30d6\u30ea\u30c3\u30af\u306a\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u4e0a\u3067\u9001\u308b\u3088\u308a\u3082\u3001\u30d7\u30eb\u30fc\u30d5\u3067\u691c\u8a3c\u3059\u308b\u3053\u3068\u3067\u6e08\u3080\u3002\u4f8b\u3048\u3070\u3001Zcash \u306f\u3053\u306e\u4ed5\u7d44\u3067\u3042\u308b\u3002\\n\\n## \u4f8b\uff11\\n\\nAlice and Bob \u306f\u7d75\u672c\u306b\u3044\u308b Waldo \u306e\u5834\u6240\u3092\u63a2\u3059\u306e\u306b\u7af6\u3063\u3066\u3044\u308b\u3068\u3057\u3088\u3046\u3002\\n\\n![](findthisguy.png)\\n\\nAlice \u306f Waldo \u306e\u5c45\u5834\u6240\u306f\u898b\u3064\u304b\u3063\u305f\u3068\u8a00\u3044\u5f35\u3063\u3066\u3044\u308b\u3002\\nAlice \u306f\u5b9f\u969b\u306e\u5c45\u5834\u6240\u3092\u30d0\u30e9\u3059\u3053\u3068\u306a\u304f\u3001\u4f1d\u3048\u305f\u304f\u3066\u8272\u3005\u8003\u3048\u305f\u3002\\n\\n### Proof1\\n\\nAlice \u306f Waldo \u306e\u7834\u7247\u3092\u305d\u306e\u307e\u307e\u5207\u308a\u53d6\u3063\u3066 Bob \u306b\u898b\u305b\u308b\u3002Bob \u306f Alice \u306e\u5207\u308a\u53d6\u3063\u305f\u7834\u7247\u3001\u3042\u308b\u3044\u306f\u5207\u308a\u53d6\u3063\u305f\u5f8c\u306e\u7d75\u672c\u3092\u53c2\u8003\u306b\u7b54\u3048\u3092\u63a2\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002\\n\\n![](alicecutehon.png)\\n\\n### Proof2\\n\\nAlice \u306f\u5225\u306e\u7d19\u3092\u7d75\u672c\u306b\u304b\u3076\u305b\u3066\u3001Bob \u306b Waldo \u3060\u3051\u7a74\u3092\u958b\u3051\u3066\u3092\u898b\u305b\u308b\u3068\u3057\u3088\u3046\u3002\u3053\u306e\u5834\u5408\u3001Waldo \u304c\u5468\u308a\u306e\u6b63\u78ba\u306a\u98a8\u666f\u306b\u3044\u308b\u304b\u306f\u4e0d\u660e\u3067\u3001Alice \u306f\u305d\u306e\u98a8\u666f\u3092\u6b63\u3057\u304f\u8a3c\u660e\u3067\u304d\u308c\u3070\u8a3c\u660e\u3067\u304d\u308b\u3002\\n\\n![](alicecutimage.png)\\n\\n### \u5065\u5168\u6027\u3001\u5b8c\u5168\u6027\u3001\u30bc\u30ed\u77e5\u8b58\u306e\u5c5e\u6027\\n\\n\u3053\u306e\u4e8c\u7a2e\u985e\u306e\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306f\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u306e\uff13\u3064\u306e\u5c5e\u6027\u3067\u3042\u308b\u5065\u5168\u6027\u3001\u5b8c\u5168\u6027\u3001\u30bc\u30ed\u77e5\u8b58\u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u3068\u8a00\u3048\u3088\u3046\u3002\\n\\n1. \u5065\u5168\u6027\uff1a\u8a3c\u660e\u3067\u304d\u305f\u3089\u3001\u672c\u5f53\u306b\u306a\u308b\u3002Alice \u304c\u3082\u3057 Waldo \u306e\u5c45\u5834\u6240\u3092\u63a2\u305b\u306a\u304b\u3063\u305f\u3089\u3001\u30e9\u30f3\u30c0\u30e0\u306a\u30d4\u30fc\u30b9\u306b\u306a\u3063\u305f\u306b\u9055\u3044\u306a\u304f\u3001\u3059\u3050\u306b\u898b\u3064\u304b\u3063\u3066\u3044\u306a\u3044\u3068\u3070\u308c\u308b\u3060\u308d\u3046\u3002\\n2. \u5b8c\u5168\u6027\uff1a\u8a3c\u660e\u3067\u304d\u305f\u5834\u5408\u306f\u5fc5\u305a\u30d7\u30eb\u30fc\u30d5\u304c\u3042\u308b\u3002Waldo \u3092\u63a2\u305b\u305f\u5834\u5408\u3001\u5fc5\u305a Waldo \u3092\u898b\u305b\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002\\n3. \u30bc\u30ed\u77e5\u8b58\uff1a\u8a3c\u660e\u3055\u308c\u305f\u3053\u3068\u304c\u898b\u305b\u3089\u308c\u3066\u3044\u3066\u3001\u4e8b\u5b9f\u305d\u306e\u3082\u306e\u306f\u898b\u305b\u3066\u3044\u306a\u3044\u3002\u552f\u4e00\u898b\u305b\u305f\u4e8b\u5b9f\u306f Waldo \u306f\u898b\u3064\u304b\u3063\u305f\u3088\u3068\u3044\u3046\u3053\u3068\u3060\u3051\u3067\u3001\u3069\u306e\u5834\u6240\u306b\u3044\u308b\u304b\u3068\u304b\u306e\u60c5\u5831\u306f\u958b\u793a\u3057\u3066\u3044\u306a\u3044\u3002\\n\\n## \u4f8b 2\\n\\n\u3082\u3046\u4e00\u3064\u4f8b\u3092\u898b\u3066\u307f\u3088\u3046\u3002Alice \u306f\u8272\u76f2\u3067\u3001Bob \u306f\u305d\u3046\u3067\u306f\u306a\u3044\u3002\u3067\u3082 Alice \u306f Bob \u304c\u81ea\u5206\u306f\u8272\u76f2\u3067\u306a\u3044\u3053\u3068\u3092\u4fe1\u7528\u3067\u304d\u3066\u304a\u3089\u305a\u3001Bob \u306b\u8a3c\u660e\u3057\u3066\u307b\u3057\u3044\u3068\u601d\u3063\u3066\u3044\u308b\u3002\\n\\n\u305d\u3053\u3067\u6697\u53f7\u5c02\u9580\u5bb6\u306e\u5f7c\u5973\u306f\u3046\u307e\u304f\u8003\u3048\u3066\u5b9f\u9a13\u3092\u3057\u3060\u3057\u305f\u3002\\n\\nAlice \u306f\u9752\u3044\u30dc\u30fc\u30eb\u3068\u30ec\u30c3\u30c9\u306e\u30dc\u30fc\u30eb\u3092\u6301\u3063\u3066\u3044\u3066\u3001\u4f53\u306e\u5f8c\u308d\u306b\u3082\u3063\u3066\u3044\u304d\u3001\u30b7\u30e3\u30c3\u30d5\u30eb\u3057\u3066\u304b\u3089 Bob \u306b\u898b\u305b\u3064\u3064\u3001\u30dc\u30fc\u30eb\u304c\u5165\u3063\u3066\u3044\u308b\u624b\u304c\u5909\u308f\u3063\u305f\u306e\u304b\u306b\u3064\u3044\u3066\u5c0b\u306d\u308b\u3002\\n\u3053\u308c\u3092 20 \u56de\u304f\u3089\u3044\u7e70\u308a\u8fd4\u3059\u3053\u3068\u3067\u3001\u3082\u3057 Bob \u304c\u5168\u90e8\u6b63\u89e3\u3057\u3066\u3044\u305f\u3089\u3001\u305f\u307e\u305f\u307e Bob \u304c\u8272\u76f2\u3067\u3042\u308a\u3064\u3064\u3001\u6b63\u89e3\u3067\u304d\u305f\u78ba\u7387\u306f 1/1048576 \u304f\u3089\u3044\u3067\u7121\u8996\u3067\u304d\u308b\u306e\u3067\u3001\u307b\u307c\u4fe1\u983c\u306b\u5024\u3059\u308b\u3060\u308d\u3046\u3068 Alice \u306f\u8003\u3048\u305f\u3002\\n\\n![](AliceBobHandColor.png)\\n\\n**THE END**\\n\\n[0xSage \u3055\u3093\u306e\u8a18\u4e8b](https://medium.com/good-audience/understanding-zero-knowledge-proofs-through-simple-examples-df673f796d99)\u3092\u53c2\u8003\u306b\u629c\u7c8b\u30fb\u7ffb\u8a33\u3057\u305f\u308a\u3057\u3066\u3044\u308b\u3002"},{"id":"opcode-basics","metadata":{"permalink":"/blog/opcode-basics","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/opcode-basics/2023-1-8-opcode-basics.md","source":"@site/blog/opcode-basics/2023-1-8-opcode-basics.md","title":"opcode\u306b\u3064\u3044\u3066","description":"Hi Hi, never give up!","date":"2023-01-08T00:00:00.000Z","formattedDate":"2023\u5e741\u67088\u65e5","tags":[{"label":"opcode","permalink":"/blog/tags/opcode"},{"label":"Etheruem","permalink":"/blog/tags/etheruem"},{"label":"blockchain","permalink":"/blog/tags/blockchain"},{"label":"examples","permalink":"/blog/tags/examples"}],"readingTime":2.122,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"opcode-basics","title":"opcode\u306b\u3064\u3044\u3066","authors":["Thurendous","Polymetis"],"blogDescription":"opcode\u306b\u3064\u3044\u3066","tags":["opcode","Etheruem","blockchain","examples"]},"prevItem":{"title":"\u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u3092\u4e8b\u4f8b\u3067\u7406\u89e3\u3059\u308b","permalink":"/blog/Zero-knowledge-proofs-explained-by-examples"},"nextItem":{"title":"ERC1155\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","permalink":"/blog/what-is-ERC1155-with-code-explained"}},"content":"Hi Hi, never give up!\\n\\n\u3053\u3053\u3067\u306f\u3001opcode\uff08\u30aa\u30da\u30ec\u30fc\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\uff09\u306b\u3064\u3044\u3066\u8a9e\u308b\u306b\u306f EVM \u306b\u3064\u3044\u3066\u3082\u8a9e\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\\n\\n\u4ed6\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3068\u540c\u3058\u3088\u3046\u306b\u3001solidity \u306f\u30cf\u30a4\u30ec\u30d9\u30eb\u306a\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u3042\u308a\u3001\u4eba\u9593\u304c\u8aad\u307f\u3084\u3059\u3044\u4e00\u65b9\u3067\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306f\u7406\u89e3\u3067\u304d\u306a\u3044\u3002\u79c1\u9054\u304c geth \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u3001\u305d\u308c\u306b\u52a0\u3048\u3066 Ethereum Virtual Machine \u304c\u3064\u304d\u3082\u306e\u3068\u3057\u3066\u3064\u3044\u3066\u304f\u308b\u3002EVM \u3068\u306f\u8efd\u91cf\u7d1a\u306e OS \u307f\u305f\u3044\u306a\u3082\u306e\u3067\u3001\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u30e9\u30f3\u3059\u308b\u74b0\u5883\u3068\u3057\u3066\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u3002\\n\\nSolidity \u306e\u30b3\u30fc\u30c9\u3092 solc \u30b3\u30f3\u30d1\u30a4\u30e9\u3092\u4f7f\u3063\u3066 compile \u3059\u308b\u3068\u304d\u306b\u3001\u30b3\u30fc\u30c9\u3092\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306b\u5909\u63db\u3055\u308c\u308b\u3002EVM \u306f\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u304c\u7406\u89e3\u3067\u304d\u308b\u3002\\n\\n\u4e0b\u8a18\u306e\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u4f8b\u3092\u898b\u3066\u307f\u3088\u3046\u3002\\n\\n```sol\\npragma solidity ^0.4.11;\\ncontract MyContract {\\n uint i = (10 + 2) * 2;\\n}\\n```\\n\\n\u3053\u306e\u5834\u5408\u3001remix browser \u3067\u8d70\u3089\u305b\u305f\u5834\u5408\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e details \u3092\u898b\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u3046\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u60c5\u5831\u304c\u898b\u3048\u3066\u304f\u308b\u3002\\n![](contractdetails.png)\\n\\n\u3053\u306e\u30b1\u30fc\u30b9\u3067\u306f\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u305f\u30b3\u30fc\u30c9\u306f\uff1a\\n\\n```\\n60606040525b600080fd00a165627a7a7230582012c9bd00152fa1c480f6827f81515bb19c3e63bf7ed9ffbb5fda0265983ac7980029\\n```\\n\\n\u3053\u306e\u30c7\u30fc\u30bf\u306f\u30d8\u30af\u30b5\u30c7\u30b7\u30de\u30eb\u30c7\u30fc\u30bf\u3068\u3057\u3066\u73fe\u308c\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u6700\u7d42\u306e\u5f62\u3068\u306a\u3063\u3066\u3044\u308b\u3002\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u547c\u3070\u308c\u3066\u3044\u308b\u3082\u306e\u3060\u3002\\n\\n\u5b9f\u969b\u306b\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3068\u304d\u306b\u306f\u3001\u3053\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u3044\u308b\u3053\u3068\u3068\u30a4\u30b3\u30fc\u30eb\u3002\\n\\n\u30a6\u30a9\u30ec\u30c3\u30c8\u3042\u308b\u3044\u306f\u30a2\u30c9\u30ec\u30b9\u306e\u524d\u306b\u3042\u308b\\"0x\\"\u3068\u306f\u4f55\u3092\u610f\u5473\u3059\u308b\u306e\u3060\u308d\u3046\u304b\u3002\\"0x\\"\u304b\u3089\u30b9\u30bf\u30fc\u30c8\u3059\u308b\u3082\u306e\u306f\u3053\u308c\u306f EVM \u3068\u4f1a\u8a71\u3092\u3059\u308b\u306b\u306f\u3001EVM \u306f\u3069\u3093\u306a\u30c7\u30fc\u30bf\u3067\u3082 16 \u9032\u6570\u306e\u30c7\u30fc\u30bf\u3068\u3057\u3066\u6271\u3046\u306e\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3060\u304b\u3089\u3067\u3042\u308b\u3002\\n\\nopcode \u3082\u3042\u308b\u3002\\n\\n```\\nPUSH1 0x60 PUSH1 0x40 MSTORE PUSH1 0x18 PUSH1 0x0 SSTORE CALLVALUE ISZERO PUSH1 0x13 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST JUMPDEST PUSH1 0x36 DUP1 PUSH1 0x21 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x60 PUSH1 0x40 MSTORE JUMPDEST PUSH1 0x0 DUP1 REVERT STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 SLT 0xc9 0xbd STOP ISZERO 0x2f LOG1 0xc4 DUP1 0xf6 DUP3 PUSH32\\n```\\n\\nopcode \u306e\u60c5\u5831\u306b\u3064\u3044\u3066\u306f\u3001[yellow paper](http://gavwood.com/paper.pdf) \u306b\u66f8\u304b\u308c\u3066\u3044\u308b\u3002\\n\\nEVM \u306f\u30b9\u30bf\u30c3\u30af\u30de\u30b7\u30f3\u3067\u3042\u308b\u3002\\n\\n\u7c21\u5358\u306b\u7406\u89e3\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002\\n\\n\u307e\u305a\u3053\u306e\u30eb\u30fc\u30eb\u306f\u4f1d\u7d71\u7684\u306a\u30d1\u30bd\u30b3\u30f3\u306e [LIFO](https://techterms.com/definition/filo) \u3068\u540c\u3058\u3067\u3042\u308b\u3002\\n\\n\u901a\u5e38\u306e\u8a08\u7b97\u306e\u5834\u5408\uff1a\\n\\n```\\n10 + 2 * 2\\n// \u7b54\u3048\u306f14\\n\\n```\\n\\n```\\n// stack machine\u306e\u5834\u5408\\n2 2 * 10 +\\n```\\n\\n\u4e0a\u8a18\u306f\u30b9\u30bf\u30c3\u30af\u30de\u30b7\u30f3\u306e\u5834\u5408\u3067\u3001\u307e\u305a\uff12\u3092\u3044\u308c\u3066\u6b21\u306e\uff12\u3092\u5165\u308c\u3066\u3001\u6b21\u306b\u4e57\u6cd5\u8a18\u53f7\u306e\\\\*\u3092\u3044\u308c\u3066\u3001\u8a08\u7b97\u3057 4 \u306b\u306a\u308a\u3001\u6b21\u306b 10\u3001\u6700\u5f8c\u306b\u30d7\u30e9\u30b9\u8a18\u53f7\u3067\u52a0\u6cd5\u8a08\u7b97\u3057\u3066\u300114 \u306b\u306a\u308b\u3002\\n\\n\u3053\u308c\u3067 14 \u306e\u7d50\u679c\u306b\u306a\u308b\u3002\\n\\n\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u547d\u4ee4\u306f`PUSH`\u3068\u3044\u3044\u3001\u30b9\u30bf\u30c3\u30af\u304b\u3089\u9664\u5916\u3059\u308b\u547d\u4ee4\u306f`POP`\u3068\u3044\u3046\u3002\u4e00\u756a\u826f\u304f\u898b\u308b\u30d1\u30bf\u30fc\u30f3\u3068\u3057\u3066\u306f\u3001`PUSH1`\u304c\u3042\u308a\u3001\u305d\u308c\u306f 1byte \u306e\u30c7\u30fc\u30bf\u3092\u30b9\u30bf\u30c3\u30af\u306b\u3044\u308c\u308b\\n\\n```\\nPUSH1 0x60\\n```\\n\\n\u3053\u308c\u306f 1byte \u306e\u30c7\u30fc\u30bf\u3068\u3057\u3066`0x60`\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u3057\u3066\u3001`PUSH1`\u306e 16 \u9032\u6570\u8868\u793a\u306f\u5076\u7136\u306b`0x60`\u3068\u540c\u3058\u3002\u3053\u3053\u3067\u30010x \u3092\u9664\u5916\u3059\u308b\u3068\u3001`6060`\u306b\u306a\u308b\u3002\\n\\n```\\nPUSH1 0x60 PUSH1 0x40 MSTORE\\n```\\n\\nMSTORE \u306f\uff12\u3064\u306e\u5165\u529b\u304c\u6c42\u3081\u3089\u308c\u3001output \u306a\u3057\u3002\u306a\u306e\u3067\u3001\u4e0a\u8a18\u306e\u89e3\u91c8\u3092\u3059\u308b\u3068\u3001\\n\\n1. PUSH1(0x60): put 0x60 in the stack\\n2. PUSH1(0x40): put 0x40 in the stack\\n3. MSTORE(0x52): allocate 0x60 of memory space and move to the 0x40 position\\n\\n\u5b9f\u306f\u3044\u3064\u3082\u540c\u3058\u3088\u3046\u306a\u30de\u30b8\u30c3\u30af\u30ca\u30f3\u30d0\u30fc`6060604052`\u3092\u898b\u308b\u306e\u306f\u3001solidity bytecode \u306e\u8a98\u5c0e\u306e\u59cb\u307e\u308a\u3060\u304b\u3089\u3060\u3002\\n\\n\u307e\u305f\u3001\u5b9f\u306f 16 \u9032\u6570\u3068\u3044\u3046\u3053\u3068\u306f\u300110 \u9032\u6570\u3067\u8003\u3048\u308b\u3068\u300140 \u306f 64 \u3067 60 \u306f 96 \u306b\u306a\u3063\u3066\u3044\u308b\u3002\\n\\n\u201cPUSH1 0x60 PUSH1 0x40 MSTORE\u201d\u304c\u3084\u3063\u3066\u3044\u308b\u306e\u306f\u300196bytes \u306e\u30e1\u30e2\u30ea\u30fc\u3092 allocate \u3057\u3001\u30dd\u30a4\u30f3\u30bf\u30fc\u3092 64 \u500b\u76ee\u306e\u30d0\u30a4\u30c8\u306e\u958b\u59cb\u4f4d\u7f6e\u306b\u79fb\u52d5\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u3002\\n\\n\u3053\u308c\u3067\u300164byte \u306e\u30b9\u30af\u30e9\u30c3\u30c1\u30b9\u30da\u30fc\u30b9\u3068 32byte \u306e\u4e00\u6642\u7684\u306a\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u305f\u3002\\n\\nEVM \u306b\u304a\u3044\u3066\u30013 \u7a2e\u985e\u306e\u30c7\u30fc\u30bf\u4fdd\u5b58\u9818\u57df\u304c\u3042\u308b\u3002\\n\\n- \u4eca\u7d39\u4ecb\u3057\u305f\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u5834\u6240\\n- RAM \u306e\u30e1\u30e2\u30ea\u30fc\u9818\u57df\u3067\u3001MSTORE \u306e opcode \u306e\u3068\u3053\u308d\\n- SSTORE \u306e\u6c38\u4e45\u4fdd\u5b58\u9818\u57df\uff08\u3068\u3066\u3082\u30ac\u30b9\u4ee3\u304c\u304b\u304b\u308b\uff09\\n\\n\u305d\u3057\u3066\u3001Assembly Language \u3092\u4f7f\u3063\u3066\u3001\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u304b\u3051\u308b\u3002\u3053\u308c\u306b\u3088\u3063\u3066 opcode \u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3002\u7d50\u69cb\u96e3\u3057\u3044\u3051\u3069\u3001\u6709\u7528\u306a\u3068\u304d\u3082\u3042\u308b\u3002solidity \u306e\u307f\u3067\u306f\u3067\u304d\u306a\u3044\u3088\u3046\u306a\u3053\u3068\u3082\u3067\u304d\u3066\u3057\u307e\u3046\u3002\\n\\n**THE END**\\n\\n[Bernard \u3055\u3093\u306e\u8a18\u4e8b](https://medium.com/@blockchain101/solidity-bytecode-and-opcode-basics-672e9b1a88c2)\u3092\u53c2\u8003\u306b\u629c\u7c8b\u30fb\u7ffb\u8a33\u3057\u305f\u308a\u3057\u3066\u3044\u308b\u3002"},{"id":"what-is-ERC1155-with-code-explained","metadata":{"permalink":"/blog/what-is-ERC1155-with-code-explained","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/ERC1155/2022-12-25-about-private-var.md","source":"@site/blog/ERC1155/2022-12-25-about-private-var.md","title":"ERC1155\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","description":"BYAC","date":"2022-12-25T00:00:00.000Z","formattedDate":"2022\u5e7412\u670825\u65e5","tags":[{"label":"ERC1155","permalink":"/blog/tags/erc-1155"},{"label":"ERC721","permalink":"/blog/tags/erc-721"},{"label":"NFT","permalink":"/blog/tags/nft"},{"label":"FT","permalink":"/blog/tags/ft"},{"label":"solidity","permalink":"/blog/tags/solidity"}],"readingTime":7.39,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"what-is-ERC1155-with-code-explained","title":"ERC1155\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","authors":["Thurendous","Polymetis"],"blogDescription":"ERC1155\u3068\u306f\u306a\u3093\u305e\u3084","tags":["ERC1155","ERC721","NFT","FT","solidity"]},"prevItem":{"title":"opcode\u306b\u3064\u3044\u3066","permalink":"/blog/opcode-basics"},"nextItem":{"title":"solidity\u306b\u304a\u3044\u3066\u306a\u305cprivate\u306a\u5909\u6570\u306fprivate\u3067\u306f\u306a\u3044\u306e\u304b","permalink":"/blog/private-variable-in-solidity-with-code-explained"}},"content":"![BYAC](whatiserc1155.gif)\\n\\n# TL;DR\\n\\n- ERC721 \u306f\u4e00\u7a2e\u306e NFT \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u306e\u306b\u5bfe\u3057\u3001ERC1155 \u306f\u8907\u6570\u306e NFT \u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30a4\u30e1\u30fc\u30b8\u3067\u3059\u3002\\n- ERC1155 \u306e ERC721 \u3068\u306e\u9055\u3044\\n - token id \u306f\u7a2e\u985e\u3092\u898f\u5b9a\u3057\u3001id \u3054\u3068\u306b amount \u3068\u3044\u3046\u6570\u91cf\u3092\u5b9a\u7fa9\u3057\u305f\\n - \u30d0\u30c3\u30c1\u51e6\u7406\u3092\u5b9f\u88c5\u3057\u305f\\n- \u4eca\u56de\u306f ERC1155 \u306e\u30b3\u30fc\u30c9\u89e3\u8aac\u3092\u3057\u305f\\n\\n# EIP1155\\n\\nERC20 \u306b\u3057\u308d ERC721 \u306b\u3057\u308d\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3054\u3068\u306b\u4e00\u7a2e\u306e\u30b3\u30a4\u30f3\u306b\u3057\u304b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001\u6211\u3005\u304c\u30dd\u30b1\u30e2\u30f3\u306e\u30b2\u30fc\u30e0\u3092\u4f5c\u308d\u3046\u3068\u3059\u308b\u3068\u3001ERC21 \u3042\u308b\u3044\u306f ERC721 \u3092\u4f7f\u3046\u3068\u88c5\u5099\u3054\u3068\u306b\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u30c7\u30d7\u30ed\u30a4\u3057\u306a\u3044\u3068\u884c\u3051\u306a\u3044\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u4e00\u5343\u7a2e\u985e\u306e\u30a2\u30a4\u30c6\u30e0\u304c\u3042\u308b\u3068\u3059\u308b\u3068\u3001\u4e00\u5343\u500b\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u4f5c\u3089\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u306f\u3068\u3093\u3067\u3082\u306a\u3044\u3053\u3068\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u8ab2\u984c\u3092\u89e3\u6c7a\u3059\u304f\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u306e [EIP1155](https://eips.ethereum.org/EIPS/eip-1155) \u3067\u306f\u3001\u4e00\u500b\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u8907\u6570\u306e FT \u3042\u308b\u3044\u306f NFT \u3092\u542b\u3081\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u7279\u306b GameFi \u306e\u30b1\u30fc\u30b9\u3067\u306f\u975e\u5e38\u306b\u6709\u7528\u3067\u3059\u3002\\n\\n\u30b7\u30f3\u30d7\u30eb\u306b\u8a00\u3046\u3068\u3001ERC1155 \u306f\u524d\u306b\u7d39\u4ecb\u3057\u305f NFT \u306e token \u30b9\u30bf\u30f3\u30c0\u30fc\u30c9 ERC721 \u3068\u4f3c\u3066\u3044\u308b\uff1aERC721 \u3067\u306f\u3001token \u3054\u3068\u306b`tokenId`\u3092\u6301\u3063\u3066\u304a\u308a\u3001\u3053\u306e id \u304c\u30e6\u30cb\u30fc\u30af\u3067\u3059\u3002`tokenId`\u306f\u4e00\u500b\u306e token \u3092\u4ee3\u8868\u3057\u3066\u3044\u308b\u3002\u305d\u308c\u306b\u5bfe\u3057\u3066\u3001ERC1155 \u306e\u5834\u5408\u306f\u3001token \u3054\u3068\u306b id \u304c\u30e6\u30cb\u30fc\u30af\u3060\u304c\u3001id \u3054\u3068\u306b\u6570\u91cf\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u3002\u3053\u308c\u3067\u3001\u8907\u6570\u306e\u7a2e\u985e\u306e token \u306f\u540c\u3058\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u5185\u3067\u7ba1\u7406\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u69d8\u306b\u306a\u308a\u307e\u3057\u305f\u3002\\n\\n\u7a2e\u985e\u3054\u3068\u306b URI \u304c\u5b58\u5728\u3057\u3066\u3044\u3066\u3001matadata \u3092\u4fdd\u5b58\u3057\u3066\u3044\u307e\u3059\u3002ERC721 \u306e URI \u3068\u985e\u4f3c\u3059\u308b\u304c\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001ERC1155 \u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\uff1a\\n\\n```sol\\n/**\\n * @dev ERC1155\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3001URI()\u3067metadata\u3092\u8fd4\u3059\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev id\u306eURI\u3092\u8fd4\u3059\\n */\\n function uri(uint256 id) external view returns (string memory);\\n```\\n\\n\u3067\u306f\u3001\u3069\u306e\u3088\u3046\u306b\u30c8\u30fc\u30af\u30f3\u306f FT \u304b NFT \u3092\u533a\u5225\u3059\u308b\u306e\u304b\uff1f\u7b54\u3048\u7c21\u5358\u3060\u3001id \u306e\u6570\u91cf\u304c 1 \u306e\u5834\u5408\u3067\u3059\u3068\u3001\u3053\u308c\u306f NFT \u3067\u3042\u308a\u3001ERC721 \u3068\u4f3c\u3066\u3044\u308b\u3002\u3082\u3057 id \u306b\u5bfe\u5fdc\u3059\u308b token \u306e\u6570\u91cf\u304c 1 \u3088\u308a\u5927\u304d\u3044\u5834\u5408\u3001\u305d\u308c\u306f FT \u3068\u306a\u308b\u3002\u540c\u3058 id \u3092\u5171\u6709\u3057\u3066\u3044\u308b\u306e\u3067\u3001ERC20 \u306b\u985e\u4f3c\u3057\u307e\u3059\u3002\\n\\n# IERC1155 \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\\n\\nERC1155 \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306f EIP1155 \u306e\u5b9f\u73fe\u3059\u3079\u304d\u6a5f\u80fd\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u4e2d\u3067\u30014 \u3064\u306e\u30a4\u30d9\u30f3\u30c8\u3068 6 \u500b\u306e\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002ERC721 \u3068\u306e\u9055\u3044\u3068\u3057\u3066\u306f\u3001ERC1155 \u306f\u8907\u6570\u306e\u7a2e\u985e\u306e token \u3092\u542b\u307e\u308c\u307e\u3059\u3002\u307e\u305f\u3001\u30d0\u30c3\u30c1\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3001\u30d0\u30c3\u30c1\u30d0\u30e9\u30f3\u30b9\u30c1\u30a7\u30c3\u30af\u306e\u6a5f\u80fd\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002\\n\\n```sol\\n// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\"https://github.com/AmazingAng/WTF-Solidity/blob/main/40_ERC1155/IERC1155.sol\\";\\n\\n/**\\n * @dev ERC1155\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3001EIP1155\u3067\u6c42\u3081\u3089\u308c\u305f\u6a5f\u80fd\u3092\u5b9a\u7fa9\\n * \u8a73\u7d30\uff1ahttps://eips.ethereum.org/EIPS/eip-1155[EIP].\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev \u5358\u4e00\u306a\u7a2e\u985e\u306etoken\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u30a4\u30d9\u30f3\u30c8\\n * `value`\u500b\u306e`id`\u7a2e\u985e\u306etoken\u304c`operator`\u306b\u3088\u3063\u3066`from`\u304b\u3089`to`\u3078\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u30a4\u30d9\u30f3\u30c8\\n * ids, values\u306f\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3059\u308btoken\u306e\u7a2e\u985e\u3001\u6570\u91cf\u306e\u914d\u5217\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u30a2\u30d7\u30eb\u30fc\u30d6\\n * `account`\u304c\u3059\u3079\u3066\u306e\u6a29\u9650\u3092`operator`\u306b\u79fb\u8b72\u3059\u308b\u3068\u304d\u306b\u653e\u51fa\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev `id`\u306etoken\u306eURI\u304c\u5909\u66f4\u3068\u306a\u3063\u305f\u3068\u304d\u3001\u653e\u51fa\u3002`value`\u306f\u65b0\u305f\u306aURI\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev \u30d0\u30e9\u30f3\u30b9\u3092\u8fd4\u3059\uff0c`account`\u304c\u6301\u3063\u3066\u3044\u308b`id`\u306etoken\u306e\u6b8b\u9ad8\u3092\u8fd4\u3059\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u3067\u8907\u6570\u30d0\u30e9\u30f3\u30b9\u3092\u8fd4\u3059\u3002`accounts`\u306e\u914d\u5217\u3068`ids`\u914d\u5217\u306elength\u304c\u30a4\u30b3\u30fc\u30eb\u3067\u306a\u3044\u3068\u3044\u3051\u306a\u3044\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n returns (uint256[] memory);\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u3067\u8907\u6570\u30a2\u30d7\u30eb\u30fc\u30d6\uff0ccaller\u306etoken\u306e\u6a29\u9650\u3092`operator`\u306b\u6e21\u3059\\n * {ApprovalForAll}\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u3067\u30a2\u30d7\u30eb\u30fc\u30d6\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001bool\u3092\u8fd4\u3059\u3002`operator`\u304c`account`\u306b\u3088\u3063\u3066\u30a2\u30d7\u30eb\u30fc\u30d6\u3055\u308c\u305f\u5834\u5408\uff0c`true`\u3092\u8fd4\u3059\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev \u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3001`amount`\u6570\u91cf\u306e`id`\u7a2e\u985e\u306etoken\\n * {TransferSingle}\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n * \u6761\u4ef6\uff1a\\n * - caller\u304cowner\u3067\u306f\u306a\u3044\u5834\u5408\u3001\u6a29\u9650\u3082\u3063\u3066\u3044\u306a\u3044\u3068\u4f7f\u3048\u306a\u3044\\n * - `from`\u306f\u5341\u5206\u306atoken\u3092\u3082\u3063\u3066\u3044\u308b\\n * - \u9001\u308a\u5148\u304c\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\uff0c`IERC1155Receiver`\u306e`onERC1155Received`\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u306a\u3044\u3068\u901a\u3089\u306a\u3044\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\\n * {TransferBatch}\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n * \u6761\u4ef6\uff1a\\n * - `ids`\u3001`amounts`\u306elength\u304c\u540c\u3058\\n * - \u9001\u308a\u5148\u304c\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\uff0c`IERC1155Receiver`\u306e`onERC1155Received`\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u306a\u3044\u3068\u901a\u3089\u306a\u3044\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\\n```\\n\\n# ERC1155 \u306e\u30a4\u30d9\u30f3\u30c8\\n\\n- `TransferSingle` event: \u5358\u4e00\u306a\u7a2e\u985e\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u30a4\u30d9\u30f3\u30c8\u3001\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u304c\u8d77\u304d\u305f\u3068\u304d\u306b\u653e\u51fa\\n- `TransferBatch` event: \u30d0\u30c3\u30c1\u30c8\u30fc\u30af\u30f3\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306e\u30a4\u30d9\u30f3\u30c8\u3001\u30d0\u30c3\u30c1\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u304c\u8d77\u304d\u305f\u3068\u304d\u306b\u653e\u51fa\\n- `ApprovalForAll` event: \u30d0\u30c3\u30c1\u30a2\u30d7\u30eb\u30fc\u30d6\u306e\u30a4\u30d9\u30f3\u30c8\u3001\u30d0\u30c3\u30c1\u30a2\u30d7\u30eb\u30fc\u30d6\u304c\u8d77\u304d\u305f\u3068\u304d\u306b\u653e\u51fa\\n- `URI` event: metadata \u306e\u30a2\u30c9\u30ec\u30b9\u5909\u66f4\u306e\u30a4\u30d9\u30f3\u30c8\u3001`uri`\u5909\u66f4\u6642\u306b\u653e\u51fa\\n\\n# IERC1155\\n\\n- `balanceOf()`: \u5358\u4e00\u306a\u7a2e\u985e\u306e\u6b8b\u9ad8\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002`account`\u306e\u6301\u3063\u3066\u3044\u308b`id`\u7a2e\u985e\u306e token \u306e\u30d0\u30e9\u30f3\u30b9\\n- `balanceOfBatch()`: \u591a\u7a2e\u985e\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u30c1\u30a7\u30c3\u30af\u3002\u30c1\u30a7\u30c3\u30af\u3059\u308b`accounts`\u304c`ids`\u3068\u306e length \u304c\u540c\u3058\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308b\\n- `setApprovalForAll()`: \u30d0\u30c3\u30c1\u30a2\u30d7\u30eb\u30fc\u30d6\u3001caller \u306e token \u3092 operator \u306b\u6a29\u9650\u3092\u79fb\u8b72\u3059\u308b\\n- `isApprovalForAll()`: \u30d0\u30c3\u30c1\u30a2\u30d7\u30eb\u30fc\u30d6\u306e\u60c5\u5831\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002`operator`\u304c`account`\u306b\u3088\u3063\u3066\u6a29\u9650\u3092\u3082\u3089\u3063\u3066\u3044\u308b\u5834\u5408\u306f`true`\u3092\u8fd4\u3059\\n- `safeTransferFrom()`: \u30bb\u30fc\u30d5\u306a\u5358\u4e00\u306e token \u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3002`amount`\u6570\u91cf\u306e`id`\u7a2e\u985e\u306e token \u3092`from`\u304b\u3089\u3001`to`\u3078\u9001\u308b\u3002`to`\u304c\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\u3001`onERC1155BatchReceived()`\u95a2\u6570\u306e\u5b9f\u88c5\u304c\u3042\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3055\u308c\u308b\u3002\\n\\n# ERC1155 \u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306b\u3001\u7528\u610f\u3059\u308b\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5f62\\n\\n`ERC721`\u3068\u540c\u3058\u3088\u3046\u306b\u3001NFT \u3092\u9001\u3063\u3066\u30ed\u30c3\u30af\u3055\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u3092\u907f\u3051\u308b\u305f\u3081\u306b\u3001`ERC1155`\u306f\u53d7\u3051\u53d6\u308b\u5074\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b`IERC1155Receiver`\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u7d99\u627f\u3057\u30012 \u3064\u306e\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002\\n\\n- `onERC1155Recieved()`: \u5358\u4e00\u306a\u7a2e\u985e\u306e token \u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306e\u95a2\u6570\u3002ERC1155 \u306e\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3067\u3042\u308b`safeTransferFrom`\u95a2\u6570\u304b\u3089\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3092\u53d7\u3051\u308b\u305f\u3081\u306b\u306f\u3001\u81ea\u5206\u81ea\u8eab\u306e selector \u3067\u3042\u308b`0xf23a6e61`\u3092\u8fd4\u3059\\n- `onERC1155BatchReceived()`: \u8907\u6570\u7a2e\u985e\u306e token \u3092\u53d7\u3051\u53d6\u308b\u7528\u306e\u95a2\u6570\u3002`ERC1155`\u306e\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1`safeBatchTransferFrom`\u304b\u3089\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306b\u3001\u81ea\u5206\u81ea\u8eab\u3067 selector`0xbc197c81`\u3092\u8fd4\u3059\u5fc5\u8981\u304c\u3042\u308b\u3002\\n\\n```sol\\n// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\"https://github.com/AmazingAng/WTFSolidity/blob/main/34_ERC721/IERC165.sol\\";\\n\\n/**\\n * @dev ERC1155\u3092\u53d7\u3051\u53d6\u308b\u305f\u3081\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3001ERC1155\u306etoken\u3092\u53d7\u3051\u53d6\u308b\u306b\u306f\u3053\u308c\u3092\u5b9f\u88c5\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev ERC1155\u306e`safeTransferFrom`\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3092\u53d7\u3051\u308b\\n * 0xf23a6e61 \u3042\u308b\u3044\u306f `bytes4(keccak256(\\"onERC1155Received(address,address,uint256,uint256,bytes)\\"))`\u3092\u8fd4\u3059\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev ERC1155\u306e`safeBatchTransferFrom`\u3092\u53d7\u3051\u308b\\n * 0xbc197c81 \u3042\u308b\u3044\u306f `bytes4(keccak256(\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\"))`\u3092\u8fd4\u3059\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n```\\n\\n# ERC1155 \u306e\u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\\n\\n\u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f`IERC1155`\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u898f\u5b9a\u306e\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002\u307e\u305f\u3001\u5358\u4e00\u306a\u7a2e\u985e/\u8907\u6570\u306e\u7a2e\u985e\u306e token \u306e\u30df\u30f3\u30c8\u3001\u30d0\u30fc\u30f3\u95a2\u6570\u3082\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002\\n\\n## \u72b6\u614b\u5909\u6570\u306f\uff14\u3064\\n\\n- `name`: token \u540d\\n- `symbol`: token \u30b7\u30f3\u30dc\u30eb\\n- `_balances`: token \u30d0\u30e9\u30f3\u30b9\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u3002`id`\u306e owner \u306e\u30a2\u30c9\u30ec\u30b9\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u8a18\u9332\\n- `_operatorApprovals`: \u30d0\u30c3\u30c1\u3067\u30a2\u30d7\u30eb\u30fc\u30d6\u3092\u3059\u308b\u305f\u3081\u306e\u30de\u30c3\u30d4\u30f3\u30b0\u3002\u6b8b\u9ad8\u3092\u6301\u3063\u3066\u3044\u308b\u30a2\u30c9\u30ec\u30b9\u306e\u30a2\u30d7\u30eb\u30fc\u30d6\u72b6\u614b\u3092\u8a18\u9332\\n\\n## ERC1155 \u95a2\u6570\\n\\n\u5168\u90e8\u3067 16 \u500b\u306e\u95a2\u6570\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002 \u3082\u3061\u308d\u3093\u3001`ERC1155`\u898f\u5b9a\u306e\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u307e\u3059\u3002\\n\\n- `constructor`: \u5f15\u6570\u306f name, symbol\\n- `supportsInterface()`: `ERC165`\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u3092\u5b9f\u73fe\u3001support \u3059\u308b\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3092\u8fd4\u3059\u3002\u4ed6\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30c1\u30a7\u30c3\u30af\u3059\u308b\u7528\u306b\u6e96\u5099\u3059\u308b\\n- `balanceOf()`: `IERC1166`\u306e\u6b8b\u9ad8\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u95a2\u6570\u3002`ERC721`\u3068\u9055\u3046\u306e\u306f\u3001\u5f15\u6570\u306f`account`\u53ca\u3073`id`\u3002\\n- `balanceOfBatch()`: \u30d0\u30c3\u30c1\u3067\u8907\u6570\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u8fd4\u3059\u95a2\u6570\\n- `setApprovalForAll()`: \u30d0\u30c3\u30c1\u3067\u8907\u6570\u306e\u30a2\u30d7\u30eb\u30fc\u30d6\u3092\u3059\u308b\u95a2\u6570\u3002`ApprovalForAll`\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\u3059\u308b\\n- `isApprovedForAll()`: \u5168\u90e8\u306e\u6a29\u9650\u3092\u6301\u3063\u3066\u3044\u308b\u30a2\u30c9\u30ec\u30b9\u306a\u306e\u304b\u306e\u78ba\u8a8d\u3092\u3059\u308b\u95a2\u6570\u3002\\n- `safeTransferFrom()`: \u5358\u4e00\u306a\u7a2e\u985e\u306e token \u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3092\u3059\u308b\u95a2\u6570\u3002`TransferSingle`\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\u3002`ERC721`\u3068\u9055\u3046\u306e\u306f\u3001\u5f15\u6570\u306f`from`, `to`, `id`\u4ee5\u5916\u306b\u3082\u3001`amount`\u3068\u3044\u3046\u306e\u304c\u5fc5\u8981\u3068\u306a\u308b\u3002\\n- `safeBatchTransferFrom()`: \u8907\u6570\u7a2e\u985e\u306e token \u3092\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3059\u308b\u95a2\u6570\u3002`TransferBatch`\u3092\u653e\u51fa\u3002\\n- `_mint()`: \u4e00\u7a2e\u985e\u306e token \u3092\u92f3\u9020\\n- `_mintBatch()`: \u8907\u6570\u7a2e\u985e\u306e token \u3092\u92f3\\n- `_burn()`: \u4e00\u7a2e\u985e\u306e token \u3092 burn \u3059\u308b\\n- `_burBatch()`: \u8907\u6570\u7a2e\u985e\u306e token \u3092 burn \u3059\u308b\\n- `doSafeTransferAcceptanceCheck()`: \u4e00\u7a2e\u985e\u306e token \u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306e\u30bb\u30fc\u30d5\u30c1\u30a7\u30c3\u30af\u3002`safeTransferFrom()`\u306b\u3088\u3063\u3066\u4f7f\u308f\u308c\u308b\u3002`onERC1155received()`\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\\n- `uri()`: `ERC1155`\u306e`id`\u306e\u7a2e\u985e\u306e metadata \u306e\u30ea\u30f3\u30af\u3092\u8fd4\u3059\u3002`ERC721`\u306e`tokenURI`\u3068\u4f3c\u3066\u3044\u308b\u3002\\n- `baseURI()`: `baseURI`\u3092\u8fd4\u3059\u3002uri \u306f`baseURI`\u3001`id`\u3092\u63a5\u7d9a\u3059\u308b\u306e\u3067\u3001\u901a\u5e38\u306f\u958b\u767a\u8005\u304c\u66f8\u304d\u63db\u3048\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\\n\\n```sol\\n// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\"./IERC1155.sol\\";\\nimport \\"./IERC1155Receiver.sol\\";\\nimport \\"./IERC1155MetadataURI.sol\\";\\nimport \\"https://github.com/AmazingAng/WTFSolidity/blob/main/34_ERC721/Address.sol\\";\\nimport \\"https://github.com/AmazingAng/WTFSolidity/blob/main/34_ERC721/String.sol\\";\\nimport \\"https://github.com/AmazingAng/WTFSolidity/blob/main/34_ERC721/IERC165.sol\\";\\n\\n/**\\n * @dev ERC1155\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306eimplementation\\n * \u8a73\u7d30\u306fhttps://eips.ethereum.org/EIPS/eip-1155\\n */\\ncontract ERC1155 is IERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address; // library Address\\n using Strings for uint256; // library Strings\\n // Token\u540d\\n string public name;\\n // Token\u30b7\u30f3\u30dc\u30eb\\n string public symbol;\\n // token\u7a2e\u985e\u306eid \u2192 account \u2192 balances \u306e\u30de\u30c3\u30d4\u30f3\u30b0\u3001\u6b8b\u9ad8\u3092\u8a18\u9332\u3059\u308b\u7528\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n // address \u2192 adderss \u306e\u5168\u6a29\u79fb\u8b72\u306e\u8a18\u9332\u3092\u3059\u308b\u30de\u30c3\u30d4\u30f3\u30b0\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3001\u521d\u671f\u5316\u306e\u5024`name` \u3001`symbol`\\n */\\n constructor(string memory name_, string memory symbol_) {\\n name = name_;\\n symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n interfaceId == type(IERC165).interfaceId;\\n }\\n\\n /**\\n * @dev \u30d0\u30e9\u30f3\u30b9\u3092\u8fd4\u3059\u95a2\u6570\u3001IERC1155\u306ebalanceOf\u3002account\u306eid\u7a2e\u985e\u306etoken\u6570\u3092\u8fd4\u3059\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\"ERC1155: address zero is not a valid owner\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev \u8907\u6570\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u8fd4\u3059\\n * \u6761\u4ef6:\\n * - `accounts` \u3001 `ids` \u306elength\u304c\u540c\u3058\u3067\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public view virtual override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\"ERC1155: accounts and ids length mismatch\\");\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n return batchBalances;\\n }\\n\\n /**\\n * @dev \u8907\u6570\u306e\u30a2\u30d7\u30eb\u30fc\u30d6\u3092\u3059\u308b\u95a2\u6570\u3002caller\u306foperator\u306b\u5168\u6a29\u79fb\u8b72\u3092\u3059\u308b\\n * {ApprovalForAll}\u30aa\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n * \u6761\u4ef6\uff1amsg.sender != operator\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n require(msg.sender != operator, \\"ERC1155: setting approval status for self\\");\\n _operatorApprovals[msg.sender][operator] = approved;\\n emit ApprovalForAll(msg.sender, operator, approved);\\n }\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u78ba\u8a8d\u3001\u8907\u6570\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev \u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\uff0c`amount`\u6570\u91cf\u306e`id`token\u3092`from`\u304b\u3089`to`\u3078\u9001\u308b\u95a2\u6570\\n * {TransferSingle} \u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n * \u6761\u4ef6\uff1a\\n * - to \u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306a\u3044\u3053\u3068\\n * - from\u30a2\u30c9\u30ec\u30b9\u306f\u5341\u5206\u306atoken\u6570\u3092\u6301\u3063\u3066\u304a\u308a\u3001caller\u306f\u6a29\u9650\u3092\u6301\u3063\u3066\u3044\u308b\u3053\u3068\\n * - to \u304c\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\u3001IERC1155Receiver-onERC1155Received\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u3053\u3068\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n address operator = msg.sender;\\n // owner\u304b\u3001\u6a29\u9650\u3092\u3082\u3089\u3063\u3066\u3044\u308b\u304b\u306e\u30c1\u30a7\u30c3\u30af\\n require(\\n from == operator || isApprovedForAll(from, operator),\\n \\"ERC1155: caller is not token owner nor approved\\"\\n );\\n require(to != address(0), \\"ERC1155: transfer to the zero address\\");\\n // from\u306f\u5341\u5206\u306atoken\u6570\u3092\u6301\u3063\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\"ERC1155: insufficient balance for transfer\\");\\n // \u30d0\u30e9\u30f3\u30b9\u3092\u66f4\u65b0\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n // \u30a4\u30d9\u30f3\u30c8\u653e\u51fa\\n emit TransferSingle(operator, from, to, id, amount);\\n // \u30bb\u30fc\u30d5\u306a\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306e\u30c1\u30a7\u30c3\u30af\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u3067\u8907\u6570\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\uff0c`amounts`\u3068\u3044\u3046\u6570\u91cf\u306e\u914d\u5217\u3001`ids`\u3068\u3044\u3046toke\u7a2e\u985e\u306e\\n * \u914d\u5217\u3092\u4f7f\u3063\u3066`from`\u304b\u3089`to`\u3078\u9001\u308b\\n * {TransferSingle} \u30a4\u30d9\u30f3\u30c8\\n * \u6761\u4ef6:\\n * - to \u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306a\u3044\\n * - from\u30a2\u30c9\u30ec\u30b9\u306f\u5341\u5206\u306atoken\u6570\u3092\u6301\u3063\u3066\u304a\u308a\u3001caller\u306f\u6a29\u9650\u3092\u6301\u3063\u3066\u3044\u308b\u3053\u3068\\n * - to \u304c\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\u3001IERC1155Receiver-onERC1155Received\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u3053\u3068\\n * - ids\u3001amounts\u306e\u914d\u5217\u306elength\u304c\u540c\u3058\u3067\u3042\u308b\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n address operator = msg.sender;\\n // owner\u304b\u3001\u6a29\u9650\u3092\u3082\u3089\u3063\u3066\u3044\u308b\u304b\u306e\u30c1\u30a7\u30c3\u30af\\n require(\\n from == operator || isApprovedForAll(from, operator),\\n \\"ERC1155: caller is not token owner nor approved\\"\\n );\\n // \u914d\u5217\u306e\u9577\u3055\u304c\u4e00\u7dd2\u3067\u3042\u308b\\n require(ids.length == amounts.length, \\"ERC1155: ids and amounts length mismatch\\");\\n // \u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306a\u3044\u3053\u3068\\n require(to != address(0), \\"ERC1155: transfer to the zero address\\");\\n\\n // for loop\u3067\u30d0\u30e9\u30f3\u30b9\u3092\u66f4\u65b0\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\"ERC1155: insufficient balance for transfer\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n // \u30bb\u30fc\u30d5\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30c1\u30a7\u30c3\u30af\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev mint\u92f3\u9020\u95a2\u6570\\n * {TransferSingle} \u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\"ERC1155: mint to the zero address\\");\\n\\n address operator = msg.sender;\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev \u30d0\u30c3\u30c1\u3067\u92f3\u9020\\n * \u91ca\u653e {TransferBatch} \u4e8b\u4ef6.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\"ERC1155: mint to the zero address\\");\\n require(ids.length == amounts.length, \\"ERC1155: ids and amounts length mismatch\\");\\n\\n address operator = msg.sender;\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev \u30d0\u30fc\u30f3\u95a2\u6570\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\"ERC1155: burn from the zero address\\");\\n\\n address operator = msg.sender;\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\"ERC1155: burn amount exceeds balance\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n }\\n\\n /**\\n * @dev \u30d0\u30fc\u30f3\u95a2\u6570\uff1a\u8907\u6570\u3092\u540c\u6642\u306b\u5b9f\u884c\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\"ERC1155: burn from the zero address\\");\\n require(ids.length == amounts.length, \\"ERC1155: ids and amounts length mismatch\\");\\n\\n address operator = msg.sender;\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\"ERC1155: burn amount exceeds balance\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n }\\n\\n // @dev ERC1155\u306e\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306e\u30c1\u30a7\u30c3\u30af\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\"ERC1155: ERC1155Receiver rejected tokens\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\"ERC1155: transfer to non-ERC1155Receiver implementer\\");\\n }\\n }\\n }\\n\\n // @dev ERC1155\u306e\u8907\u6570\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306e\u30c1\u30a7\u30c3\u30af\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\"ERC1155: ERC1155Receiver rejected tokens\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\"ERC1155: transfer to non-ERC1155Receiver implementer\\");\\n }\\n }\\n }\\n\\n /**\\n * @dev ERC1155\u306eid\u306euri\u3092\u8fd4\u3059\u3001metadata\u3001ERC721\u306etokenURI\u306b\u540c\u3058\\n */\\n function uri(uint256 id) public view virtual override returns (string memory) {\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, id.toString())) : \\"\\";\\n }\\n\\n /**\\n * {uri}\u306eBaseURI\u3092\u8fd4\u3059\uff0curi\u306fbaseURI\u3001tokenId\u3092\u3064\u306a\u3044\u3060\u3082\u306e\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\"\\";\\n }\\n}\\n\\n```\\n\\n# remix \u3067\u4f5c\u6210\\n\\n\u4eca\u56de remix \u3067\u4f5c\u308b\u306e\u306f ERC1155 \u7248\u306e BAYC\u3002\\n\\n```sol\\n// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\"./ERC1155.sol\\";\\n\\ncontract BAYC1155 is ERC1155{\\nuint256 constant MAX_ID = 10000;\\n// \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\\nconstructor() ERC1155(\\"BAYC1155\\", \\"BAYC1155\\"){\\n}\\n\\n //BAYC\u306ebaseURI\u306f\u3053\u308c\uff1aipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/\\n function _baseURI() internal pure override returns (string memory) {\\n return \\"ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/\\";\\n }\\n\\n // \u30df\u30f3\u30c8\u95a2\u6570\\n function mint(address to, uint256 id, uint256 amount) external {\\n // id \u306f10,000\u3092\u8d85\u3048\u3066\u306f\u306a\u3089\u306a\u3044\\n require(id < MAX_ID, \\"id overflow\\");\\n _mint(to, id, amount, \\"\\");\\n }\\n\\n // \u30d0\u30c3\u30c1\u3067\u30df\u30f3\u30c8\\n function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts) external {\\n // id \u306f10,000\u3092\u8d85\u3048\u3066\u306f\u306a\u3089\u306a\u3044\\n for (uint256 i = 0; i < ids.length; i++) {\\n require(ids[i] < MAX_ID, \\"id overflow\\");\\n }\\n _mintBatch(to, ids, amounts, \\"\\");\\n }\\n\\n}\\n\\n```\\n\\n\u5b9f\u969b\u306e remix \u306b\u3064\u3044\u3066\u306f\u3001\u307e\u305f\u4eca\u5ea6\u306e\u6a5f\u4f1a\u306b\u66f8\u304d\u307e\u3059\u306e\u3067\u3001\u4eca\u56de\u306f\u5272\u611b\u3002\\n\\n# \u6700\u5f8c\u306b\\n\\n\u4eca\u56de\u306f`ERC1155`\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3057\u305f\u3002\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002\u3053\u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306f\u540c\u3058\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u8907\u6570\u306e NFT \u3084 FT \u306e\u5171\u5b58\u3092\u8a31\u3057\u305f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u53ef\u80fd\u306b\u3057\u305f\u306e\u3067\u3001\u500b\u4eba\u7684\u306b\u306f\u5927\u304d\u306a\u30b9\u30c6\u30c3\u30d7\u3060\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001BYAC \u306e\u6539\u9020\u3092\u3057\u3066\u7121\u7406\u3084\u308a`ERC1155`\u306b\u3057\u307e\u3057\u305f\u3002\u307b\u3093\u3058\u3083\u3001\u307e\u305f\u306d\u3002\\n\\n**THE END**\\n\\n![](yay-yas.gif)"},{"id":"private-variable-in-solidity-with-code-explained","metadata":{"permalink":"/blog/private-variable-in-solidity-with-code-explained","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/About-private-var/2022-12-22-about-private-var.md","source":"@site/blog/About-private-var/2022-12-22-about-private-var.md","title":"solidity\u306b\u304a\u3044\u3066\u306a\u305cprivate\u306a\u5909\u6570\u306fprivate\u3067\u306f\u306a\u3044\u306e\u304b","description":"Hello, everybody!","date":"2022-12-22T00:00:00.000Z","formattedDate":"2022\u5e7412\u670822\u65e5","tags":[{"label":"private","permalink":"/blog/tags/private"},{"label":"variable","permalink":"/blog/tags/variable"},{"label":"solidity","permalink":"/blog/tags/solidity"},{"label":"\u5909\u6570","permalink":"/blog/tags/\u5909\u6570"}],"readingTime":2.146,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"private-variable-in-solidity-with-code-explained","title":"solidity\u306b\u304a\u3044\u3066\u306a\u305cprivate\u306a\u5909\u6570\u306fprivate\u3067\u306f\u306a\u3044\u306e\u304b","authors":["Thurendous","Polymetis"],"blogDescription":"\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306a\u5909\u6570\u306f\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3067\u306f\u306a\u3044","tags":["private","variable","solidity","\u5909\u6570"]},"prevItem":{"title":"ERC1155\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","permalink":"/blog/what-is-ERC1155-with-code-explained"},"nextItem":{"title":"NFT\u3001ERC721\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","permalink":"/blog/what-is-ERC721-and-NFT-with-code-explained"}},"content":"![](hffgf.gif)\\n\\nHello, everybody!\\n\\n# TL;DR\uff1a\\n\\n\u7d50\u8ad6\u3092\u8a00\u3063\u3066\u304a\u304d\u307e\u3059\u3068\u3001\u79d8\u5bc6\u3092\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u306b\u4e57\u305b\u308b\u306a\u3002private \u3068\u3044\u3046\u4fee\u98fe\u5b50\u3082\u79d8\u5bc6\u3092\u4fdd\u6301\u3059\u308b\u306e\u306b\u3001\u610f\u5473\u3092\u306a\u3055\u306a\u3044\u3002\\n\\n# \u52d8\u9055\u3044\u3057\u3066\u3044\u307e\u305b\u3093\u304b\\n\\nsolidity \u306b\u89e6\u308b\u3068\u3001private \u3068\u3044\u3046\u4fee\u98fe\u5b50\u306b\u3067\u3042\u3046\u3053\u3068\u304c\u3042\u308b\u304b\u3068\u601d\u3046\u3093\u3067\u3059\u304c\u3001\u305d\u308c\u306f\u6642\u306b\u306f\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3068\u3044\u3046\u4fee\u98fe\u5b50\u3092\u3064\u3051\u3066\u3042\u308b\u306e\u3067\u3001\u3088\u308a\u79d8\u5bc6\u6027\u3092\u6301\u3063\u3066\u3044\u308b\u5909\u6570\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3068\u304b\u3092\u4fdd\u5b58\u3059\u308c\u3070\u3088\u304f\u306d\uff1f\u3068\u52d8\u9055\u3044\u3092\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u7d50\u8ad6\u304b\u3089\u3044\u3046\u3068\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3068\u3044\u3046\u3082\u306e\u306f\u5168\u304f\u3068\u8a00\u3063\u3066\u3044\u3044\u304f\u3089\u3044\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u304c\u3042\u308a\u307e\u305b\u3093\u306e\u3067\u3001\u79d8\u5bc6\u3092\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u306b\u4fdd\u5b58\u3059\u308b\u306e\u306f\u8ad6\u5916\u3060\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\\n\\n# \u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306a\u5909\u6570\u3092\u547c\u3073\u51fa\u3057\u3066\u307f\u308b\\n\\n\u3055\u3066\u3001\u5b9f\u6f14\u3092\u4f34\u3063\u3066\u884c\u304d\u305f\u3044\u306e\u3067\u3001\u30b3\u30fc\u30c9\u3092\u5b9f\u969b\u306b\u52d5\u304b\u3057\u3066\u307f\u3066\u884c\u304d\u307e\u3057\u3087\u3046\u304b\u3002\\n\\n![](hackableson.gif)\\n\\n\u4eca\u56de\u306e\u4f7f\u3046\u30ec\u30dd\u30b8\u30c8\u30ea\u306f[\u3053\u3061\u3089](https://github.com/thurendous/private-var)\u3067\u3059\u3002\\n\\n\u30ec\u30dd\u30b8\u30c8\u30ea\u306e\u7d50\u679c\u3092\u898b\u305f\u3044\u65b9\u306f\u3053\u306e\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002\\n\\n```\\ngit clone https://github.com/thurendous/private-var\\nyarn install\\nyarn hardhat test\\n```\\n\\n\u3053\u308c\u3067\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002\\n\\n![imageOfTerminalwithResult](./ScreenShot2022-12-2223.15.42.png)\\n\\n\u4eca\u56de\u4f7f\u3063\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30fc\u306f`test`\u3068`contracts`\u306e\u307f\u3067\u3059\u3002\\n\\n\u305d\u306e\u8a73\u7d30\u3092\u8aac\u660e\u3057\u307e\u3059\u3002\\n\\n\u4eca\u56de\u306f\u3053\u3093\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002\\n\u4e2d\u8eab\u306f\u81f3\u3063\u3066\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3002\\n\\n- `LoginContract`\u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u5ba3\u8a00\\n- private \u306a\u5909\u6570\u306e userName, password \u3092\u4f5c\u308a\u307e\u3057\u305f\u3002\\n \u3053\u306e\uff12\u3064\u306e\u5909\u6570\u3092\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067\u521d\u671f\u5316\u3057\u3066\u3044\u307e\u3059\u3002\\n\\n```sol\\n// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.9;\\n\\n// Uncomment this line to use console.log\\n// import \\"hardhat/console.sol\\";\\n\\ncontract LoginContract {\\n bytes32 private userName;\\n bytes32 private password;\\n\\n constructor(bytes32 _username, bytes32 _password) {\\n userName = _username;\\n password = _password;\\n }\\n}\\n```\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u5358\u4f4d\u306f `slot` \u3068\u8a00\u308f\u308c\u307e\u3059\u3002\u3053\u306e\u30b9\u30ed\u30c3\u30c8\u3092\u5b9f\u306f\u4f55\u3089\u304b\u306e\u65b9\u6cd5\u3067\u8aad\u307f\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u3002\\n\\n\u7d9a\u3044\u3066\u3001`test`\u30d5\u30a9\u30eb\u30c0\u3092\u898b\u3066\u304f\u3060\u3055\u3044\u3002\\n\\n\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u3068\u601d\u3044\u307e\u3059\u3002\\n\\n- \u30c6\u30b9\u30c8\u306e\u30d5\u30a9\u30eb\u30c0\u306f\u66f8\u3044\u305f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30c6\u30b9\u30c8\u3092\u3059\u308b\u305f\u3081\u306e\u30d5\u30a9\u30eb\u30c0\\n\\n\u4eca\u56de\u306f\u30c6\u30b9\u30c8\u3092\u3059\u308b\u3068\u3044\u3046\u304b\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u30b9\u30ed\u30c3\u30c8\u3092\u8aad\u307f\u53d6\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002\\n\\n```javascript\\nconst {\\n time,\\n loadFixture,\\n} = require(\'@nomicfoundation/hardhat-network-helpers\')\\nconst { anyValue } = require(\'@nomicfoundation/hardhat-chai-matchers/withArgs\')\\nconst { expect } = require(\'chai\')\\nconst { ethers } = require(\'hardhat\')\\n\\ndescribe(\'LoginContract\', function () {\\n // this is the test we run to reveal the private variable\\n it(\'should show us private variable data\', async function () {\\n const LoginContract = await ethers.getContractFactory(\'LoginContract\')\\n\\n const userName = ethers.utils.formatBytes32String(\'calvin\')\\n const password = ethers.utils.formatBytes32String(\\n \'passwordIsMyBigSecret\'\\n )\\n\\n const loginContract = await LoginContract.deploy(userName, password)\\n\\n await loginContract.deployed() // wait for it to be deployed\\n\\n const slot0 = await ethers.provider.getStorageAt(\\n loginContract.address,\\n 0\\n )\\n const slot1 = await ethers.provider.getStorageAt(\\n loginContract.address,\\n 1\\n )\\n const formatUsername = await ethers.utils.parseBytes32String(slot0)\\n const formatPassword = await ethers.utils.parseBytes32String(slot1)\\n\\n console.log(\'userName should be ->\', formatUsername)\\n console.log(\'password should be ->\', formatPassword)\\n })\\n})\\n```\\n\\n\u7d50\u69cb\u305f\u304f\u3055\u3093\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u5c11\u3057\u305a\u3064\u3054\u8aac\u660e\u3057\u307e\u3059\u3002\\n\\n\u30c6\u30b9\u30c8\u306e\u5927\u304d\u306a\u5358\u4f4d\u3001\u300cLoginContract \u3068\u3044\u3046\u30c6\u30b9\u30c8\u3092\u3059\u308b\u3088\u300d\u3068\u3044\u3046\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002\\n\\n```javascript\\ndescribe(\'LoginContract\', function () {\\n\\n}\\n```\\n\\n\u30c6\u30b9\u30c8\u306e\u3088\u308a\u5c0f\u3055\u306a\u5358\u4f4d\u3001\u6587\u5b57\u5217\u306e\u90e8\u5206\u306f\u81ea\u7531\u306b\u8a18\u8f09\u3057\u3066 OK\u3002\u81ea\u5206\u304c\u66f8\u3044\u305f\u306e\u306f\u300c\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u306a\u5024\u3092\u51fa\u3057\u3066\u304f\u308c\u308b\u3088\u300d\u3068\u3044\u3046\u3053\u3068\u3092\u610f\u5473\u3059\u308b\\n\\n```javascript\\n it(\'should show us private variable data\', async function () {\\n\\n}\\n```\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\\n\\n```javascript\\nconst LoginContract = await ethers.getContractFactory(\'LoginContract\')\\n```\\n\\n`sername`, `password` \u3092\u4f5c\u6210\u3057\u3066\u304a\u304d\u307e\u3059\u3002\\n\\n```javascript\\nconst userName = ethers.utils.formatBytes32String(\'calvin\')\\nconst password = ethers.utils.formatBytes32String(\'passwordIsMyBigSecret\')\\n```\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3057\u307e\u3059\u3002\u305d\u306e\u3068\u304d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u306b\u5165\u3063\u3066\u3044\u308b\u5f15\u6570\u3001\u5148\u7a0b\u4f5c\u3063\u305f `username`, `password` \u3082\u4ee3\u5165\u3057\u307e\u3059\u3002\\n\\n```javascript\\nconst loginContract = await LoginContract.deploy(userName, password)\\n```\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30c7\u30d7\u30ed\u30a4\u3092\u5f85\u3061\u307e\u3059\u3002\\n\\n```javascript\\nawait loginContract.deployed() // wait for it to be deployed\\n```\\n\\n\u7d9a\u3044\u3066\u3001\u809d\u5fc3\u306a\u3068\u3053\u308d\u3067\u3059\u3002\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30b9\u30ed\u30c3\u30c8\u3092\u8aad\u307f\u53d6\u308a\u307e\u3059\u3002\u30dd\u30b8\u30b7\u30e7\u30f3\u306f\u305d\u308c\u305e\u308c 0, 1 \u3067\u3059\u3002\u3053\u308c\u306f`userName`, `password`\u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3068\u540c\u3058\u3067\u3059\u3002\\n\\n```javascript\\nconst slot0 = await ethers.provider.getStorageAt(loginContract.address, 0)\\nconst slot1 = await ethers.provider.getStorageAt(loginContract.address, 1)\\n```\\n\\n\u8aad\u307f\u53d6\u3063\u305f\u5024\u3092\u6574\u5f62\u3057\u307e\u3059\u3002\\n\\n```javascript\\nconst formatUsername = await ethers.utils.parseBytes32String(slot0)\\nconst formatPassword = await ethers.utils.parseBytes32String(slot1)\\n```\\n\\n\u30bf\u30fc\u30df\u30ca\u30eb\u3078\u8868\u793a\u3055\u305b\u307e\u3059\u3002\\n\\n```javascript\\nconsole.log(\'userName should be ->\', formatUsername)\\nconsole.log(\'password should be ->\', formatPassword)\\n```\\n\\n\u3053\u308c\u3067\u5148\u7a0b\u306e\u7d50\u679c\u306e\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u3066\u3001\u8aad\u307f\u53d6\u3089\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u306d\u3002\\n\\n```shell\\n LoginContract\\nuserName should be -> calvin\\npassword should be -> passwordIsMyBigSecret\\n \u2714 should show us private variable data (668ms)\\n\\n\\n 1 passing (670ms)\\n```\\n\\n\u3060\u304b\u3089\u3001private \u306a\u5909\u6570\u3060\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u79d8\u5bc6\u306a\u3053\u3068\u306f\u4f55\u4e00\u3064\u306d\u3048\u3088\u3002\\n\\n**THE END**"},{"id":"what-is-ERC721-and-NFT-with-code-explained","metadata":{"permalink":"/blog/what-is-ERC721-and-NFT-with-code-explained","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/ERC721/2022-12-22-about-private-var.md","source":"@site/blog/ERC721/2022-12-22-about-private-var.md","title":"NFT\u3001ERC721\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","description":"Hello, everybody!","date":"2022-12-22T00:00:00.000Z","formattedDate":"2022\u5e7412\u670822\u65e5","tags":[{"label":"ERC721","permalink":"/blog/tags/erc-721"},{"label":"NFT","permalink":"/blog/tags/nft"},{"label":"solidity","permalink":"/blog/tags/solidity"}],"readingTime":6.672,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"what-is-ERC721-and-NFT-with-code-explained","title":"NFT\u3001ERC721\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","authors":["Thurendous","Polymetis"],"blogDescription":"ERC721\u3068\u306f\u306a\u3093\u305e\u3084","tags":["ERC721","NFT","solidity"]},"prevItem":{"title":"solidity\u306b\u304a\u3044\u3066\u306a\u305cprivate\u306a\u5909\u6570\u306fprivate\u3067\u306f\u306a\u3044\u306e\u304b","permalink":"/blog/private-variable-in-solidity-with-code-explained"},"nextItem":{"title":"Web3 Term Dictionary","permalink":"/blog/web3-term-dictionary"}},"content":"Hello, everybody!\\n\\n# TL;DR\\n\\n- NFT \u306f\u975e\u4ee3\u66ff\u6027\u30c8\u30fc\u30af\u30f3\u306e\u3053\u3068\\n- \u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3046\u3068\u30c7\u30b8\u30bf\u30eb\u6240\u6709\u6a29\u306e\u3053\u3068\\n- \u30b3\u30fc\u30c9\u3067\u7406\u89e3\u3057\u307e\u3057\u3087\u3046\\n\\n![](nft-nfts.gif)\\n\\nBTC \u3084 ETH \u306e\u3088\u3046\u306a\u30c8\u30fc\u30af\u30f3\u306f FT \u3068\u547c\u3070\u308c\u3001\u4ee3\u66ff\u6027\u30c8\u30fc\u30af\u30f3\u306e\u3053\u3068\u3067\u3059\u3002\u7279\u5fb4\u3068\u3057\u3066\u306f\u3001\u304a\u4e92\u3044\u306b\u4ea4\u63db\u53ef\u80fd\u3067\u5927\u304d\u306a\u9055\u3044\u306f\u306a\u3044\u3053\u3068\u3067\u3059\uff08\u53b3\u5bc6\u306b\u306f\u9055\u3044\u3082\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u306f\u305d\u306e\u8b70\u8ad6\u3092\u3057\u306a\u3044\uff09\u3002\u307e\u305f\u3001\u30a2\u30fc\u30c8\u3001\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3001\u4e0d\u52d5\u7523\u306a\u3069\u306e\u3088\u3046\u306a\u304a\u4e92\u3044\u9055\u3044\u3092\u304b\u306a\u308a\u6301\u3063\u3066\u3044\u308b\u3088\u3046\u306a\u3082\u306e\u306f\u975e\u4ee3\u66ff\u6027\u30c8\u30fc\u30af\u30f3\u3067\u4ee3\u8868\u3055\u308c\u308b\u3053\u3068\u304c\u307b\u3068\u3093\u3069\u3067\u3059\u3002\\n\\n\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u3067\u306f EIP721 \u304c\u63d0\u6848\u3055\u308c\u3066\u3001ERC721 \u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u304c\u5f62\u6210\u3055\u308c\u307e\u3057\u305f\u3002\\n\\n# EIP, ERC \u3068\u306f\\n\\n\u7d50\u8ad6\uff1aEIP \u304c ERC \u3092\u542b\u3093\u3067\u3044\u308b\\n\\n\u307e\u305a\u3001\u7406\u89e3\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u306f\u3001[ERC721](https://eips.ethereum.org/EIPS/eip-721) \u3067\u3059\u3002\u3053\u306e\uff12\u3064\u306e\u9593\u306b\u306f\u306a\u3093\u306e\u95a2\u4fc2\u304c\u3042\u308b\u306e\u3067\u3057\u3087\u3046\u304b\u3002EIP \u3068\u306f\u3001Ethereum Improvement Proposals \u306e\u3053\u3068\u3067\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u304c\u63d0\u6848\u3057\u305f\u30d7\u30ed\u30c8\u30b3\u30eb\u306a\u3069\u3092\u6539\u5584\u3059\u308b\u305f\u3081\u306e\u63d0\u6848\u306e\u3053\u3068\u3067\u3059\u3002EIP \u306f\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u306e\u4e2d\u306e\u4efb\u610f\u306e\u5206\u91ce\u306e\u6539\u5584\u3067\u3001\u4f8b\u3048\u3070\u65b0\u305f\u306a\u6a5f\u80fd\u3001ERC\u3001\u30d7\u30ed\u30c8\u30b3\u30eb\u6539\u5584\u306a\u3069\u304c\u3042\u308a\u307e\u3059\u3002\\n\\nERC \u3068\u306f\u3001Ethereum Request For Comment \u306e\u3053\u3068\u3067\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u4e0a\u306e\u5404\u7a2e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d7\u30ed\u30c8\u30b3\u30eb\u3068\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306e\u3053\u3068\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u5178\u578b\u7684\u306a ERC20, ERC721\u3001\u3042\u308b\u3044\u306f URI \u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9 ERC67\u3001\u3042\u308b\u3044\u306f\u30a6\u30a9\u30ec\u30c3\u30c8\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8 EIP75, EIP85 \u306a\u3069\u304c\u3042\u308b\u3002\\n\\nERC \u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306f\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u306e\u767a\u5c55\u306b\u304a\u3051\u308b\u91cd\u8981\u306a\u69cb\u6210\u8981\u7d20\u3067\u3001ERC20, ERC721, ERC223, ERC777 \u306a\u3069\u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u304c\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u306e\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u306b\u591a\u5927\u306a\u5f71\u97ff\u3092\u4e0e\u3048\u3066\u3044\u307e\u3057\u305f\u3002\\n\\n# ERC165\\n\\n\u307e\u305a ERC165 \u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u307e\u3057\u3087\u3046\u3002\\n\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5ba3\u8a00\u3057\u3066\u4ed6\u306e\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30c1\u30a7\u30c3\u30af\u3059\u308b\u305f\u3081\u306b\u3084\u3063\u3066\u3044\u308b\u306e\u304c ERC165 \u306e\u3053\u3068\u3067\u3059\u3002\\n\\n\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3046\u3068\u3001`ERC165` \u3092\u901a\u3057\u3066\u3068\u3042\u308b\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c `ERC721`, `ERC1155` \u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u304b\u30c1\u30a7\u30c3\u30af\u3067\u304d\u308b\u3068\u3044\u3046\u4ed5\u7d44\u307f\u3067\u3059\u3002\\n\\n```sol\\ninterface IERC165 {\\n /**\\n * @dev \u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u5f53\u8a72\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306e`interfaceId`\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308c\u3070true\u3092\u8fd4\u3059\\n * \u8a73\u7d30\u306f\u3053\u3061\u3089\uff1ahttps://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n *\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n```\\n\\n\u6b21\u306b\u5b9f\u969b\u306b\u306f ERC721 \u304c\u3069\u306e\u3088\u3046\u306b `supportsInterface()`\u3092\u5b9f\u73fe\u3057\u305f\u306e\u304b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\\n\\n```sol\\nfunction supportsInterface(bytes4 interfaceId) external pure override returns (bool)\\n {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC165).interfaceId;\\n }\\n```\\n\\n\u3053\u306e\u95a2\u6570`supportsInterface`\u306f IERC721 \u3042\u308b\u3044\u306f IERC165 \u306e interfaceId \u304c\u5f15\u6570\u3068\u3057\u3066\u5165\u529b\u3055\u308c\u305f\u5834\u5408\u306b\u3001`true`\u3092\u8fd4\u3057\u3001\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f`false`\u3092\u8fd4\u3057\u307e\u3059\u3002\\n\\n# IERC721\\n\\n`IERC721`\u306e\u4e2d\u8eab\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\\n`IERC721`\u306f`ERC721`\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3067\u3001ERC721 \u304c\u5b9f\u73fe\u3059\u3079\u304d\u4e00\u822c\u7684\u306a\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u307e\u3059\u3002`tokenId`\u3092\u4f7f\u3063\u3066\u975e\u4ee3\u66ff\u6027\u30c8\u30fc\u30af\u30f3\u3092\u4ee3\u8868\u3057\u3066\u3044\u307e\u3059\u3002\u30a2\u30d7\u30eb\u30fc\u30d6\u3042\u308b\u3044\u306f\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306b\u969b\u3057\u3066\u3001`tokenId`\u306f\u5fc5\u305a\u51fa\u756a\u304c\u3042\u308a\u307e\u3059\u3002\u3057\u304b\u3057\u3001ERC20 \u306f\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306b\u304a\u3051\u308b\u6570\u91cf\u3060\u3051\u3092\u5b9a\u7fa9\u3059\u308c\u3070\u3088\u304f\u3066\u3001tokenId \u306f\u3042\u308a\u307e\u305b\u3093\u3002\\n\\n```sol\\n/**\\n * @dev ERC721\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\\n */\\ninterface IERC721 is IERC165 {\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n function approve(address to, uint256 tokenId) external;\\n\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n```\\n\\n# IERC721 \u306e event\\n\\n3 \u3064\u306e event \u3092\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002`Transfer`\u3001`Approval`\u306f ERC20 \u306b\u3082\u5b58\u5728\u3057\u307e\u3059\u3002\\n\\n- `Transfer`: \u30c8\u30fc\u30af\u30f3\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u306e\u3068\u304d\u306b\u653e\u51fa\u3002\u9001\u308a\u5143`from`\u3001\u9001\u308a\u5148`to`\u3001`tokenId`\u3002\\n- `Approvel`: \u30a2\u30d7\u30eb\u30fc\u30d6\u3059\u308b\u3068\u304d\u306b\u653e\u51fa\u3002\u30a2\u30d7\u30eb\u30fc\u30d6\u3059\u308b\u5074\u306e\u30a2\u30c9\u30ec\u30b9`owner`\u3001\u30a2\u30d7\u30eb\u30fc\u30d6\u3057\u305f\u5148\u306e\u30a2\u30c9\u30ec\u30b9`approved`\u3001`tokenId`\u3002\\n- `ApprovalForAll`: \u4e00\u6c17\u306b\u5927\u91cf\u306b\u30a2\u30d7\u30eb\u30fc\u30d6\u3059\u308b\u3068\u304d\u306b\u653e\u51fa\u3059\u308b\u30a4\u30d9\u30f3\u30c8\u3002\u30a2\u30d7\u30eb\u30fc\u30d6\u3059\u308b\u5074\u306e\u30a2\u30c9\u30ec\u30b9`owner`\u3001\u30a2\u30d7\u30eb\u30fc\u30d6\u3055\u308c\u308b\u5074\u306e\u30a2\u30c9\u30ec\u30b9`operator`\u3001\u30a2\u30d7\u30eb\u30fc\u30d6\u3059\u308b\u5834\u5408`approved`\u306f true \u3067\u3001\u9006\u306b\u6a29\u9650\u3092\u5265\u596a\u3059\u308b\u5834\u5408\u3001`approved`\u306f false \u306b\u3059\u308b\\n\\n# IERC721 \u95a2\u6570\\n\\n- `balanceOf`: \u3068\u3042\u308b\u30a2\u30c9\u30ec\u30b9\u306e\u6301\u3063\u3066\u3044\u308b NFT \u306e\u6570\u91cf\u3092\u8fd4\u3059\\n- `ownerOf`: tokenId \u306e\u30aa\u30fc\u30ca\u30fc\u3092\u8fd4\u3059\\n- `transferFrom`: \u666e\u901a\u306e\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3001\u5f15\u6570\u306f `from` \u306f\u9001\u308a\u5143\u3067\u3001`to` \u306f\u9001\u308a\u5148\u3001`tokenId `\u3082\u5fc5\u8981\\n- `safeTransferFrom`:\u5b89\u5168\u306a\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3001\u3082\u3057\u53d7\u3051\u308b\u5074\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\u3001`ERC721Receiver`\u306e\u5b9f\u88c5\u304c\u6c42\u3081\u3089\u308c\u308b\u3002\u5f15\u6570\u306f\u9001\u308a\u5143\u306e`from`\u3001\u9001\u308a\u5148\u306e`to`\u3001`tokenId`\\n- `approve`: \u4ed6\u306e\u30a2\u30c9\u30ec\u30b9\u306b\u3042\u306a\u305f\u306e NFT \u3092\u4f7f\u7528\u3059\u308b\u6a29\u5229\u3092\u6e21\u3059\u3002\u6a29\u5229\u3092\u4ed8\u4e0e\u3059\u308b\u30a2\u30c9\u30ec\u30b9\u306f`to`\u3001\u305d\u3057\u3066`tokenId`\u3082\u5f15\u6570\u306b\\n- `getApproved`: `tokenId`\u304c\u3069\u306e\u30a2\u30c9\u30ec\u30b9\u306b\u6a29\u9650\u3092\u4ed8\u4e0e\u3057\u305f\u306e\u304b\u78ba\u8a8d\u3059\u308b\\n- `setApprovalFroAll`: \u81ea\u5206\u306e\u6301\u3063\u3066\u3044\u308b\u3053\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u3059\u3079\u3066\u306e NFT \u3092\u3068\u3042\u308b\u30a2\u30c9\u30ec\u30b9\u306b\u5bfe\u3057\u3066\u5168\u6a29\u79fb\u8b72\u3059\u308b\\n- `isApprovedForAll`: \u5168\u6a29\u79fb\u8b72\u3057\u3066\u3044\u308b\u30a2\u30c9\u30ec\u30b9\u304c\u3042\u308b\u304b\u78ba\u8a8d\u3059\u308b\\n- safeTransferFrom`: \u5b89\u5168\u306a\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u95a2\u6570\u306e\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u95a2\u6570\u3001\u5f15\u6570\u306b`data`\u304c\u542b\u307e\u308c\u3066\u3044\u308b\\n\\n# IERC721Receiver\\n\\n\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3082\u3057 ERC721 \u306e\u5b9f\u73fe\u3092\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u9001\u3089\u308c\u3066\u304d\u305f NFT \u306f\u30d6\u30e9\u30c3\u30af\u30db\u30fc\u30eb\u306b\u9001\u3063\u305f\u3088\u3046\u306b\u3001\u6c38\u9060\u306b\u53d6\u308a\u51fa\u305b\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u9632\u6b62\u3059\u308b\u305f\u3081\u306b\u3001ERC721 \u306f`safetransferFrom()`\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u3002\u30bf\u30fc\u30b2\u30c3\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c`IERCReceiver`\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u5834\u5408\u306e\u307f\u3001ERC721 \u30c8\u30fc\u30af\u30f3\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f`revert`\u3055\u308c\u307e\u3059\u3002IERC721Receiver \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306f\u4e00\u500b\u306e`onERC721Receiver()`\u95a2\u6570\u3057\u304b\u3042\u308a\u307e\u305b\u3093\u3002\\n\\n```sol\\n// ERC721Receiver\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\uff1a\u3000\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u3053\u308c\u3092\u5b9f\u88c5\u3057\u3066\u5b89\u5168\u306a\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3092\u53d7\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u308b\\ninterface IERC721Receiver {\\n function onERC721Received(\\n address operator,\\n address from,\\n uint tokenId,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\\n```\\n\\n\u6b21\u306b`ERC721`\u304c\u3069\u3046\u3084\u3063\u3066`_checkOnERC721Received`\u3092\u4f7f\u3063\u3066\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c`onERC721Receiver()`\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b\u306e\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\\n\\n```sol\\nfunction _checkOnERC721Received(\\n address from,\\n address to,\\n uint tokenId,\\n bytes memory _data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n return\\n IERC721Receiver(to).onERC721Received(\\n msg.sender,\\n from,\\n tokenId,\\n _data\\n ) == IERC721Receiver.onERC721Received.selector;\\n } else {\\n return true;\\n }\\n }\\n```\\n\\n# IERC721Metadata\\n\\nIERC721Metadata \u306f ERC721 \u306e\u62e1\u5f35\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3002\uff13\u3064\u306e metadata \u7528\u95a2\u6570\u3092\u7528\u3044\u3066\u3044\u308b\u3002\\n\\n- `name()`\uff1a\u30c8\u30fc\u30af\u30f3\u540d\u3092\u8fd4\u3059\\n- `symbol()`:\u30c8\u30fc\u30af\u30f3\u7b26\u53f7\\n- `tokenURI()`:tokenId \u3092\u4f7f\u3063\u3066 metadata \u306e url \u3092\u3068\u3063\u3066\u304f\u308b\u3002ERC721 \u7279\u6709\u306e\u95a2\u6570\\n\\n```sol\\ninterface Ierc721Metadata is IERC721 {\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\\n```\\n\\n# ERC721 \u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\\n\\n`ERC721` \u30e1\u30a4\u30f3\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f `IERC721`, `IERC165`, `IERC721Metadata` \u306e\u3059\u3079\u3066\u306e\u6a5f\u80fd\u3092\u5b9a\u7fa9\u3057\u305f\u30024 \u3064\u306e\u72b6\u614b\u5909\u6570\u300117 \u500b\u306e\u95a2\u6570\u3092\u542b\u307e\u308c\u3066\u3044\u308b\u3002\u30b7\u30f3\u30d7\u30eb\u306b\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u3002\u8a73\u7d30\u306f\u30b3\u30e1\u30f3\u30c8\u3092\u8aad\u3093\u3067\u304f\u3060\u3055\u3044\u3002\\n\\n```sol\\n// SPDX-License-Identifier: MIT\\n// by 0xAA\\npragma solidity ^0.8.4;\\n\\nimport \\"./IERC165.sol\\";\\nimport \\"./IERC721.sol\\";\\nimport \\"./IERC721Receiver.sol\\";\\nimport \\"./IERC721Metadata.sol\\";\\nimport \\"./Address.sol\\";\u3000// library\\nimport \\"./String.sol\\"; // library\\n\\ncontract ERC721 is IERC721, IERC721Metadata{\\n using Address for address; // Address library\u3092\u4f7f\u3046\uff08isContract\u3092\u4f7f\u3046\u305f\u3081\uff09\\n using Strings for uint256; // String library\\n\\n // Token\u540d\\n string public override name;\\n // Token\u30b7\u30f3\u30dc\u30eb\\n string public override symbol;\\n // tokenId -> owner address \u306e\u30de\u30c3\u30d4\u30f3\u30b0\\n mapping(uint => address) private _owners;\\n // address -> \u30d0\u30e9\u30f3\u30b9\u306e\u30de\u30c3\u30d4\u30f3\u30b0\\n mapping(address => uint) private _balances;\\n // tokenID -> \u30a2\u30d7\u30eb\u30fc\u30d6\u3055\u308c\u305f\u30a2\u30c9\u30ec\u30b9\u306e\u30de\u30c3\u30d4\u30f3\u30b0\\n mapping(uint => address) private _tokenApprovals;\\n // owner -> operator\u30a2\u30c9\u30ec\u30b9 -> bool\uff08\u6a29\u9650\u6e21\u3057\u305f\u5834\u5408\u306ftrue\uff09\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * constructor, name, symbol\u3092\u521d\u671f\u5316\u3059\u308b\\n */\\n constructor(string memory name_, string memory symbol_) {\\n name = name_;\\n symbol = symbol_;\\n }\\n\\n // ERC165\u306esupportsInterface\u95a2\u6570\\n function supportsInterface(bytes4 interfaceId)\\n external\\n pure\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC165).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId;\\n }\\n\\n // IERC721\u306ebalanceOf\u95a2\u6570\u3001_balances\u3092\u4f7f\u3063\u3066\u8abf\u3079\u305f\u3044\u30a2\u30c9\u30ec\u30b9\u306e\u6b8b\u9ad8\u3092\u8fd4\u3059\\n function balanceOf(address owner) external view override returns (uint) {\\n require(owner != address(0), \\"owner = zero address\\");\\n return _balances[owner];\\n }\\n\\n // IERC721\u306eownerOf\u95a2\u6570\u3001_owners\u5909\u6570\u3092\u4f7f\u3063\u3066tokenId\u306eowner\u3092\u8fd4\u3059\\n function ownerOf(uint tokenId) public view override returns (address owner) {\\n owner = _owners[tokenId];\\n require(owner != address(0), \\"token doesn\'t exist\\");\\n }\\n\\n // IERC721\u306eisApprovedForAll\u3001_operatorApprovals\u5909\u6570\u3092\\n // \u4f7f\u3063\u3066owner\u304coperator\u306b\u6a29\u9650\u3092\u79fb\u8b72\u3057\u305f\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\\n // \u6a29\u9650\u79fb\u8b72\u3057\u305f\u5834\u5408\u306ftrue\u3092\u8fd4\u3059\\n function isApprovedForAll(address owner, address operator)\\n external\\n view\\n override\\n returns (bool)\\n {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n // IERC721\u306esetApprovalForAll\u3092\u5b9f\u88c5\u3002\u6301\u3063\u3066\u3044\u308b\u30c8\u30fc\u30af\u30f3\u3092\u3059\u3079\u3066operator\u306b\u6a29\u9650\u3092\u6e21\u3059(true),\\n // \u3042\u308b\u3044\u306foperator\u306e\u6a29\u9650\u3092\u5265\u596a\u3059\u308b(false)\u3002_setApprovalForAll\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3002\\n function setApprovalForAll(address operator, bool approved) external override {\\n _operatorApprovals[msg.sender][operator] = approved;\\n emit ApprovalForAll(msg.sender, operator, approved);\\n }\\n\\n // \u5b9e\u73b0IERC721\u7684getApproved\uff0c\u5229\u7528_tokenApprovals\u53d8\u91cf\u67e5\u8be2tokenId\u7684\u6388\u6743\u5730\u5740\u3002\\n function getApproved(uint tokenId) external view override returns (address) {\\n require(_owners[tokenId] != address(0), \\"token doesn\'t exist\\");\\n return _tokenApprovals[tokenId];\\n }\\n\\n // _approve\u95a2\u6570\u3002_tokenApprovals\u3092\u66f8\u304d\u63db\u3048\u3066\uff0cto\u30a2\u30c9\u30ec\u30b9\u306b tokenId\u3092\u3044\u3058\u308b\u6a29\u9650\u3092\u6e21\u3059\u3002\\n // Approval\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\u3002\\n function _approve(\\n address owner,\\n address to,\\n uint tokenId\\n ) private {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(owner, to, tokenId);\\n }\\n\\n // IERC721\u306eapprove\u95a2\u6570\uff0ctokenId\u306e\u6a29\u9650\u3092 to \u30a2\u30c9\u30ec\u30b9\u306b\u6e21\u3059\u3002\\n // \u6761\u4ef6\uff1ato\u306fowner\u3067\u306f\u306a\u3044\u3053\u3068\uff0c\u304b\u3064msg.sender\u306fowner\u3042\u308b\u3044\u306fapprove\u3055\u308c\u305f\u30a2\u30c9\u30ec\u30b9\u3002\\n // _approve\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\\n function approve(address to, uint tokenId) external override {\\n address owner = _owners[tokenId];\\n require(\\n msg.sender == owner || _operatorApprovals[owner][msg.sender],\\n \\"not owner nor approved for all\\"\\n );\\n _approve(owner, to, tokenId);\\n }\\n\\n // spender\u30a2\u30c9\u30ec\u30b9\u304ctokenId\u3092\u4f7f\u3046\u6a29\u9650\u304c\u3042\u308b\u304b\u306a\u3044\u304b\u3092\u8abf\u3079\u308b\u3002\uff08\u3042\u308b\u306e\u306fowner\u304b\\n // approve\u3055\u308c\u305f\u304b\u306e\u3044\u305a\u308c\u3060\u3002approve\u3055\u308c\u305f\u5834\u5408\u306f\u901a\u5e38\u306eapprove\u3042\u308b\u3044\u306f\\n // setApprovalForAll\u306e2\u30d1\u30bf\u30fc\u30f3\uff09\\n function _isApprovedOrOwner(\\n address owner,\\n address spender,\\n uint tokenId\\n ) private view returns (bool) {\\n return (spender == owner ||\\n _tokenApprovals[tokenId] == spender ||\\n _operatorApprovals[owner][spender]);\\n }\\n\\n /*\\n * \u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u95a2\u6570\u3002_balances\u3001_owner\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u8abf\u6574\u3057\u3066 tokenId \u3092 from \u304b\u3089 to\u306b\\n * \u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3059\u308b\u3002\u540c\u6642\u306bTransfer\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\u3002\\n * \u524d\u63d0\u6761\u4ef6:\\n * 1. tokenId \u306f from \u306b\u3088\u3063\u3066\u6240\u6709\u3055\u308c\u3066\u3044\u308b\\n * 2. to \u306f\u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306a\u3044\\n * \u6761\u4ef6\u3092\u6e80\u305f\u3055\u306a\u3044\u5834\u5408\u306frevert\\n */\\n function _transfer(\\n address owner,\\n address from,\\n address to,\\n uint tokenId\\n ) private {\\n require(from == owner, \\"not owner\\");\\n require(to != address(0), \\"transfer to the zero address\\");\\n\\n _approve(owner, address(0), tokenId); // \u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3059\u308b\u306e\u3067\u6a29\u9650\u3092\u30ea\u30bb\u30c3\u30c8\u3059\u308b\\n\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n }\\n\\n // IERC721\u306etransferFrom\u95a2\u6570\u306e\u5b9f\u88c5\uff0c\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3067\u306f\u306a\u3044\u306e\u3067\u3001\\n // \u3053\u306e\u95a2\u6570\u3092\u4f7f\u3046\u306e\u306f\u63a8\u5968\u3055\u308c\u3066\u3044\u306a\u3044\u3002\\n function transferFrom(\\n address from,\\n address to,\\n uint tokenId\\n ) external override {\\n address owner = ownerOf(tokenId);\\n require(\\n _isApprovedOrOwner(owner, msg.sender, tokenId),\\n \\"not owner nor approved\\"\\n );\\n _transfer(owner, from, to, tokenId);\\n }\\n\\n /**\\n * \u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\uff0c\u5b89\u5168\u306btokenId\u3092from\u304b\u3089to\u3078\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3059\u308b\u3002\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\\n * erc721\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u305f\u4e0a\u3067\u3001\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3092\u3059\u308b\u306e\u3067\u3001NFT\u304c\u6c38\u9060\u306b\\n * \u30ed\u30c3\u30af\u3055\u308c\u308b\u5b9f\u614b\u3092\u56de\u907f\u3059\u308b\u3002_transfer\u3001_checkOnERC721Received\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3002\\n * \u6761\u4ef6\uff1a\\n * from \u306f\u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306f\u306a\u3044\\n * to \u306f\u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306f\u306a\u3044\\n * tokenId \u304c\u5b58\u5728\u3057\u3066\u3057\u304b\u3082from\u30a2\u30c9\u30ec\u30b9\u304c\u6240\u6709\\n * to\u304c\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u5834\u5408\u3001\u5fc5\u305aIERC721Receiver-onERC721Received\u3092\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u308b\\n * \u3053\u3068\u304c\u6c42\u3081\u3089\u308c\u308b\\n */\\n function _safeTransfer(\\n address owner,\\n address from,\\n address to,\\n uint tokenId,\\n bytes memory _data\\n ) private {\\n _transfer(owner, from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, _data), \\"not ERC721Receiver\\");\\n }\\n\\n /**\\n * IERC721\u306esafeTransferFrom\u3092\u5b9f\u88c5\u3002\u30bb\u30fc\u30d5\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u95a2\u6570\uff0c_safeTransfer\u95a2\u6570\u3092\u547c\u3073\u51fa\u3057\u3066\u3044\u308b\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint tokenId,\\n bytes memory _data\\n ) public override {\\n address owner = ownerOf(tokenId);\\n require(\\n _isApprovedOrOwner(owner, msg.sender, tokenId),\\n \\"not owner nor approved\\"\\n );\\n _safeTransfer(owner, from, to, tokenId, _data);\\n }\\n\\n // safeTransferFrom\u306e\u30aa\u30fc\u30d0\u30e9\u30a4\u30c9\u95a2\u6570\u3001\u5f15\u6570\u304c\u9055\u3046\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint tokenId\\n ) external override {\\n safeTransferFrom(from, to, tokenId, \\"\\");\\n }\\n\\n /**\\n * mint\u95a2\u6570\u3002_balances\u3001_owners\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u3044\u3058\u308b\u3053\u3068\u3067\u3001tokenId\u3092to\u3078\u30c8\u30e9\u30f3\u30b9\u30d5\u30a1\u3059\u308b\u3002\\n * \u540c\u6642\u306bTransfer\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\u3059\u308b\u3002\\n * \u73fe\u5728\u306e\u72b6\u614b\u3067\u306f\u3001\u8ab0\u3067\u3082\u30df\u30f3\u30c8\u3067\u304d\u308b\u306e\u3067\u3001\u958b\u767a\u8005\u306f\u666e\u901a\u3053\u306e\u95a2\u6570\u3092\u66f8\u304d\u63db\u3048\u308b\\n * \u6761\u4ef6:\\n * 1. tokenId\u304c\u307e\u3060\u5b58\u5728\u3057\u306a\u3044\\n * 2. to\u306f\u30bc\u30ed\u30a2\u30c9\u30ec\u30b9\u3067\u306a\u3044\\n */\\n function _mint(address to, uint tokenId) internal virtual {\\n require(to != address(0), \\"mint to zero address\\");\\n require(_owners[tokenId] == address(0), \\"token already minted\\");\\n\\n _balances[to] += 1;\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n }\\n\\n // \u30d0\u30fc\u30f3\u95a2\u6570\uff0c_balances\u3001_owners\u5909\u6570\u3092\u8abf\u6574\u3057\u3066tokenId\u3092\u30d0\u30fc\u30f3\u3059\u308b\u3002\u540c\u6642\u306bTransfer\u30a4\u30d9\u30f3\u30c8\u3092\u653e\u51fa\\n // \u6761\u4ef6\uff1atokenId\u5b58\u5728\u3002\\n function _burn(uint tokenId) internal virtual {\\n address owner = ownerOf(tokenId);\\n require(msg.sender == owner, \\"not owner of token\\");\\n\\n _approve(owner, address(0), tokenId); // \u6a29\u9650\u3092\u66f4\u65b0\\n\\n _balances[owner] -= 1;\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n }\\n\\n // _checkOnERC721Received\uff1aIERC721Receiver-onERC721Received\u95a2\u6570, \u9001\u308a\u5148\u306fERC721\u4e92\u63db\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u305f\u3081\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint tokenId,\\n bytes memory _data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n return\\n IERC721Receiver(to).onERC721Received(\\n msg.sender,\\n from,\\n tokenId,\\n _data\\n ) == IERC721Receiver.onERC721Received.selector;\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * IERC721Metadata\u306etokenURI\u95a2\u6570\uff0cmetadata\u3092\u8fd4\u3059\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n require(_owners[tokenId] != address(0), \\"Token Not Exist\\");\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\"\\";\\n }\\n\\n /**\\n * {tokenURI}\u306eBaseURI\u3002tokenURI\u306fbaseURI\u3001tokenId\u3092\u3064\u306a\u3044\u3067\u3067\u304d\u305f\u3082\u306e\u3002\\n * \u958b\u767a\u8005\u304c\u3053\u306e\u95a2\u6570\u3092\u66f8\u304d\u304b\u3048\u308b\\n * \u4f8b\u3048\u3070BAYC\u306ebaseURI\u306fipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\"\\";\\n }\\n}\\n\\n```\\n\\n# free mint \u306e APE \u3092\u4f5c\u308d\u3046\\n\\n\u305d\u308c\u3067\u306f\u3001free mint \u306e APE \u3092\u4f5c\u308a\u307e\u3057\u3087\u3046\u304b\u3002totalSupply \u3092 10000 \u500b\u306b\u3057\u3066\u3001mint \u95a2\u6570\u3084 baseURI \u3092\u66f8\u304d\u63db\u3048\u308b\u3060\u3051\u3067\u6e08\u307f\u307e\u3059\u3002\\n\\nbaseURI()\u306e\u8a2d\u5b9a\u3092 BAYS \u3068\u5168\u304f\u540c\u3058\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u3001BAYC \u306e\u733f\u304c\u8868\u793a\u3055\u308c\u308b\u306f\u305a\u3067\u3059\u3002\\n\\n```sol\\n\\n// SPDX-License-Identifier: MIT\\n// by 0xAA\\npragma solidity ^0.8.4;\\n\\nimport \\"./ERC721.sol\\";\\n\\ncontract OmaenoApe is ERC721{\\n uint public MAX_APES = 10000; // \u7dcf\u6570\\n\\n // \u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\\n constructor(string memory name_, string memory symbol_) ERC721(name_, symbol_){\\n }\\n\\n //BAYC\u306ebaseURI\u306fipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/\\n function _baseURI() internal pure override returns (string memory) {\\n return \\"ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/\\";\\n }\\n\\n // mint\u95a2\u6570\\n function mint(address to, uint tokenId) external {\\n require(tokenId >= 0 && tokenId < MAX_APES, \\"tokenId out of range\\");\\n _mint(to, tokenId);\\n }\\n}\\n```\\n\\n\u305d\u308c\u3067\u306f remix \u3092\u958b\u3044\u3066\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u307e\u3057\u3087\u3046\u3002\\n\\n# ERC721 \u3092\u767a\u884c\u3057\u3088\u3046\\n\\nERC721 \u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u304c\u3042\u308c\u3070\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u3066 NFT \u3092\u767a\u884c\u3059\u308b\u3053\u3068\u306f\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306b\u306a\u308a\u307e\u3059\u3002\\n\u4eca\u3001\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u304c\u3067\u304d\u305f\u306e\u3067\u3001remix \u306b\u3066\u767a\u884c\u3057\u307e\u3057\u3087\u3046\u3002\\n\\n\u5b9f\u969b\u306e\u624b\u9806\u306f\u307e\u305f\u306e\u6a5f\u4f1a\u3067\u66f8\u304d\u307e\u3059\u3002\\n\\n# ERC165 \u3068 ERC721\\n\\nNFT \u3092 NFT \u306b\u3064\u3044\u3066\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3067\u304d\u306a\u3044\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3078\u9001\u4ed8\u3057\u3066\u3057\u307e\u3046\u3068\u3001\u6c38\u9060\u306b\u6d88\u5931\u3057\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u3053\u308c\u3092\u9632\u3050\u305f\u3081\u306b`ERC721TokenReceiver`\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306e\u5b9f\u88c5\u304c\u6c42\u3081\u3089\u308c\u307e\u3059\u3002\\n\\n```sol\\ninterface ERC721TokenReceiver {\\n function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes _data) external returns(bytes4);\\n}\\n```\\n\\n\u5b9f\u306f\u3053\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3068\u306f\u3001\u3053\u306e `onERC721REceived` \u95a2\u6570\u306e\u3053\u3068\u3067\u3059\u3002\u3053\u306e\u95a2\u6570\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308c\u3070\u3001NFT \u3092\u51e6\u7406\u3059\u308b\u80fd\u529b\u304c\u3042\u308b\u3068\u3044\u3046\u5ba3\u8a00\u306b\u306a\u308a\u307e\u3059\u3002\\n\\n**THE END**\\n\\n![](ethereum-eth.gif)"},{"id":"web3-term-dictionary","metadata":{"permalink":"/blog/web3-term-dictionary","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/Web3-term-dict/2022-09-29-web3-term-dictionary.md","source":"@site/blog/Web3-term-dict/2022-09-29-web3-term-dictionary.md","title":"Web3 Term Dictionary","description":"Hello, everybody!","date":"2022-09-29T00:00:00.000Z","formattedDate":"2022\u5e749\u670829\u65e5","tags":[{"label":"\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","permalink":"/blog/tags/\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3"},{"label":"Web3","permalink":"/blog/tags/web-3"},{"label":"about","permalink":"/blog/tags/about"}],"readingTime":3.85,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"web3-term-dictionary","title":"Web3 Term Dictionary","authors":["Thurendous","Polymetis"],"blogDescription":"Web3\u7528\u8a9e\u8f9e\u66f8","tags":["\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","Web3","about"]},"prevItem":{"title":"NFT\u3001ERC721\u3068\u306f\u306a\u3093\u305e\u3084\uff08\u30b3\u30fc\u30c9\u89e3\u8aac\uff09","permalink":"/blog/what-is-ERC721-and-NFT-with-code-explained"},"nextItem":{"title":"Why Crypto is the Future","permalink":"/blog/why-crypto-is-the-future"}},"content":"Hello, everybody!\\n\\n## Web3 \u6d41\u884c\u8a9e\\n\\n\u300cgm \u3063\u3066\u4f55\u300d\u3068\u3088\u304f\u805e\u304b\u308c\u308b\u306e\u3067\u3001Web3 \u306e\u6d41\u884c\u8a9e\u3092\u65e5\u672c\u8a9e\u3067\u307e\u3068\u3081\u3066\u7c21\u5358\u306b\u8abf\u3079\u3089\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u3001Web3 \u306e\u8a00\u8a9e\u6587\u5316\u3092\u5e83\u3081\u3066\u3044\u3063\u3066\u308f\u304b\u308a\u3084\u3059\u304f\u306a\u3063\u305f\u3089\u3044\u3044\u306a\u3068\u601d\u3063\u3066\u4f5c\u308a\u307e\u3057\u305f\u3002\\nweb3 \u696d\u754c\u3078\u306e\u30cf\u30fc\u30c9\u30eb\u304c\u4e0b\u304c\u3063\u3066\u3001\u3082\u3063\u3068\u305f\u304f\u3055\u3093\u306e\u4eba\u304c\u53c2\u52a0\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u76db\u308a\u4e0a\u3052\u3066\u3044\u3051\u308c\u3070\u826f\u3044\u306a\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002\\n\\n### A\\n\\nABI: Application Binary Interface \u306f\u3001API \u3068\u4f3c\u3066\u3044\u3066 2 \u3064\u306e\u30d0\u30a4\u30ca\u30ea\u30d7\u30ed\u30b0\u30e9\u30e0\u30e2\u30b8\u30e5\u30fc\u30eb\u9593\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u306e\u3053\u3068\\n\\naddress: \u30a6\u30a9\u30ec\u30c3\u30c8/\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30a2\u30c9\u30ec\u30b9\\n\\nAlpha\uff1a\u30a2\u30eb\u30d5\u30a1\u3001\u3059\u3054\u3044\u53ce\u76ca\u306e\u30c1\u30e3\u30f3\u30b9\u306e\u3053\u3068\u3002\\n\\nAMA\uff1aAsk Me Anything\u3001\u300c\u306a\u3093\u3067\u3082\u805e\u3044\u3066\u304f\u3060\u3055\u3044\u300d\u306e\u30a4\u30d9\u30f3\u30c8\u3067\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5074\u304c\u5b9f\u65bd\u3059\u308b\u4e00\u822c\u53c2\u52a0\u8005\u306e\u8cea\u554f\u3078\u306e\u56de\u7b54\u3092\u884c\u3046\u30a4\u30d9\u30f3\u30c8\u306e\u3053\u3068\\n\\nAMM\uff1aAutonomous Market Making \u306e\u7565\u3067\u3001\u81ea\u52d5\u7684\u306b\u884c\u308f\u308c\u308b\u30de\u30fc\u30b1\u30c3\u30c8\u30e1\u30a4\u30ad\u30f3\u30b0\u3001\u5206\u6563\u578b\u53d6\u5f15\u6240\u306b\u304a\u3051\u308b\u5171\u901a\u6280\u8853\\n\\nape: All in \u3059\u308b\u3053\u3068\u3001\u3059\u3079\u3066\u3092\u8ced\u3051\u3066\u3084\u308b\\n\\nATH\uff1aAll Time High\u3001\u53f2\u4e0a\u6700\u9ad8\u5024\u306e\u3053\u3068\\n\\n### B\\n\\nBlockchain\uff1a\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\\n\\nBridge\uff1a\u30af\u30ed\u30b9\u30c1\u30a7\u30fc\u30f3\u306e\u30d6\u30ea\u30c3\u30b8\u3001\u7570\u306a\u308b\u30d1\u30d6\u30ea\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u4e0a\u306e\u30a2\u30bb\u30c3\u30c8\u3092\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3002\u8907\u96d1\u3055\u304c\u3086\u3048\u306b\u8106\u5f31\u6027\u304c\u3088\u304f\u767a\u898b\u3055\u308c\u308b\\n\\nBuy the fucking dip\uff1a\u4eee\u60f3\u901a\u8ca8\u3092\u5b89\u3044\u5024\u6bb5\u3067\u62fe\u3046\uff08\u8cb7\u3046\uff09\u3053\u3068\\n\\n### C\\n\\nCeFi\uff1aCentralized Finance \u306e\u7565\u3067\u3001DeFi \u306e\u9006\\n\\nCex: Centralized Exchange\uff08\u30bb\u30f3\u30c8\u30e9\u30eb\u30fb\u30a8\u30af\u30b9\u30c1\u30a7\u30f3\u30b8\uff09\u3067\u3001Binance\u3001Coincheck \u306a\u3069\u306e\u53d6\u5f15\u6240\\n\\nctf: Capture The Flag\u3001\u30b5\u30a4\u30d0\u30fc\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u6280\u8853\u30b3\u30f3\u30c6\u30b9\u30c8\u3002\\n\\nchad\uff1a \u3059\u3054\u3044\u4eba\uff08\u4e00\u822c\u7684\u306b\u306f\u7537\u6027\uff09\\n\\n### D\\n\\nDAO: Decentralized Autonomous Organization\uff08\u5206\u6563\u578b\u81ea\u5f8b\u7d44\u7e54\uff09\\n\\nDapp\uff1a\u5206\u6563\u578b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3001Decentralized Application \u306e\u7565\\n\\nDeFi: Decentralized Finance\uff08\u5206\u6563\u578b\u91d1\u878d\uff09\u306e\u7565\\n\\ndegen\uff1a\u30ae\u30e3\u30f3\u30d6\u30eb\u4e2d\u6bd2\u8005\u3067\u3084\u305f\u3089\u3068 ape in \u3059\u308b\u4eba\\n\\ndelist: \u30ea\u30b9\u30c6\u30a3\u30f3\u30b0\u304b\u3089\u9664\u5916\u3059\u308b\u3053\u3068\\n\\nDeSci: Decentralized Science\u3001[\u5206\u6563\u578b\u30b5\u30a4\u30a8\u30f3\u30b9](https://note.com/hirotaiyohamada/n/n82e5c7d22c31)\u3002\\n\\nDeSoc\uff1a\u5206\u6563\u578b\u793e\u4f1a\u3001Decentralized Society\\n\\nDex\uff1aDecentralized Exchange\u3001\u5206\u6563\u578b\u53d6\u5f15\u6240\\n\\nDiamond hands\uff1a\u30c0\u30a4\u30e4\u30e2\u30f3\u30c9\u30cf\u30f3\u30c9\u3001\u30c8\u30fc\u30af\u30f3/NFT \u3092\u9577\u671f\u306b\u6e21\u3063\u3066\u4fdd\u6709\u3067\u304d\u308b\u4eba\\n\\nDID: Decentralized Identity\uff08\u5206\u6563\u578b\u30a2\u30a4\u30c7\u30f3\u30c6\u30a3\u30c6\u30a3\uff09\\n\\ndiscord\uff1a\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306e\u305f\u3081\u306e\u5171\u901a\u60c5\u5831\u767a\u4fe1\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\uff08\u30e9\u30a4\u30f3\u306b\u306b\u3066\u3044\u308b\u304c\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u306b\u7279\u5316\u3057\u3066\u3044\u308b\uff09\\n\\ndm: \u30c0\u30a4\u30ec\u30af\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\u3001\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30e1\u30c3\u30bb\u30fc\u30b8\\n\\nDYOR\uff1aDo Your Own Research\uff08\u81ea\u5206\u3067\u8abf\u3079\u3066\u81ea\u5206\u3067\u8cac\u4efb\u3092\u3068\u308c\uff09\\n\\nDue diligence\uff1a\u30c7\u30e5\u30fc\u30c7\u30a3\u30ea\u30b8\u30a7\u30f3\u30b9\uff08\u6295\u8cc7\u3092\u884c\u3046\u306b\u3042\u305f\u3063\u3066\u6295\u8cc7\u5bfe\u8c61\u3068\u306a\u308b\u4f01\u696d\u3084\u6295\u8cc7\u5148\u306e\u4fa1\u5024\u3084\u30ea\u30b9\u30af\u306a\u3069\u3092\u8abf\u67fb\u3059\u308b\u9069\u6b63\u306a\u52aa\u529b\u306e\u3053\u3068\uff09\\n\\n### E\\n\\nEOA: Externally Owned Accounts\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u500b\u3005\u306e\u30e6\u30fc\u30b6\u30fc\u3067\u3001\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30a2\u30c9\u30ec\u30b9\u3067\u306f\u306a\u3044\u3053\u3068\u3001\u666e\u901a\u306e\u30a6\u30a9\u30ec\u30c3\u30c8\u306e\u3053\u3068\\n\\nERC20\uff1aEther \u4e0a\u306e\u30c8\u30fc\u30af\u30f3\u3092\u5747\u8cea\u5316\u3059\u308b\u305f\u3081\u306e\u898f\u683c\\n\\nERC721: Ether \u4e0a\u306e\u975e\u5747\u8cea\u306a\u30c8\u30fc\u30af\u30f3\u898f\u683c\u3002\\n\\nEthereum\uff1a\u5206\u6563\u578b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u3067\u3042\u308b\u30a4\u30fc\u30b5\u3001\u304a\u3088\u3073\u305d\u306e\u30cd\u30a4\u30c6\u30a3\u30d6\u30c8\u30fc\u30af\u30f3\u306e\u540d\u79f0\u3002\\n\\nEVM\uff1aEthereum Virtual Machine \u306e\u7565\u3067\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u958b\u767a\u8005\u304c\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u4e0a\u306b\u5206\u6563\u578b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\uff08Dapp\uff09\u3092\u5c55\u958b\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u3059\u3002\\n\\n### F\\n\\nFT\uff1a\u30d5\u30a1\u30f3\u30b8\u30d6\u30eb\u30c8\u30fc\u30af\u30f3\\n\\nfam\uff1a\u5bb6\u65cf\u306e\u3053\u3068\\n\\nfloor price\uff1a\u30d5\u30ed\u30a2\u30d7\u30e9\u30a4\u30b9\u3001\u30b9\u30bf\u30fc\u30c8\u306e\u4fa1\u683c\u306e\u3053\u3068\\n\\nfren\uff1afriend\uff0c\u53cb\u9054\u3001\u53cb\\n\\nFomo\uff1aFear of Missing Out\u3001\u6a5f\u4f1a\u3092\u9003\u3059\u3053\u3068\u304c\u6016\u304f\u3066\u76f2\u76ee\u7684\u306b ape in \u3059\u308b\u3053\u3068\\n\\nFud\uff1aFear\uff08\u6050\u6016\uff09\u3001Uncertainty\uff08\u4e0d\u78ba\u5b9f\u6027\uff09\u3001Doubt\uff08\u7591\u3044\uff09\u3067\u3001\u5e02\u5834\u306e\u60aa\u3044\u9762\u3092\u717d\u308b\u60c5\u5831\\n\\nFYI\uff1afor your information\uff08\u3054\u53c2\u8003\u307e\u3067\u306b\uff09\\n\\nFull Send\uff1a\u30d1\u30ef\u30fc\u5168\u958b\u3067\\n\\n### G\\n\\ngas\uff1a\u30ac\u30b9\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u4e0a\u3067\u53d6\u5f15\u3092\u5b8c\u4e86\u3055\u305b\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u30ac\u30b9\u306e\u3053\u3068\\n\\ngas fee\uff1a\u30ac\u30b9\u4ee3\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u4e0a\u3067\u53d6\u5f15\u3092\u5b8c\u4e86\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u30ac\u30b9\u4ee3\uff08\u5358\u4f4d\u306f ETH\uff09\u2192 (gas fee) = gas \xd7 (gas price)\\n\\ngas limit\uff1a1 \u56de\u306e\u53d6\u5f15\u3067\u6d88\u8cbb\u3067\u304d\u308b\u30ac\u30b9\u306e\u6700\u5927\u5024\\n\\ngas price\uff1a\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u304a\u3051\u308b\u30ac\u30b9\u306e\u5358\u4f4d\u3042\u305f\u308a\u306e\u4fa1\u683c\\n\\ngas war\uff1a\u4eba\u6c17\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u3088\u308b\u30ac\u30b9\u4ee3\u306e\u9ad8\u9a30\u3002\\n\\ngm\uff1a\u304a\u306f\u3088\u3046\u3054\u3056\u3044\u307e\u3059\u3002web3 \u306b\u304a\u3051\u308b\u65e5\u5e38\u7684\u306a\u6328\u62f6\\n\\ngn\uff1a\u304a\u3084\u3059\u307f\u306a\u3055\u3044\\n\\ngg\uff1a\u30b0\u30c3\u30c9\u30b2\u30fc\u30e0\u3001\u30b2\u30fc\u30e0\u4ef2\u9593\u304c\u3088\u304f\u4f7f\u3046\u6328\u62f6\\n\\n### H\\n\\nhacked: \u30cf\u30c3\u30ad\u30f3\u30b0\u3055\u308c\u305f\\n\\nHODL\uff1ahodl on dear love\u3001\u30c0\u30a4\u30e4\u30e2\u30f3\u30c9\u30cf\u30f3\u30c9\u3001\u9577\u671f\u306b\u6e21\u3063\u3066\u30db\u30fc\u30eb\u30c9\u3059\u308b\u3053\u3068\\n\\n### I\\n\\nIRL\uff1aIn Real Life \u306e\u7565\\n\\nifykyk: \u308f\u304b\u308b\u4eba\u306b\u306f\u308f\u304b\u308b\\n\\n### L\\n\\nlayer2: \u65e2\u5b58\u306e\u30d1\u30d6\u30ea\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u4e0a\u306b\u69cb\u7bc9\u3055\u308c\u305f\u30ec\u30a4\u30e4\u30fc 2 \u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3001\u901a\u5e38\u306f\u30ec\u30a4\u30e4\u30fc\uff11\u3088\u308a\u9ad8\u901f\u3067\u5b89\u4fa1\u306a\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u767a\u884c\u3067\u304d\u3001\u3088\u308a UX \u304c\u3088\u3044\\n\\nLFG\uff1aLet\'s Fucking Go\uff01Ape in \u3059\u308b\u3053\u3068\\n\\nLGTM\uff1aLooking good to me, \u898b\u305f\u611f\u3058\u306f\u3044\u3044\u306d\\n\\nliquidity\uff1a \u6d41\u52d5\u6027\\n\\nLMAO\uff1a\u30af\u30bd\u7b11\u3063\u305f\\n\\n### M\\n\\nmaxi\uff1a\u30de\u30af\u30b7\u3001\u4f55\u304b\u3092\u3082\u306e\u3059\u3054\u3044\u4fe1\u4ef0\u3057\u3066\u3044\u308b\u4eba\\n\\nmeme\uff1a\u30df\u30fc\u30e0\u3001\u30cd\u30bf\u753b\u50cf\u306a\u3069\\n\\nMempool: \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30d0\u30c3\u30d5\u30a1\u30d7\u30fc\u30eb\u3002\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u304c\u9001\u4fe1\u3055\u308c\u305f\u5f8c\u306b mempool \u306b\u306f\u8868\u793a\u3055\u308c\u308b\u304c\u3001\u307e\u3060\u30c1\u30a7\u30fc\u30f3\u4e0a\u306b\u306e\u3063\u3066\u3044\u306a\u3044\u72b6\u614b\\n\\nMerkle Tree\uff1a\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u304c\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u5b89\u5168\u306b\u691c\u8a3c\u30fb\u96c6\u7d04\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3002\\n\\nMEV\uff1aMiner Extractable Value \u307e\u305f\u306f Maximal Extractable Value \u306e\u7565\u3067\u3001\u30d6\u30ed\u30c3\u30af\u5185\u306e\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u542b\u3081\u305f\u308a\u3001\u9664\u5916\u3057\u305f\u308a\u3001\u4e26\u3073\u66ff\u3048\u305f\u308a\u3059\u308b\u3053\u3068\u3067\u30de\u30a4\u30ca\u30fc\u304c\u5f97\u308b\u3053\u3068\u306e\u3067\u304d\u308b\u5229\u76ca\u306e\u3053\u3068\\n\\nMint\uff1aMint NFT/ERC20\u3001\u30df\u30f3\u30c8\u3059\u308b\u3001\u92f3\u9020\u3059\u308b\\n\\nMoon\uff1a\u4fa1\u683c\u304c\u6025\u9a30\u3057\u3066\u6708\u307e\u3067\u98db\u3076\u3001to the moon\\n\\n### N\\n\\nnfa: Not Financial Advice\u3001\u300c\u30d5\u30a3\u30ca\u30f3\u30b7\u30e3\u30eb\u30a2\u30c9\u30d0\u30a4\u30b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u300d\\n\\nNFT: Non-Fungible Token\u3001\u30ce\u30f3\u30d5\u30a1\u30f3\u30b8\u30d6\u30eb\u30c8\u30fc\u30af\u30f3\u3067\u3059\u3002\\n\\nngmi: not gonna make it, \u300c\u3060\u3081\u3060\u3001\u3046\u307e\u304f\u3044\u304b\u306a\u3044\u300d\\n\\nNoob\uff1a\u30eb\u30fc\u30ad\u30fc\u3001\u65b0\u4eba\u3001\u304f\u305d\u7d20\u4eba\\n\\nNonce: \u91cd\u8907\u3092\u9632\u3050\u305f\u3081\u306b\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u53d6\u5f15\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u756a\u53f7\u3067\u3001\u5404\u53d6\u5f15\u306b 1 \u3064\u305a\u3064\u8ffd\u52a0\u3055\u308c\u308b\u3002\u5404 Nonce \u306f 1 \u5ea6\u3060\u3051\u4f7f\u7528\u3067\u304d\u308b\\n\\n### O\\n\\nOG\uff1aOriginal Gangster\u3001\u53e4\u53c2\u306e\u4eba\\n\\non-chain\uff1a\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u306e\u3063\u3066\u3044\u308b\\n\\noff-chain\uff1a\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u3067\u306f\u306a\u304f\u3001\u30aa\u30d5\u30c1\u30a7\u30fc\u30f3\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u306e\u3063\u3066\u3044\u306a\u3044\\n\\noptimistic rollups: \u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u306e layer2 \u306e\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u306e\u4e00\u3064\\n\\noracle\uff1a[\u30aa\u30e9\u30af\u30eb](https://zenn.dev/jpyc/articles/a8b3710676c433)\u3001\u975e\u4e2d\u592e\u96c6\u6a29\u7684\u306b\u30c7\u30fc\u30bf\u3092\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u306b\u6301\u3063\u3066\u3053\u308c\u308b\u4f55\u304b\\n\\n### P\\n\\npaper hands: \u30c0\u30a4\u30e4\u30e2\u30f3\u30c9\u306e\u624b\u306e\u53cd\u5bfe\u8a9e\u3067\u3001\u5168\u304f\u30db\u30fc\u30eb\u30c9\u3067\u304d\u306a\u3044\u4eba\\n\\npfp: \u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u753b\u50cf\\n\\nPoS\uff1aProof of Stake \u306e\u7565\u3067\u3001\u53c2\u52a0\u8005\u306f POW \u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u30d1\u30ef\u30fc\u306e\u4ee3\u308f\u308a\u306b\u30c8\u30fc\u30af\u30f3\u306e staking \u306b\u3088\u3063\u3066\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u6b63\u5e38\u306a\u6a5f\u80fd\u3092\u7dad\u6301\u3055\u305b\u308b\\n\\nPoW\uff1aProof of Work\uff08\u30d7\u30eb\u30fc\u30d5\u30fb\u30aa\u30d6\u30fb\u30ef\u30fc\u30af\uff09\u306e\u7565\u3067\u3001\u53c2\u52a0\u8005\u304c\u30b3\u30f3\u30d4\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0\u30d1\u30ef\u30fc\u3068\u30a8\u30cd\u30eb\u30ae\u30fc\u3092\u6d88\u8cbb\u3057\u3066\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u30fb\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u6b63\u5e38\u306a\u6a5f\u80fd\u3092\u7dad\u6301\u3055\u305b\u308b\\n\\nprolly nothing: Probbably Nothing\u3001\u300c\u4f55\u3082\u8d77\u3053\u3089\u306a\u3044\u304b\u3082\u3060\u3051\u3069\u300d\\n\\n### R\\n\\nReFi\uff1aRegenerative Finance\u3001\u518d\u751f\u53ef\u80fd\u30fb\u6301\u7d9a\u53ef\u80fd\u306a\u91d1\u878d\u3002\\n\\nrekt\uff1a\u5927\u7834\u3001\u7d42\u4e86\u3001\u7834\u7523\u3001\u30b2\u30fc\u30e0\u30aa\u30fc\u30d0\u30fc\\n\\nroadmap\uff1a\u30ed\u30fc\u30c9\u30de\u30c3\u30d7\\n\\nRT\uff1aTwitter \u3092\u30ea\u30c4\u30a4\u30fc\u30c8\u3059\u308b\\n\\nrug\uff1a\u30e9\u30b0\u30d7\u30fc\u30eb\u3001\u9003\u3052\u308b\uff0f\u30bc\u30ed\u306b\u306a\u308b\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5074\u304c\u5168\u3066\u306e\u8cc7\u91d1\u3092\u629c\u304d\u53d6\u3063\u3066\u7d42\u4e86\u3059\u308b\\n\\n### S\\n\\nSandwich Attack\uff1a\u30b5\u30f3\u30c9\u30a4\u30c3\u30c1\u653b\u6483\u3001mempool \u3067\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306f\u8ab0\u3067\u3082\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3053\u3068\u304b\u3089\u3001\u88ab\u5bb3\u8005\u306f\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u3067\u8cfc\u5165\u6ce8\u6587\u3092\u51fa\u3059\u3068\u3001\u653b\u6483\u8005\u306f\u305d\u308c\u3092\u5229\u7528\u3057\u3066\u88ab\u5bb3\u8005\u306e\u8cfc\u5165\u6ce8\u6587\u306e\u524d\u5f8c\u306b\u53d6\u5f15\u3092\u4ed5\u639b\u3051\u3066\u88ab\u5bb3\u8005\u306b\u52b9\u7387\u306e\u60aa\u3044\u53d6\u5f15\u3092\u5f37\u3044\u3066\u3001\u5229\u76ca\u3092\u53d6\u308d\u3046\u3068\u3059\u308b\u653b\u6483\u306e\u3053\u3068\u3002\u3053\u3046\u3044\u3046\u3053\u3068\u304c\u3042\u308b\u3053\u3068\u304b\u3089\u3001\u30aa\u30f3\u30c1\u30a7\u30fc\u30f3\u306e\u4e16\u754c\u306f\u5f31\u8089\u5f37\u98df\u306e\u30d6\u30e9\u30c3\u30af\u30d5\u30a9\u30ec\u30b9\u30c8\u3068\u3082\u547c\u3070\u308c\u3066\u3044\u308b\\n\\nSBT\uff1aSoulbound Token\u3001\u9b42\u304c\u5bbf\u3063\u305f\u30c8\u30fc\u30af\u30f3\u3001\u3064\u307e\u308a\u3042\u306a\u305f\u306e\u9b42\u3068\u30d0\u30f3\u30c9\u30eb\u3068\u306a\u3063\u3066\u53d6\u5f15\u3067\u304d\u306a\u3044 NFT \u306e\u3053\u3068\u3001\u305f\u3060\u3057\u3001\u81ea\u5206\u306f\u81ea\u5206\u306e SBT \u3092 burn \u3067\u304d\u308b\\n\\nshilling: \u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u3001\u55b6\u696d\u3059\u308b\\n\\nSmart Contracts\uff1a\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u4e0a\u3067\u52d5\u4f5c\u3059\u308b\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u3053\u3068\u3067\u3001\u901a\u5e38\u306f\u4e00\u65e6\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u3068\u3001\u6b62\u3081\u3089\u308c\u308b\u3053\u3068\u306f\u306a\u3044\\n\\nsolidity: \u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u4e0a\u3067\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u8a18\u8ff0\u3059\u308b\u305f\u3081\u306e\u8a00\u8a9e\\n\\nSend it: \u4e86\u89e3\\n\\n### T\\n\\nTokenomics\uff1a\u30c8\u30fc\u30af\u30f3\u30a8\u30b3\u30ce\u30df\u30fc\\n\\ntradfi: \u4f1d\u7d71\u7684\u306a\u91d1\u878d\u30b7\u30b9\u30c6\u30e0\u306e\u3053\u3068\\n\\nTVL: Total Value Locked\u3001\u30d7\u30ed\u30c8\u30b3\u30eb\u306b\u30ed\u30c3\u30af\u3055\u308c\u305f\u8cc7\u91d1\u306e\u5408\u8a08\\n\\n### U\\n\\nUp Only\uff1a\u4fa1\u683c\u304c\u4e0a\u304c\u308a\u7d9a\u3051\u308b\uff08\u5927\u4f53\u306f\u7686\u306e\u7406\u60f3\u306a\u9858\u671b\u306a\u3060\u3051\uff09\\n\\n### W\\n\\nwagmi\uff1aWe are gonna make it, \u79c1\u9054\u306f\u5fc5\u305a\u6210\u529f\u3059\u308b\u3002 \u307e\u305f\u3001\u591a\u304f\u306e\u5171\u901a\u30d5\u30c3\u30af\u3092\u542b\u3093\u3060 web3 react \u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u540d\u524d\u3067\u3082\u3042\u308b \u2192 \u3053\u308c\u306f\u304a\u3082\u3057\u308d\u3044\\n\\nwallet\uff1a\u30a6\u30a9\u30ec\u30c3\u30c8\\n\\nweb3.0: Web1.0 \u3084 Web2.0 \u3068\u306f\u5bfe\u7167\u7684\u306a\u3082\u306e\u3067\u3001\u5206\u6563\u5316\u3001\u975e\u4e2d\u592e\u96c6\u6a29\u5316\u3068\u30c7\u30b8\u30bf\u30eb\u6240\u6709\u6a29\u306b\u3088\u3063\u3066\u7279\u5fb4\u3065\u3051\u3089\u308c\u308b\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306e\u3053\u3068\\n\\nwen\uff1a\u3044\u3064\uff1f\\n\\nwen token\uff1a\u3044\u3064\u30a8\u30a2\u30c9\u30ed\u3059\u3093\u306e\uff1f\\n\\nWETH\uff1aWrapped Ethereum\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30c8\u30fc\u30af\u30f3\u306e ERC20 \u30d0\u30fc\u30b8\u30e7\u30f3\\n\\nwhale\uff1a\u304f\u3058\u3089\u3001\u5927\u91cf\u306e\u304a\u91d1\u30fb\u30c8\u30fc\u30af\u30f3\u3092\u4fdd\u6709\u3059\u308b\u4eba\\n\\nWL\uff1aWhite list\u3001\u30db\u30ef\u30a4\u30c8\u30ea\u30b9\u30c8\u3002\u7279\u6a29\u306e\u3042\u308b\u30e6\u30fc\u30b6\u30fc\u7fa4\u306e\u3053\u3068\\n\\n### Z\\n\\nzk: zero-knowledge proof, \u30bc\u30ed\u77e5\u8b58\u8a3c\u660e\u306e\u3053\u3068\u3001\u8ab0\u304b\u304c\u3042\u308b\u79d8\u5bc6\u3092\u3057\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u3001\u305d\u306e\u79d8\u5bc6\u81ea\u4f53\u3092\u660e\u304b\u3055\u305a\u306b\u8a3c\u660e\u3067\u304d\u308b"},{"id":"why-crypto-is-the-future","metadata":{"permalink":"/blog/why-crypto-is-the-future","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/Why-crypto-is-the-future/2022-09-20-what-is-Scaricity.md","source":"@site/blog/Why-crypto-is-the-future/2022-09-20-what-is-Scaricity.md","title":"Why Crypto is the Future","description":"Crypto is the future","date":"2022-09-20T00:00:00.000Z","formattedDate":"2022\u5e749\u670820\u65e5","tags":[{"label":"\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","permalink":"/blog/tags/\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3"},{"label":"\u30af\u30ea\u30d7\u30c8","permalink":"/blog/tags/\u30af\u30ea\u30d7\u30c8"},{"label":"\u672a\u6765","permalink":"/blog/tags/\u672a\u6765"},{"label":"\u6b74\u53f2","permalink":"/blog/tags/\u6b74\u53f2"},{"label":"\u30e1\u30bf\u30d0\u30fc\u30b9","permalink":"/blog/tags/\u30e1\u30bf\u30d0\u30fc\u30b9"}],"readingTime":8.092,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"why-crypto-is-the-future","title":"Why Crypto is the Future","authors":["Thurendous","Polymetis"],"blogDescription":"\u306a\u305c\u30af\u30ea\u30d7\u30c8\u306f\u672a\u6765\u304b","tags":["\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","\u30af\u30ea\u30d7\u30c8","\u672a\u6765","\u6b74\u53f2","\u30e1\u30bf\u30d0\u30fc\u30b9"]},"prevItem":{"title":"Web3 Term Dictionary","permalink":"/blog/web3-term-dictionary"},"nextItem":{"title":"About Scaricity","permalink":"/blog/about-scaricity"}},"content":"## Crypto is the future\\n\\n\u7d50\u8ad6\u304b\u3089\u8a00\u3044\u307e\u3059\u3002\u307c\u304f\u306f\u30af\u30ea\u30d7\u30c8\u304c\u672a\u6765\u3060\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002\\n\\n\u305d\u306e\u7406\u7531\u3092\u8a9e\u308b\u306b\u306f\u3001\u7d50\u69cb\u306a\u52b4\u529b\u3068\u6642\u9593\u304c\u5fc5\u8981\u306a\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u8a00\u8a9e\u5316\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u81ea\u5206\u306e\u982d\u306e\u6574\u7406\u306b\u3082\u306a\u308b\u306e\u3067\u3001\u3053\u3053\u3067\u50d5\u306f\u305d\u308c\u306b\u6311\u6226\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\\n\\n\u5c11\u3057\u60f3\u50cf\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002\\n\\n> \u73fe\u5b9f\u4e16\u754c\u306e\u3069\u3093\u306a\u3082\u306e\u3067\u3082\uff08\u30b5\u30fc\u30d3\u30b9\u3001\u4e0d\u52d5\u7523\u3001\u50b5\u6a29\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3001\u8cb7\u3044\u7269\u3001\u56fd\u50b5\u3001\u30b4\u30fc\u30eb\u30c9\u3001\u30db\u30c6\u30eb\u306e\u3044\u3061\u65e5\u6cca\u307e\u308b\u6a29\u5229\u3001\u306a\u3069\u306a\u3069\u3042\u308a\u3068\u3042\u3089\u3086\u308b\u3082\u306e\uff09\u3001\u307e\u305f\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u306b\u3042\u308b\u3069\u3093\u306a\u3082\u306e\u3067\u3082\uff08\u30b2\u30fc\u30e0\u30a2\u30a4\u30c6\u30e0\u3001\u97f3\u697d\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u306e\u571f\u5730\u3001\u30b2\u30fc\u30e0\u30ad\u30e3\u30e9\u306e\u30b9\u30ad\u30f3\u306a\u3069\u306a\u3069\uff09\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u3067\u30dc\u30fc\u30c0\u30ec\u30b9\u306b\u30df\u30c9\u30eb\u30de\u30f3\u306a\u3057\u3067\u3001\u30aa\u30fc\u30d7\u30f3\u306b\u516c\u5e73\u306b\u53d6\u5f15\u304c\u3067\u304d\u308b\u6642\u4ee3\\n>\\n> \u56fd\u5883\u306a\u3069\u95a2\u4fc2\u306a\u3057\u306b\u30b9\u30e0\u30fc\u30ba\u306b\u591a\u6587\u5316\u591a\u8a00\u8a9e\u5354\u529b\u95a2\u4fc2\u306e\u7d44\u7e54\u3092\u7bc9\u3051\u3066\u3001\u305d\u3057\u3066\u5831\u916c\u3092\u76f4\u63a5\u7684\u306b\u81ea\u5206\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u3082\u3089\u3048\u308b\u3002\u306a\u306b\u304b\u6ca1\u982d\u3067\u304d\u308b\u3088\u3046\u306a\u3053\u3068\u306b\u95a2\u3057\u3066\u30b0\u30ed\u30fc\u30d0\u30eb\u306b\u52df\u96c6\u3057\u3066\u7d44\u7e54\u3092\u4e00\u77ac\u306b\u4f5c\u3063\u3066\u4f55\u304b\u3092\u3084\u3063\u305f\u308a\u3001\u53ce\u76ca\u5316\u3067\u304d\u305f\u308a\\n\\n\u3053\u308c\u304c\u50d5\u304c\u8003\u3048\u305f\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u8fd1\u672a\u6765\u3067\u3059\u3002\u3082\u3061\u308d\u3093\u3001\u69d8\u3005\u306a\u58c1\u3084\u30cf\u30fc\u30c9\u30eb\u304c\u7acb\u3061\u306f\u3060\u304b\u3063\u3066\u3044\u308b\u306e\u306f\u9593\u9055\u3044\u306a\u3044\u3067\u3059\u3002\u3051\u308c\u3069\u3001\u305d\u308c\u304c\u4f55\u5e74\u304b\u304b\u308b\u304b\u308f\u304b\u308a\u307e\u305b\u3093\u304c\u3001\u8fd1\u3044\u3046\u3061\u305d\u308c\u306b\u8fd1\u3044\u5f62\u614b\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u306a\u305c\u306a\u3089\u3001\u305d\u3046\u3044\u3063\u305f\u30a4\u30f3\u30d5\u30e9\u306f\u3059\u3067\u306b\u3067\u304d\u3066\u304d\u3066\u6539\u5584\u3082\u3069\u3093\u3069\u3093\u3055\u308c\u3066\u3044\u3063\u3066\u3044\u308b\u6642\u4ee3\u306a\u306e\u3067\u3001\u305d\u3046\u306a\u3063\u3066\u3044\u304f\u306e\u306f\u76ee\u306b\u898b\u3048\u305f\u304b\u3089\u3067\u3059\u3002\\n\\n\u307e\u305f\u3001\u81ea\u5206\u304c\u8003\u3048\u305f\u4e16\u754c\u306b\u6bd4\u3079\u3066\u5b9f\u969b\u306b\u306f\u3082\u3063\u3068\u9032\u3093\u3067\u3044\u308b\u53ef\u80fd\u6027\u304c\u7d50\u69cb\u9ad8\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u306a\u305c\u304b\u3068\u3044\u3046\u3068\u3001\u4eba\u9593\u306f\u7dda\u5f62\u7684\u306b\u7269\u4e8b\u3092\u8003\u3048\u304c\u3061\u3067\u3042\u308a\u3001\u4eca\u306e\u72b6\u6cc1\u304c\u3088\u308a\u3088\u3044\u72b6\u6cc1\u306b\u306a\u308b\u3068\u3044\u3046\u60f3\u50cf\u3057\u304b\u3067\u304d\u307e\u305b\u3093\u3002\u5b9f\u969b\u306b\u306f\u4eca\u3067\u306f\u8003\u3048\u305f\u3053\u3068\u306e\u306a\u3044\u72b6\u6cc1\u306b\u306a\u3063\u305f\u308a\u3059\u308b\u306e\u3082\u3042\u308a\u5f97\u307e\u3059\u3002\u81ea\u5206\u304c\u60f3\u50cf\u529b\u306b\u6b20\u3051\u308b\u306e\u3082\u7121\u7406\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3001\u73fe\u6642\u70b9\u306b\u57fa\u3065\u3044\u3066\u4e88\u6e2c\u3092\u3057\u306a\u3044\u3068\u4f55\u3082\u59cb\u307e\u308a\u307e\u305b\u3093\u3088\u306d\u3002\\n\\n\u7d50\u679c\u3092\u8a00\u3063\u305f\u306e\u306f\u3044\u3044\u3051\u3069\u3001\u306a\u3093\u3067\u305d\u3046\u306a\u308b\u3093\u3060\uff1f\u3068\u601d\u3046\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u3053\u3053\u304b\u3089\u8ff0\u3079\u3066\u3044\u304d\u307e\u3059\u3002\u8a00\u3044\u305f\u3044\u3053\u3068\u304c\u5c71\u7a0b\u3042\u308b\u306e\u3067\u3001\u8a18\u4e8b\u306f\u30b7\u30ea\u30fc\u30ba\u5316\u3057\u307e\u3059\u3002\\n\\n## \u30ea\u30a2\u30eb\u304b\u3089\u30d0\u30fc\u30c1\u30e3\u30eb\u3078\\n\\n\u5927\u304d\u306a\u7406\u7531\u3068\u3057\u3066\u306f\u3001\u4eba\u9593\u793e\u4f1a\u306f\u30ea\u30a2\u30eb\u304b\u3089\u30d0\u30fc\u30c1\u30e3\u30eb\u3078\u9077\u79fb\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u5927\u304d\u306a\u7406\u7531\u3067\u3059\u3002\\n\\n### Metaverse\\n\\n\u6700\u8fd1\u3060\u3068\u3001\u30e1\u30bf\u30d0\u30fc\u30b9\u3068\u3044\u3046\u30ef\u30fc\u30c9\u304c\u304b\u306a\u308a\u8033\u306b\u5165\u3063\u3066\u304f\u308b\u69d8\u306b\u306a\u3063\u305f\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002\u30e1\u30bf\u30d0\u30fc\u30b9\u3068\u805e\u304f\u3068\u3001\u308f\u3051\u304c\u308f\u304b\u3089\u306a\u3044\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u81ea\u5206\u306e\u7406\u89e3\u3067\u3059\u3068\u3001\u3053\u306e\u30ef\u30fc\u30c9\u306f\u307e\u3060\u610f\u5473\u304c\u5b9a\u307e\u3063\u3066\u3044\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u3042\u3048\u3066\u610f\u898b\u3092\u8a00\u308f\u305b\u3066\u3082\u3089\u3046\u3068\u3001\u30e1\u30bf\u30d0\u30fc\u30b9\u306f\u3044\u308f\u3086\u308b\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u305d\u306e\u3082\u306e\u306e\u5b9a\u7fa9\u306b\u306a\u308a\u307e\u3059\u3002\u8ab0\u3067\u3082\u4f5c\u308c\u307e\u3059\u3057\u3001\u3059\u3067\u306b\u3042\u308b\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u305d\u306e\u3082\u306e\u3082\u5e83\u7fa9\u7684\u306b\u30e1\u30bf\u30d0\u30fc\u30b9\u306a\u306e\u3067\u3059\u3002\\n\\n\u4f8b\u3048\u3070\u3001\u3059\u3067\u306b\u50d5\u9054\u306e\u30b0\u30fc\u30b0\u30eb\u30a2\u30ab\u30a6\u30f3\u30c8\u3042\u308b\u3044\u306f\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30a6\u30a9\u30ec\u30c3\u30c8\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3068\u304b\u304c\u30e1\u30bf\u30d0\u30fc\u30b9\u306e\u50d5\u9054\u306e\u5206\u8eab\u3068\u7406\u89e3\u3057\u3066\u3082\u3088\u3044\u3067\u3057\u3087\u3046\u3002\u305f\u3060\u3001\u3053\u306e\u30e1\u30bf\u30d0\u30fc\u30b9\u306f\u307e\u3060\u307e\u3060\u521d\u6b69\u7684\u306a\u6bb5\u968e\u306a\u306e\u3067\u3001\u672c\u5f53\u306b\u4f7f\u3048\u308b\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u3068\u8a00\u3048\u308b\u306e\u304b\u3068\u3044\u3046\u3068\u3053\u308d\u304c\u78ba\u304b\u306b\u3042\u308a\u307e\u3059\u3002\\n\\n### \\"Software is eating the world\\"\\n\\n\u82f1\u8a9e\u570f\u3067\u306f\u3068\u3066\u3082\u6709\u540d\u306a\u8a00\u8449\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u308c\u306f\u3053\u306e\u300cSoftware is eating the world. (\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306f\u4e16\u754c\u3092\u98f2\u307f\u8fbc\u3093\u3067\u3044\u308b)\u300d\u3068\u3044\u3046\u8a00\u8449\u3067\u3059\u3002\\n\\n\u3053\u308c\u306f 2011 \u5e74\u306b A16Z \u3068\u3044\u3046\u3068\u3066\u3082\u5148\u9032\u7684\u306a\u8996\u91ce\u3092\u6301\u3064[ VC \u306e\u30d5\u30a1\u30f3\u30c0\u30fc\u304c\u8a71\u3057\u305f\u8a00\u8449](https://a16z.com/2011/08/20/why-software-is-eating-the-world/)\u3067\u3059\u3002\u305d\u306e\u5f8c\u306e\u4e16\u754c\u306f\u3054\u5b58\u77e5\u306e\u901a\u308a\u3001\u5f7c\u304c\u8a00\u3063\u305f\u901a\u308a\u306b\u306a\u308a\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306f\u4e16\u754c\u3092\u98f2\u307f\u8fbc\u3093\u3067\u3044\u304d\u307e\u3057\u305f\u3002\\n\\n### Companies\' market cap ranking\\n\\n![](worldranking1989-2022.png)\\n\\n\u4e0a\u306e\u753b\u50cf\u3067\u308f\u304b\u308b\u3088\u3046\u306b\u3001\u305d\u306e\u904e\u7a0b\u3067\u306f\u4e16\u754c\u6642\u4fa1\u7dcf\u984d\u30e9\u30f3\u30ad\u30f3\u30b0\u306e\u4e0a\u4f4d\u306f\u307b\u3068\u3093\u3069\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4f01\u696d\u3001\u3044\u308f\u3086\u308b FANG \u307e\u305f\u306f GAFA \u3068\u547c\u3070\u308c\u308b\u4f01\u696d\u306b\u72ec\u5360\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\\n\\n\u4e00\u6614\u524d\u65e5\u672c\u4f01\u696d\u304c\u3042\u308c\u3060\u3051\u72ec\u5360\u3057\u3066\u3044\u305f\u30e9\u30f3\u30ad\u30f3\u30b0\u3067\u3059\u304c\u3001\u65e5\u672c\u304c\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306e\u6ce2\u3092\u5b8c\u5168\u306b\u9003\u3057\u305f\u305b\u3044\u3067\u3001\u4eca\u3084\u30e9\u30f3\u30ad\u30f3\u30b0\u306e\u4e0b\u4f4d\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u30a2\u30e1\u30ea\u30ab\u306e\u4f01\u696d\u304c\u307b\u3068\u3093\u3069\u3067\u3001\u305f\u307e\u306b\u4e2d\u56fd\u3084\u97d3\u56fd\u306e\u4f01\u696d\u304c\u73fe\u308c\u3066\u300131 \u4f4d\u306b\u306a\u3063\u3066\u521d\u3081\u3066\u30c8\u30e8\u30bf\u304c\u51fa\u3066\u304d\u3066\u3044\u307e\u3059\u3002\u4e16\u306e\u4e2d\u306e\u6642\u6d41\u306f\u3082\u306e\u3065\u304f\u308a\u6642\u4ee3\u304b\u3089\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u6642\u4ee3\u306b\u306a\u3063\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002\\n\\n\u3053\u3046\u3044\u3063\u305f\u4f01\u696d\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u3063\u305f\u3053\u3068\u304c\u3042\u308b\u65b9\u306f\u308f\u304b\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u3068\u3066\u3082\u5f79\u306b\u7acb\u3063\u3066\u3044\u3066\u3001\u4e00\u5ea6\u4f7f\u3046\u3068\u306a\u304b\u306a\u304b\u305d\u306e\u30a8\u30b3\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u629c\u3051\u51fa\u305b\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306b\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u304c\u4e16\u754c\u3092\u98f2\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u3053\u308c\u3067\u306f\u7d42\u308f\u3089\u306a\u3044\u306e\u3067\u3059\u3002\\n\\n\u3053\u308c\u306f\u898b\u65b9\u3092\u5909\u3048\u308b\u3068\u3001\u4eba\u985e\u304c\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u3078\u9032\u3093\u3060\u7b2c\u4e00\u6b69\u306b\u904e\u304e\u305a\u3001\u307e\u3060\u307e\u3060\u9053\u306e\u308a\u306f\u9577\u3044\u3067\u3059\u3002\u73fe\u5728\u3053\u3046\u3044\u3063\u305f\u5927\u4f01\u696d\u304c\u4f5c\u3063\u3066\u3044\u308b\u521d\u6b69\u7684\u306a\u300c\u30e1\u30bf\u30d0\u30fc\u30b9\u300d\u306e\u4e16\u754c\u306f\u3053\u308c\u306f\u3053\u308c\u3067\u30a4\u30f3\u30d5\u30a9\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u30c7\u30b8\u30bf\u30eb\u5316\u3059\u308b\u3053\u3068\u306b\u6210\u529f\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u307e\u3060\u304a\u91d1\u3068\u3044\u3046\u3082\u306e\u306f\u73fe\u5b9f\u4e16\u754c\u304b\u3089\u5207\u308a\u96e2\u3057\u305f\u5f62\u3067\u30c7\u30b8\u30bf\u30eb\u5316\u3067\u304d\u3066\u3044\u307e\u305b\u3093\u3002\uff08\u4f8b\u3048\u3070 paypay \u3068\u304b\u306f\u304a\u91d1\u3068\u540c\u7b49\u306a\u3088\u3046\u306b\u601d\u308f\u308c\u307e\u3059\u304c\u3001\u72ec\u7acb\u3057\u305f\u5f62\u3067\u304a\u91d1\u3068\u3044\u3046\u3082\u306e\u3067\u306f\u306a\u304f\u3001\u7d50\u5c40\u306f\u65e5\u672c\u5186\u306e\u5206\u8eab\u3067\u3042\u308a\u3001paypay \u306e\u904b\u7528\u4f1a\u793e\u306b\u5927\u304d\u304f\u4f9d\u5b58\u3057\u305f\u5f62\u3067\u3059 \u2192 \u904b\u7528\u4f1a\u793e\u306f\u305d\u306e\u4e16\u754c\u306e\u795e\u69d8\u3067\u3059\uff09\\n\\n### \u795e\u69d8\u306e\u3044\u306a\u3044\uff08\u975e\u4e2d\u592e\u96c6\u6a29\u7684\u306a\uff09\u4e16\u754c\\n\\n\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306f\u3053\u308c\u3092\u89e3\u6c7a\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306f\u4eca\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u304a\u3051\u308b\u306a\u3093\u3067\u3082\u30b3\u30d4\u30fc\u3067\u304d\u3066\u3057\u307e\u3046\u554f\u984c\u3092\u89e3\u6c7a\u3057\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u306a\u3082\u306e\u306b\u30ea\u30a2\u30eb\u4e16\u754c\u3068\u540c\u3058\u3088\u3046\u306a\u8ab0\u306b\u3082\u95a2\u4e0e\u3055\u308c\u306a\u3044\u5e0c\u5c11\u6027\u3001\u6539\u3056\u3093\u8010\u6027\u3092\u4e0e\u3048\u3066\u3001\u521d\u3081\u3066\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u3092\u300c\u4e16\u754c\u300d\u3068\u3057\u3066\u6210\u308a\u7acb\u305f\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3059\u3002\u5148\u7a0b\u3001\u795e\u69d8\u3068\u3044\u3063\u305f\u306e\u306f\u4f8b\u3048\u3070\u3042\u306a\u305f\u306e\u751f\u304d\u308b\u4e16\u754c\u306b\u795e\u69d8\u304c\u3069\u3053\u304b\u306e\u4eba\u9593\u306b\u306a\u308b\u3068\u3001\u6016\u304f\u3042\u308a\u307e\u305b\u3093\u304b\uff1f\u305d\u306e\u4eba\u306e\u6c7a\u5b9a\u3067\u4f55\u3082\u304b\u3082\u5909\u308f\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u6975\u7aef\u306a\u8a71\u3001\u751f\u5b58\u306e\u6a29\u5229\u3055\u3048\u3082\u596a\u308f\u308c\u308b\u30ea\u30b9\u30af\u304c\u6f5c\u3093\u3067\u3044\u307e\u3059\u3002\u305d\u3093\u306a\u4e16\u754c\u3063\u3066\u30c7\u30a3\u30b9\u30c8\u30d4\u30a2\u3067\u5acc\u3067\u3059\u3088\u306d\uff1f\\n\\n\u3059\u3067\u306b\u6c17\u3065\u3044\u3066\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u4eca\u50d5\u9054\u306f\u307e\u3055\u306b\u3053\u306e\u795e\u69d8\u304c\u3044\u308b\uff08\u4e2d\u592e\u96c6\u6a29\u7684\u306a\uff09\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e16\u754c\u306b\u4f4f\u3093\u3067\u3044\u307e\u3059\u3002youtuber \u3055\u3093\u306f\u308f\u3051\u304c\u306a\u304f\u30c1\u30e3\u30f3\u30cd\u30eb\u505c\u6b62\u3055\u308c\u308b\u3057\u3001\u30a2\u30de\u30be\u30f3\u3067\u306f\u660e\u78ba\u306a\u7406\u7531\u304c\u4e0e\u3048\u3089\u308c\u305a\u51fa\u5e97\u505c\u6b62\u51e6\u5206\u306b\u306a\u3063\u305f\u308a\u3057\u307e\u3059\u3002\u30c4\u30a4\u30c3\u30bf\u30fc\u3060\u3063\u3066\u30c8\u30e9\u30f3\u30d7\u3055\u3093\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u304c\u30d0\u30f3\u3055\u308c\u305f\u3053\u3068\u3067\u6709\u540d\u3067\u3057\u305f\u306d\u3002\\n\\n\u3082\u3061\u308d\u3093\u3001\u60aa\u3055\u3092\u3057\u3066\u30d0\u30f3\u3055\u308c\u305f\u3089\u305d\u308c\u306f\u305d\u308c\u3067\u4ed5\u65b9\u306a\u3044\u306e\u3067\u3059\u304c\u3001\u305f\u3060\u4f1a\u793e\u5074\u306e\u4e00\u4efb\u3067\u3059\u3079\u3066\u304c\u6c7a\u5b9a\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u306f\u679c\u305f\u3057\u3066\u6b63\u7fa9\u306a\u306e\u304b\u3069\u3046\u304b\u306f\u8b70\u8ad6\u306e\u4f59\u5730\u304c\u3042\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\uff1f\\n\\n\u5b9f\u969b\u306b\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u306e\u5275\u59cb\u8005\u3067\u3042\u308b\u30d3\u30bf\u30ea\u30c3\u30af\u6c0f\u306f\u30ef\u30fc\u30eb\u30c9\u30aa\u30d6\u30ef\u30fc\u30af\u30e9\u30d5\u30c8\u306e MMO \u30b2\u30fc\u30e0\u5185\u306e\u597d\u304d\u306a\u30ad\u30e3\u30e9\u30af\u30bf\u304c\u5f31\u4f53\u5316\u3055\u308c\u305f\u3053\u3068\u3067\u5acc\u6c17\u304c\u5dee\u3057\u305f\u306e\u304c\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u3068\u3044\u3046\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u59cb\u307e\u308a\u3060\u3068\u3082\u8a00\u308f\u308c\u3066\u3044\u307e\u3059\u3002\u795e\u69d8\u306e\u3044\u306a\u3044\u4e16\u754c\u306f\u4eba\u985e\u53f2\u4e0a\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u3055\u305e\u304b\u3057\u30d3\u30bf\u30ea\u30c3\u30af\u6c0f\u306f\u4f5c\u308a\u305f\u304b\u3063\u305f\u3093\u3060\u308d\u3046\u306d\u3002\\n\\n\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3067\u3042\u308c\u3070\u3001\u795e\u69d8\u306e\u3044\u306a\u3044\u4e16\u754c\u304c\u4f5c\u308c\u308b\u3068\u3044\u3046\u70b9\u304c\u975e\u5e38\u306b\u5927\u304d\u3044\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u3063\u3066\u4e07\u4eba\u5e73\u7b49\u3067\u540c\u3058\u30eb\u30fc\u30eb\u306b\u5247\u3063\u305f\u4e16\u754c\u304c\u69cb\u7bc9\u3067\u304d\u308b\u69d8\u306b\u306a\u3063\u305f\u3068\u3044\u3048\u307e\u3059\u3002\\n\\n\u305f\u3060\u3001\u4eca\u306f\u3053\u306e\u5927\u304d\u306a\u8ab2\u984c\u89e3\u6c7a\u306e\u73fe\u5728\u9032\u884c\u7cfb\u3067\u3042\u308a\u3001\u3042\u308c\u3084\u3053\u308c\u306e\u4e0d\u5177\u5408\u3084\u6e80\u8db3\u306e\u884c\u304b\u306a\u3044\u70b9\u304c\u305f\u304f\u3055\u3093\u3042\u308b\u3067\u3057\u3087\u3046\u3002\\n\\n\u305d\u3046\u3044\u3063\u305f\u3068\u304d\u306b\u306f\u3001\u50d5\u306e\u610f\u898b\u3068\u3057\u3066\u306f\u672a\u6765\u5fd7\u5411\u304c\u3044\u3044\u3067\u3059\u3002\u672a\u6765\u5fd7\u5411\u306f\u4f55\u304b\u3068\u3044\u3046\u3068\u3001\u30af\u30ec\u30fc\u30de\u30fc\u306b\u306a\u3089\u305a\u6696\u304b\u304f\u898b\u5b88\u3063\u3066\u3042\u3052\u3066\u4e00\u7dd2\u306b\u6210\u9577\u3059\u308b\u306e\u304c\u30d9\u30b9\u30c8\u3060\u3068\u601d\u3044\u307e\u3059\u3002\u30af\u30ec\u30fc\u30de\u30fc\u306b\u306a\u308b\u306e\u306f\u7c21\u5358\u3067\u3042\u308a\u3001\u8ab2\u984c\u3092\u89e3\u6c7a\u3059\u308b\u5074\u306b\u56de\u3063\u3066\u8272\u3005\u8003\u3048\u3066\u884c\u52d5\u3059\u308b\u3053\u3068\u3053\u305d\u793e\u4f1a\u304c\u9032\u5316\u3057\u3066\u3044\u304f\u529b\u3068\u306a\u3063\u3066\u3044\u304f\u306e\u3067\u3001\u7d50\u5c40\u306f\u307f\u3093\u306a\u30a6\u30a3\u30f3\u30a6\u30a3\u30f3\u306b\u306a\u308b\u308f\u3051\u3067\u3059\u3002\\n\\n\u8a71\u304c\u305d\u308c\u307e\u3057\u305f\u304c\u3001\u4eba\u9593\u793e\u4f1a\u306f\u30ea\u30a2\u30eb\u304b\u3089\u30d0\u30fc\u30c1\u30e3\u30eb\u3078\u3068\u3044\u3046\u5927\u304d\u306a\u65b9\u5411\u6027\u306f\u9593\u9055\u3044\u304c\u306a\u304f\u3001\u3059\u3067\u306b\u81ea\u5206\u305f\u3061\u306e\u6d3b\u52d5\u306f\u305f\u304f\u3055\u3093\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3078\u79fb\u690d\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u304c\u52a0\u901f\u3057\u3066\u3044\u304d\u307e\u3059\u3002\\n\\n### Human society\'s GDP\\n\\n![](./human_history_GDP.png)\\n_[\u51fa\u5178](https://www.weforum.org/agenda/2017/09/over-2000-years-of-economic-history-in-one-chart)_\\n\\n\\n\u4eba\u985e\u306e\u6b74\u53f2\u306b\u304a\u3051\u308b \u4e00\u4eba\u5f53\u305f\u308a\u306e GDP \u306f\u4e0a\u306e\u30b0\u30e9\u30d5\u3092\u898b\u3066\u4e0b\u3055\u3044\u3002\u308f\u304b\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u6307\u6570\u95a2\u6570\u7684\u306b\u5897\u52a0\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\u3053\u308c\u306e\u4e3b\u306a\u8981\u56e0\u306b\u306f\u3001\u4e00\u3064\u3068\u3057\u3066\u30ea\u30a2\u30eb\u306a\u4e16\u754c\u3067\u306f\u30ea\u30a2\u30eb\u306a\u8cc7\u6e90\u306e\u958b\u767a\u304c\u3067\u304d\u308b\u90e8\u5206\u304c\u305f\u304f\u3055\u3093\u3042\u3063\u305f\u3053\u3068\u3068\u3001\u6280\u8853\u7684\u306a\u9032\u6b69\u304c\u7206\u767a\u7684\u306b\u5897\u52a0\u3057\u305f\u3068\u601d\u3044\u307e\u3059\u3002\u7523\u696d\u9769\u547d\u4ee5\u5f8c\u3001\u4eba\u985e\u306f\u30d1\u30f3\u30c9\u30e9\u306e\u30dc\u30c3\u30af\u30b9\u3092\u958b\u3044\u305f\u3088\u3046\u306b\u3001\u77e5\u306e\u96c6\u5408\u4f53\u3068\u3057\u3066\u5927\u304d\u304f\u6210\u9577\u3057\u3001\u3082\u306f\u3084\u7523\u696d\u9769\u547d\u306e\u3068\u304d\u307f\u305f\u3044\u306b\u4e00\u7a2e\u306e\u6280\u8853\u9032\u6b69\u3067\u5927\u304d\u304f\u4eba\u985e\u304c\u524d\u9032\u3059\u308b\u3068\u3044\u3046\u72b6\u6cc1\u3067\u306f\u306a\u304f\u306a\u3063\u3066\u3044\u307e\u3059\u3002\\n\\n\u4eca\u73fe\u5728\u3060\u3051\u3067\u3082\u3001\u81ea\u5206\u306e\u8a8d\u8b58\u3057\u3066\u3044\u308b\u7bc4\u56f2\u3067\u3059\u3068\u30015G\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3001AI\u3001Iot \u306a\u3069\u3001\u69d8\u3005\u306a\u6280\u8853\u304c\u96e8\u5f8c\u306e\u7b4d\u306e\u3088\u3046\u306b\u73fe\u308c\u3066\u304d\u3066\u3001\u540c\u6642\u306b\u9032\u5316\u3057\u3066\u878d\u5408\u3057\u3064\u3064\u3001\u6b21\u306e\u7523\u696d\u9769\u547d\u3068\u3057\u3066\u4eba\u985e\u793e\u4f1a\u3092\u7206\u767a\u7684\u306b\u524d\u9032\u3055\u305b\u308b\u3067\u3057\u3087\u3046\u3002\u60f3\u50cf\u3092\u7d76\u3059\u308b\u3088\u3046\u306a\u4e16\u754c\u304c\u307e\u305f 10 \u5e74 20 \u5e74\u5f8c\u306b\u306f\u73fe\u308c\u3066\u4eba\u9593\u793e\u4f1a\u306e\u3053\u308c\u307e\u3067\u306e\u77e5\u8b58\u3001\u7d4c\u9a13\u3001\u54f2\u5b66\u3084\u4fa1\u5024\u89b3\u3092\u3059\u3079\u3066\u8003\u3048\u76f4\u3055\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u4eca\u306f\u3053\u308c\u3060\u3051\u9032\u5316\u306e\u901f\u5ea6\u304c\u65e9\u304f\u3066\u3001\u6bce\u65e5\u304c\u65b0\u305f\u306a\u6b74\u53f2\u306e\u30da\u30fc\u30b8\u3092\u3081\u304f\u3063\u3066\u3044\u308b\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002\\n\\n### Why human will go virtual\\n\\n\u307e\u305f\u3001\u306a\u305c\u30d0\u30fc\u30c1\u30e3\u30eb\u304c\u826f\u3044\u306e\u304b\u3068\u3044\u3046\u7591\u554f\u3082\u3042\u308d\u3046\u304b\u3068\u601d\u3044\u307e\u3059\u3002\\n\\n\u6614\u30de\u30eb\u30af\u30b9\u306e\u4eba\u53e3\u8ad6\u3067\u3082\u6709\u540d\u3067\u3059\u304c\u3001\u4eba\u985e\u306e\u767a\u5c55\u306f\u3044\u305a\u308c\u73fe\u5b9f\u4e16\u754c\u306e\u9650\u754c\u3092\u8fce\u3048\u3066\u3057\u307e\u3044\u3001\u6e1b\u901f\u3057\u3066\u3057\u307e\u3046\u3067\u3057\u3087\u3046\u3068\u3044\u3046\u7406\u8ad6\u3067\u3059\u3002\u81ea\u5206\u306f\u4eba\u9593\u793e\u4f1a\u306e GDP \u306f\u307e\u3059\u307e\u3059\u5897\u52a0\u3057\u3066\u3044\u304f\u3053\u3068\u306f\u9593\u9055\u3044\u306a\u3044\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002\u306a\u305c\u306a\u3089\u73fe\u5b9f\u4e16\u754c\u306f\u5236\u7d04\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u7a7a\u9593\u306f\u5236\u7d04\u304c\u5c11\u306a\u3044\u304b\u3089\u3067\u3059\u3002\\n\\n\u4eba\u9593\u306f\u5927\u822a\u6d77\u6642\u4ee3\u4ee5\u6765\u3001\u5f71\u97ff\u7bc4\u56f2\u3092\u62e1\u5927\u3057\u3088\u3046\u3068\u3001\u5730\u7403\u3092\u305f\u304f\u3055\u3093\u63a2\u7d22\u3057\u7d9a\u3051\u958b\u767a\u3057\u3066\u304d\u307e\u3057\u305f\u3002\u4eca\u3084\u5b87\u5b99\u3078\u884c\u3053\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u3001\u5b87\u5b99\u958b\u767a\u306f\u305d\u3046\u7c21\u5358\u306b\u3067\u304d\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u5b87\u5b99\u306e\u958b\u767a\u3092\u7a81\u7834\u3059\u308b\u306b\u306f\u6642\u9593\u3068\u7a7a\u9593\u3068\u3044\u3046\u3068\u3066\u3064\u3082\u306a\u304f\u56f0\u96e3\u306a\u58c1\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u305d\u3053\u3067\u3001\u3053\u306e\u5236\u9650\u304c\u304b\u304b\u3063\u3066\u3044\u306a\u3044\u30d0\u30fc\u30c1\u30e3\u30eb\u7a7a\u9593\u306e\u958b\u767a\u304c\u5bb9\u6613\u306a\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u666e\u901a\u306f\u8003\u3048\u307e\u3059\u3002\u30d0\u30fc\u30c1\u30e3\u30eb\u306a\u4e16\u754c\u306b\u3044\u308b\u3068\u3001\u77ac\u9593\u79fb\u52d5\u3082\u3067\u304d\u3066\u30b9\u30da\u30fc\u30b9\u306e\u554f\u984c\u3082\u89e3\u6c7a\u3055\u308c\u307e\u3059\u3002\\n\\nWeb3 \u304c\u6765\u308b\u3068\u4eba\u985e\u306e\u30d0\u30fc\u30c1\u30e3\u30eb\u5316\u304c\u66f4\u306b\u52a0\u901f\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u4fa1\u5024\u304c\u5bb9\u6613\u306b\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u5185\u3067\u3084\u308a\u53d6\u308a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u3001\u6a5f\u68b0\u3068\u6a5f\u68b0\u304c\u30df\u30c9\u30eb\u30de\u30f3\u306a\u3057\u3067\u4fa1\u5024\u306e\u3084\u308a\u53d6\u308a\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u5c11\u3057\u4e88\u8a00\u3057\u307e\u3059\u304c\u3001\u5c06\u6765\u306f\u3053\u306e\u6a5f\u68b0\u9593\u306e\u4fa1\u5024\u306e\u4ea4\u63db\u304c\u30e1\u30a4\u30f3\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002\u3044\u308f\u3086\u308b\u304a\u91d1\u306b\u3064\u3044\u3066\u306f\u3001\u307e\u3059\u307e\u3059\u30d7\u30ed\u30b0\u30e9\u30de\u30d6\u30eb\u30de\u30cd\u30fc\uff08\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u5236\u5fa1\u3067\u304d\u308b\u304a\u91d1\uff09\u306b\u306a\u3063\u3066\u3044\u304f\u308f\u3051\u3067\u3059\u3002\\n\\n\u30d0\u30fc\u30c1\u30e3\u30eb\u306a\u4e16\u754c\u3067\u751f\u304d\u3066\u3044\u308b\u4eba\u9593\u306b\u3068\u3063\u3066\u306f\u5f53\u7136\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u30cd\u30a4\u30c6\u30a3\u30d6\u306a\u8cc7\u7523\u304c\u751f\u307e\u308c\u3066\u3082\u304a\u304b\u3057\u304f\u306a\u3044\u3067\u3057\u3087\u3046\u3002\u305d\u308c\u304c\u30af\u30ea\u30d7\u30c8\uff08\u4eee\u60f3\u901a\u8ca8\uff09\u3067\u3059\u3002\\n\\n## Why people cannot understand this trend?\\n\\n\u3053\u306e\u8a71\u306f\u3081\u3061\u3083\u3081\u3061\u3083\u91cd\u8981\u3067\u3001\u306a\u305c\u6c17\u3065\u3044\u3066\u3044\u306a\u3044\u4eba\u3005\u304c\u591a\u3044\u306e\u304b\uff1f\u3068\u3044\u3046\u7591\u554f\u3092\u62b1\u304f\u3068\u601d\u3044\u307e\u3059\u3002\u3053\u308c\u306b\u3064\u3044\u3066\u306f\u3001\u307e\u3042\u3044\u308d\u3044\u308d\u306a\u7406\u7531\u304c\u3042\u308b\u3067\u3057\u3087\u3046\u3002\u3067\u3082\u3053\u308c\u3092\u77e5\u3063\u3066\u3082\u3089\u3063\u305f\u3042\u306a\u305f\u306b\u306f\u3053\u306e\u30c8\u30ec\u30f3\u30c9\u306e\u3053\u3068\u3092\u899a\u3048\u3066\u307b\u3057\u3044\u3067\u3059\u3002\\n\\n\u6280\u8853\u3068\u3044\u3046\u3082\u306e\u306f\u6b74\u53f2\u306b\u304a\u3044\u3066\u6bce\u56de\u4f55\u304b\u3092\u4e00\u65b0\u3057\u3066\u3001\u65e2\u5f97\u6a29\u76ca\u8005\u306e\u5229\u76ca\u306b\u89e6\u308c\u307e\u3059\u3002\u305d\u3046\u3059\u308b\u3068\u5fc5\u305a\u53cd\u767a\u3092\u53d7\u3051\u307e\u3059\u3002\\n\\n\u3060\u3051\u3069\u3001\u77ed\u671f\u7684\u306b\u306f\u65e2\u5f97\u6a29\u76ca\u306e\u307b\u3046\u304c\u52dd\u3064\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u9577\u671f\u7684\u306b\u306f\u52dd\u3066\u307e\u305b\u3093\u3002\u6642\u4ee3\u306e\u30c8\u30ec\u30f3\u30c9\u3068\u3044\u3046\u306e\u306f\u9006\u3089\u3046\u3053\u3068\u304c\u307b\u307c\u4e0d\u53ef\u80fd\u306a\u306e\u3067\u3059\u3002\\n\\n\u82f1\u8a9e\u3067\u306f\u3088\u304f\u8a00\u308f\u308c\u308b\u8a00\u8449\u3068\u3057\u3066\u4ee5\u4e0b\u304c\u3042\u308a\u307e\u3059\u3002\\n\\n> First they ignore you, then they laugh at you, then they fight you, then you win.\\n\\n\u3053\u308c\u306f\u30af\u30ea\u30d7\u30c8\u306e\u696d\u754c\u3067\u3082\u3081\u3061\u3083\u304f\u3061\u3083\u3074\u3093\u3068\u304f\u308b\u8a00\u8449\u3067\u3059\u3002\u300c\u6700\u521d\u306b\u5f7c\u3089\u3042\u306a\u305f\u3092\u7121\u8996\u3057\u3001\u305d\u308c\u304b\u3089\u3042\u3056\u7b11\u308f\u3044\u3001\u305d\u308c\u304b\u3089\u6297\u3044\u3001\u6700\u7d42\u7684\u306b\u306f\u3042\u306a\u305f\u306e\u52dd\u5229\u300d\u3068\u3044\u3046\u3088\u3046\u306a\u611f\u3058\u3067\u3001\u6b74\u53f2\u306b\u304a\u3044\u3066\u306f\u69d8\u3005\u306a\u30c8\u30ec\u30f3\u30c9\u304c\u305f\u3069\u3063\u3066\u304d\u305f\u904b\u547d\u306a\u306e\u3067\u3059\u3002\\n\\n\u8eca\u306e\u6b74\u53f2\u3082\u305d\u3046\u3067\u3059\u3057\u3001\u767a\u660e\u3055\u308c\u305f\u5f53\u521d\u3001\u3081\u3061\u3083\u304f\u3061\u3083\u52b9\u7387\u304c\u60aa\u304f\u30c7\u30b6\u30a4\u30f3\u3082\u826f\u304f\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u99ac\u8eca\u306e\u307b\u3046\u304c\u5168\u7136\u3044\u3044\u3068\u601d\u3063\u3066\u3044\u305f\u4eba\u304c\u5c11\u306a\u304b\u3089\u305a\u3044\u307e\u3057\u305f\u3002\u307e\u305f\u3001\u305d\u306e\u3042\u3068\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3082\u767a\u660e\u3055\u308c\u305f\u5f53\u521d\u306f\u8ab0\u306b\u3082\u7406\u89e3\u3055\u308c\u305a\u3001\u30d3\u30eb\u30fb\u30b2\u30a4\u30c4\u304c\u30c6\u30ec\u30d3\u3067\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3092\u7d39\u4ecb\u3057\u3066\u3044\u305f\u3068\u304d\u306b\u306f\u89b3\u5ba2\u3068\u53f8\u4f1a\u8005\u306e\u65b9\u304b\u3089\u5927\u3044\u306b\u7b11\u308f\u308c\u3066\u3044\u307e\u3057\u305f\u3002\u4eca\u3060\u304b\u3089\u8a00\u3048\u308b\u306e\u3067\u3059\u304c\u3001\u5f53\u521d\u306e\u30d3\u30eb\u30fb\u30b2\u30a4\u30c4\u304c\u60f3\u50cf\u3057\u305f\u4e16\u754c\u3088\u308a\u3082\u9065\u304b\u306b\u9032\u3093\u3060\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u793e\u4f1a\u304c\u3067\u304d\u3066\u3044\u307e\u3059\u3002\\n\\n> \\"History Doesn\u2019t Repeat Itself, but It Often Rhymes\\" - Mark Twain\\n\\nMark Twain \u6c0f\u304c\u8a00\u3063\u3066\u3044\u308b\u901a\u308a\u3067\u3059\u3002\\n\\n\u305d\u3053\u3067\u3001\u4eca\u5ea6\u306f\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u756a\u3067\u3059\u3002\u300c\u30c7\u30a3\u30b9\u3089\u308c\u308b\u3001\u6012\u3089\u308c\u308b\u3001\u8efd\u8511\u3055\u308c\u308b\u3001\u7121\u8996\u3055\u308c\u308b\u3001\u305d\u308c\u3067\u3082\u9032\u5316\u3057\u7d9a\u3051\u3066\u793e\u4f1a\u3092\u5909\u3048\u3066\u3044\u304d\u3001\u6211\u3005\u306e\u751f\u304d\u65b9\u3082\u5909\u3048\u3066\u304f\u308c\u308b\u300d\u3001\u3053\u308c\u304c\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002\\n\\n\u3060\u3089\u3060\u3089\u3068\u66f8\u3044\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u304c\u3001\u666e\u6bb5\u53cb\u4eba\u306b\u805e\u304b\u308c\u3066\u8aac\u660e\u3059\u308b\u3068\u7d50\u69cb\u306a\u6642\u9593\u3092\u304b\u3051\u3066\u8aac\u660e\u3067\u304d\u305f\u308a\u3057\u307e\u3059\u304c\u3001\u3044\u3056\u66f8\u304f\u3068\u306a\u308b\u3068\u3046\u307e\u304f\u66f8\u3051\u306a\u3044\u3093\u3067\u3059\u306d\u3002\u307e\u3060\u66f8\u304d\u304d\u308c\u306a\u3044\u307b\u3069\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u307e\u305f\u6b21\u56de\u3092\u304a\u697d\u3057\u307f\u306b\uff01\\n\\n### _\u514d\u8cac\u4e8b\u9805_\\n\\n_\u672c website \u306b\u304b\u304b\u308c\u3066\u3044\u308b\u5185\u5bb9\u306f\u3042\u304f\u307e\u3067\u500b\u4eba\u7684\u306a\u898b\u89e3\u3067\u3042\u308a\u3001Financial advice \u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002_"},{"id":"about-scaricity","metadata":{"permalink":"/blog/about-scaricity","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/What-is-Scaricity/2022-09-02-what-is-Scaricity.md","source":"@site/blog/What-is-Scaricity/2022-09-02-what-is-Scaricity.md","title":"About Scaricity","description":"\u3042\u306a\u305f\u306f\u3001\u300c\u5e0c\u5c11\u6027\u304c\u3042\u308b\u300d\u300c\u5e0c\u5c11\u6027\u304c\u7121\u3044\u300d\u3068\u3044\u3046\u3053\u3068\u3092\u8003\u3048\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u304b\uff1f","date":"2022-09-02T00:00:00.000Z","formattedDate":"2022\u5e749\u67082\u65e5","tags":[{"label":"\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","permalink":"/blog/tags/\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3"},{"label":"scaricity","permalink":"/blog/tags/scaricity"},{"label":"\u5e0c\u5c11\u6027","permalink":"/blog/tags/\u5e0c\u5c11\u6027"}],"readingTime":5.178,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"about-scaricity","title":"About Scaricity","authors":["Thurendous","Polymetis"],"blogDescription":"\u306a\u305c\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u8a18\u4e8b\u3092\u304b\u304f\u306e\u304b","tags":["\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","scaricity","\u5e0c\u5c11\u6027"]},"prevItem":{"title":"Why Crypto is the Future","permalink":"/blog/why-crypto-is-the-future"},"nextItem":{"title":"Fundamental Knowledge","permalink":"/blog/fundamental-knowledge"}},"content":"\u3042\u306a\u305f\u306f\u3001\u300c\u5e0c\u5c11\u6027\u304c\u3042\u308b\u300d\u300c\u5e0c\u5c11\u6027\u304c\u7121\u3044\u300d\u3068\u3044\u3046\u3053\u3068\u3092\u8003\u3048\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u304b\uff1f\\n\\n\u300c\u5e0c\u5c11\u6027\u300d\u3068\u306f\u4f55\u3067\u3057\u3087\u3046\uff1f\\n\\n\u300c\u5e0c\u5c11\u6027\u300d\u306f\u3001\u6b32\u6c42\u306b\u5bfe\u3057\u3066\u91cf\u3084\u6570\u304c\u6975\u3081\u3066\u5c11\u306a\u3044\u3001\u3042\u308b\u610f\u5473\u5ba2\u89b3\u7684\u4e8b\u5b9f\u3067\u3059\u3002\\n\\n\u307e\u305f\u3001\u305d\u306e\u305f\u3081\u306b\u751f\u3058\u308b\u4fa1\u5024\u306e\u3053\u3068\u3092\u300c\u5e0c\u5c11\u4fa1\u5024\u300d\u3068\u3044\u3044\u307e\u3059\u3002\\n\\n\u666e\u6bb5\u306e\u751f\u6d3b\u306b\u304a\u3044\u3066\u306f\u6211\u3005\u306f\u5b9f\u306f\u7121\u610f\u8b58\u306e\u3046\u3061\u306b\u4fa1\u5024\u306e\u5224\u65ad\u3092\u6bce\u65e5\u3057\u3066\u3044\u307e\u3059\u3002\u300c\u3053\u308c\u306f\u79c1\u306b\u3068\u3063\u3066\u4fa1\u5024\u304c\u3042\u308b\u300d\u3001\u300c\u305d\u308c\u306f\u4fa1\u5024\u304c\u306a\u3044\u300d\u306a\u3069\u3068\u8272\u3005\u8003\u3048\u3066\u884c\u52d5\u3092\u3057\u3066\u3001\u4eba\u9593\u306e\u4e00\u3064\u4e00\u3064\u306e\u5c0f\u3055\u306a\u884c\u52d5\u30d1\u30bf\u30fc\u30f3\u304c\u5e02\u5834\u3092\u6c7a\u3081\u3066\u3044\u308b\u306e\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u6211\u3005\u306e\u611f\u899a\u7684\u306a\u4fa1\u5024\u306e\u5224\u65ad\u306f\u5b9f\u306f\u5c11\u3057\u7acb\u3061\u623b\u3063\u3066\u8003\u3048\u308b\u3068\u3001\u591a\u5c11\u305a\u308c\u305f\u611f\u899a\u3067\u3042\u308a\u3001\u3042\u307e\u308a\u306b\u3082\u77ed\u8996\u7684\u306b\u7269\u4e8b\u3092\u898b\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308b\u3068\u601d\u3044\u307e\u3059\u3002\\n\\n\u4eca\u56de\u306f\u5e0c\u5c11\u6027\u306e\u8a71\u3092\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u7d50\u8ad6\u3092\u3044\u304d\u306a\u308a\u8a00\u3063\u3066\u3057\u307e\u3046\u3068\u3059\u3054\u304f\u7591\u554f\u306b\u601d\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u306e\u3067\u3001\u3086\u3063\u304f\u308a\u8a71\u3092\u8aad\u3093\u3067\u3082\u3089\u3048\u308c\u3070\u3001\u79c1\u306e\u4e3b\u5f35\u304c\u5f53\u305f\u308a\u524d\u306e\u3088\u3046\u306b\u601d\u3048\u3066\u304f\u308b\u3067\u3057\u3087\u3046\u3002\\n\\n![](moneything.jpeg)\\n\\n## \u5e0c\u5c11\u6027\u3092\u8003\u3048\u308b\\n\\n\u4e16\u306e\u4e2d\u3067\u4f55\u306b\u5e0c\u5c11\u6027\u304c\u3042\u308b\u304b\u3068\u3044\u3046\u3053\u3068\u306f\u3088\u304f\u3088\u304f\u8003\u3048\u3066\u304f\u3060\u3055\u3044\u3002\u3082\u3061\u308d\u3093\u3001\u4ee3\u66ff\u3067\u304d\u306a\u3044\u3082\u306e\u304c\u4e00\u756a\u5e0c\u5c11\u6027\u304c\u3042\u308b\u3067\u3057\u3087\u3046\u3002\u305d\u306e\u6700\u305f\u308b\u3082\u306e\u306f\u3042\u306a\u305f\u306e\u547d\u3067\u3059\u3002\u305d\u308c\u306f\u81ea\u5206\u81ea\u8eab\u306b\u3068\u3063\u3066\u306f\u304b\u3051\u304c\u3048\u306e\u306a\u3044\u4fa1\u5024\u3092\u6301\u3063\u3066\u3044\u308b\u306e\u306f\u81ea\u660e\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u3088\u304f\u8003\u3048\u308b\u3068\u305d\u308c\u306f\u8d64\u306e\u4ed6\u4eba\u306b\u3068\u3063\u3066\u3069\u308c\u304f\u3089\u3044\u306e\u4fa1\u5024\u304c\u3042\u308b\u306e\u304b\uff1f\u3042\u307e\u308a\u306a\u3044\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3057\u3001\u7d50\u69cb\u3042\u308b\u5834\u5408\u3082\u3042\u308b\u3067\u3057\u3087\u3046\u3002\\n\\n\u3053\u3046\u3044\u3046\u4e3b\u89b3\u306b\u3088\u3063\u3066\u4fa1\u5024\u304c\u5909\u308f\u308b\u3082\u306e\u304c\u4e16\u306e\u4e2d\u306b\u306f\u5b58\u5728\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u753b\u5bb6\u306b\u3088\u308b\u7d75\u753b\u304c\u305d\u3046\u3067\u3059\u3002\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u4e16\u754c\u3067\u3044\u3046\u3068 NFT \u306b\u76f8\u5f53\u3057\u307e\u3059\u3002\u4eba\u306b\u3088\u3063\u3066\u306f\u3082\u306e\u3059\u3054\u3044\u4fa1\u5024\u3092\u6301\u3064\u3057\u3001\u4fa1\u5024\u304c\u30bc\u30ed\u306e\u5834\u5408\u3082\u3042\u308b\u3067\u3057\u3087\u3046\u3002\\n\\n\u3057\u304b\u3057\u3001\u4eca\u56de\u8b70\u8ad6\u3057\u305f\u3044\u306e\u306f\u3053\u3046\u3044\u3046\u985e\u306e\u3082\u306e\u3067\u306f\u306a\u304f\u3001\u666e\u904d\u7684\u306b\u7686\u3055\u3093\u306b\u3068\u3063\u3066\u4fa1\u5024\u304c\u3042\u308a\u3001\u5c1a\u4e14\u3064\u4ea4\u63db\u3057\u3084\u3059\u3044\u3082\u306e\u306e\u5e0c\u5c11\u6027\u3092\u8003\u3048\u3066\u307b\u3057\u3044\u306e\u3067\u3059\u3002\\n\\n\u307e\u305a\u8a00\u3063\u3066\u304a\u304d\u305f\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u524d\u63d0\u3068\u3057\u3066\u3001\u3082\u3057\u3042\u306a\u305f\u304c\u5d07\u62dd\u3057\u3066\u3044\u308b\u8cc7\u7523\u304c\u3042\u308c\u3070\u3001\u305d\u306e\u8003\u3048\u3092\u6368\u3066\u3066\u307b\u3057\u3044\u3067\u3059\u3002\u5148\u5165\u89b3\u306a\u3057\u3067\u5e73\u7b49\u306b\u5ba2\u89b3\u7684\u306b\u5224\u65ad\u3092\u3057\u3066\u521d\u3081\u3066\u5e0c\u5c11\u6027\u306b\u3064\u3044\u3066\u6c17\u4ed8\u304f\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u3002\\n\\n\u7269\u4e8b\u306e\u5024\u6bb5\u3068\u3044\u3046\u306e\u306f\u4f1d\u7d71\u7684\u306a\u7d4c\u6e08\u306e\u7406\u8ad6\u306e\u4e2d\u3067\u9700\u8981\u3068\u4f9b\u7d66\u306e\u30d0\u30e9\u30f3\u30b9\u3067\u6c7a\u307e\u308b\u3068\u3044\u3046\u524d\u63d0\u304c\u3042\u308a\u3001\u5e0c\u5c11\u6027\u3068\u4e0d\u53ef\u5206\u3067\u3059\u3002\u5e0c\u5c11\u4fa1\u5024\u304c\u3042\u308b\u304b\u5426\u304b\u306e\u5224\u65ad\u57fa\u6e96\u3068\u3057\u3066\u306f\u3001\u9700\u8981\u304c\u3042\u307e\u308a\u6e1b\u3089\u305a\u3001\u4f9b\u7d66\u3082\u3042\u307e\u308a\u5897\u3048\u306a\u3044\u3053\u3068\u3060\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002\u5e0c\u5c11\u4fa1\u5024\u304c\u3042\u308b\u3082\u306e\u306f\u9ad8\u4fa1\u683c\u3067\u3042\u308b\u3001\u3042\u308b\u3044\u306f\u5c06\u6765\u7684\u306b\u9ad8\u4fa1\u683c\u306b\u306a\u308a\u3046\u308b\u3082\u306e\u3068\u8a00\u3048\u307e\u3059\u3002\\n\\n\u305d\u308c\u3067\u306f\u3001\u5e0c\u5c11\u6027\u306e\u3042\u308b\u3082\u306e\u306b\u3064\u3044\u3066\u4e00\u500b\u305a\u3064\u8003\u3048\u307e\u3057\u3087\u3046\u3002\\n\\n## Japanese Yen\\n\\n![](japanyen.jpg)\\n\\n\u4fa1\u5024\u3068\u3044\u3046\u3082\u306e\u306b\u3064\u3044\u3066\u8003\u3048\u305f\u6642\u306b\u4e00\u756a\u6700\u521d\u306b\u601d\u3044\u6d6e\u304b\u3076\u3082\u306e\u306f\u65e5\u672c\u5186\u3067\u3057\u3087\u3046\u3002\u3057\u304b\u3057\u3001\u65e5\u672c\u5186\u306f\u679c\u305f\u3057\u3066\u3069\u308c\u304f\u3089\u3044\u5e0c\u5c11\u6027\u304c\u3042\u308b\u306e\u304b\u3002\\n\\n\u65e5\u672c\u5186\u306f\u653f\u5e9c\u306e\u4fe1\u983c\u306b\u57fa\u3065\u3044\u3066\u767a\u884c\u3055\u308c\u3066\u304a\u308a\u3001\u653f\u5e9c\u306f\u4fe1\u983c\u3055\u308c\u3066\u304d\u3061\u3093\u3068\u5186\u306e\u5e0c\u5c11\u6027\u3092\u62c5\u4fdd\u3057\u3066\u304f\u308c\u308b\u3068\u4fe1\u3058\u3066\u3044\u308b\u65b9\u304c\u5c11\u306a\u304f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u5b9f\u969b\u306b\u306f\u672a\u3060\u306b\u65e5\u672c\u5186\u306f\u7d9a\u3005\u3068\u5237\u3089\u308c\u3066\u5e02\u5834\u3078\u653e\u51fa\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u304c\u3044\u308f\u3086\u308b\u666e\u6bb5\u8033\u306b\u3059\u308b\u300c\u91d1\u878d\u7de9\u548c\u300d\u3068\u3044\u3046\u8a00\u8449\u3067\u3059\u3002\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3046\u3068\u304a\u91d1\u3092\u5927\u91cf\u306b\u5237\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u3002\\n\\n\u3053\u3093\u306a\u3082\u306e\u306b\u5e0c\u5c11\u6027\u304c\u3042\u308b\u306e\u304b\u751a\u3060\u7591\u554f\u3067\u3059\u3002\\n\\n## Real Estate\\n\\n![](realestate.jpg)\\n\\n\u4e0d\u52d5\u7523\u3068\u3044\u3046\u306e\u306f\u3001\u5927\u8846\u7684\u306b\u7279\u306b\u4e2d\u56fd\u3042\u308b\u3044\u306f\u6614\u306e\u65e5\u672c\u306e\u3088\u3046\u306a\u6025\u6210\u9577\u3057\u305f\u56fd\u3067\u306f\u795e\u8a71\u306e\u3088\u3046\u306a\u8cc7\u7523\u3068\u3057\u3066\u8a9e\u3089\u308c\u304c\u3061\u3067\u3059\u3002\u305d\u3046\u3044\u3046\u56fd\u3067\u306f\u3001\u6c38\u9060\u306b\u4fa1\u5024\u304c\u4e0a\u304c\u308b\u3082\u306e\u3068\u3057\u3066\u898b\u3089\u308c\u3066\u304d\u307e\u3057\u305f\u3002\u4f55\u5341\u5e74\u3082\u4e8b\u5b9f\u3068\u3057\u3066\u6210\u308a\u7acb\u3063\u3066\u3044\u308b\u3082\u306e\u306f\u795e\u8a71\u3068\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u305d\u308c\u3082\u3044\u305a\u308c\u7d42\u7109\u3092\u8fce\u3048\u308b\u306e\u3067\u3059\u3002\\n\\n\u4e0d\u52d5\u7523\u3092\u9700\u8981\u3068\u4f9b\u7d66\u306e\u30d0\u30e9\u30f3\u30b9\u306e\u89b3\u70b9\u304b\u3089\u8a71\u3059\u3068\u3001\u6c7a\u3057\u3066\u5e0c\u5c11\u6027\u306e\u3042\u308b\u8cc7\u7523\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u306a\u305c\u306a\u3089\u3001\u307e\u305a\u9700\u8981\u306f\u4eba\u53e3\u3084\u666f\u6c17\u306b\u6bd4\u4f8b\u3057\u3001\u4f9b\u7d66\u306f\u4e0d\u52d5\u7523\u306e\u958b\u767a\u898f\u6a21\u306b\u4f9d\u5b58\u3059\u308b\u304b\u3089\u3067\u3059\u3002\u57fa\u672c\u7684\u306b\u4e0d\u52d5\u7523\u958b\u767a\u306e\u898f\u6a21\u306f\u3001\u3082\u3057\u9700\u8981\u304c\u5897\u3048\u308c\u3070\u5897\u52a0\u3055\u305b\u308b\u3053\u3068\u3067\u4fa1\u683c\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\\n\\n\u4e0d\u52d5\u7523\u958b\u767a\u306e\u898f\u6a21\u306f\u3042\u308b\u7a0b\u5ea6\u307e\u3067\u306f\u7121\u9650\u306b\u5897\u9577\u3067\u304d\u307e\u3059\u3002\u6975\u7aef\u306a\u8a71\u3067\u3059\u304c\u3001\u5730\u7403\u4e0a\u306b\u571f\u5730\u304c\u306a\u304f\u306a\u3063\u3066\u3082\u5b87\u5b99\u958b\u767a\u3092\u3059\u308b\u4eba\u9593\u793e\u4f1a\u306f\u3001\u4f8b\u3048\u3070\u706b\u661f\u3078\u5f15\u3063\u8d8a\u3057\u3057\u3066\u4e0d\u52d5\u7523\u958b\u767a\u3092\u3059\u308c\u3070\u3001\u4f9b\u7d66\u306f\u4e00\u6c17\u306b\u5897\u3048\u308b\u3067\u3057\u3087\u3046\u3002\u307e\u3057\u3066\u3084\u73fe\u5728\u306e\u4eba\u9593\u793e\u4f1a\u306f\u30ea\u30a2\u30eb\u4e16\u754c\u304b\u3089\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u3078\u9032\u3093\u3067\u3044\u308b\u3053\u3068\u304b\u3089\u3001\u4e0d\u52d5\u7523\u306b\u4ee3\u8868\u3055\u308c\u308b\u30ea\u30a2\u30eb\u4e16\u754c\u306e\u7d4c\u6e08\u898f\u6a21\u3068\u3044\u3046\u306e\u306f\u9577\u671f\u7684\u306b\u898b\u308b\u3068\u3001\u3069\u3053\u307e\u3067\u3082\u7121\u9650\u306b\u5897\u9577\u53ef\u80fd\u306a\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u3068\u6bd4\u8f03\u3057\u3066\u3001\u4f38\u3073\u3057\u308d\u304c\u7e2e\u5c0f\u3059\u308b\u50be\u5411\u306b\u3042\u308a\u307e\u3059\u3002\\n\\n\u5c11\u306a\u304f\u3068\u3082\u4e0d\u52d5\u7523\u306b\u306f\u3042\u307e\u308a\u5e0c\u5c11\u6027\u304c\u3042\u308a\u307e\u305b\u3093\u3002\\n\\n## Stocks\\n\\n\u682a\u306f\u4f1a\u793e\u304c\u767a\u884c\u3057\u3066\u3044\u308b\u3082\u306e\u3067\u3059\u3002\u3044\u304f\u3089\u3067\u3082\u518d\u767a\u884c\u3084\u8ffd\u52a0\u767a\u884c\u3067\u304d\u3001\u3057\u304b\u3082\u5012\u7523\u306e\u30ea\u30b9\u30af\u3082\u3042\u308a\u307e\u3059\u3002\u5f53\u7136\u3067\u3059\u304c\u3001\u3042\u307e\u308a\u5e0c\u5c11\u6027\u306f\u3042\u308a\u307e\u305b\u3093\u3002\\n\\n## GOLD\\n\\n![](gold1.jpg)\\n\\n\u7d9a\u3044\u3066\u306f\u6b74\u53f2\u304c\u9577\u3044\u30b4\u30fc\u30eb\u30c9\u306b\u3064\u3044\u3066\u8a71\u3092\u3057\u307e\u3059\u3002\\n\\n\u3053\u3046\u3044\u3046\u8cb4\u91d1\u5c5e\u306b\u306f\u5e0c\u5c11\u6027\u304c\u3042\u308b\u3068\u601d\u3046\u3067\u3057\u3087\u3046\u3002\u30b4\u30fc\u30eb\u30c9\u306f\u9577\u3044\u6b74\u53f2\u306e\u4e2d\u3067\u4f9b\u7d66\u3082\u3042\u307e\u308a\u5897\u3048\u305a\u3001\u306a\u304b\u306a\u304b\u30ec\u30a2\u306a\u3082\u306e\u3067\u3042\u308a\u3001\u304a\u91d1\u3068\u3057\u3066\u898b\u3089\u308c\u3066\u304d\u305f\u306e\u3067\u3001\u305f\u3057\u304b\u306b\u5e0c\u5c11\u6027\u304c\u3042\u308b\u3088\u3046\u306b\u601d\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002\\n\\n\u3057\u304b\u3057\u3001\u9700\u8981\u3068\u4f9b\u7d66\u306e\u8a71\u3092\u3059\u308b\u3068\u3001\u9700\u8981\u306f\u9577\u3044\u6b74\u53f2\u306e\u4e2d\u3067\u5f62\u6210\u3055\u308c\u3066\u304d\u305f\u306e\u3067\u3042\u308b\u306e\u306f\u9593\u9055\u3044\u3042\u308a\u307e\u305b\u3093\u3002\u3067\u3059\u304c\u4f9b\u7d66\u5074\u3067\u3044\u3046\u3068\u3001\u81ea\u7136\u306a\u9271\u7269\u3060\u3068\u3059\u308b\u3068\u3001\u9271\u5c71\u3092\u3044\u3063\u3071\u3044\u767a\u898b\u3059\u308c\u3070\u4f9b\u7d66\u304c\u305d\u308c\u3060\u3051\u5897\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002\\n\\n\u4e00\u65b9\u3067\u3082\u3057\u9700\u8981\u304c\u305f\u304f\u3055\u3093\u3042\u308b\u5834\u5408\u3001\u9271\u5c71\u3092\u898b\u3064\u3051\u308b\u305f\u3081\u306e\u30a4\u30f3\u30bb\u30f3\u30c6\u30a3\u30d6\u304c\u50cd\u3044\u3066\u305f\u304f\u3055\u3093\u9271\u5c71\u304c\u898b\u3064\u304b\u308b\u3067\u3057\u3087\u3046\u3002\u307e\u305f\u3001\u3055\u3089\u306b\u5b87\u5b99\u9032\u51fa\u3092\u3057\u3066\u3044\u308b\u4eba\u9593\u304c\u5b87\u5b99\u3067\u305f\u304f\u3055\u3093\u306e\u30b4\u30fc\u30eb\u30c9\u3092\u624b\u306b\u5165\u308c\u305f\u3089\u3001\u30b4\u30fc\u30eb\u30c9\u306e\u5e0c\u5c11\u6027\u306b\u307e\u3064\u308f\u308b\u795e\u8a71\u3082\u7d42\u308f\u308a\u3092\u544a\u3052\u308b\u3067\u3057\u3087\u3046\u3002\\n\\n\u4e00\u5b9a\u6761\u4ef6\u306e\u3082\u3068\u3067\u306f\u3001\u30b4\u30fc\u30eb\u30c9\u306f\u5e0c\u5c11\u6027\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u9577\u671f\u7684\u306b\u8003\u3048\u308b\u3068\u3042\u307e\u308a\u5e0c\u5c11\u6027\u306f\u3042\u308a\u307e\u305b\u3093\u3002\\n\\n\u30b4\u30fc\u30eb\u30c9\u3067\u3055\u3048\u3082\u5e0c\u5c11\u6027\u304c\u3042\u307e\u308a\u306a\u3044\u3068\u3044\u3046\u306a\u3089\u3001\u4f55\u306b\u5e0c\u5c11\u6027\u304c\u3042\u308b\u3093\u3060\u3088\u3068\u601d\u3046\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u3002\\n\\n\u3067\u306f\u3053\u3053\u3067\u91cd\u8981\u306a\u7d50\u8ad6\u3092\u8a71\u3057\u307e\u3059\u3002\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u5143\u7956\u3067\u3042\u308b\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3\u3067\u3059\u3002\\n\\n\u3053\u3053\u3067\u3044\u3046\u306e\u306f\u4ee3\u8868\u683c\u306e Bitcoin \u3092\u8a00\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u5225\u306b\u305d\u306e\u4ed6\u306e\u30a2\u30eb\u30c8\u30b3\u30a4\u30f3\u306b\u5e0c\u5c11\u6027\u304c\u7121\u3044\u3068\u3044\u3046\u610f\u5473\u3067\u306f\u306a\u3044\u3068\u7406\u89e3\u3057\u3066\u304f\u3060\u3055\u3044\u3002\\n\\n## Bitcoin\\n\\n![](bitcoin.jpg)\\n\\n\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3\u306f\u30cf\u30fc\u30c9\u30ad\u30e3\u30c3\u30d7(\u4e0a\u9650\u3068\u306a\u308b\u767a\u884c\u91cf)\u3067\u3042\u308b 2100 \u4e07\u500b\u3068\u3044\u3046\u4eba\u985e\u793e\u4f1a\u306e\u30b3\u30f3\u30bb\u30f3\u30b5\u30b9\u304c\u3042\u308b\u3053\u3068\u304b\u3089\u3001\u4eba\u5de5\u7684\u306b\u4f5c\u3063\u305f\u3042\u307e\u308a\u5909\u3048\u3089\u308c\u306a\u3044\u6570\u306e\u4f9b\u7d66\u304c\u6210\u308a\u7acb\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\uff11\u56fd\u5bb6\u3060\u308d\u3046\u304c\u3060\u308c\u3067\u3042\u308d\u3046\u304c\u3001\u3053\u306e\u30cf\u30fc\u30c9\u30ad\u30e3\u30c3\u30d7\u306b\u5bfe\u3059\u308b\u30b3\u30f3\u30bb\u30f3\u30b5\u30b9\u3092\u52d5\u304b\u3059\u306e\u306f\u7d50\u69cb\u306a\u30cf\u30fc\u30c9\u30eb\u304c\u3042\u308a\u307e\u3059\u3002\\n\\n\u307e\u305f\u3001\u9700\u8981\u9762\u304b\u3089\u3044\u3046\u3068\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u30ea\u30c6\u30e9\u30b7\u30fc\u304c\u5897\u52a0\u306e\u4e00\u9014\u3092\u305f\u3069\u3063\u3066\u304a\u308a\u3001\u4eca\u3084Web3\u306f\u65e5\u672c\u306e\u56fd\u5bb6\u6226\u7565\u3068\u304b\u306b\u306a\u3063\u305f\u308a\u3057\u3066\u3044\u3066\u3001\u305d\u306e\u30a4\u30f3\u30d5\u30e9\u3067\u3042\u308b\u3053\u3068\u304b\u3089\u307e\u3059\u307e\u3059\u591a\u304f\u306e\u4eba\u3005\u304c\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3078\u306e\u7406\u89e3\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002\u307e\u305f\u3001\u4eba\u9593\u793e\u4f1a\u304c\u30ea\u30a2\u30eb\u4e16\u754c\u304b\u3089\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u3078\u3044\u304f\u306e\u306f\u76ee\u306b\u898b\u3048\u3066\u3044\u308b\u3057\u3001\u73fe\u5b9f\u4e16\u754c\u306e\u4fa1\u5024\u306e\u30a2\u30f3\u30ab\u30fc(\u57fa\u790e)\u306f\u30b4\u30fc\u30eb\u30c9\u3060\u3068\u3059\u308b\u3068\u3001\u30d0\u30fc\u30c1\u30e3\u30eb\u4e16\u754c\u306e\u4fa1\u5024\u306e\u30a2\u30f3\u30ab\u30fc\u306f\u307b\u307c\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3\u4e00\u629e\u3067\u3059\u3002\u9700\u8981\u304c\u5897\u3048\u308b\u3053\u3068\u3082\u9593\u9055\u3044\u306a\u3044\u3067\u3057\u3087\u3046\u3002\\n\\n\u3057\u305f\u304c\u3063\u3066\u3001\u7b46\u8005\u306f\u3053\u308c\u307e\u3067\u8272\u3005\u898b\u3066\u304d\u305f\u666e\u904d\u7684\u306a\u4fa1\u5024\u3092\u6301\u3064\u3082\u306e\u306e\u4e2d\u3067\u3001bitcoin \u306e\u3088\u3046\u306a\u4eba\u5de5\u7684\u306a\u3082\u306e\u3060\u3051\u304c\u9577\u671f\u306b\u6e21\u3063\u3066\u7d76\u5bfe\u7684\u306a\u5e0c\u5c11\u6027\u304c\u6210\u7acb\u3057\u307e\u3059\u3002\\n\\n## PS\\n\\n\u6b63\u76f4\u3001\u5e0c\u5c11\u6027\u306e\u3042\u308b\u666e\u904d\u7684\u306a\u3082\u306e\u3068\u3044\u3046\u306e\u306f\u3042\u307e\u308a\u3042\u308a\u307e\u305b\u3093\u3002\u3069\u3093\u306a\u7269\u8cea\u3067\u3042\u308d\u3046\u304c\u9811\u5f35\u308c\u3070\u624b\u306b\u5165\u308b\u304b\u3001\u3042\u308b\u3044\u306f\u91cf\u3092\u5897\u3084\u305b\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u4eca\u307e\u3067\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u304a\u3044\u3066\u306f\u30c7\u30fc\u30bf\u306f\u30b3\u30d4\u30fc\u3067\u304d\u308b\u3068\u3044\u3046\u30c1\u30fc\u30c8\u6280\u3092\u4f7f\u3048\u3070\u5e0c\u5c11\u6027\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\\n\\n### _\u514d\u8cac\u4e8b\u9805_\\n\\n_\u672c website \u306b\u304b\u304b\u308c\u3066\u3044\u308b\u5185\u5bb9\u306f\u3042\u304f\u307e\u3067\u500b\u4eba\u7684\u306a\u898b\u89e3\u3067\u3042\u308a\u3001Financial advice \u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002_"},{"id":"fundamental-knowledge","metadata":{"permalink":"/blog/fundamental-knowledge","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/Basics/2022-08-28-what-is-Blockchain.md","source":"@site/blog/Basics/2022-08-28-what-is-Blockchain.md","title":"Fundamental Knowledge","description":"Blockchain","date":"2022-08-28T00:00:00.000Z","formattedDate":"2022\u5e748\u670828\u65e5","tags":[],"readingTime":0.01,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"fundamental-knowledge","title":"Fundamental Knowledge","authors":["Thurendous","Polymetis"],"blogDescription":"Blockchain\u306e\u57fa\u790e\u77e5\u8b58","tags":[]},"prevItem":{"title":"About Scaricity","permalink":"/blog/about-scaricity"},"nextItem":{"title":"About Knowledge","permalink":"/blog/about-why-I-write-about"}},"content":"# What is Blockchain\\n\\nBlockchain"},{"id":"about-why-I-write-about","metadata":{"permalink":"/blog/about-why-I-write-about","editUrl":"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/About-this-blog/2022-08-25-why-I-write-about-blockchain.md","source":"@site/blog/About-this-blog/2022-08-25-why-I-write-about-blockchain.md","title":"About Knowledge","description":"Preface","date":"2022-08-25T00:00:00.000Z","formattedDate":"2022\u5e748\u670825\u65e5","tags":[{"label":"\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","permalink":"/blog/tags/\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3"},{"label":"about","permalink":"/blog/tags/about"}],"readingTime":2.922,"hasTruncateMarker":false,"authors":[{"name":"Thurendous","title":"Think borderlessly","url":"https://github.com/thurendous","imageURL":"https://github.com/thurendous.png","key":"Thurendous"},{"name":"Polymetis","title":"Do your best now","url":"https://github.com/PolymetisOutis","imageURL":"https://github.com/PolymetisOutis.png","key":"Polymetis"}],"frontMatter":{"slug":"about-why-I-write-about","title":"About Knowledge","authors":["Thurendous","Polymetis"],"blogDescription":"\u306a\u305c\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u8a18\u4e8b\u3092\u304b\u304f\u306e\u304b","tags":["\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","about"]},"prevItem":{"title":"Fundamental Knowledge","permalink":"/blog/fundamental-knowledge"}},"content":"## Preface\\n\\n\u3053\u3093\u306b\u3061\u308f\uff01Thurendous \u3067\u3059\u3002\\n\\n\u305d\u3082\u305d\u3082\u672c Website \u3092\u4f5c\u308d\u3046\u3068\u601d\u3063\u305f\u306e\u306f\u3001\u81ea\u5206\u306f 2017 \u5e74\u304b\u3089\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u71c3\u3048\u59cb\u3081\u3066\u304b\u3089\u3001\u5468\u308a\u306e\u65b9\u305f\u3061\u306f\u8208\u5473\u3092\u793a\u3059\u3069\u3053\u308d\u304b\u3001\u7591\u7fa9\u306e\u5ff5\u3092\u62b1\u3044\u3066\u3044\u308b\u65b9\u304c\u5c11\u306a\u304b\u3089\u305a\u3044\u305f\u3053\u3068\u304c\u304d\u3063\u304b\u3051\u3067\u3001\u305d\u308c\u304b\u3089\u60b6\u3005\u3068\u306a\u306b\u304b\u3092\u3084\u3063\u3066\u3084\u308d\u3046\u3058\u3083\u306a\u3044\u304b\u3068\u8272\u3005\u601d\u3044\u3092\u62b1\u3044\u3066\u304d\u307e\u3057\u305f\u3002\\n\\n\u4eca\u73fe\u5728\u306b\u81f3\u308b\u307e\u3067\u3001\u3060\u3044\u3076\u6642\u9593\u304c\u7d4c\u3061\u307e\u3057\u305f\u3057\u3001\u8272\u3005\u306a\u8003\u3048\u3082\u6210\u719f\u3057\u3066\u304d\u3066\u3044\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u52c9\u5f37\u3082\u7d9a\u3051\u3066\u304d\u3066\u304a\u308a\u3001\u305d\u308c\u304c\u7d42\u308f\u308a\u306e\u306a\u3044\u30de\u30e9\u30bd\u30f3\u306e\u3088\u3046\u3067\u3059\u304c\u3001\u7d76\u3048\u305a\u7d9a\u3051\u3066\u3044\u304f\u6240\u5b58\u3067\u3059\u3002\u672c Website \u306f\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u7d20\u4eba\u306e\u3042\u306a\u305f\u306b\u3068\u3063\u3066\u306e\u3059\u3079\u3066\u306e\u7591\u554f\u306b\u7b54\u3048\u3001\u9577\u5e74\u306b\u6e21\u3063\u3066\u8ffd\u3063\u3066\u304d\u305f\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u696d\u754c\u306e\u89b3\u5bdf\u8005\u3067\u3042\u308b\u81ea\u5206\u81ea\u8eab\u304c\u3053\u306e\u696d\u754c\u306e\u5c06\u6765\u306b\u5bfe\u3059\u308b\u30d3\u30b8\u30e7\u30f3\u3092\u5171\u6709\u3067\u304d\u308c\u3070\u5e78\u3044\u3060\u3068\u8003\u3048\u3066\u304a\u308a\u307e\u3059\u3002\\n\\n\u672c\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u3092\u304d\u3063\u304b\u3051\u306b\u5c11\u3057\u3067\u3082\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306e\u7406\u89e3\u306e\u4fc3\u9032\u3001Web3 \u306e\u7406\u89e3\u3001\u30e1\u30bf\u30d0\u30fc\u30b9\u3078\u306e\u8208\u5473\u3092\u6301\u3061\u59cb\u3081\u3066\u3082\u3089\u3048\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\u3002\\n\\n\u3072\u3044\u3066\u306f\u71b1\u72c2\u7684\u306b\u8208\u5473\u3092\u6301\u3063\u3066\u3082\u3089\u3048\u308b\u3088\u3046\u306a\u4eba\u304c\u751f\u307e\u308c\u3066\u304d\u3066\u3001Web3 \u696d\u754c\u306b\u3066\u8d77\u696d\u3057\u305f\u308a\u793e\u4f1a\u3092\u5909\u9769\u3055\u305b\u305f\u308a\u3001\u3053\u308c\u307e\u3067\u306e\u56fa\u5b9a\u89b3\u5ff5\u3001\u5e38\u8b58\u3092\u53d6\u308a\u58ca\u3057\u3001\u65b0\u305f\u306a\u6b69\u307f\u3001\u5bcc\u3092\u5275\u9020\u3057\u3066\u3001\u4eba\u3005\u3092\u81ea\u7531\u3092\u4e0e\u3048\u3001\u793e\u4f1a\u3092\u958b\u653e\u3057\u3066\u3044\u304f\u3068\u304b\u3001\u305d\u3046\u3044\u3046\u3053\u3068\u306f\u9858\u3063\u3066\u3084\u307f\u307e\u305b\u3093\uff01\\n\\n## Big Trend\\n\\n\u81ea\u5206\u306f\u3082\u3068\u3082\u3068\u6d77\u5916\u51fa\u8eab\u304b\u3064\u7406\u7cfb\u51fa\u8eab\u3067\u3059\u304c\u3001\u6587\u7cfb\u3082\u5927\u597d\u304d\u3067\u3057\u305f\u3002\u305d\u308c\u304c\u539f\u56e0\u306a\u306e\u304b\u308f\u304b\u308a\u307e\u305b\u3093\u304c\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u51fa\u4f1a\u3063\u3066\u304b\u3089\u305d\u306e\u8003\u3048\u65b9\u304c\u7406\u7cfb\u3067\u3082\u3067\u304d\u3066\u6587\u7cfb\u3067\u3082\u3067\u304d\u308b\u3068\u3053\u308d\u3001\u307e\u305f\u6df1\u304f\u8003\u3048\u308c\u3070\u8003\u3048\u308b\u307b\u3069\u3001\u697d\u3057\u304f\u306a\u3063\u3066\u3044\u304f\u3053\u3068\u304c\u5927\u597d\u304d\u3067\u3057\u305f\u3002\\n\\n\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3092\u8003\u3048\u308b\u3068\u304d\u306b\u3001\u6295\u8cc7\u306e\u4e16\u754c\u3067\u3059\u3068\u3001\u3069\u3046\u3057\u3066\u3082\u77ed\u671f\u7684\u306b\u7269\u4e8b\u3092\u4fa1\u683c\u7684\u3001\u3042\u308b\u3044\u306f\u6295\u6a5f\u7684\u306a\u8996\u70b9\u3067\u898b\u304c\u3061\u3067\u3059\u304c\u3001\u81ea\u5206\u306f\u3069\u3061\u3089\u304b\u3068\u3044\u3046\u3068\u3001\u5c11\u3057\u539f\u70b9\u306b\u7acb\u3061\u623b\u3063\u3066\u5927\u304d\u306a\u8996\u70b9\u304b\u3089\u898b\u308b\u306e\u304c\u597d\u304d\u3067\u3059\u3002\\n\\n\u500b\u4eba\u3068\u3057\u3066\u884c\u52d5\u3092\u8d77\u3053\u3059\u4e0a\u3067\u3001\u5927\u304d\u306a\u65b9\u5411\u3068\u3057\u3066\u9593\u9055\u3048\u306a\u3051\u308c\u3070\u3001\u4f55\u304b\u65b9\u5411\u6027\u3092\u7591\u3046\u3088\u3046\u306a\u4e8b\u4ef6\u304c\u8d77\u304d\u305f\u3068\u3057\u3066\u3082\u500b\u4eba\u7684\u306b\u306f\u8a31\u5bb9\u7bc4\u56f2\u306a\u306e\u304b\u306a\u3063\u3066\u601d\u3063\u3066\u307e\u3059\u3002\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u5bfe\u3057\u3066\u7591\u7fa9\u306e\u5ff5\u3092\u62b1\u3044\u3066\u308b\u4eba\u304c\u7d50\u69cb\u3044\u307e\u3059\u304c\u3001\u5927\u304d\u306a\u30c8\u30ec\u30f3\u30c9\u3068\u3057\u3066\u5206\u6790\u3059\u308b\u3068\u3001\u8272\u3005\u660e\u3089\u304b\u306b\u306a\u308b\u3053\u3068\u304c\u591a\u3044\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002\\n\\n\u3053\u308c\u304b\u3089\u3001\u5927\u304d\u306a\u30c8\u30ec\u30f3\u30c9\u306e\u8a71\u3092\u3044\u304f\u3064\u304b\u8a18\u4e8b\u306b\u5206\u3051\u3066\u66f8\u3044\u3066\u3044\u3053\u3046\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002\u3053\u3046\u3044\u3063\u305f\u8a18\u4e8b\u3092\u8aad\u3093\u3067\u3044\u305f\u3060\u3051\u308c\u3070\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u696d\u754c\u3092\u9577\u5e74\u89b3\u5bdf\u3057\u3066\u304d\u3066\u3001\u306a\u305c\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u71b1\u72c2\u7684\u306b\u81ea\u5206\u306f\u306a\u3063\u305f\u306e\u304b\u3001\u306a\u305c\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u696d\u754c\u306f\u3059\u3054\u3044\u306e\u304b\u3068\u3044\u3063\u305f\u8cea\u554f\u306b\u7b54\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002\\n\\n\u3082\u3061\u308d\u3093\u3001\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u696d\u754c\u306b\u5bfe\u3057\u3066\u7591\u7fa9\u306e\u5ff5\u3092\u3042\u306a\u305f\u306f\u62b1\u3044\u3066\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u305d\u3053\u306f\u3086\u3063\u304f\u308a\u541f\u5473\u3057\u3066\u3044\u305f\u3060\u3044\u3066\u3001\u79c1\u306f\u7d20\u4eba\u3067\u3042\u308a\u306a\u304c\u3089\u3082\u3001\u666e\u901a\u306e\u4eba\u304c\u8003\u3048\u305f\u3053\u3068\u306e\u306a\u3044\u3001\u3042\u308b\u3044\u306f\u77e5\u308d\u3046\u3068\u3057\u306a\u3044\u3053\u3068\u3092\u9577\u3044\u5e74\u6708\u3068\u7d4c\u9a13\u3092\u7d4c\u3066\u591a\u8a00\u8a9e\u7684\u306b\u60c5\u5831\u3092\u53ce\u96c6\u3057\u52c9\u5f37\u3057\u3066\u304d\u3066\u4eca\u306b\u81f3\u3063\u3066\u3044\u307e\u3059\u3002\\n\\n\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u306b\u3064\u3044\u3066\u306f\u3082\u306e\u3059\u3054\u3044\u697d\u89b3\u8996\u3057\u3066\u3044\u308b\u306e\u306f\u305d\u308c\u306a\u308a\u306e\u7406\u7531\u3084\u80cc\u666f\u77e5\u8b58\u3092\u9811\u5f35\u3063\u3066\u624b\u306b\u5165\u308c\u305f\u304b\u3089\u3067\u3059\u3002\u6839\u62e0\u304c\u3042\u3063\u3066\u4eca\u306e\u8a8d\u8b58\u304c\u3042\u308b\u308f\u3051\u3067\u3059\u3002\u3086\u3063\u304f\u308a\u3068\u3054\u89a7\u306b\u306a\u3063\u3066\u8003\u3048\u3066\u307f\u3066\u307b\u3057\u3044\u3067\u3059\u3002\\n\\n\u4e00\u5ea6\u306b\u66f8\u304f\u3068\u66f8\u304d\u304d\u308c\u306a\u3044\u3053\u3068\u3067\u3059\u306e\u3067\u3001\u81ea\u5206\u3068\u3057\u3066\u3082\u3086\u3063\u304f\u308a\u6574\u7406\u3057\u3066\u8907\u6570\u306e\u8a18\u4e8b\u306b\u3057\u3066\u5168\u90e8\u66f8\u3044\u3066\u3044\u304d\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002\u4f55\u304b\u304a\u5f79\u306b\u7acb\u3063\u305f\u306e\u3067\u3042\u308c\u3070\u5e78\u3044\u3067\u3059\uff01\\n\\n# What to Write\\n\\n\u5c0f\u96e3\u3057\u3044\u3053\u3068\u3092\u66f8\u304f\u3068\u591a\u5206\u7406\u89e3\u3055\u308c\u307e\u305b\u3093\u306e\u3067\u3001\u3042\u308b\u610f\u5473\u81ea\u5206\u304c\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3092\u7406\u89e3\u3057\u3066\u304d\u305f\u4e2d\u3067\u3001\u5b9f\u751f\u6d3b\u306e\u4e8b\u4f8b\u3068\u304b\u3001\u666e\u6bb5\u306e\u611f\u899a\u3068\u304b\u305d\u3046\u3044\u3063\u305f\u3082\u306e\u3092\u4f7f\u3044\u3064\u3064\u3001\u76f4\u611f\u7684\u306b\u308f\u304b\u3063\u3066\u3082\u3089\u3048\u308b\u3088\u3046\u306b\u5185\u5bb9\u3092\u66f8\u3044\u3066\u3044\u3051\u308c\u3070\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002\u3068\u3044\u3046\u306e\u3082\u81ea\u5206\u306f\u305d\u3046\u3044\u3063\u305f\u7d4c\u7def\u3092\u305f\u3069\u3063\u305f\u7d4c\u9a13\u304c\u3042\u308a\u307e\u3057\u305f\u306e\u3067\u3001\u305d\u3046\u3057\u3088\u3046\u3068\u8003\u3048\u305f\u306e\u3067\u3059\u3002\\n\\n- \u30de\u30af\u30ed\u306a\u8996\u70b9\u304b\u3089\u898b\u305f blockchain\\n\\n - \u6b74\u53f2\u306e\u8a71\u304b\u3089\u3001\u304a\u91d1\u306e\u8a71\u304b\u3089\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306e\u6b74\u53f2\uff08\u30d0\u30fc\u30c1\u30e3\u30eb\u3078\uff09\\n - software is eating the world\\n - \u6280\u8853\u306e\u9032\u6b69\u306b\u3064\u3044\u3066\u306e\u73fe\u72b6\\n - \u4e16\u754c\u7d4c\u6e08\u306e\u898f\u6a21\\n - \u4eee\u60f3\u901a\u8ca8\u306f\u5024\u4e0a\u304c\u308a\u3059\u308b\u306e\uff1f\\n - \u5c06\u6765\u306e\u7d4c\u6e08\u767a\u5c55\u306e\u5272\u5408\\n - \u793e\u4f1a\u306e\u5909\u8c8c\uff08\u975e\u4e2d\u592e\u96c6\u6a29\u3078\uff09\\n\\n- Web3 \u3063\u3066\u306a\u306b\\n- DeFi \u3063\u3066\u306a\u306b\\n- \u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3063\u3066\u306a\u306b\\n- \u4eee\u60f3\u901a\u8ca8\u306f\u672c\u8cea\u7684\u306a\u4fa1\u5024\u304c\u306a\u3044\u3068\u3088\u304f\u8a00\u308f\u308c\u308b\u306e\u3067\u5927\u4e08\u592b\u304b\\n- \u4eee\u60f3\u901a\u8ca8\u306f\u6295\u6a5f\u3070\u304b\u308a\u3067\u3059\u3088\u306d\uff1f\\n\\n- \u5e0c\u5c11\u6027\u306e\u8a71\\n- \u4eba\u9593\u306e\u672c\u6027\\n- \u56fd\u5883\u304c\u306a\u3044\u4e16\u754c\\n- blockchain \u306e\u4ed5\u7d44\u307f\\n- \u4eba\u53e3\u5206\u5e03\u306e\u95a2\u4fc2\\n- \u6280\u8853\u7cfb\u95a2\u9023\u306e solidity \u306a\u3069\u306e\u8a18\u4e8b"}]}')}}]); \ No newline at end of file diff --git a/assets/js/b37b7b6b.c3b7ec3b.js b/assets/js/b37b7b6b.c3b7ec3b.js deleted file mode 100644 index 47e1422e..00000000 --- a/assets/js/b37b7b6b.c3b7ec3b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[7852],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var l=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=l.createContext({}),m=function(e){var t=l.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=m(e.components);return l.createElement(i.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},c=l.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),c=m(n),k=r,d=c["".concat(i,".").concat(k)]||c[k]||s[k]||a;return n?l.createElement(d,o(o({ref:t},u),{},{components:n})):l.createElement(d,o({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,o=new Array(a);o[0]=c;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p.mdxType="string"==typeof e?e:r,o[1]=p;for(var m=2;m{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>s,frontMatter:()=>a,metadata:()=>p,toc:()=>m});var l=n(7462),r=(n(7294),n(3905));const a={slug:"EVM-deep-dive-part2",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",tags:["EVM","opcode","Etheruem","blockchain","examples"]},o=void 0,p={permalink:"/blog/EVM-deep-dive-part2",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md",source:"@site/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",description:"Hello, everybody!",date:"2023-05-13T00:00:00.000Z",formattedDate:"2023\u5e745\u670813\u65e5",tags:[{label:"EVM",permalink:"/blog/tags/evm"},{label:"opcode",permalink:"/blog/tags/opcode"},{label:"Etheruem",permalink:"/blog/tags/etheruem"},{label:"blockchain",permalink:"/blog/tags/blockchain"},{label:"examples",permalink:"/blog/tags/examples"}],readingTime:7.626,hasTruncateMarker:!1,authors:[{name:"Thurendous",title:"Think borderlessly",url:"https://github.com/thurendous",imageURL:"https://github.com/thurendous.png",key:"Thurendous"}],frontMatter:{slug:"EVM-deep-dive-part2",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",tags:["EVM","opcode","Etheruem","blockchain","examples"]},nextItem:{title:"SafeERC20\u3068\u306f",permalink:"/blog/What is SafeERC20"}},i={authorsImageUrls:[void 0]},m=[{value:"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35",id:"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35",level:2},{value:"\u30e1\u30e2\u30ea\u306f byte \u306e Array \u3060\u304b\u3089",id:"\u30e1\u30e2\u30ea\u306f-byte-\u306e-array-\u3060\u304b\u3089",level:2},{value:"Bytecode",id:"bytecode",level:2},{value:"Reference",id:"reference",level:2}],u={toc:m};function s(e){let{components:t,...a}=e;return(0,r.kt)("wrapper",(0,l.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Hello, everybody!"),(0,r.kt)("h1",{id:"never-give-up"},"Never Give Up"),(0,r.kt)("p",null,"\u4ee5\u524d\u66f8\u3044\u305f\u6642\u304b\u3089\u3001EVM \u306b\u3064\u3044\u3066\u7406\u89e3\u3067\u304d\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u3001\u5f53\u6642\u306f\u8aad\u307f\u3065\u3089\u304b\u3063\u305f\u6280\u8853\u7cfb\u306e\u6587\u7ae0\u3082\u3059\u3089\u3059\u3089\u8aad\u3081\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u305d\u3053\u3067 EVM \u306e\u3053\u3068\u3042\u308b\u3044\u306f\u4ed6\u306e\u306a\u306b\u304b\u3067\u9811\u5f35\u3063\u3066\u3044\u308b\u3042\u306a\u305f\u3082\u3082\u3057\u304b\u3057\u3066\u4f55\u304b\u304c\u3067\u304d\u305a\u306b\u60a9\u3093\u3067\u3044\u308b\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u884c\u3063\u3066\u304a\u304d\u307e\u3059\u304c\u3001\u50d5\u3082\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3001\u5b89\u5fc3\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u3046\u3061\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3060\u308d\u3046\u3002"),(0,r.kt)("p",null,"\u3061\u306a\u307f\u306b\u3001\u3053\u3061\u3089\u306e\u753b\u50cf\u3092\u307f\u3066\u3054\u3089\u3093\u3002"),(0,r.kt)("p",null,"\u672c\u5f53\u306b\u7d4c\u9a13\u3057\u305f\u4eba\u3057\u304b\u308f\u304b\u3089\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3057\u3001\u7d4c\u9a13\u3057\u305f\u3068\u3057\u3066\u3082\u3082\u3046\u4e00\u5ea6\u7d4c\u9a13\u3059\u308b\u3068\u3001\u3084\u306f\u308a\u4fe1\u3058\u3089\u308c\u306a\u3044\u6c17\u6301\u3061\u306b\u306a\u308b\u3068\u601d\u3046\u3088\u306d\u3002"),(0,r.kt)("p",null,"\u4f55\u304c\u3069\u3046\u306a\u3063\u3066\u3082\u3001\u7d9a\u3051\u308b\u3053\u3068\u304c\u4e00\u756a\u5927\u5207\u3002"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u9045\u304f\u3066\u3082\u3044\u3044")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(8919).Z,width:"828",height:"382"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u7406\u60f3\u3068\u73fe\u5b9f")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(4740).Z,width:"820",height:"380"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u300c\u7d9a\u3051\u3066\u3066\u3082\u610f\u5473\u306a\u3044\u300d")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(6794).Z,width:"934",height:"524"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u6700\u521d\u306e\u7b2c\u4e00\u6b69\u304c\u4e00\u756a\u3080\u305a\u3044\u3051\u3069\u306d")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(408).Z,width:"792",height:"742"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u4e09\u65e5\u574a\u4e3b VS \u7d9a\u3051\u308b")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(3814).Z,width:"886",height:"516"})),(0,r.kt)("hr",null),(0,r.kt)("p",null,"\u4eca\u56de\u306f\u3001\u30e1\u30e2\u30ea\u30fc\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002"),(0,r.kt)("p",null,"Part 1 \u3067\u306f\u3001EVM \u304c\u3069\u306e\u3088\u3046\u306b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u3069\u3053\u3092\u72d9\u3063\u3066 run \u3055\u305b\u308b\u304b\u3092\u898b\u3066\u304d\u305f\u3002 \u305d\u308c\u306f\u3001\u5916\u90e8\u306e calldata \u3092\u5165\u529b\u3057\u3066\u304d\u3066\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u3069\u306e\u95a2\u6570\u3092\u547c\u3093\u3067\u3044\u308b\u304b\u3092\u5224\u5225\u3057\u3066 run \u3059\u3079\u304d\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u7b87\u6240\u3092\u6c7a\u3081\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u95a2\u6570\u306e\u7f72\u540d\u30fbcall stack\u30fbcalldata\u30fbEVM \u306e\u30aa\u30da\u30b3\u30fc\u30c9 \u306b\u3064\u3044\u3066\u7406\u89e3\u304c\u9032\u3093\u3060\u3068\u601d\u3046\u3002"),(0,r.kt)("p",null,"Part 2 \u3067\u306f\u3001EVM \u306b\u304a\u3051\u308b\u30e1\u30e2\u30ea\u30fc\u306b\u3064\u3044\u3066\u8272\u3005\u898b\u3066\u3044\u3053\u3046\u3002"),(0,r.kt)("h1",{id:"memory"},"Memory"),(0,r.kt)("p",null,"Part1 \u306e\u30b3\u30fc\u30c9\u3092\u601d\u3044\u3060\u3057\u3066\u307f\u3066\u3002",(0,r.kt)("inlineCode",{parentName:"p"},"1_Storage.sol"),"\u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3042\u3063\u305f\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sol"},"pragma solidity >=0.7.0 <0.9.0;\n\ncontract Storage {\n uint256 number;\n\n function store(uint256 num) public {\n number = num;\n }\n\n function retrieve() public view returns (uint256) {\n return number;\n }\n}\n")),(0,r.kt)("p",null,"\u3053\u308c\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u3068\u3001\u3053\u3046\u306a\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"608060405234801561001057600080fd....\n")),(0,r.kt)("p",null,"\u4eca\u56de\u306f\u3053\u306e\u90e8\u5206\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u3066\u8aac\u660e\u3057\u305f\u3044\u3068\u601d\u3046\u3002\u4e00\u756a\u6700\u521d\u306e 5bytes \u3060\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"6080604052\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"60 80 = PUSH1 0x80\n60 40 = PUSH1 0x40\n52 = MSTORE\n")),(0,r.kt)("p",null,"\u3053\u308c\u304c\u805e\u3044\u305f\u3053\u3068\u3042\u308b\u304c\u304b\u3082\u3057\u308c\u306a\u3044\u3051\u3069\u3001\u3044\u308f\u3086\u308b\u300cfree memory pointer\u300d\u3060\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u30fc\u3092\u7406\u89e3\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002"),(0,r.kt)("h1",{id:"\u30e1\u30e2\u30ea\u306e\u30c7\u30fc\u30bf\u69cb\u9020"},"\u30e1\u30e2\u30ea\u306e\u30c7\u30fc\u30bf\u69cb\u9020"),(0,r.kt)("p",null,"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3046\u3068\u3001byte \u306e array \u3060\u300232bytes(256bit)\u3042\u308b\u3044\u306f 1byte(8bit)\u306e\u5358\u4f4d\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002\u8aad\u307e\u308c\u308b\u3068\u304d\u306b\u306f\u300132bytes(256bit)\u5358\u4f4d\u3054\u3068\u306b\u306a\u308b\u3002\u4e0b\u8a18\u306e\u753b\u50cf\u306f\u8a71\u3057\u305f\u5185\u5bb9\u3092\u5177\u73fe\u5316\u3057\u305f\u3082\u306e\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(5473).Z,width:"559",height:"427"})),(0,r.kt)("p",null,"\u3053\u306e\u6a5f\u80fd\u306f\uff13\u3064\u306e opcode \u306b\u5de6\u53f3\u3055\u308c\u3066\u3044\u308b\u3002"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"MSTORE(x, y)"),": 32 byte(256 bit) \u306e\u5024 y \u3092\u30e1\u30e2\u30ea\u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e x \u306b\u4fdd\u5b58"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"MLOAD(x)"),": 32 byte(256 bit) \u306e\u30e1\u30e2\u30ea\u306e\u5834\u6240\u3092\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 x \u304b\u3089\u8aad\u307f\u51fa\u3057\u3001\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"MSOTRE8(x, y)"),": 1 byte (8 bit)\u306e\u5024 y \u3092\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e x \u306b\u4fdd\u5b58\u3059\u308b")),(0,r.kt)("p",null,"\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u3053\u3068\u306f\u3069\u3053\u304b\u3089\u30e1\u30e2\u30ea\u3092\u8aad\u307f\u53d6\u308b/\u66f8\u304d\u8fbc\u3080\u304b\u3092\u6c7a\u3081\u3066\u3044\u308b\u3068\u8003\u3048\u3066\u3088\u3044\u3002\u3082\u3057\u30011byte \u3088\u308a\u591a\u304f\u8aad\u307f\u53d6\u308b/\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3092\u3057\u305f\u3044\u306e\u3067\u3042\u308c\u3070\u3001\u305d\u306e\u307e\u307e\u7d99\u7d9a\u3059\u308c\u3070\u3088\u3044\u3060\u3051\u306e\u8a71\u306b\u306a\u308b\u3002"),(0,r.kt)("h1",{id:"evm-playground"},"EVM playground"),(0,r.kt)("p",null,"\u3053\u306e ",(0,r.kt)("a",{parentName:"p",href:"https://www.evm.codes/playground?fork=shanghai"},"EVM playground")," \u306f\u3042\u306a\u305f\u306e\u7406\u89e3\u306e\u624b\u52a9\u3051\u304c\u3067\u304d\u308b\u3060\u308d\u3046\u3002Run \u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u53f3\u4e0a\u306e\u77e2\u5370\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u3088\u3046\u3002\u77e2\u5370\u30dc\u30bf\u30f3\u306f\u30b3\u30fc\u30c9\u306e\u7a3c\u50cd\u30d7\u30ed\u30bb\u30b9\u3092\u305f\u3069\u3063\u3066\u3044\u3063\u3066\u304f\u308c\u308b\u3002\u30b9\u30bf\u30c3\u30af\u3001\u30e1\u30e2\u30ea\u306f\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u306e\u304b\u3082\u308f\u304b\u308b\u3002\u3059\u3054\u304f\u76f4\u611f\u7684\u306a\u30c4\u30fc\u30eb\u3060\u3068\u611f\u5fc3\u3059\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"// MSTORE 32 bytes 0x11...1 at memory location 0\nPUSH32 0x1111111111111111111111111111111111111111111111111111111111111111\nPUSH1 0x00\nMSTORE\n\n// MSTORE8 1 byte 0x22 at memory location 32 (0x20 in hex)\nPUSH1 0x22\nPUSH1 0x20\nMSTORE8\n\n// MSTORE8 1 byte 0x33 at memory location 33 (0x21 in hex)\nPUSH1 0x33\nPUSH1 0x21\nMSTORE8\n\n// MLOAD 32 bytes to the call stack from memory location 0 ie 0-32 bytes of memory\nPUSH1 0x00\nMLOAD\n\n// MLOAD 32 bytes to the call stack from memory location 32 ie 32-64 bytes of memory\nPUSH1 0x20\nMLOAD\n\n// MLOAD 32 to the call stack from memory location 33 ie 33-65 bytes of memory\nPUSH1 0x21\nMLOAD\n")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3e29126-2954-40e3-bc1b-7ca5e780fd1c_1500x850.png",alt:null})),(0,r.kt)("p",null,"opcode \u306b\u3064\u3044\u3066\u3082\u3001\u82f1\u8a9e\u3060\u304c\u8aac\u660e\u6587\u304c\u3064\u3044\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3084\u3063\u3066\u307f\u3066\u5909\u3060\u306a\u3068\u601d\u3046\u3053\u3068\u306f\u306a\u3044\u306e\u304b\uff1f\n\u307e\u305a\u3001MSTORE8 \u3092\u4f7f\u3063\u3066 1 byte \u306e 0x22 \u3092\u30e1\u30e2\u30ea\u306e 0x20 \u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u308b\u3064\u3082\u308a\u3060\u304c\u3001\u4f55\u6545\u304b\u30e1\u30e2\u30ea\u306f\u3053\u3053\u304b\u3089\u3001"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F954d54e6-0bce-4de3-a61d-dd41fdae49c7_836x152.png",alt:null})),(0,r.kt)("p",null,"\u3053\u3046\u5909\u308f\u308b\u3093\u3060\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F225fde5a-09bf-4a24-a702-88ad5010951e_836x176.png",alt:null})),(0,r.kt)("p",null,"\u3053\u306e\u4f59\u5206\u306a\u30bc\u30ed\u3063\u3066\u306a\u3093\u3060\u3068\u601d\u3046\u3060\u308d\u3046\u3002"),(0,r.kt)("h2",{id:"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35"},"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35"),(0,r.kt)("p",null,"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30e1\u30e2\u30ea\u3078\u306a\u306b\u304b\u3092\u66f8\u304d\u8fbc\u3080\u969b\u3001byte \u6570\u306b\u5f93\u3063\u3066\u30ac\u30b9\u4ee3\u3092\u652f\u6255\u3063\u3066\u3044\u308b\u3002\u3053\u308c\u304c opcode \u306e\u30b3\u30b9\u30c8\u3068\u8a00\u3046\u3002\u3082\u3057\u3001\u3053\u308c\u307e\u3067\u30e1\u30e2\u30ea\u3078\u66f8\u304d\u8fbc\u3093\u3060\u3053\u3068\u304c\u306a\u3044\u5834\u6240\u3078\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u8ffd\u52a0\u7684\u306b\u30e1\u30e2\u30ea\u62e1\u5f35\u306e\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u307e\u3067\u66f8\u304d\u8fbc\u3093\u3060\u3053\u3068\u304c\u306a\u3044\u7b87\u6240\u3078\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u30e1\u30e2\u30ea\u306f 32bytes(256bit)\u62e1\u5f35\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308b\u3002"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u30e1\u30e2\u30ea\u306e\u30b3\u30b9\u30c8\u306e\u5897\u3048\u65b9\u306b\u95a2\u3057\u3066\u306f\u3001\u6700\u521d\u306e 724bytes \u306f\u7dda\u5f62\u7684\u306b\u5897\u52a0\u3059\u308b\u304c\u3001\u305d\u308c\u4ee5\u964d\u306f\u4e8c\u6b21\u6307\u6570\u95a2\u6570\u7684\u306b\u306a\u308b\u3002")),(0,r.kt)("p",null,"\u4e0a\u306e\u4f8b\u3067\u306f\u3001\u307e\u305a 0x00 \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078 32 bytes \u66f8\u304d\u8fbc\u3093\u3060\u304c\u3001\u305d\u3053\u304b\u3089\u3055\u3089\u306b\u66f8\u304d\u8fbc\u3080\u3068\u306a\u308b\u3068\u3001\u30e1\u30e2\u30ea\u62e1\u5f35\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u305a\u3001\u7d50\u679c\u7684\u306b\u3001\u30e1\u30e2\u30ea\u306f 64 bytes \u306b\u306a\u3063\u305f\u3002"),(0,r.kt)("p",null,"\u30e1\u30e2\u30ea\u306b\u3042\u308b\u4fdd\u5b58\u9818\u57df\u306e\u6700\u521d\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f\u30bc\u30ed\u3002\u3060\u304b\u3089 2200000000000000000000000000000000000000000000000000000000000000 \u304c\u30e1\u30e2\u30ea\u306b\u8ffd\u52a0\u3055\u308c\u305f\u3002"),(0,r.kt)("h2",{id:"\u30e1\u30e2\u30ea\u306f-byte-\u306e-array-\u3060\u304b\u3089"},"\u30e1\u30e2\u30ea\u306f byte \u306e Array \u3060\u304b\u3089"),(0,r.kt)("p",null,"\u6b21\u306b\u6ce8\u610f\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u306f\u3001\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 33(0x21)\u304b\u3089 MLOAD \u3057\u305f\u3068\u304d\u306b\u3001\u4e0b\u8a18\u306e\u5024\u304c\u8fd4\u3055\u308c\u305f\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"3300000000000000000000000000000000000000000000000000000000000000\n")),(0,r.kt)("p",null,"32 bytes \u305a\u3064\u8aad\u307f\u8fbc\u3093\u3067\u3044\u306a\u304f\u3066\u3082\u3001\u8aad\u307f\u8fbc\u3081\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u3063\u305f\u3002"),(0,r.kt)("p",null,"memory \u306f\u305f\u3060\u306e byte array \u306a\u306e\u3067\u3001\u3069\u3053\u306e\u5834\u6240\u304b\u3089\u3067\u3082\u8aad\u307f\u8fbc\u3081\u308b\u3053\u3068\u3092\u899a\u3048\u3066\u4e0b\u3055\u3044\u300232bytes \u306e\u5236\u9650\u306f\u7279\u306b\u306a\u304f\u3001\u3069\u3053\u304b\u3089\u3067\u3082 byte \u5358\u4f4d\u304b\u3089\u8aad\u307f\u8fbc\u3081\u308b\u3002"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u95a2\u6570\u5185\u3067\u306e\u307f\u65b0\u305f\u306b\u30e1\u30e2\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u308c\u306f\u65b0\u305f\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3055\u308c\u305f\u8907\u96d1\u306a\u578b\uff08\u4f8b\u3048\u3070 ",(0,r.kt)("inlineCode",{parentName:"p"},"new int[...]")," \u306a\u3069\uff09\u3067\u3042\u3063\u305f\u308a\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u53c2\u7167\u5909\u6570\u304b\u3089\u30b3\u30d4\u30fc\u3055\u308c\u305f\u3082\u306e\u3067\u3042\u3063\u305f\u308a\u3057\u307e\u3059\u3002")),(0,r.kt)("p",null,"\u73fe\u5728\u3001\u6211\u3005\u306f\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u3064\u3044\u3066\u7406\u89e3\u3067\u304d\u305f\u306e\u3067\u3001free memory \u306e\u8a71\u3078\u623b\u308d\u3046\u3002"),(0,r.kt)("h1",{id:"free-memory-pointer"},"Free Memory Pointer"),(0,r.kt)("p",null,"Free Memory Pointer \u3068\u306f\u3001\u7c21\u5358\u306b\u3044\u3046\u3068\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30dd\u30a4\u30f3\u30bf\u30fc\u3067\u3042\u308a\u3001Free Memory \u304c\u3069\u3053\u304b\u3089\u30b9\u30bf\u30fc\u30c8\u3059\u3079\u304d\u306a\u306e\u304b\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002\u8a00\u3044\u63db\u3048\u308b\u3068\u3001\u30e1\u30e2\u30ea\u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3069\u3053\u307e\u3067\u66f8\u304d\u8fbc\u307e\u308c\u3066\u3044\u3066\u3001\u3069\u3053\u304b\u3089\u66f8\u304d\u8fbc\u3080\u3079\u304d\u306a\u306e\u304b\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30e1\u30e2\u30ea\u3092\u4e0a\u66f8\u304d\u3059\u308b\u306e\u3092\u9632\u3050\u305f\u3081\u3067\u3082\u3042\u308b\u3002"),(0,r.kt)("p",null,"\u5909\u6570\u304c\u30e1\u30e2\u30ea\u3078\u66f8\u304d\u8fbc\u3080\u3068\u304d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u307e\u305a Free Memory Pointer \u3092\u53c2\u7167\u3057\u3001\u3069\u3053\u304b\u3089\u66f8\u304d\u8fbc\u3080\u3079\u304d\u304b\u3092\u6c7a\u3081\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002\u305d\u308c\u304b\u3089 Free Memory Pointer \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3001\u6700\u65b0\u306e\u30e1\u30e2\u30ea\u306e\u300c\u5883\u754c\u5024\u300d\u3042\u308b\u3044\u306f\u300c\u30aa\u30d5\u30bb\u30c3\u30c8\u300d\u3092\u8a18\u9332\u3059\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"}," newFreeMemoryPointer = freeMemoryPointer + dataSizeBytes\n")),(0,r.kt)("h2",{id:"bytecode"},"Bytecode"),(0,r.kt)("p",null,"\u5148\u7a0b\u306b\u3082\u8a00\u53ca\u3057\u305f\u3088\u3046\u306b\u3001Free Memory Pointer \u306f\u6700\u521d\u306e runtime bytecode \u306e\u3053\u306e\u90e8\u5206\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"60 80 = PUSH1 0x80\n60 40 = PUSH1 0x40\n52 = MSTORE\n")),(0,r.kt)("p",null,"\u3053\u308c\u306f\u57fa\u672c\u7684\u306b\u4f55\u3092\u8a00\u3063\u3066\u3044\u308b\u304b\u3068\u3044\u3046\u3068\u3001Free Memory Pointer \u306f\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x40(64 in decimal)\u3067\u3001\u5024\u306f 0x80(128 in decimal)\u3068\u306a\u308b\u3002"),(0,r.kt)("p",null,"\u3059\u3050\u306b\u7591\u554f\u306b\u601d\u3046\u306e\u306f\u3001\u306a\u305c\u3053\u306e\u6570\u5b57\u306a\u306e\u3068\u3044\u3046\u3053\u3068\u3060\u308d\u3046\u3002"),(0,r.kt)("p",null,"\u7b54\u3048\uff1a"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"0x00 - 0x3f (64 bytes): scratch space"),(0,r.kt)("p",{parentName:"blockquote"},"0x40 - 0x5f (32 bytes): free memory pointer"),(0,r.kt)("p",{parentName:"blockquote"},"0x60 - 0x7f (32 bytes): zero slot")),(0,r.kt)("p",null,"0x40 \u306f solidity \u304c\u5b9a\u7fa9\u3057\u305f\u4e00\u756a\u6700\u521d\u306e Free Memory Pointer \u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3060\u3002\u5024 0x80 \u306f\u5358\u306b\u6700\u521d\u306e 4 \u3064\u306e 32 bytes \u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3089\u306e\u4e88\u7d04\u3055\u308c\u305f\u30e1\u30e2\u30ea\u306b\u3064\u3044\u3066"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Scrach space: inline assembly \u306e\u30cf\u30c3\u30b7\u30f3\u30b0\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u4f7f\u3063\u3066\u3082\u826f\u3044"),(0,r.kt)("li",{parentName:"ul"},"Free memroy pointer: \u4eca\u306e\u30e1\u30e2\u30ea\u306e\u30b5\u30a4\u30ba\u3001free memory \u306e\u30b9\u30bf\u30fc\u30c8\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3001\u6700\u521d\u306f 0x80"),(0,r.kt)("li",{parentName:"ul"},"The zero slot: \u52d5\u7684\u306a Memory Array \u306e\u521d\u671f\u5024\u3067\u3042\u308a\u3001\u3069\u3093\u306a\u3068\u304d\u306b\u3067\u3082\u66f8\u304d\u8fbc\u307e\u308c\u308b\u3053\u3068\u306f\u306a\u3044")),(0,r.kt)("h1",{id:"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea"},"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea"),(0,r.kt)("p",null,"\u30ea\u30a2\u30eb\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304f\u3068\u3057\u3088\u3046\u304b\u3002"),(0,r.kt)("p",null,"\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u4f5c\u6210\u3057\u305f\u3002\u3053\u3044\u3064\u306e\u540d\u306f ",(0,r.kt)("inlineCode",{parentName:"p"},"MemoryLane"),"\u3002\u305f\u3063\u305f\u4e00\u500b\u306e\u95a2\u6570\u3092\u6301\u3063\u3066\u304a\u308a\u3001\uff12\u3064\u306e Array \u3092\u6301\u3063\u3066\u3044\u308b\u3002\u305d\u308c\u304b\u3089 b","[0]","\u306b\u5024 1 \u3092\u4ed8\u4e0e\u3059\u308b\u3002"),(0,r.kt)("p",null,"3 \u884c\u7a0b\u5ea6\u306e\u30b3\u30fc\u30c9\u3060\u3051\u3069\u3001\u304b\u306a\u308a\u591a\u304f\u306e\u3053\u3068\u304c\u8d77\u304d\u3066\u3044\u308b\u3088\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sol"},"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.3;\n\ncontract MemoryLane {\n function memoryLane() public pure {\n bytes32[5] memory a;\n bytes32[5] memory b;\n b[0] = bytes32(uint256(1));\n }\n}\n\n")),(0,r.kt)("p",null,"\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u3082\u3046\u4e00\u5ea6 ",(0,r.kt)("a",{parentName:"p",href:"https://remix.ethereum.org/"},"remix")," \u3078\u6295\u5165\u3002"),(0,r.kt)("p",null,"\u305d\u308c\u304b\u3089\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u304f\u3060\u3055\u3044\u3002"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"memoryLane()"),"\u95a2\u6570\u3092 run \u3057\u3066\u3001debugging mode \u3078\u5165\u3063\u3066\u304f\u3060\u3055\u3044\u3002"),(0,r.kt)("p",null,"opcode \u3092\u5c11\u3057\u305a\u3064\u898b\u3066\u3044\u3053\u3046\u3002"),(0,r.kt)("p",null,"\u5c11\u3057\u7c21\u5358\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u3092",(0,r.kt)("a",{parentName:"p",href:"https://www.evm.codes/playground?unit=Wei&codeType=Mnemonic&code=%27Vg*%28_I...1W0GJ_%21%21%21%21z00FK22WJQ0Y22z20F8K33W33Q1Y33z21F8d%28v0Z0-Jq00Xd%28vJZJ-64q20Xdv33Z33-65q21Xpp%27%7EN+locatioCzG1_wppVv7o7hBcall+stack+from%7EuIIIIq%28+ofNzp%5Cnj+bytegSTOREdw%29*_+0xZ9BY9Chex%7DzXpM%29W+at%7EV%2F%2F+MQ+%7B0x2N+memoryKwg8+1j_J32I11GpPUSHFpMgCn+Be+9+i7+t*+J%29LOAD%28js%21uu%01%21%28%29*79BCFGIJKNQVWXYZ_dgjpquvwz%7E_&fork=shanghai"},"EVM playground"),"\u3078\u5165\u308c\u3066\u3044\u308b\u3002\u305d\u306e opcode \u306f\u305d\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u7c21\u5358\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u306f opcode \u3092\u9806\u756a\u306b\u69cb\u6210\u3057\u3001JUMP \u306a\u3069\u306e\u30e1\u30e2\u30ea\u64cd\u4f5c\u3068\u95a2\u9023\u3057\u306a\u3044\u3053\u3068\u3092\u9664\u5916\u3057\u305f\u3002\u3044\u308d\u3044\u308d\u30b3\u30e1\u30f3\u30c8\u3082\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u53c2\u7167\u3057\u3066\u307b\u3057\u3044\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u30b3\u30fc\u30c9\u306f 6 \u90e8\u5206\u304b\u3089\u69cb\u6210\u3055\u308c\u3066\u3044\u3066\u3001\u3053\u308c\u304b\u3089 dive in \u3059\u308b\u3002"),(0,r.kt)("p",null,"play ground \u3092\u4f7f\u3046\u3053\u3068\u3092\u5f37\u304f\u304a\u3059\u3059\u3081\u3059\u308b\u3002"),(0,r.kt)("h1",{id:"free-memory-pointer-initialisation-evm-playground-lines-1-15"},"Free Memory Pointer Initialisation (EVM Playground Lines 1-15)"),(0,r.kt)("p",null,"\u307e\u305a\u3001\u201cfree memory pointer initialisation\u201d\u304b\u3089\u3084\u3063\u3066\u3044\u304f\u3002\u4e0a\u8a18\u3067\u3082\u3042\u3063\u305f\u3088\u3046\u306b\u30010x80(128 in decimal)\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3002\u3053\u308c\u306f free memory pointer \u306e\u5024\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002Solidity \u306e memory \u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(3136).Z,width:"726",height:"129"})),(0,r.kt)("p",null,"\u3053\u306e\u6bb5\u968e\u3067\u306f\u3001\u307e\u3060\u30e1\u30e2\u30ea\u306b\u306f\u306a\u306b\u3082\u306a\u3044\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(5939).Z,width:"722",height:"166"})),(0,r.kt)("p",null,"\u7d9a\u3044\u3066 free memory pointer \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x40(64 in decimal)\u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002"),(0,r.kt)("p",null,"\u6700\u5f8c\u306b\u3001MSTORE \u3092\u4f7f\u3063\u3066\u30010x40 \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306b 0x80 \u306e\u5024\u3092\u8a18\u9332\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u5f8c\u3001\u30b9\u30bf\u30c3\u30af\u306b\u306f\u4f55\u3082\u306a\u304f\u3001\u30e1\u30e2\u30ea\u306b\u306a\u306b\u304b\u3092\u6b8b\u305b\u305f\u3053\u3068\u306b\u306a\u308b\u3002\u30e1\u30e2\u30ea\u306f 16 \u9032\u6570\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u6570\u5b57\u3054\u3068\u306b 4bit \u306e\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u4eca\u3068\u306a\u3063\u3066\u3001192 \u306e 16 \u9032\u6570\u306e\u6570\u5b57\u3068\u306a\u3063\u3066\u3044\u308b\uff08\u6570\u5b57 2 \u6841 = 1 byte = 8 bit\uff09\u3002"),(0,r.kt)("p",null,"\u5148\u7a0b\u306e\u5185\u5bb9\u3092\u601d\u3044\u51fa\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6700\u521d\u306e 64bytes \u306f scrach space \u3067\u3001\u6b21\u306e 32bytes \u306f free memory pointer \u306b\u306a\u308b\u3002\u3053\u308c\u306f\u307e\u3055\u306b\u4e0b\u8a18\u306e\u72b6\u614b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(499).Z,width:"721",height:"197"})),(0,r.kt)("h1",{id:"memory-allocation-variable-a--free-memory-pointer-update-evm-playground-lines-16-34"},"Memory Allocation Variable \u201ca\u201d & Free Memory Pointer Update (EVM Playground Lines 16-34)"),(0,r.kt)("p",null,"\u6b8b\u308a\u306e\u90e8\u5206\u306b\u3064\u3044\u3066\u306f\u3001\u7c21\u5358\u306b\u3059\u308b\u305f\u3081\u306b\u4e00\u65e6\u6700\u5f8c\u306e\u98db\u3070\u3057\u3066\u30cf\u30a4\u30ec\u30d9\u30eb\u306e\u6982\u8981\u3092\u898b\u3066\u307f\u3088\u3046\u3002"),(0,r.kt)("p",null,"\u6b21\u306e\u30e1\u30e2\u30ea\u306b\u95a2\u3057\u3066\u3001\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"(bytes32","[5]",")\u306e\u3053\u3068\u3092\u914d\u7f6e\u3057\u3066 free memory pointer \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u304c\u308f\u304b\u308b\u3002"),(0,r.kt)("p",null,"\u30b3\u30f3\u30d1\u30a4\u30e9\u306f array size \u306b\u3088\u3063\u3066\u3069\u308c\u304f\u3089\u3044\u306e\u30b9\u30da\u30fc\u30b9\u304c\u5fc5\u8981\u304b\u6c7a\u5b9a\u3059\u308b\u3002"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u30e1\u30e2\u30ea array \u306e\u8981\u7d20\u306e\u5360\u3081\u308b\u9818\u57df\u306f 32 bytes \u306e\u500d\u6570\u306b\u306a\u308b\u3002\u3053\u308c\u306f ",(0,r.kt)("inlineCode",{parentName:"p"},"bytes1[]"),"\u306b\u5bfe\u3057\u3066\u3082\u901a\u7528\u3059\u308b\u3002\u305f\u3060\u3057\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"bytes")," \u3084 ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," \u306f\u9055\u3046\u3002")),(0,r.kt)("p",null,"array \u306e\u30b5\u30a4\u30ba \xd732bytes \u3067\u3069\u308c\u304f\u3089\u3044\u306e\u30e1\u30e2\u30ea\u3092\u98df\u3046\u304b\u308f\u304b\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u5834\u5408\u30015 ","*"," 32 bytes \u3067\u30010xa0 (160)\u306b\u306a\u308b\u306e\u3060\u3002\u3057\u305f\u304c\u3063\u3066\u305d\u306e\u5024\u306f stack \u306b\u30d7\u30c3\u30b7\u30e5\u3055\u308c\u3001\u73fe\u5728\u306e free memory pointer \u306b\u4fdd\u5b58\u3055\u308c\u305f\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u5f8c\u3001\u524d\u306e free memory pointer \u306e\u5024\u3068\u8db3\u3057\u7b97\u3092\u3057\u3066\u3001\u5024 0x120 (288)\u304c\u751f\u6210\u3055\u308c\u305f\u3002\u3053\u306e\u5024\u304c free memory pointer \u306b\u4fdd\u5b58\u3055\u308c\u305f\u3002"),(0,r.kt)("p",null,"stack \u306b\u306f\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"\u30e1\u30e2\u30ea\u3092\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 0x80 \u306b\u30ad\u30fc\u30d7\u3057\u3066\u5f8c\u304b\u3089\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u3002",(0,r.kt)("inlineCode",{parentName:"p"},"0xffff"),"\u306f JUMP \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u610f\u5473\u3057\u3066\u304a\u308a\u3001\u95a2\u4fc2\u306a\u3044\u306e\u3067\u5f53\u9762\u306f\u7121\u8996\u3057\u3066\u3088\u3044(stack \u306e underflow \u3092\u9632\u3050\u305f\u3081\u306b\u3042\u308b)\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(8735).Z,width:"719",height:"255"})),(0,r.kt)("h1",{id:"memory-initialisation-variable-a-evm-playground-lines-35-95"},"Memory Initialisation Variable \u201ca\u201d (EVM Playground Lines 35-95)"),(0,r.kt)("p",null,"\u4eca\u3067\u306f\u30e1\u30e2\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u3066 free memory pointer \u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u305f\u3002\u3053\u3053\u304b\u3089\u306f\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"\u306e\u30e1\u30e2\u30ea\u306b\u304a\u3051\u308b\u521d\u671f\u5316\u3092\u3059\u308b\u3002\u5909\u6570\u306f\u5ba3\u8a00\u3055\u308c\u3066\u5024\u4ee3\u5165\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30bc\u30ed\u5024\u306b\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3092\u3059\u308b\u305f\u3081\u306b\u306f\u3001EVM \u306e CALLDATACOPY \u3092\u4f7f\u3063\u3066\u5b9f\u65bd\u3059\u308b\u3002\u3053\u306e opcode \u306f\uff13\u3064\u306e\u5f15\u6570\u304c\u5fc5\u8981\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"memoryOffset\uff08\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078\u30b3\u30d4\u30fc\u3059\u308b\u5834\u6240\uff09"),(0,r.kt)("li",{parentName:"ul"},"calldataOffset\uff08calldata \u306b\u304a\u3051\u308b byte offset \u306e\u3053\u3068\uff09"),(0,r.kt)("li",{parentName:"ul"},"size\uff08\u30b3\u30d4\u30fc\u3059\u308b byte size\uff09")),(0,r.kt)("p",null,"\u4eca\u56de\u306e\u5834\u5408\u3001memoryOffset \u306f",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 0x80\u3002"),(0,r.kt)("p",null,"calldataOffset \u306f\u5b9f\u969b\u306e calldata \u306e\u30b5\u30a4\u30ba\u3001\u306a\u305c\u306a\u3089\u305d\u3082\u305d\u3082 calldata \u306e copy \u304c\u3044\u3089\u306a\u3044\u3002\u30e1\u30e2\u30ea\u3092\u30bc\u30ed\u5024\u3067\u521d\u671f\u5316\u3057\u305f\u3044\u3002\u7d50\u679c\u7684\u306b\u30b5\u30a4\u30ba\u304c 0xa0 \u3042\u308b\u3044\u306f 160 bytes \u306b\u306a\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u3001\u30e1\u30e2\u30ea\u304c 288 bytes \u306b\u306a\u3063\u305f\u3068\u308f\u304b\u308b(zero slot \u3082\u542b\u3081\u3066)\u3002stack \u306f\u4eca\u3082\u3046\u4e00\u5ea6\u5909\u6570\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3068 JUMP \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u6301\u3063\u3066\u3044\u308b\u72b6\u614b\u3002"),(0,r.kt)("p",null,"\uff08\u305d\u306e\u9593\u306b\u7d30\u304b\u3044\u64cd\u4f5c\u306b\u3064\u3044\u3066\u306f\u3001\u4f55\u5ea6\u3082 pop \u3057\u3066\u3044\u308b\u306e\u304c\u3042\u308b\u304c\u3001\u500b\u4eba\u7684\u306b\u306f\u307e\u3060\u306a\u305e\u3067\u3001\u308f\u304b\u308b\u65b9\u306a\u3089\u6559\u3048\u3066\u4e0b\u3055\u3044\uff09"),(0,r.kt)("h1",{id:"memory-allocation-variable-b--free-memory-pointer-update-evm-playground-lines-96-112"},"Memory Allocation Variable \u201cb\u201d & Free Memory Pointer Update (EVM Playground Lines 96-112)"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u306e\u64cd\u4f5c\u306f\u4e0a\u8a18\u306e\u6d41\u308c\u3068\u975e\u5e38\u306b\u4f3c\u3066\u3044\u308b\u304c\u3001\u305f\u3060\u3057\u3001\u4eca\u56de\u306f",(0,r.kt)("inlineCode",{parentName:"p"},"bytes32[2] memory b"),"\u3068\u306a\u308b\u3002"),(0,r.kt)("p",null,"free memory pointer \u3092 0x160(352 in decimal)\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b(\u524d\u306e free memory pointer 288 + \u65b0\u3057\u3044\u5909\u6570\u306e\u30b5\u30a4\u30ba 64 bytes)\u3002"),(0,r.kt)("p",null,"\u6ce8\u610f\u3068\u3057\u3066\u306f\u3001free memory pointer \u306f\u30e1\u30e2\u30ea\u306b\u3066 0x160 \u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u3001\u305d\u3053\u3067\u73fe\u5728\u306f\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"b"),"\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3(0x120)\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u3066\u3042\u308b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(82).Z,width:"713",height:"407"})),(0,r.kt)("h1",{id:"memory-initialisation-variable-b-evm-playground-lines-113-162"},"Memory Initialisation Variable \u201cb\u201d (EVM Playground Lines 113-162)"),(0,r.kt)("p",null,"\u7d9a\u3044\u3066\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"b"),"\u521d\u671f\u5316\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002"),(0,r.kt)("p",null,"\u73fe\u5728\u3001\u30e1\u30e2\u30ea\u306f 352bytes \u3078\u62e1\u5f35\u3055\u308c\u305f\u3002\u30b9\u30bf\u30c3\u30af\u306b\u306f\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092 2 \u500b\u6301\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("h1",{id:"assign-value-to-b0-evm-playground-lines-163-207"},"Assign Value to ",(0,r.kt)("inlineCode",{parentName:"h1"},"b[0]")," (EVM Playground Lines 163-207)"),(0,r.kt)("p",null,"\u3084\u3063\u3068\u6700\u5f8c\u306e\u6bb5\u968e\u306b\u6765\u308c\u305f\u3002\u6b63\u76f4\u306b\u3044\u3063\u3066\u96e3\u3057\u304b\u3063\u305f\u3002"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u306f\u3001array ",(0,r.kt)("inlineCode",{parentName:"p"},"b")," \u306e index ",(0,r.kt)("inlineCode",{parentName:"p"},"0"),"\u306b\u5024\u3092\u4ed8\u4e0e\u3057\u305f\u3044\u3002"),(0,r.kt)("p",null,"\u30b3\u30fc\u30c9\u3067\u306f b","[0]"," = 1 \u3068\u306a\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u307e\u305a\u3001\u3053\u306e\u5024\u304c stack \u306b\u7a81\u3063\u8fbc\u307e\u308c\u308b\u3002\u305d\u306e\u5f8c\u3001bit shift \u304c\u8d77\u304d\u308b\u304c\u3001\u3053\u308c\u79fb\u52d5\u3057\u305f\u306e\u306f 0 \u3067\u4f55\u3082\u5909\u308f\u308a\u306f\u306a\u3044\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002"),(0,r.kt)("p",null,"\u6b21\u306b array \u306e index \u306b\u306f 0x00 \u3078\u66f8\u304d\u8fbc\u307e\u308c\u30010 positon \u3078\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u306e\u969b\u306b\u3001array length \u306e 2 \u3092\u8d85\u3048\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u30c1\u30a7\u30c3\u30af\u3002\u3082\u3057\u6761\u4ef6\u3092\u30af\u30ea\u30a2\u3067\u304d\u306a\u3044\u5834\u5408\u3001\u7570\u306a\u308b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3078\u98db\u3073\u3001\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306e\u90e8\u5206\u3078\u98db\u3070\u3055\u308c\u308b\u3002"),(0,r.kt)("p",null,"MUL\u3001ADD opcode \u306f\u30e1\u30e2\u30ea\u3044\u306b\u304a\u3044\u3066\u5024\u304c\u66f8\u304d\u8fbc\u307e\u308c\u308b\u5834\u6240\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"0x20 (32 in decimal) * 0x00 (0 in decimal) = 0x00\n")),(0,r.kt)("p",null,"\u30e1\u30e2\u30ea\u306e array \u306f 32 byte \u5358\u4f4d\u3067\u3042\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u3057\u3066\u307b\u3057\u3044\u3002\u3053\u3061\u3089\u306f 0x00 \u306b\u306a\u308b\u306e\u3067\u3001offset \u306f\u4e0d\u8981\u3067\u305d\u306e\u307e\u307e 0 \u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u304b\u3089\u66f8\u7740\u8fbc\u3080\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"0x00 + 0x120 = 0x120 (288 in decimal)\n")),(0,r.kt)("p",null,"ADD \u306f offset \u306e\u5024\u3092\u30e1\u30e2\u30ea\u306b\u3042\u308b\u5909\u6570 b \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b\u3088\u3046\u306b\u4f7f\u308f\u308c\u305f\u3002offset \u306f\u4eca\u56de 0 \u306a\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u3001free memory pointer \u306e\u4f4d\u7f6e\u306b\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3068\u306a\u308b\u3002"),(0,r.kt)("p",null,"\u4e00\u756a\u6700\u5f8c\u306b\u3001MSTORE \u3092\u4f7f\u3063\u3066\u5024 0x01 \u3092\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x120 \u3078\u66f8\u304d\u8fbc\u3080\u3002\u305d\u3057\u3066\u3001\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u3059\u3079\u3066\u306e\u8981\u7d20\u3092 pop \u3057\u3001\u7d42\u4e86\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3067\u30e1\u30e2\u30ea\u306f",(0,r.kt)("inlineCode",{parentName:"p"},"b[0] = 1"),"\u3068\u306a\u3063\u3066\u3044\u308b\u3002\u4e0b\u304b\u3089 3 \u884c\u76ee\u306e\u3068\u3053\u308d\u306b 1 \u3068\u3044\u3046\u6570\u5b57\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u304c\u308f\u304b\u308b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(4039).Z,width:"716",height:"381"})),(0,r.kt)("p",null,"\u4eca\u56de\u306e\u8a18\u4e8b\u306f\u3053\u3053\u307e\u3067\uff01Bye\uff01"),(0,r.kt)("h2",{id:"reference"},"Reference"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy-d6b?s=r"},"EVM Deep Dives: The Path to Shadowy Super Coder \ud83e\udd77 \ud83d\udcbb - Part 2")))}s.isMDXComponent=!0},8919:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/0plus1is1-67419ad8c3e6896eb20d34b24f09e059.png"},408:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/keeptrying-d7c22670dd835427081a62ef78787bc0.png"},3814:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/keeptryingallday-55e3b5ef7bf92e4188f07f753f51c8fd.png"},4740:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/meikyuu-8f55c9a4c82238d91b81b7627ee94a99.png"},3136:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory00-64684a54a90cd8fad4035fb6bc659256.png"},5939:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory01-bedf15c76b97ec5039e2dc0c9d1acd30.png"},499:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory02-5c58412a5109dbc9f344363980e9a18e.png"},8735:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory03-45df8d05acd1c466840636031aeb0c69.png"},82:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory04-21f31db9f1b092990a9a117ab315b165.png"},4039:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory05-98e5924ea9117797c28563e880002aec.png"},5473:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memoryImpression-bf6e64d85b0989e34e97553f008b2e36.png"},6794:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/thisispointless-c42e9d59813d74a2a459dc60158cfd9c.png"}}]); \ No newline at end of file diff --git a/assets/js/b37b7b6b.e0e055a6.js b/assets/js/b37b7b6b.e0e055a6.js new file mode 100644 index 00000000..abfa2422 --- /dev/null +++ b/assets/js/b37b7b6b.e0e055a6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[7852],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>k});var l=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=l.createContext({}),m=function(e){var t=l.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=m(e.components);return l.createElement(i.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},c=l.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),c=m(n),k=r,d=c["".concat(i,".").concat(k)]||c[k]||s[k]||a;return n?l.createElement(d,o(o({ref:t},u),{},{components:n})):l.createElement(d,o({ref:t},u))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,o=new Array(a);o[0]=c;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p.mdxType="string"==typeof e?e:r,o[1]=p;for(var m=2;m{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>s,frontMatter:()=>a,metadata:()=>p,toc:()=>m});var l=n(7462),r=(n(7294),n(3905));const a={slug:"EVM-deep-dive-part2",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",tags:["EVM","opcode","Etheruem","blockchain","examples"]},o=void 0,p={permalink:"/blog/EVM-deep-dive-part2",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md",source:"@site/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",description:"Hello, everybody!",date:"2023-05-13T00:00:00.000Z",formattedDate:"2023\u5e745\u670813\u65e5",tags:[{label:"EVM",permalink:"/blog/tags/evm"},{label:"opcode",permalink:"/blog/tags/opcode"},{label:"Etheruem",permalink:"/blog/tags/etheruem"},{label:"blockchain",permalink:"/blog/tags/blockchain"},{label:"examples",permalink:"/blog/tags/examples"}],readingTime:7.626,hasTruncateMarker:!1,authors:[{name:"Thurendous",title:"Think borderlessly",url:"https://github.com/thurendous",imageURL:"https://github.com/thurendous.png",key:"Thurendous"}],frontMatter:{slug:"EVM-deep-dive-part2",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",tags:["EVM","opcode","Etheruem","blockchain","examples"]},prevItem:{title:"SafeERC20\u3068\u306f",permalink:"/blog/What-is-SafeERC20"},nextItem:{title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",permalink:"/blog/EVM-deep-dive-part1"}},i={authorsImageUrls:[void 0]},m=[{value:"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35",id:"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35",level:2},{value:"\u30e1\u30e2\u30ea\u306f byte \u306e Array \u3060\u304b\u3089",id:"\u30e1\u30e2\u30ea\u306f-byte-\u306e-array-\u3060\u304b\u3089",level:2},{value:"Bytecode",id:"bytecode",level:2},{value:"Reference",id:"reference",level:2}],u={toc:m};function s(e){let{components:t,...a}=e;return(0,r.kt)("wrapper",(0,l.Z)({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Hello, everybody!"),(0,r.kt)("h1",{id:"never-give-up"},"Never Give Up"),(0,r.kt)("p",null,"\u4ee5\u524d\u66f8\u3044\u305f\u6642\u304b\u3089\u3001EVM \u306b\u3064\u3044\u3066\u7406\u89e3\u3067\u304d\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u3001\u5f53\u6642\u306f\u8aad\u307f\u3065\u3089\u304b\u3063\u305f\u6280\u8853\u7cfb\u306e\u6587\u7ae0\u3082\u3059\u3089\u3059\u3089\u8aad\u3081\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u305d\u3053\u3067 EVM \u306e\u3053\u3068\u3042\u308b\u3044\u306f\u4ed6\u306e\u306a\u306b\u304b\u3067\u9811\u5f35\u3063\u3066\u3044\u308b\u3042\u306a\u305f\u3082\u3082\u3057\u304b\u3057\u3066\u4f55\u304b\u304c\u3067\u304d\u305a\u306b\u60a9\u3093\u3067\u3044\u308b\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u884c\u3063\u3066\u304a\u304d\u307e\u3059\u304c\u3001\u50d5\u3082\u305d\u3046\u3060\u3063\u305f\u306e\u3067\u3001\u5b89\u5fc3\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u3046\u3061\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3060\u308d\u3046\u3002"),(0,r.kt)("p",null,"\u3061\u306a\u307f\u306b\u3001\u3053\u3061\u3089\u306e\u753b\u50cf\u3092\u307f\u3066\u3054\u3089\u3093\u3002"),(0,r.kt)("p",null,"\u672c\u5f53\u306b\u7d4c\u9a13\u3057\u305f\u4eba\u3057\u304b\u308f\u304b\u3089\u306a\u3044\u3068\u601d\u3044\u307e\u3059\u3057\u3001\u7d4c\u9a13\u3057\u305f\u3068\u3057\u3066\u3082\u3082\u3046\u4e00\u5ea6\u7d4c\u9a13\u3059\u308b\u3068\u3001\u3084\u306f\u308a\u4fe1\u3058\u3089\u308c\u306a\u3044\u6c17\u6301\u3061\u306b\u306a\u308b\u3068\u601d\u3046\u3088\u306d\u3002"),(0,r.kt)("p",null,"\u4f55\u304c\u3069\u3046\u306a\u3063\u3066\u3082\u3001\u7d9a\u3051\u308b\u3053\u3068\u304c\u4e00\u756a\u5927\u5207\u3002"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u9045\u304f\u3066\u3082\u3044\u3044")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(8919).Z,width:"828",height:"382"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u7406\u60f3\u3068\u73fe\u5b9f")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(4740).Z,width:"820",height:"380"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u300c\u7d9a\u3051\u3066\u3066\u3082\u610f\u5473\u306a\u3044\u300d")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(6794).Z,width:"934",height:"524"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u6700\u521d\u306e\u7b2c\u4e00\u6b69\u304c\u4e00\u756a\u3080\u305a\u3044\u3051\u3069\u306d")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(408).Z,width:"792",height:"742"})),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"\u4e09\u65e5\u574a\u4e3b VS \u7d9a\u3051\u308b")),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(3814).Z,width:"886",height:"516"})),(0,r.kt)("hr",null),(0,r.kt)("p",null,"\u4eca\u56de\u306f\u3001\u30e1\u30e2\u30ea\u30fc\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002"),(0,r.kt)("p",null,"Part 1 \u3067\u306f\u3001EVM \u304c\u3069\u306e\u3088\u3046\u306b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u3069\u3053\u3092\u72d9\u3063\u3066 run \u3055\u305b\u308b\u304b\u3092\u898b\u3066\u304d\u305f\u3002 \u305d\u308c\u306f\u3001\u5916\u90e8\u306e calldata \u3092\u5165\u529b\u3057\u3066\u304d\u3066\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u3069\u306e\u95a2\u6570\u3092\u547c\u3093\u3067\u3044\u308b\u304b\u3092\u5224\u5225\u3057\u3066 run \u3059\u3079\u304d\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u7b87\u6240\u3092\u6c7a\u3081\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u95a2\u6570\u306e\u7f72\u540d\u30fbcall stack\u30fbcalldata\u30fbEVM \u306e\u30aa\u30da\u30b3\u30fc\u30c9 \u306b\u3064\u3044\u3066\u7406\u89e3\u304c\u9032\u3093\u3060\u3068\u601d\u3046\u3002"),(0,r.kt)("p",null,"Part 2 \u3067\u306f\u3001EVM \u306b\u304a\u3051\u308b\u30e1\u30e2\u30ea\u30fc\u306b\u3064\u3044\u3066\u8272\u3005\u898b\u3066\u3044\u3053\u3046\u3002"),(0,r.kt)("h1",{id:"memory"},"Memory"),(0,r.kt)("p",null,"Part1 \u306e\u30b3\u30fc\u30c9\u3092\u601d\u3044\u3060\u3057\u3066\u307f\u3066\u3002",(0,r.kt)("inlineCode",{parentName:"p"},"1_Storage.sol"),"\u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3042\u3063\u305f\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sol"},"pragma solidity >=0.7.0 <0.9.0;\n\ncontract Storage {\n uint256 number;\n\n function store(uint256 num) public {\n number = num;\n }\n\n function retrieve() public view returns (uint256) {\n return number;\n }\n}\n")),(0,r.kt)("p",null,"\u3053\u308c\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\u3068\u3001\u3053\u3046\u306a\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"608060405234801561001057600080fd....\n")),(0,r.kt)("p",null,"\u4eca\u56de\u306f\u3053\u306e\u90e8\u5206\u306b\u30d5\u30a9\u30fc\u30ab\u30b9\u3057\u3066\u8aac\u660e\u3057\u305f\u3044\u3068\u601d\u3046\u3002\u4e00\u756a\u6700\u521d\u306e 5bytes \u3060\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"6080604052\n")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"60 80 = PUSH1 0x80\n60 40 = PUSH1 0x40\n52 = MSTORE\n")),(0,r.kt)("p",null,"\u3053\u308c\u304c\u805e\u3044\u305f\u3053\u3068\u3042\u308b\u304c\u304b\u3082\u3057\u308c\u306a\u3044\u3051\u3069\u3001\u3044\u308f\u3086\u308b\u300cfree memory pointer\u300d\u3060\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u30fc\u3092\u7406\u89e3\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002"),(0,r.kt)("h1",{id:"\u30e1\u30e2\u30ea\u306e\u30c7\u30fc\u30bf\u69cb\u9020"},"\u30e1\u30e2\u30ea\u306e\u30c7\u30fc\u30bf\u69cb\u9020"),(0,r.kt)("p",null,"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u306f\u30b7\u30f3\u30d7\u30eb\u306b\u3044\u3046\u3068\u3001byte \u306e array \u3060\u300232bytes(256bit)\u3042\u308b\u3044\u306f 1byte(8bit)\u306e\u5358\u4f4d\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002\u8aad\u307e\u308c\u308b\u3068\u304d\u306b\u306f\u300132bytes(256bit)\u5358\u4f4d\u3054\u3068\u306b\u306a\u308b\u3002\u4e0b\u8a18\u306e\u753b\u50cf\u306f\u8a71\u3057\u305f\u5185\u5bb9\u3092\u5177\u73fe\u5316\u3057\u305f\u3082\u306e\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(5473).Z,width:"559",height:"427"})),(0,r.kt)("p",null,"\u3053\u306e\u6a5f\u80fd\u306f\uff13\u3064\u306e opcode \u306b\u5de6\u53f3\u3055\u308c\u3066\u3044\u308b\u3002"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"MSTORE(x, y)"),": 32 byte(256 bit) \u306e\u5024 y \u3092\u30e1\u30e2\u30ea\u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e x \u306b\u4fdd\u5b58"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"MLOAD(x)"),": 32 byte(256 bit) \u306e\u30e1\u30e2\u30ea\u306e\u5834\u6240\u3092\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 x \u304b\u3089\u8aad\u307f\u51fa\u3057\u3001\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b"),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"MSOTRE8(x, y)"),": 1 byte (8 bit)\u306e\u5024 y \u3092\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e x \u306b\u4fdd\u5b58\u3059\u308b")),(0,r.kt)("p",null,"\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u3053\u3068\u306f\u3069\u3053\u304b\u3089\u30e1\u30e2\u30ea\u3092\u8aad\u307f\u53d6\u308b/\u66f8\u304d\u8fbc\u3080\u304b\u3092\u6c7a\u3081\u3066\u3044\u308b\u3068\u8003\u3048\u3066\u3088\u3044\u3002\u3082\u3057\u30011byte \u3088\u308a\u591a\u304f\u8aad\u307f\u53d6\u308b/\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3092\u3057\u305f\u3044\u306e\u3067\u3042\u308c\u3070\u3001\u305d\u306e\u307e\u307e\u7d99\u7d9a\u3059\u308c\u3070\u3088\u3044\u3060\u3051\u306e\u8a71\u306b\u306a\u308b\u3002"),(0,r.kt)("h1",{id:"evm-playground"},"EVM playground"),(0,r.kt)("p",null,"\u3053\u306e ",(0,r.kt)("a",{parentName:"p",href:"https://www.evm.codes/playground?fork=shanghai"},"EVM playground")," \u306f\u3042\u306a\u305f\u306e\u7406\u89e3\u306e\u624b\u52a9\u3051\u304c\u3067\u304d\u308b\u3060\u308d\u3046\u3002Run \u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u53f3\u4e0a\u306e\u77e2\u5370\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u3088\u3046\u3002\u77e2\u5370\u30dc\u30bf\u30f3\u306f\u30b3\u30fc\u30c9\u306e\u7a3c\u50cd\u30d7\u30ed\u30bb\u30b9\u3092\u305f\u3069\u3063\u3066\u3044\u3063\u3066\u304f\u308c\u308b\u3002\u30b9\u30bf\u30c3\u30af\u3001\u30e1\u30e2\u30ea\u306f\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u306e\u304b\u3082\u308f\u304b\u308b\u3002\u3059\u3054\u304f\u76f4\u611f\u7684\u306a\u30c4\u30fc\u30eb\u3060\u3068\u611f\u5fc3\u3059\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"// MSTORE 32 bytes 0x11...1 at memory location 0\nPUSH32 0x1111111111111111111111111111111111111111111111111111111111111111\nPUSH1 0x00\nMSTORE\n\n// MSTORE8 1 byte 0x22 at memory location 32 (0x20 in hex)\nPUSH1 0x22\nPUSH1 0x20\nMSTORE8\n\n// MSTORE8 1 byte 0x33 at memory location 33 (0x21 in hex)\nPUSH1 0x33\nPUSH1 0x21\nMSTORE8\n\n// MLOAD 32 bytes to the call stack from memory location 0 ie 0-32 bytes of memory\nPUSH1 0x00\nMLOAD\n\n// MLOAD 32 bytes to the call stack from memory location 32 ie 32-64 bytes of memory\nPUSH1 0x20\nMLOAD\n\n// MLOAD 32 to the call stack from memory location 33 ie 33-65 bytes of memory\nPUSH1 0x21\nMLOAD\n")),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe3e29126-2954-40e3-bc1b-7ca5e780fd1c_1500x850.png",alt:null})),(0,r.kt)("p",null,"opcode \u306b\u3064\u3044\u3066\u3082\u3001\u82f1\u8a9e\u3060\u304c\u8aac\u660e\u6587\u304c\u3064\u3044\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3084\u3063\u3066\u307f\u3066\u5909\u3060\u306a\u3068\u601d\u3046\u3053\u3068\u306f\u306a\u3044\u306e\u304b\uff1f\n\u307e\u305a\u3001MSTORE8 \u3092\u4f7f\u3063\u3066 1 byte \u306e 0x22 \u3092\u30e1\u30e2\u30ea\u306e 0x20 \u306b\u66f8\u304d\u8fbc\u3093\u3067\u3044\u308b\u3064\u3082\u308a\u3060\u304c\u3001\u4f55\u6545\u304b\u30e1\u30e2\u30ea\u306f\u3053\u3053\u304b\u3089\u3001"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F954d54e6-0bce-4de3-a61d-dd41fdae49c7_836x152.png",alt:null})),(0,r.kt)("p",null,"\u3053\u3046\u5909\u308f\u308b\u3093\u3060\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{parentName:"p",src:"https://substackcdn.com/image/fetch/w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F225fde5a-09bf-4a24-a702-88ad5010951e_836x176.png",alt:null})),(0,r.kt)("p",null,"\u3053\u306e\u4f59\u5206\u306a\u30bc\u30ed\u3063\u3066\u306a\u3093\u3060\u3068\u601d\u3046\u3060\u308d\u3046\u3002"),(0,r.kt)("h2",{id:"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35"},"\u30e1\u30e2\u30ea\u306e\u62e1\u5f35"),(0,r.kt)("p",null,"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30e1\u30e2\u30ea\u3078\u306a\u306b\u304b\u3092\u66f8\u304d\u8fbc\u3080\u969b\u3001byte \u6570\u306b\u5f93\u3063\u3066\u30ac\u30b9\u4ee3\u3092\u652f\u6255\u3063\u3066\u3044\u308b\u3002\u3053\u308c\u304c opcode \u306e\u30b3\u30b9\u30c8\u3068\u8a00\u3046\u3002\u3082\u3057\u3001\u3053\u308c\u307e\u3067\u30e1\u30e2\u30ea\u3078\u66f8\u304d\u8fbc\u3093\u3060\u3053\u3068\u304c\u306a\u3044\u5834\u6240\u3078\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u8ffd\u52a0\u7684\u306b\u30e1\u30e2\u30ea\u62e1\u5f35\u306e\u30b3\u30b9\u30c8\u304c\u304b\u304b\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u307e\u3067\u66f8\u304d\u8fbc\u3093\u3060\u3053\u3068\u304c\u306a\u3044\u7b87\u6240\u3078\u66f8\u304d\u8fbc\u3080\u5834\u5408\u3001\u30e1\u30e2\u30ea\u306f 32bytes(256bit)\u62e1\u5f35\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308b\u3002"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u30e1\u30e2\u30ea\u306e\u30b3\u30b9\u30c8\u306e\u5897\u3048\u65b9\u306b\u95a2\u3057\u3066\u306f\u3001\u6700\u521d\u306e 724bytes \u306f\u7dda\u5f62\u7684\u306b\u5897\u52a0\u3059\u308b\u304c\u3001\u305d\u308c\u4ee5\u964d\u306f\u4e8c\u6b21\u6307\u6570\u95a2\u6570\u7684\u306b\u306a\u308b\u3002")),(0,r.kt)("p",null,"\u4e0a\u306e\u4f8b\u3067\u306f\u3001\u307e\u305a 0x00 \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078 32 bytes \u66f8\u304d\u8fbc\u3093\u3060\u304c\u3001\u305d\u3053\u304b\u3089\u3055\u3089\u306b\u66f8\u304d\u8fbc\u3080\u3068\u306a\u308b\u3068\u3001\u30e1\u30e2\u30ea\u62e1\u5f35\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u305a\u3001\u7d50\u679c\u7684\u306b\u3001\u30e1\u30e2\u30ea\u306f 64 bytes \u306b\u306a\u3063\u305f\u3002"),(0,r.kt)("p",null,"\u30e1\u30e2\u30ea\u306b\u3042\u308b\u4fdd\u5b58\u9818\u57df\u306e\u6700\u521d\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306f\u30bc\u30ed\u3002\u3060\u304b\u3089 2200000000000000000000000000000000000000000000000000000000000000 \u304c\u30e1\u30e2\u30ea\u306b\u8ffd\u52a0\u3055\u308c\u305f\u3002"),(0,r.kt)("h2",{id:"\u30e1\u30e2\u30ea\u306f-byte-\u306e-array-\u3060\u304b\u3089"},"\u30e1\u30e2\u30ea\u306f byte \u306e Array \u3060\u304b\u3089"),(0,r.kt)("p",null,"\u6b21\u306b\u6ce8\u610f\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u306f\u3001\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 33(0x21)\u304b\u3089 MLOAD \u3057\u305f\u3068\u304d\u306b\u3001\u4e0b\u8a18\u306e\u5024\u304c\u8fd4\u3055\u308c\u305f\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"3300000000000000000000000000000000000000000000000000000000000000\n")),(0,r.kt)("p",null,"32 bytes \u305a\u3064\u8aad\u307f\u8fbc\u3093\u3067\u3044\u306a\u304f\u3066\u3082\u3001\u8aad\u307f\u8fbc\u3081\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u3063\u305f\u3002"),(0,r.kt)("p",null,"memory \u306f\u305f\u3060\u306e byte array \u306a\u306e\u3067\u3001\u3069\u3053\u306e\u5834\u6240\u304b\u3089\u3067\u3082\u8aad\u307f\u8fbc\u3081\u308b\u3053\u3068\u3092\u899a\u3048\u3066\u4e0b\u3055\u3044\u300232bytes \u306e\u5236\u9650\u306f\u7279\u306b\u306a\u304f\u3001\u3069\u3053\u304b\u3089\u3067\u3082 byte \u5358\u4f4d\u304b\u3089\u8aad\u307f\u8fbc\u3081\u308b\u3002"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u95a2\u6570\u5185\u3067\u306e\u307f\u65b0\u305f\u306b\u30e1\u30e2\u30ea\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u308c\u306f\u65b0\u305f\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3055\u308c\u305f\u8907\u96d1\u306a\u578b\uff08\u4f8b\u3048\u3070 ",(0,r.kt)("inlineCode",{parentName:"p"},"new int[...]")," \u306a\u3069\uff09\u3067\u3042\u3063\u305f\u308a\u3001\u30b9\u30c8\u30ec\u30fc\u30b8\u53c2\u7167\u5909\u6570\u304b\u3089\u30b3\u30d4\u30fc\u3055\u308c\u305f\u3082\u306e\u3067\u3042\u3063\u305f\u308a\u3057\u307e\u3059\u3002")),(0,r.kt)("p",null,"\u73fe\u5728\u3001\u6211\u3005\u306f\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u3064\u3044\u3066\u7406\u89e3\u3067\u304d\u305f\u306e\u3067\u3001free memory \u306e\u8a71\u3078\u623b\u308d\u3046\u3002"),(0,r.kt)("h1",{id:"free-memory-pointer"},"Free Memory Pointer"),(0,r.kt)("p",null,"Free Memory Pointer \u3068\u306f\u3001\u7c21\u5358\u306b\u3044\u3046\u3068\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30dd\u30a4\u30f3\u30bf\u30fc\u3067\u3042\u308a\u3001Free Memory \u304c\u3069\u3053\u304b\u3089\u30b9\u30bf\u30fc\u30c8\u3059\u3079\u304d\u306a\u306e\u304b\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002\u8a00\u3044\u63db\u3048\u308b\u3068\u3001\u30e1\u30e2\u30ea\u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3069\u3053\u307e\u3067\u66f8\u304d\u8fbc\u307e\u308c\u3066\u3044\u3066\u3001\u3069\u3053\u304b\u3089\u66f8\u304d\u8fbc\u3080\u3079\u304d\u306a\u306e\u304b\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u30e1\u30e2\u30ea\u3092\u4e0a\u66f8\u304d\u3059\u308b\u306e\u3092\u9632\u3050\u305f\u3081\u3067\u3082\u3042\u308b\u3002"),(0,r.kt)("p",null,"\u5909\u6570\u304c\u30e1\u30e2\u30ea\u3078\u66f8\u304d\u8fbc\u3080\u3068\u304d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u307e\u305a Free Memory Pointer \u3092\u53c2\u7167\u3057\u3001\u3069\u3053\u304b\u3089\u66f8\u304d\u8fbc\u3080\u3079\u304d\u304b\u3092\u6c7a\u3081\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3002\u305d\u308c\u304b\u3089 Free Memory Pointer \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u3001\u6700\u65b0\u306e\u30e1\u30e2\u30ea\u306e\u300c\u5883\u754c\u5024\u300d\u3042\u308b\u3044\u306f\u300c\u30aa\u30d5\u30bb\u30c3\u30c8\u300d\u3092\u8a18\u9332\u3059\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"}," newFreeMemoryPointer = freeMemoryPointer + dataSizeBytes\n")),(0,r.kt)("h2",{id:"bytecode"},"Bytecode"),(0,r.kt)("p",null,"\u5148\u7a0b\u306b\u3082\u8a00\u53ca\u3057\u305f\u3088\u3046\u306b\u3001Free Memory Pointer \u306f\u6700\u521d\u306e runtime bytecode \u306e\u3053\u306e\u90e8\u5206\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"60 80 = PUSH1 0x80\n60 40 = PUSH1 0x40\n52 = MSTORE\n")),(0,r.kt)("p",null,"\u3053\u308c\u306f\u57fa\u672c\u7684\u306b\u4f55\u3092\u8a00\u3063\u3066\u3044\u308b\u304b\u3068\u3044\u3046\u3068\u3001Free Memory Pointer \u306f\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x40(64 in decimal)\u3067\u3001\u5024\u306f 0x80(128 in decimal)\u3068\u306a\u308b\u3002"),(0,r.kt)("p",null,"\u3059\u3050\u306b\u7591\u554f\u306b\u601d\u3046\u306e\u306f\u3001\u306a\u305c\u3053\u306e\u6570\u5b57\u306a\u306e\u3068\u3044\u3046\u3053\u3068\u3060\u308d\u3046\u3002"),(0,r.kt)("p",null,"\u7b54\u3048\uff1a"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"0x00 - 0x3f (64 bytes): scratch space"),(0,r.kt)("p",{parentName:"blockquote"},"0x40 - 0x5f (32 bytes): free memory pointer"),(0,r.kt)("p",{parentName:"blockquote"},"0x60 - 0x7f (32 bytes): zero slot")),(0,r.kt)("p",null,"0x40 \u306f solidity \u304c\u5b9a\u7fa9\u3057\u305f\u4e00\u756a\u6700\u521d\u306e Free Memory Pointer \u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3060\u3002\u5024 0x80 \u306f\u5358\u306b\u6700\u521d\u306e 4 \u3064\u306e 32 bytes \u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3089\u306e\u4e88\u7d04\u3055\u308c\u305f\u30e1\u30e2\u30ea\u306b\u3064\u3044\u3066"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"Scrach space: inline assembly \u306e\u30cf\u30c3\u30b7\u30f3\u30b0\u30e1\u30bd\u30c3\u30c9\u3068\u3057\u3066\u4f7f\u3063\u3066\u3082\u826f\u3044"),(0,r.kt)("li",{parentName:"ul"},"Free memroy pointer: \u4eca\u306e\u30e1\u30e2\u30ea\u306e\u30b5\u30a4\u30ba\u3001free memory \u306e\u30b9\u30bf\u30fc\u30c8\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3001\u6700\u521d\u306f 0x80"),(0,r.kt)("li",{parentName:"ul"},"The zero slot: \u52d5\u7684\u306a Memory Array \u306e\u521d\u671f\u5024\u3067\u3042\u308a\u3001\u3069\u3093\u306a\u3068\u304d\u306b\u3067\u3082\u66f8\u304d\u8fbc\u307e\u308c\u308b\u3053\u3068\u306f\u306a\u3044")),(0,r.kt)("h1",{id:"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea"},"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea"),(0,r.kt)("p",null,"\u30ea\u30a2\u30eb\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30e1\u30e2\u30ea\u306b\u3064\u3044\u3066\u898b\u3066\u3044\u304f\u3068\u3057\u3088\u3046\u304b\u3002"),(0,r.kt)("p",null,"\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u3092\u4f5c\u6210\u3057\u305f\u3002\u3053\u3044\u3064\u306e\u540d\u306f ",(0,r.kt)("inlineCode",{parentName:"p"},"MemoryLane"),"\u3002\u305f\u3063\u305f\u4e00\u500b\u306e\u95a2\u6570\u3092\u6301\u3063\u3066\u304a\u308a\u3001\uff12\u3064\u306e Array \u3092\u6301\u3063\u3066\u3044\u308b\u3002\u305d\u308c\u304b\u3089 b","[0]","\u306b\u5024 1 \u3092\u4ed8\u4e0e\u3059\u308b\u3002"),(0,r.kt)("p",null,"3 \u884c\u7a0b\u5ea6\u306e\u30b3\u30fc\u30c9\u3060\u3051\u3069\u3001\u304b\u306a\u308a\u591a\u304f\u306e\u3053\u3068\u304c\u8d77\u304d\u3066\u3044\u308b\u3088\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-sol"},"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.3;\n\ncontract MemoryLane {\n function memoryLane() public pure {\n bytes32[5] memory a;\n bytes32[5] memory b;\n b[0] = bytes32(uint256(1));\n }\n}\n\n")),(0,r.kt)("p",null,"\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u3082\u3046\u4e00\u5ea6 ",(0,r.kt)("a",{parentName:"p",href:"https://remix.ethereum.org/"},"remix")," \u3078\u6295\u5165\u3002"),(0,r.kt)("p",null,"\u305d\u308c\u304b\u3089\u3001\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u304f\u3060\u3055\u3044\u3002"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"memoryLane()"),"\u95a2\u6570\u3092 run \u3057\u3066\u3001debugging mode \u3078\u5165\u3063\u3066\u304f\u3060\u3055\u3044\u3002"),(0,r.kt)("p",null,"opcode \u3092\u5c11\u3057\u305a\u3064\u898b\u3066\u3044\u3053\u3046\u3002"),(0,r.kt)("p",null,"\u5c11\u3057\u7c21\u5358\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u3092",(0,r.kt)("a",{parentName:"p",href:"https://www.evm.codes/playground?unit=Wei&codeType=Mnemonic&code=%27Vg*%28_I...1W0GJ_%21%21%21%21z00FK22WJQ0Y22z20F8K33W33Q1Y33z21F8d%28v0Z0-Jq00Xd%28vJZJ-64q20Xdv33Z33-65q21Xpp%27%7EN+locatioCzG1_wppVv7o7hBcall+stack+from%7EuIIIIq%28+ofNzp%5Cnj+bytegSTOREdw%29*_+0xZ9BY9Chex%7DzXpM%29W+at%7EV%2F%2F+MQ+%7B0x2N+memoryKwg8+1j_J32I11GpPUSHFpMgCn+Be+9+i7+t*+J%29LOAD%28js%21uu%01%21%28%29*79BCFGIJKNQVWXYZ_dgjpquvwz%7E_&fork=shanghai"},"EVM playground"),"\u3078\u5165\u308c\u3066\u3044\u308b\u3002\u305d\u306e opcode \u306f\u305d\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u7c21\u5358\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u306f opcode \u3092\u9806\u756a\u306b\u69cb\u6210\u3057\u3001JUMP \u306a\u3069\u306e\u30e1\u30e2\u30ea\u64cd\u4f5c\u3068\u95a2\u9023\u3057\u306a\u3044\u3053\u3068\u3092\u9664\u5916\u3057\u305f\u3002\u3044\u308d\u3044\u308d\u30b3\u30e1\u30f3\u30c8\u3082\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u53c2\u7167\u3057\u3066\u307b\u3057\u3044\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u30b3\u30fc\u30c9\u306f 6 \u90e8\u5206\u304b\u3089\u69cb\u6210\u3055\u308c\u3066\u3044\u3066\u3001\u3053\u308c\u304b\u3089 dive in \u3059\u308b\u3002"),(0,r.kt)("p",null,"play ground \u3092\u4f7f\u3046\u3053\u3068\u3092\u5f37\u304f\u304a\u3059\u3059\u3081\u3059\u308b\u3002"),(0,r.kt)("h1",{id:"free-memory-pointer-initialisation-evm-playground-lines-1-15"},"Free Memory Pointer Initialisation (EVM Playground Lines 1-15)"),(0,r.kt)("p",null,"\u307e\u305a\u3001\u201cfree memory pointer initialisation\u201d\u304b\u3089\u3084\u3063\u3066\u3044\u304f\u3002\u4e0a\u8a18\u3067\u3082\u3042\u3063\u305f\u3088\u3046\u306b\u30010x80(128 in decimal)\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3002\u3053\u308c\u306f free memory pointer \u306e\u5024\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u308b\u3002Solidity \u306e memory \u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(3136).Z,width:"726",height:"129"})),(0,r.kt)("p",null,"\u3053\u306e\u6bb5\u968e\u3067\u306f\u3001\u307e\u3060\u30e1\u30e2\u30ea\u306b\u306f\u306a\u306b\u3082\u306a\u3044\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(5939).Z,width:"722",height:"166"})),(0,r.kt)("p",null,"\u7d9a\u3044\u3066 free memory pointer \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x40(64 in decimal)\u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002"),(0,r.kt)("p",null,"\u6700\u5f8c\u306b\u3001MSTORE \u3092\u4f7f\u3063\u3066\u30010x40 \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306b 0x80 \u306e\u5024\u3092\u8a18\u9332\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u5f8c\u3001\u30b9\u30bf\u30c3\u30af\u306b\u306f\u4f55\u3082\u306a\u304f\u3001\u30e1\u30e2\u30ea\u306b\u306a\u306b\u304b\u3092\u6b8b\u305b\u305f\u3053\u3068\u306b\u306a\u308b\u3002\u30e1\u30e2\u30ea\u306f 16 \u9032\u6570\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u6570\u5b57\u3054\u3068\u306b 4bit \u306e\u30c7\u30fc\u30bf\u3092\u8a18\u9332\u3057\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u4eca\u3068\u306a\u3063\u3066\u3001192 \u306e 16 \u9032\u6570\u306e\u6570\u5b57\u3068\u306a\u3063\u3066\u3044\u308b\uff08\u6570\u5b57 2 \u6841 = 1 byte = 8 bit\uff09\u3002"),(0,r.kt)("p",null,"\u5148\u7a0b\u306e\u5185\u5bb9\u3092\u601d\u3044\u51fa\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6700\u521d\u306e 64bytes \u306f scrach space \u3067\u3001\u6b21\u306e 32bytes \u306f free memory pointer \u306b\u306a\u308b\u3002\u3053\u308c\u306f\u307e\u3055\u306b\u4e0b\u8a18\u306e\u72b6\u614b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(499).Z,width:"721",height:"197"})),(0,r.kt)("h1",{id:"memory-allocation-variable-a--free-memory-pointer-update-evm-playground-lines-16-34"},"Memory Allocation Variable \u201ca\u201d & Free Memory Pointer Update (EVM Playground Lines 16-34)"),(0,r.kt)("p",null,"\u6b8b\u308a\u306e\u90e8\u5206\u306b\u3064\u3044\u3066\u306f\u3001\u7c21\u5358\u306b\u3059\u308b\u305f\u3081\u306b\u4e00\u65e6\u6700\u5f8c\u306e\u98db\u3070\u3057\u3066\u30cf\u30a4\u30ec\u30d9\u30eb\u306e\u6982\u8981\u3092\u898b\u3066\u307f\u3088\u3046\u3002"),(0,r.kt)("p",null,"\u6b21\u306e\u30e1\u30e2\u30ea\u306b\u95a2\u3057\u3066\u3001\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"(bytes32","[5]",")\u306e\u3053\u3068\u3092\u914d\u7f6e\u3057\u3066 free memory pointer \u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u306e\u304c\u308f\u304b\u308b\u3002"),(0,r.kt)("p",null,"\u30b3\u30f3\u30d1\u30a4\u30e9\u306f array size \u306b\u3088\u3063\u3066\u3069\u308c\u304f\u3089\u3044\u306e\u30b9\u30da\u30fc\u30b9\u304c\u5fc5\u8981\u304b\u6c7a\u5b9a\u3059\u308b\u3002"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"\u30e1\u30e2\u30ea array \u306e\u8981\u7d20\u306e\u5360\u3081\u308b\u9818\u57df\u306f 32 bytes \u306e\u500d\u6570\u306b\u306a\u308b\u3002\u3053\u308c\u306f ",(0,r.kt)("inlineCode",{parentName:"p"},"bytes1[]"),"\u306b\u5bfe\u3057\u3066\u3082\u901a\u7528\u3059\u308b\u3002\u305f\u3060\u3057\u3001",(0,r.kt)("inlineCode",{parentName:"p"},"bytes")," \u3084 ",(0,r.kt)("inlineCode",{parentName:"p"},"string")," \u306f\u9055\u3046\u3002")),(0,r.kt)("p",null,"array \u306e\u30b5\u30a4\u30ba \xd732bytes \u3067\u3069\u308c\u304f\u3089\u3044\u306e\u30e1\u30e2\u30ea\u3092\u98df\u3046\u304b\u308f\u304b\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u5834\u5408\u30015 ","*"," 32 bytes \u3067\u30010xa0 (160)\u306b\u306a\u308b\u306e\u3060\u3002\u3057\u305f\u304c\u3063\u3066\u305d\u306e\u5024\u306f stack \u306b\u30d7\u30c3\u30b7\u30e5\u3055\u308c\u3001\u73fe\u5728\u306e free memory pointer \u306b\u4fdd\u5b58\u3055\u308c\u305f\u3002"),(0,r.kt)("p",null,"\u3053\u306e\u5f8c\u3001\u524d\u306e free memory pointer \u306e\u5024\u3068\u8db3\u3057\u7b97\u3092\u3057\u3066\u3001\u5024 0x120 (288)\u304c\u751f\u6210\u3055\u308c\u305f\u3002\u3053\u306e\u5024\u304c free memory pointer \u306b\u4fdd\u5b58\u3055\u308c\u305f\u3002"),(0,r.kt)("p",null,"stack \u306b\u306f\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"\u30e1\u30e2\u30ea\u3092\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 0x80 \u306b\u30ad\u30fc\u30d7\u3057\u3066\u5f8c\u304b\u3089\u53c2\u7167\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u3002",(0,r.kt)("inlineCode",{parentName:"p"},"0xffff"),"\u306f JUMP \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u610f\u5473\u3057\u3066\u304a\u308a\u3001\u95a2\u4fc2\u306a\u3044\u306e\u3067\u5f53\u9762\u306f\u7121\u8996\u3057\u3066\u3088\u3044(stack \u306e underflow \u3092\u9632\u3050\u305f\u3081\u306b\u3042\u308b)\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(8735).Z,width:"719",height:"255"})),(0,r.kt)("h1",{id:"memory-initialisation-variable-a-evm-playground-lines-35-95"},"Memory Initialisation Variable \u201ca\u201d (EVM Playground Lines 35-95)"),(0,r.kt)("p",null,"\u4eca\u3067\u306f\u30e1\u30e2\u30ea\u306b\u4fdd\u5b58\u3055\u308c\u3066 free memory pointer \u304c\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u305f\u3002\u3053\u3053\u304b\u3089\u306f\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"\u306e\u30e1\u30e2\u30ea\u306b\u304a\u3051\u308b\u521d\u671f\u5316\u3092\u3059\u308b\u3002\u5909\u6570\u306f\u5ba3\u8a00\u3055\u308c\u3066\u5024\u4ee3\u5165\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30bc\u30ed\u5024\u306b\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3092\u3059\u308b\u305f\u3081\u306b\u306f\u3001EVM \u306e CALLDATACOPY \u3092\u4f7f\u3063\u3066\u5b9f\u65bd\u3059\u308b\u3002\u3053\u306e opcode \u306f\uff13\u3064\u306e\u5f15\u6570\u304c\u5fc5\u8981\uff1a"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"memoryOffset\uff08\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3078\u30b3\u30d4\u30fc\u3059\u308b\u5834\u6240\uff09"),(0,r.kt)("li",{parentName:"ul"},"calldataOffset\uff08calldata \u306b\u304a\u3051\u308b byte offset \u306e\u3053\u3068\uff09"),(0,r.kt)("li",{parentName:"ul"},"size\uff08\u30b3\u30d4\u30fc\u3059\u308b byte size\uff09")),(0,r.kt)("p",null,"\u4eca\u56de\u306e\u5834\u5408\u3001memoryOffset \u306f",(0,r.kt)("inlineCode",{parentName:"p"},"a"),"\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 0x80\u3002"),(0,r.kt)("p",null,"calldataOffset \u306f\u5b9f\u969b\u306e calldata \u306e\u30b5\u30a4\u30ba\u3001\u306a\u305c\u306a\u3089\u305d\u3082\u305d\u3082 calldata \u306e copy \u304c\u3044\u3089\u306a\u3044\u3002\u30e1\u30e2\u30ea\u3092\u30bc\u30ed\u5024\u3067\u521d\u671f\u5316\u3057\u305f\u3044\u3002\u7d50\u679c\u7684\u306b\u30b5\u30a4\u30ba\u304c 0xa0 \u3042\u308b\u3044\u306f 160 bytes \u306b\u306a\u308b\u3002"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u3001\u30e1\u30e2\u30ea\u304c 288 bytes \u306b\u306a\u3063\u305f\u3068\u308f\u304b\u308b(zero slot \u3082\u542b\u3081\u3066)\u3002stack \u306f\u4eca\u3082\u3046\u4e00\u5ea6\u5909\u6570\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3068 JUMP \u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u6301\u3063\u3066\u3044\u308b\u72b6\u614b\u3002"),(0,r.kt)("p",null,"\uff08\u305d\u306e\u9593\u306b\u7d30\u304b\u3044\u64cd\u4f5c\u306b\u3064\u3044\u3066\u306f\u3001\u4f55\u5ea6\u3082 pop \u3057\u3066\u3044\u308b\u306e\u304c\u3042\u308b\u304c\u3001\u500b\u4eba\u7684\u306b\u306f\u307e\u3060\u306a\u305e\u3067\u3001\u308f\u304b\u308b\u65b9\u306a\u3089\u6559\u3048\u3066\u4e0b\u3055\u3044\uff09"),(0,r.kt)("h1",{id:"memory-allocation-variable-b--free-memory-pointer-update-evm-playground-lines-96-112"},"Memory Allocation Variable \u201cb\u201d & Free Memory Pointer Update (EVM Playground Lines 96-112)"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u306e\u64cd\u4f5c\u306f\u4e0a\u8a18\u306e\u6d41\u308c\u3068\u975e\u5e38\u306b\u4f3c\u3066\u3044\u308b\u304c\u3001\u305f\u3060\u3057\u3001\u4eca\u56de\u306f",(0,r.kt)("inlineCode",{parentName:"p"},"bytes32[2] memory b"),"\u3068\u306a\u308b\u3002"),(0,r.kt)("p",null,"free memory pointer \u3092 0x160(352 in decimal)\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b(\u524d\u306e free memory pointer 288 + \u65b0\u3057\u3044\u5909\u6570\u306e\u30b5\u30a4\u30ba 64 bytes)\u3002"),(0,r.kt)("p",null,"\u6ce8\u610f\u3068\u3057\u3066\u306f\u3001free memory pointer \u306f\u30e1\u30e2\u30ea\u306b\u3066 0x160 \u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u3001\u305d\u3053\u3067\u73fe\u5728\u306f\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"b"),"\u306e\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3(0x120)\u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u3066\u3042\u308b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(82).Z,width:"713",height:"407"})),(0,r.kt)("h1",{id:"memory-initialisation-variable-b-evm-playground-lines-113-162"},"Memory Initialisation Variable \u201cb\u201d (EVM Playground Lines 113-162)"),(0,r.kt)("p",null,"\u7d9a\u3044\u3066\u5909\u6570",(0,r.kt)("inlineCode",{parentName:"p"},"b"),"\u521d\u671f\u5316\u306b\u3064\u3044\u3066\u8aac\u660e\u3059\u308b\u3002"),(0,r.kt)("p",null,"\u73fe\u5728\u3001\u30e1\u30e2\u30ea\u306f 352bytes \u3078\u62e1\u5f35\u3055\u308c\u305f\u3002\u30b9\u30bf\u30c3\u30af\u306b\u306f\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092 2 \u500b\u6301\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("h1",{id:"assign-value-to-b0-evm-playground-lines-163-207"},"Assign Value to ",(0,r.kt)("inlineCode",{parentName:"h1"},"b[0]")," (EVM Playground Lines 163-207)"),(0,r.kt)("p",null,"\u3084\u3063\u3068\u6700\u5f8c\u306e\u6bb5\u968e\u306b\u6765\u308c\u305f\u3002\u6b63\u76f4\u306b\u3044\u3063\u3066\u96e3\u3057\u304b\u3063\u305f\u3002"),(0,r.kt)("p",null,"\u3053\u3053\u3067\u306f\u3001array ",(0,r.kt)("inlineCode",{parentName:"p"},"b")," \u306e index ",(0,r.kt)("inlineCode",{parentName:"p"},"0"),"\u306b\u5024\u3092\u4ed8\u4e0e\u3057\u305f\u3044\u3002"),(0,r.kt)("p",null,"\u30b3\u30fc\u30c9\u3067\u306f b","[0]"," = 1 \u3068\u306a\u3063\u3066\u3044\u308b\u3002"),(0,r.kt)("p",null,"\u307e\u305a\u3001\u3053\u306e\u5024\u304c stack \u306b\u7a81\u3063\u8fbc\u307e\u308c\u308b\u3002\u305d\u306e\u5f8c\u3001bit shift \u304c\u8d77\u304d\u308b\u304c\u3001\u3053\u308c\u79fb\u52d5\u3057\u305f\u306e\u306f 0 \u3067\u4f55\u3082\u5909\u308f\u308a\u306f\u306a\u3044\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002"),(0,r.kt)("p",null,"\u6b21\u306b array \u306e index \u306b\u306f 0x00 \u3078\u66f8\u304d\u8fbc\u307e\u308c\u30010 positon \u3078\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u306e\u969b\u306b\u3001array length \u306e 2 \u3092\u8d85\u3048\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u30c1\u30a7\u30c3\u30af\u3002\u3082\u3057\u6761\u4ef6\u3092\u30af\u30ea\u30a2\u3067\u304d\u306a\u3044\u5834\u5408\u3001\u7570\u306a\u308b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u3078\u98db\u3073\u3001\u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u306e\u90e8\u5206\u3078\u98db\u3070\u3055\u308c\u308b\u3002"),(0,r.kt)("p",null,"MUL\u3001ADD opcode \u306f\u30e1\u30e2\u30ea\u3044\u306b\u304a\u3044\u3066\u5024\u304c\u66f8\u304d\u8fbc\u307e\u308c\u308b\u5834\u6240\u3092\u6c7a\u3081\u3066\u3044\u308b\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"0x20 (32 in decimal) * 0x00 (0 in decimal) = 0x00\n")),(0,r.kt)("p",null,"\u30e1\u30e2\u30ea\u306e array \u306f 32 byte \u5358\u4f4d\u3067\u3042\u308b\u3053\u3068\u3092\u601d\u3044\u51fa\u3057\u3066\u307b\u3057\u3044\u3002\u3053\u3061\u3089\u306f 0x00 \u306b\u306a\u308b\u306e\u3067\u3001offset \u306f\u4e0d\u8981\u3067\u305d\u306e\u307e\u307e 0 \u306e\u30dd\u30b8\u30b7\u30e7\u30f3\u304b\u3089\u66f8\u7740\u8fbc\u3080\u3002"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre"},"0x00 + 0x120 = 0x120 (288 in decimal)\n")),(0,r.kt)("p",null,"ADD \u306f offset \u306e\u5024\u3092\u30e1\u30e2\u30ea\u306b\u3042\u308b\u5909\u6570 b \u306e\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b\u3088\u3046\u306b\u4f7f\u308f\u308c\u305f\u3002offset \u306f\u4eca\u56de 0 \u306a\u306e\u3067\u3001\u305d\u306e\u307e\u307e\u3001free memory pointer \u306e\u4f4d\u7f6e\u306b\u66f8\u304d\u8fbc\u3080\u3053\u3068\u3068\u306a\u308b\u3002"),(0,r.kt)("p",null,"\u4e00\u756a\u6700\u5f8c\u306b\u3001MSTORE \u3092\u4f7f\u3063\u3066\u5024 0x01 \u3092\u30e1\u30e2\u30ea\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3\u306e 0x120 \u3078\u66f8\u304d\u8fbc\u3080\u3002\u305d\u3057\u3066\u3001\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u3059\u3079\u3066\u306e\u8981\u7d20\u3092 pop \u3057\u3001\u7d42\u4e86\u3002"),(0,r.kt)("p",null,"\u3053\u308c\u3067\u30e1\u30e2\u30ea\u306f",(0,r.kt)("inlineCode",{parentName:"p"},"b[0] = 1"),"\u3068\u306a\u3063\u3066\u3044\u308b\u3002\u4e0b\u304b\u3089 3 \u884c\u76ee\u306e\u3068\u3053\u308d\u306b 1 \u3068\u3044\u3046\u6570\u5b57\u304c\u5165\u3063\u3066\u3044\u308b\u306e\u304c\u308f\u304b\u308b\u3002"),(0,r.kt)("p",null,(0,r.kt)("img",{src:n(4039).Z,width:"716",height:"381"})),(0,r.kt)("p",null,"\u4eca\u56de\u306e\u8a18\u4e8b\u306f\u3053\u3053\u307e\u3067\uff01Bye\uff01"),(0,r.kt)("h2",{id:"reference"},"Reference"),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy-d6b?s=r"},"EVM Deep Dives: The Path to Shadowy Super Coder \ud83e\udd77 \ud83d\udcbb - Part 2")))}s.isMDXComponent=!0},8919:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/0plus1is1-67419ad8c3e6896eb20d34b24f09e059.png"},408:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/keeptrying-d7c22670dd835427081a62ef78787bc0.png"},3814:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/keeptryingallday-55e3b5ef7bf92e4188f07f753f51c8fd.png"},4740:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/meikyuu-8f55c9a4c82238d91b81b7627ee94a99.png"},3136:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory00-64684a54a90cd8fad4035fb6bc659256.png"},5939:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory01-bedf15c76b97ec5039e2dc0c9d1acd30.png"},499:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory02-5c58412a5109dbc9f344363980e9a18e.png"},8735:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory03-45df8d05acd1c466840636031aeb0c69.png"},82:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory04-21f31db9f1b092990a9a117ab315b165.png"},4039:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memory05-98e5924ea9117797c28563e880002aec.png"},5473:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/memoryImpression-bf6e64d85b0989e34e97553f008b2e36.png"},6794:(e,t,n)=>{n.d(t,{Z:()=>l});const l=n.p+"assets/images/thisispointless-c42e9d59813d74a2a459dc60158cfd9c.png"}}]); \ No newline at end of file diff --git a/assets/js/c2ff29d8.c07c6a43.js b/assets/js/c2ff29d8.c07c6a43.js new file mode 100644 index 00000000..33e81175 --- /dev/null +++ b/assets/js/c2ff29d8.c07c6a43.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[5867],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>m});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),f=u(r),m=a,d=f["".concat(s,".").concat(m)]||f[m]||c[m]||o;return r?n.createElement(d,l(l({ref:t},p),{},{components:r})):n.createElement(d,l({ref:t},p))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=f;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i.mdxType="string"==typeof e?e:a,l[1]=i;for(var u=2;u{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>i,toc:()=>u});var n=r(7462),a=(r(7294),r(3905));const o={slug:"What-is-SafeERC20",title:"SafeERC20\u3068\u306f",authors:["Thurendous"],blogDescription:"Foundry\u306e\u4f7f\u3044\u65b9\u5165\u9580",tags:["Etheruem","blockchain","Foundry"]},l=void 0,i={permalink:"/blog/What-is-SafeERC20",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/20230812About-safeERC20/2023-8-12-EVM-deep-dive-part1.md",source:"@site/blog/20230812About-safeERC20/2023-8-12-EVM-deep-dive-part1.md",title:"SafeERC20\u3068\u306f",description:"Hello! Everybody!",date:"2023-08-12T00:00:00.000Z",formattedDate:"2023\u5e748\u670812\u65e5",tags:[{label:"Etheruem",permalink:"/blog/tags/etheruem"},{label:"blockchain",permalink:"/blog/tags/blockchain"},{label:"Foundry",permalink:"/blog/tags/foundry"}],readingTime:1.076,hasTruncateMarker:!1,authors:[{name:"Thurendous",title:"Think borderlessly",url:"https://github.com/thurendous",imageURL:"https://github.com/thurendous.png",key:"Thurendous"}],frontMatter:{slug:"What-is-SafeERC20",title:"SafeERC20\u3068\u306f",authors:["Thurendous"],blogDescription:"Foundry\u306e\u4f7f\u3044\u65b9\u5165\u9580",tags:["Etheruem","blockchain","Foundry"]},nextItem:{title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",permalink:"/blog/EVM-deep-dive-part2"}},s={authorsImageUrls:[void 0]},u=[{value:"Reference",id:"reference",level:2}],p={toc:u};function c(e){let{components:t,...r}=e;return(0,a.kt)("wrapper",(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Hello! Everybody!"),(0,a.kt)("h1",{id:"safeerc20-\u306e\u4f7f\u3044\u65b9---what-is-and-how-to-use-safeerc20"},(0,a.kt)("inlineCode",{parentName:"h1"},"SafeERC20")," \u306e\u4f7f\u3044\u65b9 - What is and how to use ",(0,a.kt)("inlineCode",{parentName:"h1"},"SafeERC20")),(0,a.kt)("p",null,"OpenZeppelin \u306e SafeERC20 \u3068\u3044\u3046\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u8da3\u65e8\u306f\u3001ERC20 \u30c8\u30fc\u30af\u30f3\u306b\u306f\u57fa\u6e96\u304c\u3042\u308b\u3082\u306e\u306e\u3001\u57fa\u6e96\u306b\u6cbf\u3063\u3066\u3044\u306a\u3044\u6709\u540d\u306a\u30c8\u30fc\u30af\u30f3\u304c\u3042\u308b\u304b\u3089\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001BNB \u3084 USDT \u306f bool \u5024\u3092\u8fd4\u3055\u306a\u3044 transfer \u95a2\u6570\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u30c8\u30fc\u30af\u30f3\u3092\u6271\u3046\u3068\u304d\u306b\u3001SafeERC20 \u3092\u4f7f\u3046\u3053\u3068\u3067\u3001bool \u5024\u3092\u8fd4\u3055\u306a\u3044\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3082\u3001\u5931\u6557\u3057\u305f\u5834\u5408\u306b\u306f revert \u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002"),(0,a.kt)("h1",{id:"\u3058\u3083\u6b63\u78ba\u306b\u4f7f\u3046\u306b\u306f"},"\u3058\u3083\u6b63\u78ba\u306b\u4f7f\u3046\u306b\u306f\uff1f"),(0,a.kt)("p",null,"SafeERC20 \u306e\u4f7f\u7528\u65b9\u6cd5\u306f\u3088\u304f\u8aa4\u89e3\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002"),(0,a.kt)("p",null,"SafeERC20 \u306f\u3001\u30c8\u30fc\u30af\u30f3\u3092\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b ERC20 \u306e\u62e1\u5f35\u3067\u306f\u3042\u308a\u307e\u305b\u3093\uff08OpenZeppelin \u306e ERC20 \u306f\u3059\u3067\u306b\u5b89\u5168\u3067\u3059\u304c\uff57\uff09\u3002\u4ed6\u4eba\u306e ERC20 \u30c8\u30fc\u30af\u30f3\u3068\u306e\u3084\u308a\u53d6\u308a\u3092\u5b89\u5168\u306b\u3059\u308b\u305f\u3081\u306e\u88dc\u52a9\u6a5f\u80fd\u3067\u3059\u3002"),(0,a.kt)("p",null,"\u3053\u306e\u88dc\u52a9\u6a5f\u80fd\u304c\u884c\u3046\u3053\u3068\u306f\u3001"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"ERC20 \u64cd\u4f5c\u306e\u30d6\u30fc\u30eb\u5024\u306e\u623b\u308a\u5024\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u5931\u6557\u3057\u305f\u5834\u5408\u306b\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092 revert \u3055\u305b\u307e\u3059\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u540c\u6642\u306b\u3001\u30d6\u30fc\u30eb\u5024\u306e\u623b\u308a\u5024\u3092\u6301\u305f\u306a\u3044\u975e\u6a19\u6e96\u306e ERC20 \u30c8\u30fc\u30af\u30f3\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002"),(0,a.kt)("li",{parentName:"ul"},"\u3055\u3089\u306b\u3001",(0,a.kt)("a",{parentName:"li",href:"https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729"},"\u653b\u6483")," \u3092\u7de9\u548c\u3059\u308b\u305f\u3081\u306b\u3001\u627f\u8a8d\u984d\u3092\u5897\u6e1b\u3055\u305b\u308b\u305f\u3081\u306e\u88dc\u52a9\u6a5f\u80fd\u3082\u63d0\u4f9b\u3057\u307e\u3059\u3002")),(0,a.kt)("p",null,"\u4f8b\u3068\u3057\u3066\u3001\u30c8\u30fc\u30af\u30f3\u3068\u3084\u308a\u53d6\u308a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5951\u7d04\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002\u305d\u308c\u306f\u3001\u4eba\u3005\u304c\u4e00\u5b9a\u306e\u4fa1\u683c\u3067\u30c8\u30fc\u30af\u30f3\u3092\u8ca9\u58f2\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3001\u5f8c\u3067\u8cfc\u5165\u8005\u304c\u305d\u308c\u3089\u304b\u3089\u8cfc\u5165\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3082\u306e\u3067\u3059\u3002\u3044\u304f\u3064\u304b\u306e\u30c8\u30fc\u30af\u30f3\u306e\u8ee2\u9001\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u305d\u308c\u3089\u306b SafeERC20 \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002IERC20 \u306e\u578b\u306e\u5024\u3067\u5b89\u5168\u306a\u64cd\u4f5c\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u884c\u300cusing SafeERC20 for IERC20\u300d\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f8b\uff1atradingToken.safeTransferFrom\u3002"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-solidity"},"contract FixedPriceMarket {\n using SafeERC20 for IERC20;\n\n IERC20 tradingToken = 0x1234...;\n uint256 price = 128;\n\n mapping (address => uint256) selling;\n\n function sell(uint256 tokenValue) {\n tradingToken.safeTransferFrom(msg.sender, this, tokenValue);\n selling[msg.sender] = selling[msg.sender].add(tokenValue);\n }\n\n function buy(address seller, uint256 tokenValue) {\n require(msg.value == tokenValue.mul(price));\n selling[seller] = selling[seller].sub(tokenValue);\n tradingToken.safeTransfer(msg.sender, tokenValue);\n seller.transfer(msg.value);\n }\n}\n")),(0,a.kt)("h2",{id:"reference"},"Reference"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://forum.openzeppelin.com/t/safeerc20-tokentimelock-wrappers/396"},"OpenZeppelin Forum"),(0,a.kt)("br",{parentName:"p"}),"\n",(0,a.kt)("a",{parentName:"p",href:"https://zenn.dev/retocrooman/articles/20768619a313ae"},"SafeERC20 \u306b\u3064\u3044\u3066")))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f6d7b0c1.4d7e29bd.js b/assets/js/f6d7b0c1.4d7e29bd.js new file mode 100644 index 00000000..a79a4c04 --- /dev/null +++ b/assets/js/f6d7b0c1.4d7e29bd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[1655],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>k});var r=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var u=r.createContext({}),i=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},c=function(e){var t=i(e.components);return r.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},s=r.forwardRef((function(e,t){var n=e.components,l=e.mdxType,a=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),s=i(n),k=l,m=s["".concat(u,".").concat(k)]||s[k]||d[k]||a;return n?r.createElement(m,p(p({ref:t},c),{},{components:n})):r.createElement(m,p({ref:t},c))}));function k(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var a=n.length,p=new Array(a);p[0]=s;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:l,p[1]=o;for(var i=2;i{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>i});var r=n(7462),l=(n(7294),n(3905));const a={slug:"EVM-deep-dive-part1",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",tags:["EVM","opcode","Etheruem","blockchain","examples"]},p=void 0,o={permalink:"/blog/EVM-deep-dive-part1",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md",source:"@site/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",description:"Hello, everybody!",date:"2023-02-26T00:00:00.000Z",formattedDate:"2023\u5e742\u670826\u65e5",tags:[{label:"EVM",permalink:"/blog/tags/evm"},{label:"opcode",permalink:"/blog/tags/opcode"},{label:"Etheruem",permalink:"/blog/tags/etheruem"},{label:"blockchain",permalink:"/blog/tags/blockchain"},{label:"examples",permalink:"/blog/tags/examples"}],readingTime:3.734,hasTruncateMarker:!1,authors:[{name:"Thurendous",title:"Think borderlessly",url:"https://github.com/thurendous",imageURL:"https://github.com/thurendous.png",key:"Thurendous"}],frontMatter:{slug:"EVM-deep-dive-part1",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",tags:["EVM","opcode","Etheruem","blockchain","examples"]},prevItem:{title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 2",permalink:"/blog/EVM-deep-dive-part2"},nextItem:{title:"CEI\u3068\u306f : Checks Effects Interactions",permalink:"/blog/checks-effects-interactions"}},u={authorsImageUrls:[void 0]},i=[{value:"\u57fa\u790e\uff1aSolidity \u2192 Bytecode \u2192 Opcode",id:"\u57fa\u790esolidity--bytecode--opcode",level:2},{value:"1_Storage.sol \u30b3\u30f3\u30c8\u30e9\u30af\u30c8",id:"1_storagesol-\u30b3\u30f3\u30c8\u30e9\u30af\u30c8",level:2},{value:"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084 Calldata",id:"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084-calldata",level:2},{value:"\u30aa\u30da\u30b3\u30fc\u30c9\uff06\u30b9\u30bf\u30c3\u30af",id:"\u30aa\u30da\u30b3\u30fc\u30c9\u30b9\u30bf\u30c3\u30af",level:2},{value:"Reference",id:"reference",level:2}],c={toc:i};function d(e){let{components:t,...n}=e;return(0,l.kt)("wrapper",(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Hello, everybody!"),(0,l.kt)("p",null,"First Principle \u3068\u3044\u3046\u8a00\u8449\u3092\u8033\u306b\u3055\u308c\u305f\u3053\u3068\u306f\u306a\u3044\u3060\u308d\u3046\u304b\u3002\u305d\u308c\u306f\u5965\u6df1\u304f\u7269\u4e8b\u306e\u57fa\u790e\u3092\u7406\u89e3\u3057\u305f\u4e0a\u3067\u3001\u3088\u308a\u3088\u3044\u767a\u60f3\u3092\u751f\u307e\u308c\u308b\u3053\u3068\u3068\u3044\u3046\u6982\u5ff5\u3060\u3002"),(0,l.kt)("p",null,"\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u4e16\u754c\u3067\u306f\u3001EVM \u3068\u305d\u306e\u5468\u308a\u306b\u3042\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u95a2\u3057\u3066\u306f\u3001\u307e\u3055\u306b\u3053\u306e First Principle \u3067\u3042\u308b\u3002Solidity \u3042\u308b\u3044\u306f\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u3053\u306e\u57fa\u790e\u306e\u4e0a\u306b\u4f5c\u308b\u69cb\u9020\u7269\u306a\u306e\u3067\u3001EVM \u306e\u3053\u3068\u3092\u7406\u89e3\u305b\u305a\u306b\u306f\u3088\u3044 solidity dev \u3068\u79f0\u3059\u308b\u306b\u306f\u307e\u3060\u65e9\u3044\u3068\u8a00\u3063\u3066\u3088\u3044\u3060\u308d\u3046\u3002"),(0,l.kt)("h2",{id:"\u57fa\u790esolidity--bytecode--opcode"},"\u57fa\u790e\uff1aSolidity \u2192 Bytecode \u2192 Opcode"),(0,l.kt)("p",null,"\u307e\u305a\u3001\u57fa\u790e\u7684\u306a\u90e8\u5206\u306b\u3064\u3044\u3066\u4e00\u5b9a\u7a0b\u5ea6\u306e\u77e5\u8b58\u3092\u6709\u3059\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u308b\u3002"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u304a\u3055\u3089\u3044\uff1a",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Bytecode & ABI: \u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u306f EVM \u4e0a\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u30b3\u30fc\u30c9\u3067\u3001ABI \u3068\u306f\u3053\u306e EVM \u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u3084\u308a\u53d6\u308a\u304c\u3067\u304d\u308b\u305f\u3081\u306e interface\u3002"),(0,l.kt)("li",{parentName:"ul"},"Solidity \u30b3\u30fc\u30c9\u306f\u307e\u305a\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3078\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304b\u3089\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3078\u4e57\u305b\u308b\u3068\u3044\u3046\u6d41\u308c\u306b\u306a\u308b\u3002\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u5b9f\u306f\u8272\u3005\u306a\u30aa\u30da\u30b3\u30fc\u30c9\u3092\u610f\u5473\u3057\u3066\u3044\u308b\u3002")))),(0,l.kt)("p",null,"\u4eca\u56de\u306f\u57fa\u672c\u7684\u306a solidity \u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u3064\u3044\u3066\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u4e00\u90e8\u3092\u4e00\u7dd2\u306b\u307f\u3066\u3044\u304d\u3001EVM \u304c\u3069\u306e\u3088\u3046\u306b\u95a2\u6570\u3092\u9078\u3093\u3067\u3044\u308b\u304b\u3092\u898b\u3088\u3046\u3002"),(0,l.kt)("p",null,"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304b\u3089\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u305f\u3082\u306e\u3067\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u306f\u3044\u304f\u3064\u304b\u3082\u306e\u95a2\u6570\u304c\u3042\u308b\u3060\u308d\u3046\u3002"),(0,l.kt)("p",null,"\u3088\u304f\u3042\u308b\u8cea\u554f\u306f\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u305f\u5f8c\u3001EVM \u306f\u3069\u306e\u3088\u3046\u306b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u3069\u306e\u90e8\u5206\u3092\u5b9f\u884c\u3059\u3079\u304d\u304b\u304c\u308f\u304b\u3063\u305f\u306e\u304b\u3068\u3044\u3046\u306e\u304c\u3042\u308b\u3002"),(0,l.kt)("h2",{id:"1_storagesol-\u30b3\u30f3\u30c8\u30e9\u30af\u30c8"},"1_Storage.sol \u30b3\u30f3\u30c8\u30e9\u30af\u30c8"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-solidity"},"pragma solidity >=0.7.0 <0.9.0;\n\ncontract Storage {\n uint256 number;\n\n function store(uint256 num) public {\n number = num;\n }\n\n function retrieve() public view returns (uint256) {\n return number;\n }\n}\n")),(0,l.kt)("p",null,"\u4eca\u56de\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u4e0a\u8a18\u306e\u3082\u306e\u3068\u306a\u308b\u3002\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u306f\u4e8c\u500b\u306e\u95a2\u6570\u304c\u3042\u308b\u3002",(0,l.kt)("inlineCode",{parentName:"p"},"store()"),"\u3068 ",(0,l.kt)("inlineCode",{parentName:"p"},"retrieve()"),"\u3002"),(0,l.kt)("p",null,"runtime \u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033\n")),(0,l.kt)("p",null,"\u4eca\u56de\u30d5\u30a9\u30fc\u30ab\u30b9\u3059\u308b\u306e\u306f\u4ee5\u4e0b\u306e\u90e8\u5206\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"60003560e01c80632e64cec11461003b5780636057361d1461005957\n")),(0,l.kt)("p",null,"\u3053\u306e\u90e8\u5206\u306f\u5168\u4f53\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u304b\u3089\u629c\u304d\u53d6\u3063\u305f\u3082\u306e\u3002"),(0,l.kt)("p",null,"\u95a2\u6570\u306e\u30bb\u30ec\u30af\u30bf\u306e\u30ed\u30b8\u30c3\u30af\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3002"),(0,l.kt)("p",null,"\u8a00\u3044\u9045\u308c\u305f\u304c\u3001EVM \u306e\u30aa\u30da\u30b3\u30fc\u30c9\u306b\u95a2\u3057\u3066\u306f\u3001",(0,l.kt)("a",{parentName:"p",href:"https://www.ethervm.io/"},"\u3053\u3053"),"\u304b\u3089\u78ba\u8a8d\u3067\u304d\u308b\u3002"),(0,l.kt)("p",null,"\u30aa\u30da\u30b3\u30fc\u30c9\u306f 1 byte \u306e\u9577\u3055\u306b\u306a\u308b\u3002\u305d\u3046\u3059\u308b\u3068\u81ea\u7136\u306b 256 \u30d1\u30bf\u30fc\u30f3\u304c\u3042\u308b\u3068\u5206\u308b\u3068\u601d\u3046\u3002"),(0,l.kt)("p",null,"\u3057\u304b\u3057\u3001\u5b9f\u969b\u306b\u306f 140 \u500b\u306e\u30aa\u30da\u30b3\u30fc\u30c9\u3057\u304b\u5b58\u5728\u3057\u306a\u3044\u3002"),(0,l.kt)("p",null,"\u4ee5\u4e0b\u306f\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u95a2\u4fc2\u3059\u308b\u30aa\u30da\u30b3\u30fc\u30c9\u3078\u5909\u63db\u3057\u305f\u3082\u306e\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"60 00 = PUSH1 0x00\n35 = CALLDATALOAD\n60 e0 = PUSH1 0xe0\n1c = SHR\n80 = DUP1\n63 2e64cec1 = PUSH4 0x2e64cec1\n14 = EQ\n61 003b = PUSH2 0x003b\n57 = JUMPI\n80 = DUP1\n63 6057361d = PUSH4 0x6057361d\n14 = EQ\n61 0059 = PUSH2 0x0059\n57 = JUMPI\n")),(0,l.kt)("h2",{id:"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084-calldata"},"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084 Calldata"),(0,l.kt)("p",null,"\u30aa\u30da\u30b3\u30fc\u30c9\u3078\u30c0\u30a4\u30d6\u3059\u308b\u524d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u306b\u3064\u3044\u3066\u5fa9\u7fd2\u3057\u3088\u3046\u3002"),(0,l.kt)("p",null,"\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u306e\u524d\u306b\u3001calldata \u306b\u3001\u95a2\u6570\u306e\u7f72\u540d\u3001\u305d\u3057\u3066\u7d9a\u3044\u3066\u5f15\u6570\u3082\u5165\u308c\u308b\u3002"),(0,l.kt)("p",null,"Solidity \u306e\u30b3\u30fc\u30c9\u306b\u8868\u73fe\u3057\u3066\u3082\u3089\u3046\u3068\u3001\u3053\u3046\u306a\u308b\u3060\u308d\u3046\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-solidity"},"event FunctionCalldata(bytes);\nbytes memory functionCalldata = abi.encodeWithSignature('store(uint256)', 10);\nemit FunctionCalldata(functionCalldata);\naddress(storageContract).call(functionCalldata);\n")),(0,l.kt)("p",null,"\u4eca\u56de\u306e\u5834\u5408\u3001\u50d5\u306f store \u95a2\u6570\u3092\u547c\u3073\u300110 \u5f15\u6570\u3068\u3057\u3066\u4ee3\u5165\u3057\u305f\u3044\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-solidity"},"0x6057361d000000000000000000000000000000000000000000000000000000000000000a\n")),(0,l.kt)("p",null,"\u4e0a\u306e\u9577\u3044\u6570\u5b57\u306e\u914d\u5217\u306f abi.encodeWithSignature(\u201dstore(uint256)\u201d,10)\u306e\u7d50\u679c\u3002"),(0,l.kt)("p",null,"\u95a2\u6570\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306f\uff14\u30d0\u30a4\u30c8\u306e Keccak \u30cf\u30c3\u30b7\u30e5\u5024\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u300c0x6057361d\u300d\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"keccak256(\u201cstore(uint256)\u201d) \u2192 first 4 bytes = 6057361d\n\nkeccak256(\u201cretrieve()\u201d) \u2192 first 4 bytes = 2e64cec1\n")),(0,l.kt)("p",null,"\u5148\u7a0b\u306e calldata \u3092\u898b\u308b\u3068\u3001\u5168\u90e8\u3067 36bytes \u3042\u3063\u305f\u3002\u6700\u521d\u306e 4bytes: ",(0,l.kt)("inlineCode",{parentName:"p"},"6057361d"),"\u306f\u95a2\u6570\u306e\u30bb\u30ec\u30af\u30bf\u95a2\u9023\u3067\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"store(uint256)"),"\u3068\u95a2\u4fc2\u3059\u308b\u3002"),(0,l.kt)("p",null,"\u3054\u81ea\u8eab\u3067\u306f\u30c3\u30b7\u30e5\u3057\u3066\u307f\u3066 \u2192",(0,l.kt)("a",{parentName:"p",href:"https://emn178.github.io/online-tools/keccak_256.html"},"\u3053\u3053")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"6057361d = function signature (4 bytes)\n\n000000000000000000000000000000000000000000000000000000000000000a = uint256 input (32 bytes)\n")),(0,l.kt)("p",null,"\u4ee5\u4e0a\u3001calldata \u306e\u6e96\u5099\u3060\u3063\u305f\u3002"),(0,l.kt)("h2",{id:"\u30aa\u30da\u30b3\u30fc\u30c9\u30b9\u30bf\u30c3\u30af"},"\u30aa\u30da\u30b3\u30fc\u30c9\uff06\u30b9\u30bf\u30c3\u30af"),(0,l.kt)("p",null,"\u305d\u308c\u3067\u306f\u3001EVM \u30ec\u30d9\u30eb\u3078\u30c0\u30a4\u30d6\u3057\u3066\u3044\u3053\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002\u308f\u304b\u3089\u306a\u3044\u5834\u5408\u306f",(0,l.kt)("a",{parentName:"p",href:"https://www.youtube.com/watch?v=FNZ5o9S9prU"},"\u3053\u308c"),"\u3092\u898b\u3066\u3002"),(0,l.kt)("p",null,"\u5148\u7a0b\u306e\u30aa\u30da\u30b3\u30fc\u30c9\u306f\u3053\u308c\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"60 00 = PUSH1 0x00\n35 = CALLDATALOAD\n60 e0 = PUSH1 0xe0\n1c = SHR\n80 = DUP1\n63 2e64cec1 = PUSH4 0x2e64cec1\n14 = EQ\n61 003b = PUSH2 0x003b\n57 = JUMPI\n80 = DUP1\n63 6057361d = PUSH4 0x6057361d\n14 = EQ\n61 0059 = PUSH2 0x0059\n57 = JUMPI\n")),(0,l.kt)("p",null,"PUSH1 \u306f 1byte \u306e\u30c7\u30fc\u30bf\u3092\u30b9\u30bf\u30c3\u30af\u3078\u5165\u308c\u308b\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u3046\u3059\u308b\u3068\u3001\u30b9\u30bf\u30c3\u30af\u306f\u3053\u3046\u306a\u308b"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH1 0x00 | 0 |\n")),(0,l.kt)("p",null,"\u7d9a\u3044\u3066 CALLDATALOAD \u306f\u6700\u521d\u306e stack(0)\u306e\u5024\u3092\u30dd\u30c3\u30d7\u3055\u305b\u308b\u3002\u3053\u306e 0 \u5024\u3092 input \u3068\u3057\u3066\u4f7f\u7528\u3057\u3001offset \u3068\u3057\u3066\u4f7f\u3046\u3002\u30b9\u30bf\u30c3\u30af\u30a2\u30a4\u30c6\u30e0\u306e\u30b5\u30a4\u30ba\u306f 32bytes \u306a\u306e\u306b\u5bfe\u3057\u3001\u4eca\u56de\u306e calldata \u306f 36bytes \u306b\u306a\u3063\u3066\u3044\u308b\u3002\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u306f msg.data","[i : i+32]","\u3067\u3001i \u306f\u4eca\u56de\u306e input \u5024\u3068\u306a\u308b\u3002\u3053\u308c\u306f\u6bce\u56de\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u304c 32bytes \u306b\u306a\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3067\u304d\u308b\u3002\u540c\u6642\u306b\u3001\u3069\u306e\u90e8\u5206\u306b\u3082\u30a2\u30af\u30bb\u30eb\u3067\u304d\u308b\u3002"),(0,l.kt)("p",null,"\u4eca\u56de\u306e\u5834\u5408\u3001offset \u306f\u306a\u304b\u3063\u305f\u306e\u3067\u300132bytes \u306e calldata \u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u306b push \u3057\u305f\u3002\u3055\u304d\u307b\u3069\u7528\u610f\u3057\u305f calldata \u306f\u3053\u308c\u3002\u3084\u3063\u3068\u51fa\u756a\u304c\u304d\u305f\u3002"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"0x6057361d000000000000000000000000000000000000000000000000000000000000000a"),"\u3002"),(0,l.kt)("p",null,"\u3068\u3044\u3046\u306e\u306f\u3001\u6700\u5f8c\u306e",(0,l.kt)("inlineCode",{parentName:"p"},"0000000a"),"\u304c\u9664\u5916\u3055\u308c\u305f 32bytes \u304c\u4eca\u56de\u306e\u5165\u529b\u3068\u306a\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"CALLDATALOAD | 0x6057361d0...00 |\n")),(0,l.kt)("p",null,"\u6b21\u306b PUSH1 \u3092\u4f7f\u3063\u3066 hex value \u306e 0xe0 \u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3002\u3053\u308c\u306f\u5341\u9032\u6570\u3060\u3068 224\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH1 0xe0 | 224 |\n | 0x6057361d0...00 |\n")),(0,l.kt)("p",null,"SHR \u3092\u4f7f\u3063\u3066\u30e9\u30a4\u30c8\u30b7\u30d5\u30c8\u3055\u305b\u308b\u3002\u4eca\u56de\u306f\u6700\u521d\u306e\u30a2\u30a4\u30c6\u30e0\u3067\u3042\u308b 224 \u3092\u53d6\u308a\u51fa\u3057\u3001input \u3068\u3057\u3066\u6271\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u4e8c\u756a\u76ee\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u3069\u308c\u304f\u3089\u3044\u53f3\u3078\u30e9\u30a4\u30c8\u30b7\u30d5\u30c8\u3055\u305b\u308b\u304b\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u3002256 - 244 = 32 bit \u3068\u308f\u304b\u308b\u3088\u3046\u306b\u3001\u6700\u5f8c\u306b\u306f 4bytes \u306e\u30bb\u30ec\u30af\u30bf\u304c call stack \u306b\u6b8b\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"SHR | 0x6057361d |\n")),(0,l.kt)("p",null,"DUP1 \u3092\u4f7f\u3063\u3066\u30b9\u30bf\u30c3\u30af\u306e\u4e00\u756a\u4e0a\u306e\u5024\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"DUP1 | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"PUSH4 \u3092\u4f7f\u3063\u3066 4byte \u306e\u95a2\u6570\u306e\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306e",(0,l.kt)("inlineCode",{parentName:"p"},"retrieve()")," (0x2e64cec1) \u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH4 0x2e64cec1 | 0x2e64cec1 |\n | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"EQ \u306f\u4e8c\u500b\u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u304b\u3089\u51fa\u3057\u3001\u30a4\u30b3\u30fc\u30eb\u306a\u306e\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\u3082\u3057\u30a4\u30b3\u30fc\u30eb\u306a\u3089 1\uff08true\uff09 \u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3001\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f 0\uff08false\uff09 \u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"EQ | 0 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"\u6b21\u306b PUSH2 \u3092\u4f7f\u3063\u3066\u4e8c\u500b\u306e\u5024\u3092\u30d7\u30c3\u30b7\u30e5\u3002\uff080x003b, \u5341\u9032\u6570\u3060\u3068 59\uff09"),(0,l.kt)("p",null,"\u3053\u3053\u3067\u306f\u300159 \u304c\u51fa\u305f\u306e\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u304c\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306b\u6b21\u306e\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u306f\u3069\u3053\u306b\u3042\u308b\u306e\u304b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b\u304b\u3089\u3002\u3053\u306e 59 \u306f retrieve()\u304c\u30b9\u30bf\u30fc\u30c8\u5730\u70b9\u306f 59 \u3092\u610f\u5473\u3057\u3066\u3044\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH2 0x003b | 59 |\n | 0 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"JUMPI \u306f\u201djump if\u201d\u3092\u610f\u5473\u3059\u308b\u3002\u4e8c\u500b\u306e\u5024\u3092\u30dd\u30c3\u30d7\u3055\u305b\u3001\u4e00\u500b\u76ee\u306e\u5024\u306f 59 \u3067\u3001\u4e8c\u500b\u76ee\u306f 0\u3002\u4e8c\u500b\u76ee\u306e\u5024\u306f bool \u5024\u3067\u3053\u306e jump \u3092\u5b9f\u884c\u3059\u3079\u304d\u304b\u3092\u78ba\u5b9a\u3057\u3066\u3044\u308b\u30021 = true, 0 = false\u3002"),(0,l.kt)("p",null,"\u3082\u3057 true \u306e\u5834\u5408\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u306f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u5b9f\u884c\u306f\u305d\u3061\u3089\u3078 jump \u3059\u308b\u3002\u4eca\u56de\u306f false \u306a\u306e\u3067\u3001\u30b9\u30ad\u30c3\u30d7\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"JUMPI | 0x6057361d |\n")),(0,l.kt)("p",null,"DUP1 again"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"DUP1 | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"PUSH4 \u306f 4byte \u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH4 0x6057361d | 0x6057361d |\n | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"\u307e\u305f EQ \u3057\u3066\u3001\u4eca\u56de\u306f true \u306a\u306e\u3067\u3002\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u304c\u5408\u3063\u305f\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"EQ | 1 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"JUMPI\u3001\u4eca\u56de\u306f true \u306a\u3093\u3067 jump \u3092\u5b9f\u884c\u3059\u308b\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u306f 89 \u3067\u3001\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u9055\u3046\u5834\u6240\u3078\u79fb\u52d5\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH2 0x0059 | 89 |\n | 1 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"\u3053\u306e\u5834\u6240\u306b JUMPDEST \u30aa\u30da\u30b3\u30fc\u30c9\u304c\u3042\u308b\u3002\u3053\u308c\u304c\u306a\u3044\u3068\u5931\u6557\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"JUMPI | 0x6057361d |\n")),(0,l.kt)("p",null,"\u305d\u3053\u3067\u7d42\u308f\u308a\u3002\u3053\u308c\u3067\u30aa\u30da\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u306f",(0,l.kt)("inlineCode",{parentName:"p"},"store(uint156)"),"\u306e\u5834\u6240\u3078\u79fb\u52d5\u3067\u304d\u305f\u3002"),(0,l.kt)("p",null,"\u4eca\u56de\u306f\u4e8c\u500b\u306e\u95a2\u6570\u3057\u304b\u306a\u3044\u3082\u306e\u306e\u3001\u305f\u3068\u3048 20 \u500b\u306e\u95a2\u6570\u304c\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u30d7\u30ed\u30bb\u30b9\u306f\u4e00\u7dd2\u3002"),(0,l.kt)("p",null,"\u3053\u306e",(0,l.kt)("a",{parentName:"p",href:"https://www.evm.codes/playground?unit=Wei&callData=0x6057361d000000000000000000000000000000000000000000000000000000000000000a&codeType=Mnemonic&code=%27%210%7E0KCALLDATALOAD%7E2z2qw%21E0%7E3KSHR%7E5z2qwDUP1%7E6%28X4_2E64CEC1%7E7KEQ%7E12z5qwX2_3B%7E13%28*I%7E16z3qwDUP1%7E17KX4_6057361D%7E18KEQ%7E23z5qwX2_59%7E24K*I%7E27z3qwkY+wX30_0%7E28KwZGV59z31q%211%7E60+%7BG%7DW%7DKwkYwX26_0%7E62z2qKZstore%7Buint256V89z27q%210+ZContinueW.KK%27%7E+ZOffset+z+%7Bprevious+instruFoccupies+w%5Cnq%29s%7DwkZThes-ar-just+paddingNenabl-usNgetN_+0xZ%2F%2F+Yprogram+counter+59+%26+89XPUSHW+funFexecution...V%7D%29codew*DEST%7EN+to%28wwGretrieve%7BFction+-e+*JUMP%29+byte%28+K%21X1_%01%21%28%29*-FGKNVWXYZ_kqwz%7E_&fork=merge"},"\u30ea\u30f3\u30af"),"\u306f\u975e\u5e38\u306b\u304a\u3059\u3059\u3081\u3002\u89e6\u3063\u3066\u307f\u308b\u3068\u5409\u3002"),(0,l.kt)("p",null,"EVM \u306e\u30b9\u30bf\u30c3\u30af\u30fb\u30e1\u30e2\u30ea\u30fb\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u3066\u304f\u308c\u308b\u3002"),(0,l.kt)("h2",{id:"reference"},"Reference"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy"},"EVM Deep Dives: The Path to Shadowy Super Coder \ud83e\udd77 \ud83d\udcbb - Part 1")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/f6d7b0c1.d1a3854f.js b/assets/js/f6d7b0c1.d1a3854f.js deleted file mode 100644 index e808138d..00000000 --- a/assets/js/f6d7b0c1.d1a3854f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[1655],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>k});var r=n(7294);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var u=r.createContext({}),i=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):p(p({},t),e)),n},c=function(e){var t=i(e.components);return r.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},s=r.forwardRef((function(e,t){var n=e.components,l=e.mdxType,a=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),s=i(n),k=l,m=s["".concat(u,".").concat(k)]||s[k]||d[k]||a;return n?r.createElement(m,p(p({ref:t},c),{},{components:n})):r.createElement(m,p({ref:t},c))}));function k(e,t){var n=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var a=n.length,p=new Array(a);p[0]=s;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:l,p[1]=o;for(var i=2;i{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>i});var r=n(7462),l=(n(7294),n(3905));const a={slug:"EVM-deep-dive-part1",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",tags:["EVM","opcode","Etheruem","blockchain","examples"]},p=void 0,o={permalink:"/blog/EVM-deep-dive-part1",editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md",source:"@site/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",description:"Hello, everybody!",date:"2023-02-26T00:00:00.000Z",formattedDate:"2023\u5e742\u670826\u65e5",tags:[{label:"EVM",permalink:"/blog/tags/evm"},{label:"opcode",permalink:"/blog/tags/opcode"},{label:"Etheruem",permalink:"/blog/tags/etheruem"},{label:"blockchain",permalink:"/blog/tags/blockchain"},{label:"examples",permalink:"/blog/tags/examples"}],readingTime:3.734,hasTruncateMarker:!1,authors:[{name:"Thurendous",title:"Think borderlessly",url:"https://github.com/thurendous",imageURL:"https://github.com/thurendous.png",key:"Thurendous"}],frontMatter:{slug:"EVM-deep-dive-part1",title:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",authors:["Thurendous"],blogDescription:"EVM \u30c7\u30a3\u30fc\u30d7\u30c0\u30a4\u30d6 - super coder \u3078\u306e\u9053 \ud83e\udd77 \ud83d\udcbbPart 1",tags:["EVM","opcode","Etheruem","blockchain","examples"]},prevItem:{title:"SafeERC20\u3068\u306f",permalink:"/blog/What is SafeERC20"},nextItem:{title:"CEI\u3068\u306f : Checks Effects Interactions",permalink:"/blog/checks-effects-interactions"}},u={authorsImageUrls:[void 0]},i=[{value:"\u57fa\u790e\uff1aSolidity \u2192 Bytecode \u2192 Opcode",id:"\u57fa\u790esolidity--bytecode--opcode",level:2},{value:"1_Storage.sol \u30b3\u30f3\u30c8\u30e9\u30af\u30c8",id:"1_storagesol-\u30b3\u30f3\u30c8\u30e9\u30af\u30c8",level:2},{value:"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084 Calldata",id:"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084-calldata",level:2},{value:"\u30aa\u30da\u30b3\u30fc\u30c9\uff06\u30b9\u30bf\u30c3\u30af",id:"\u30aa\u30da\u30b3\u30fc\u30c9\u30b9\u30bf\u30c3\u30af",level:2},{value:"Reference",id:"reference",level:2}],c={toc:i};function d(e){let{components:t,...n}=e;return(0,l.kt)("wrapper",(0,r.Z)({},c,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("p",null,"Hello, everybody!"),(0,l.kt)("p",null,"First Principle \u3068\u3044\u3046\u8a00\u8449\u3092\u8033\u306b\u3055\u308c\u305f\u3053\u3068\u306f\u306a\u3044\u3060\u308d\u3046\u304b\u3002\u305d\u308c\u306f\u5965\u6df1\u304f\u7269\u4e8b\u306e\u57fa\u790e\u3092\u7406\u89e3\u3057\u305f\u4e0a\u3067\u3001\u3088\u308a\u3088\u3044\u767a\u60f3\u3092\u751f\u307e\u308c\u308b\u3053\u3068\u3068\u3044\u3046\u6982\u5ff5\u3060\u3002"),(0,l.kt)("p",null,"\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u4e16\u754c\u3067\u306f\u3001EVM \u3068\u305d\u306e\u5468\u308a\u306b\u3042\u308b\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u95a2\u3057\u3066\u306f\u3001\u307e\u3055\u306b\u3053\u306e First Principle \u3067\u3042\u308b\u3002Solidity \u3042\u308b\u3044\u306f\u30b9\u30de\u30fc\u30c8\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u3053\u306e\u57fa\u790e\u306e\u4e0a\u306b\u4f5c\u308b\u69cb\u9020\u7269\u306a\u306e\u3067\u3001EVM \u306e\u3053\u3068\u3092\u7406\u89e3\u305b\u305a\u306b\u306f\u3088\u3044 solidity dev \u3068\u79f0\u3059\u308b\u306b\u306f\u307e\u3060\u65e9\u3044\u3068\u8a00\u3063\u3066\u3088\u3044\u3060\u308d\u3046\u3002"),(0,l.kt)("h2",{id:"\u57fa\u790esolidity--bytecode--opcode"},"\u57fa\u790e\uff1aSolidity \u2192 Bytecode \u2192 Opcode"),(0,l.kt)("p",null,"\u307e\u305a\u3001\u57fa\u790e\u7684\u306a\u90e8\u5206\u306b\u3064\u3044\u3066\u4e00\u5b9a\u7a0b\u5ea6\u306e\u77e5\u8b58\u3092\u6709\u3059\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u3044\u308b\u3002"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u304a\u3055\u3089\u3044\uff1a",(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},"Bytecode & ABI: \u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u306f EVM \u4e0a\u3067\u5b9f\u884c\u53ef\u80fd\u306a\u30b3\u30fc\u30c9\u3067\u3001ABI \u3068\u306f\u3053\u306e EVM \u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3068\u3084\u308a\u53d6\u308a\u304c\u3067\u304d\u308b\u305f\u3081\u306e interface\u3002"),(0,l.kt)("li",{parentName:"ul"},"Solidity \u30b3\u30fc\u30c9\u306f\u307e\u305a\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3078\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u304b\u3089\u3001\u30a4\u30fc\u30b5\u30ea\u30a2\u30e0\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3\u3078\u4e57\u305b\u308b\u3068\u3044\u3046\u6d41\u308c\u306b\u306a\u308b\u3002\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u5b9f\u306f\u8272\u3005\u306a\u30aa\u30da\u30b3\u30fc\u30c9\u3092\u610f\u5473\u3057\u3066\u3044\u308b\u3002")))),(0,l.kt)("p",null,"\u4eca\u56de\u306f\u57fa\u672c\u7684\u306a solidity \u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u3064\u3044\u3066\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u4e00\u90e8\u3092\u4e00\u7dd2\u306b\u307f\u3066\u3044\u304d\u3001EVM \u304c\u3069\u306e\u3088\u3046\u306b\u95a2\u6570\u3092\u9078\u3093\u3067\u3044\u308b\u304b\u3092\u898b\u3088\u3046\u3002"),(0,l.kt)("p",null,"\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u304b\u3089\u30b3\u30f3\u30d1\u30a4\u30eb\u3055\u308c\u305f\u3082\u306e\u3067\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u306f\u3044\u304f\u3064\u304b\u3082\u306e\u95a2\u6570\u304c\u3042\u308b\u3060\u308d\u3046\u3002"),(0,l.kt)("p",null,"\u3088\u304f\u3042\u308b\u8cea\u554f\u306f\u3001\u30c7\u30d7\u30ed\u30a4\u3057\u305f\u5f8c\u3001EVM \u306f\u3069\u306e\u3088\u3046\u306b\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u3069\u306e\u90e8\u5206\u3092\u5b9f\u884c\u3059\u3079\u304d\u304b\u304c\u308f\u304b\u3063\u305f\u306e\u304b\u3068\u3044\u3046\u306e\u304c\u3042\u308b\u3002"),(0,l.kt)("h2",{id:"1_storagesol-\u30b3\u30f3\u30c8\u30e9\u30af\u30c8"},"1_Storage.sol \u30b3\u30f3\u30c8\u30e9\u30af\u30c8"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-solidity"},"pragma solidity >=0.7.0 <0.9.0;\n\ncontract Storage {\n uint256 number;\n\n function store(uint256 num) public {\n number = num;\n }\n\n function retrieve() public view returns (uint256) {\n return number;\n }\n}\n")),(0,l.kt)("p",null,"\u4eca\u56de\u306e\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306f\u4e0a\u8a18\u306e\u3082\u306e\u3068\u306a\u308b\u3002\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306b\u306f\u4e8c\u500b\u306e\u95a2\u6570\u304c\u3042\u308b\u3002",(0,l.kt)("inlineCode",{parentName:"p"},"store()"),"\u3068 ",(0,l.kt)("inlineCode",{parentName:"p"},"retrieve()"),"\u3002"),(0,l.kt)("p",null,"runtime \u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea2646970667358221220404e37f487a89a932dca5e77faaf6ca2de3b991f93d230604b1b8daaef64766264736f6c63430008070033\n")),(0,l.kt)("p",null,"\u4eca\u56de\u30d5\u30a9\u30fc\u30ab\u30b9\u3059\u308b\u306e\u306f\u4ee5\u4e0b\u306e\u90e8\u5206\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"60003560e01c80632e64cec11461003b5780636057361d1461005957\n")),(0,l.kt)("p",null,"\u3053\u306e\u90e8\u5206\u306f\u5168\u4f53\u306e\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u304b\u3089\u629c\u304d\u53d6\u3063\u305f\u3082\u306e\u3002"),(0,l.kt)("p",null,"\u95a2\u6570\u306e\u30bb\u30ec\u30af\u30bf\u306e\u30ed\u30b8\u30c3\u30af\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3002"),(0,l.kt)("p",null,"\u8a00\u3044\u9045\u308c\u305f\u304c\u3001EVM \u306e\u30aa\u30da\u30b3\u30fc\u30c9\u306b\u95a2\u3057\u3066\u306f\u3001",(0,l.kt)("a",{parentName:"p",href:"https://www.ethervm.io/"},"\u3053\u3053"),"\u304b\u3089\u78ba\u8a8d\u3067\u304d\u308b\u3002"),(0,l.kt)("p",null,"\u30aa\u30da\u30b3\u30fc\u30c9\u306f 1 byte \u306e\u9577\u3055\u306b\u306a\u308b\u3002\u305d\u3046\u3059\u308b\u3068\u81ea\u7136\u306b 256 \u30d1\u30bf\u30fc\u30f3\u304c\u3042\u308b\u3068\u5206\u308b\u3068\u601d\u3046\u3002"),(0,l.kt)("p",null,"\u3057\u304b\u3057\u3001\u5b9f\u969b\u306b\u306f 140 \u500b\u306e\u30aa\u30da\u30b3\u30fc\u30c9\u3057\u304b\u5b58\u5728\u3057\u306a\u3044\u3002"),(0,l.kt)("p",null,"\u4ee5\u4e0b\u306f\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u3092\u95a2\u4fc2\u3059\u308b\u30aa\u30da\u30b3\u30fc\u30c9\u3078\u5909\u63db\u3057\u305f\u3082\u306e\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"60 00 = PUSH1 0x00\n35 = CALLDATALOAD\n60 e0 = PUSH1 0xe0\n1c = SHR\n80 = DUP1\n63 2e64cec1 = PUSH4 0x2e64cec1\n14 = EQ\n61 003b = PUSH2 0x003b\n57 = JUMPI\n80 = DUP1\n63 6057361d = PUSH4 0x6057361d\n14 = EQ\n61 0059 = PUSH2 0x0059\n57 = JUMPI\n")),(0,l.kt)("h2",{id:"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084-calldata"},"\u30b9\u30de\u30b3\u30f3\u306e\u95a2\u6570\u547c\u3073\u51fa\u3057\u3084 Calldata"),(0,l.kt)("p",null,"\u30aa\u30da\u30b3\u30fc\u30c9\u3078\u30c0\u30a4\u30d6\u3059\u308b\u524d\u306b\u3001\u30b3\u30f3\u30c8\u30e9\u30af\u30c8\u306e\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u306b\u3064\u3044\u3066\u5fa9\u7fd2\u3057\u3088\u3046\u3002"),(0,l.kt)("p",null,"\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u306e\u524d\u306b\u3001calldata \u306b\u3001\u95a2\u6570\u306e\u7f72\u540d\u3001\u305d\u3057\u3066\u7d9a\u3044\u3066\u5f15\u6570\u3082\u5165\u308c\u308b\u3002"),(0,l.kt)("p",null,"Solidity \u306e\u30b3\u30fc\u30c9\u306b\u8868\u73fe\u3057\u3066\u3082\u3089\u3046\u3068\u3001\u3053\u3046\u306a\u308b\u3060\u308d\u3046\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-solidity"},"event FunctionCalldata(bytes);\nbytes memory functionCalldata = abi.encodeWithSignature('store(uint256)', 10);\nemit FunctionCalldata(functionCalldata);\naddress(storageContract).call(functionCalldata);\n")),(0,l.kt)("p",null,"\u4eca\u56de\u306e\u5834\u5408\u3001\u50d5\u306f store \u95a2\u6570\u3092\u547c\u3073\u300110 \u5f15\u6570\u3068\u3057\u3066\u4ee3\u5165\u3057\u305f\u3044\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-solidity"},"0x6057361d000000000000000000000000000000000000000000000000000000000000000a\n")),(0,l.kt)("p",null,"\u4e0a\u306e\u9577\u3044\u6570\u5b57\u306e\u914d\u5217\u306f abi.encodeWithSignature(\u201dstore(uint256)\u201d,10)\u306e\u7d50\u679c\u3002"),(0,l.kt)("p",null,"\u95a2\u6570\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306f\uff14\u30d0\u30a4\u30c8\u306e Keccak \u30cf\u30c3\u30b7\u30e5\u5024\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u300c0x6057361d\u300d\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"keccak256(\u201cstore(uint256)\u201d) \u2192 first 4 bytes = 6057361d\n\nkeccak256(\u201cretrieve()\u201d) \u2192 first 4 bytes = 2e64cec1\n")),(0,l.kt)("p",null,"\u5148\u7a0b\u306e calldata \u3092\u898b\u308b\u3068\u3001\u5168\u90e8\u3067 36bytes \u3042\u3063\u305f\u3002\u6700\u521d\u306e 4bytes: ",(0,l.kt)("inlineCode",{parentName:"p"},"6057361d"),"\u306f\u95a2\u6570\u306e\u30bb\u30ec\u30af\u30bf\u95a2\u9023\u3067\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"store(uint256)"),"\u3068\u95a2\u4fc2\u3059\u308b\u3002"),(0,l.kt)("p",null,"\u3054\u81ea\u8eab\u3067\u306f\u30c3\u30b7\u30e5\u3057\u3066\u307f\u3066 \u2192",(0,l.kt)("a",{parentName:"p",href:"https://emn178.github.io/online-tools/keccak_256.html"},"\u3053\u3053")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"6057361d = function signature (4 bytes)\n\n000000000000000000000000000000000000000000000000000000000000000a = uint256 input (32 bytes)\n")),(0,l.kt)("p",null,"\u4ee5\u4e0a\u3001calldata \u306e\u6e96\u5099\u3060\u3063\u305f\u3002"),(0,l.kt)("h2",{id:"\u30aa\u30da\u30b3\u30fc\u30c9\u30b9\u30bf\u30c3\u30af"},"\u30aa\u30da\u30b3\u30fc\u30c9\uff06\u30b9\u30bf\u30c3\u30af"),(0,l.kt)("p",null,"\u305d\u308c\u3067\u306f\u3001EVM \u30ec\u30d9\u30eb\u3078\u30c0\u30a4\u30d6\u3057\u3066\u3044\u3053\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306b\u3064\u3044\u3066\u7406\u89e3\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002\u308f\u304b\u3089\u306a\u3044\u5834\u5408\u306f",(0,l.kt)("a",{parentName:"p",href:"https://www.youtube.com/watch?v=FNZ5o9S9prU"},"\u3053\u308c"),"\u3092\u898b\u3066\u3002"),(0,l.kt)("p",null,"\u5148\u7a0b\u306e\u30aa\u30da\u30b3\u30fc\u30c9\u306f\u3053\u308c\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"60 00 = PUSH1 0x00\n35 = CALLDATALOAD\n60 e0 = PUSH1 0xe0\n1c = SHR\n80 = DUP1\n63 2e64cec1 = PUSH4 0x2e64cec1\n14 = EQ\n61 003b = PUSH2 0x003b\n57 = JUMPI\n80 = DUP1\n63 6057361d = PUSH4 0x6057361d\n14 = EQ\n61 0059 = PUSH2 0x0059\n57 = JUMPI\n")),(0,l.kt)("p",null,"PUSH1 \u306f 1byte \u306e\u30c7\u30fc\u30bf\u3092\u30b9\u30bf\u30c3\u30af\u3078\u5165\u308c\u308b\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u305d\u3046\u3059\u308b\u3068\u3001\u30b9\u30bf\u30c3\u30af\u306f\u3053\u3046\u306a\u308b"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH1 0x00 | 0 |\n")),(0,l.kt)("p",null,"\u7d9a\u3044\u3066 CALLDATALOAD \u306f\u6700\u521d\u306e stack(0)\u306e\u5024\u3092\u30dd\u30c3\u30d7\u3055\u305b\u308b\u3002\u3053\u306e 0 \u5024\u3092 input \u3068\u3057\u3066\u4f7f\u7528\u3057\u3001offset \u3068\u3057\u3066\u4f7f\u3046\u3002\u30b9\u30bf\u30c3\u30af\u30a2\u30a4\u30c6\u30e0\u306e\u30b5\u30a4\u30ba\u306f 32bytes \u306a\u306e\u306b\u5bfe\u3057\u3001\u4eca\u56de\u306e calldata \u306f 36bytes \u306b\u306a\u3063\u3066\u3044\u308b\u3002\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u306f msg.data","[i : i+32]","\u3067\u3001i \u306f\u4eca\u56de\u306e input \u5024\u3068\u306a\u308b\u3002\u3053\u308c\u306f\u6bce\u56de\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u5024\u304c 32bytes \u306b\u306a\u308b\u3053\u3068\u3092\u4fdd\u8a3c\u3067\u304d\u308b\u3002\u540c\u6642\u306b\u3001\u3069\u306e\u90e8\u5206\u306b\u3082\u30a2\u30af\u30bb\u30eb\u3067\u304d\u308b\u3002"),(0,l.kt)("p",null,"\u4eca\u56de\u306e\u5834\u5408\u3001offset \u306f\u306a\u304b\u3063\u305f\u306e\u3067\u300132bytes \u306e calldata \u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u306b push \u3057\u305f\u3002\u3055\u304d\u307b\u3069\u7528\u610f\u3057\u305f calldata \u306f\u3053\u308c\u3002\u3084\u3063\u3068\u51fa\u756a\u304c\u304d\u305f\u3002"),(0,l.kt)("p",null,(0,l.kt)("inlineCode",{parentName:"p"},"0x6057361d000000000000000000000000000000000000000000000000000000000000000a"),"\u3002"),(0,l.kt)("p",null,"\u3068\u3044\u3046\u306e\u306f\u3001\u6700\u5f8c\u306e",(0,l.kt)("inlineCode",{parentName:"p"},"0000000a"),"\u304c\u9664\u5916\u3055\u308c\u305f 32bytes \u304c\u4eca\u56de\u306e\u5165\u529b\u3068\u306a\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"CALLDATALOAD | 0x6057361d0...00 |\n")),(0,l.kt)("p",null,"\u6b21\u306b PUSH1 \u3092\u4f7f\u3063\u3066 hex value \u306e 0xe0 \u3092\u30b9\u30bf\u30c3\u30af\u306b\u5165\u308c\u308b\u3002\u3053\u308c\u306f\u5341\u9032\u6570\u3060\u3068 224\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH1 0xe0 | 224 |\n | 0x6057361d0...00 |\n")),(0,l.kt)("p",null,"SHR \u3092\u4f7f\u3063\u3066\u30e9\u30a4\u30c8\u30b7\u30d5\u30c8\u3055\u305b\u308b\u3002\u4eca\u56de\u306f\u6700\u521d\u306e\u30a2\u30a4\u30c6\u30e0\u3067\u3042\u308b 224 \u3092\u53d6\u308a\u51fa\u3057\u3001input \u3068\u3057\u3066\u6271\u3046\u3002\u30b9\u30bf\u30c3\u30af\u306b\u3042\u308b\u4e8c\u756a\u76ee\u306e\u30a2\u30a4\u30c6\u30e0\u3092\u3069\u308c\u304f\u3089\u3044\u53f3\u3078\u30e9\u30a4\u30c8\u30b7\u30d5\u30c8\u3055\u305b\u308b\u304b\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u3002256 - 244 = 32 bit \u3068\u308f\u304b\u308b\u3088\u3046\u306b\u3001\u6700\u5f8c\u306b\u306f 4bytes \u306e\u30bb\u30ec\u30af\u30bf\u304c call stack \u306b\u6b8b\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"SHR | 0x6057361d |\n")),(0,l.kt)("p",null,"DUP1 \u3092\u4f7f\u3063\u3066\u30b9\u30bf\u30c3\u30af\u306e\u4e00\u756a\u4e0a\u306e\u5024\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"DUP1 | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"PUSH4 \u3092\u4f7f\u3063\u3066 4byte \u306e\u95a2\u6570\u306e\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306e",(0,l.kt)("inlineCode",{parentName:"p"},"retrieve()")," (0x2e64cec1) \u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH4 0x2e64cec1 | 0x2e64cec1 |\n | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"EQ \u306f\u4e8c\u500b\u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u304b\u3089\u51fa\u3057\u3001\u30a4\u30b3\u30fc\u30eb\u306a\u306e\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3002\u3082\u3057\u30a4\u30b3\u30fc\u30eb\u306a\u3089 1\uff08true\uff09 \u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3001\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u306f 0\uff08false\uff09 \u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"EQ | 0 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"\u6b21\u306b PUSH2 \u3092\u4f7f\u3063\u3066\u4e8c\u500b\u306e\u5024\u3092\u30d7\u30c3\u30b7\u30e5\u3002\uff080x003b, \u5341\u9032\u6570\u3060\u3068 59\uff09"),(0,l.kt)("p",null,"\u3053\u3053\u3067\u306f\u300159 \u304c\u51fa\u305f\u306e\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u304c\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306b\u6b21\u306e\u5b9f\u884c\u30b3\u30de\u30f3\u30c9\u306f\u3069\u3053\u306b\u3042\u308b\u306e\u304b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u308b\u304b\u3089\u3002\u3053\u306e 59 \u306f retrieve()\u304c\u30b9\u30bf\u30fc\u30c8\u5730\u70b9\u306f 59 \u3092\u610f\u5473\u3057\u3066\u3044\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH2 0x003b | 59 |\n | 0 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"JUMPI \u306f\u201djump if\u201d\u3092\u610f\u5473\u3059\u308b\u3002\u4e8c\u500b\u306e\u5024\u3092\u30dd\u30c3\u30d7\u3055\u305b\u3001\u4e00\u500b\u76ee\u306e\u5024\u306f 59 \u3067\u3001\u4e8c\u500b\u76ee\u306f 0\u3002\u4e8c\u500b\u76ee\u306e\u5024\u306f bool \u5024\u3067\u3053\u306e jump \u3092\u5b9f\u884c\u3059\u3079\u304d\u304b\u3092\u78ba\u5b9a\u3057\u3066\u3044\u308b\u30021 = true, 0 = false\u3002"),(0,l.kt)("p",null,"\u3082\u3057 true \u306e\u5834\u5408\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u306f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3055\u308c\u5b9f\u884c\u306f\u305d\u3061\u3089\u3078 jump \u3059\u308b\u3002\u4eca\u56de\u306f false \u306a\u306e\u3067\u3001\u30b9\u30ad\u30c3\u30d7\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"JUMPI | 0x6057361d |\n")),(0,l.kt)("p",null,"DUP1 again"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"DUP1 | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"PUSH4 \u306f 4byte \u306e\u5024\u3092\u30b9\u30bf\u30c3\u30af\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH4 0x6057361d | 0x6057361d |\n | 0x6057361d |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"\u307e\u305f EQ \u3057\u3066\u3001\u4eca\u56de\u306f true \u306a\u306e\u3067\u3002\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u304c\u5408\u3063\u305f\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"EQ | 1 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"JUMPI\u3001\u4eca\u56de\u306f true \u306a\u3093\u3067 jump \u3092\u5b9f\u884c\u3059\u308b\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u30ab\u30a6\u30f3\u30bf\u30fc\u306f 89 \u3067\u3001\u30d0\u30a4\u30c8\u30b3\u30fc\u30c9\u306e\u9055\u3046\u5834\u6240\u3078\u79fb\u52d5\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"PUSH2 0x0059 | 89 |\n | 1 |\n | 0x6057361d |\n")),(0,l.kt)("p",null,"\u3053\u306e\u5834\u6240\u306b JUMPDEST \u30aa\u30da\u30b3\u30fc\u30c9\u304c\u3042\u308b\u3002\u3053\u308c\u304c\u306a\u3044\u3068\u5931\u6557\u3059\u308b\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"JUMPI | 0x6057361d |\n")),(0,l.kt)("p",null,"\u305d\u3053\u3067\u7d42\u308f\u308a\u3002\u3053\u308c\u3067\u30aa\u30da\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u306f",(0,l.kt)("inlineCode",{parentName:"p"},"store(uint156)"),"\u306e\u5834\u6240\u3078\u79fb\u52d5\u3067\u304d\u305f\u3002"),(0,l.kt)("p",null,"\u4eca\u56de\u306f\u4e8c\u500b\u306e\u95a2\u6570\u3057\u304b\u306a\u3044\u3082\u306e\u306e\u3001\u305f\u3068\u3048 20 \u500b\u306e\u95a2\u6570\u304c\u3042\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u30d7\u30ed\u30bb\u30b9\u306f\u4e00\u7dd2\u3002"),(0,l.kt)("p",null,"\u3053\u306e",(0,l.kt)("a",{parentName:"p",href:"https://www.evm.codes/playground?unit=Wei&callData=0x6057361d000000000000000000000000000000000000000000000000000000000000000a&codeType=Mnemonic&code=%27%210%7E0KCALLDATALOAD%7E2z2qw%21E0%7E3KSHR%7E5z2qwDUP1%7E6%28X4_2E64CEC1%7E7KEQ%7E12z5qwX2_3B%7E13%28*I%7E16z3qwDUP1%7E17KX4_6057361D%7E18KEQ%7E23z5qwX2_59%7E24K*I%7E27z3qwkY+wX30_0%7E28KwZGV59z31q%211%7E60+%7BG%7DW%7DKwkYwX26_0%7E62z2qKZstore%7Buint256V89z27q%210+ZContinueW.KK%27%7E+ZOffset+z+%7Bprevious+instruFoccupies+w%5Cnq%29s%7DwkZThes-ar-just+paddingNenabl-usNgetN_+0xZ%2F%2F+Yprogram+counter+59+%26+89XPUSHW+funFexecution...V%7D%29codew*DEST%7EN+to%28wwGretrieve%7BFction+-e+*JUMP%29+byte%28+K%21X1_%01%21%28%29*-FGKNVWXYZ_kqwz%7E_&fork=merge"},"\u30ea\u30f3\u30af"),"\u306f\u975e\u5e38\u306b\u304a\u3059\u3059\u3081\u3002\u89e6\u3063\u3066\u307f\u308b\u3068\u5409\u3002"),(0,l.kt)("p",null,"EVM \u306e\u30b9\u30bf\u30c3\u30af\u30fb\u30e1\u30e2\u30ea\u30fb\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3057\u3066\u304f\u308c\u308b\u3002"),(0,l.kt)("h2",{id:"reference"},"Reference"),(0,l.kt)("p",null,(0,l.kt)("a",{parentName:"p",href:"https://noxx.substack.com/p/evm-deep-dives-the-path-to-shadowy"},"EVM Deep Dives: The Path to Shadowy Super Coder \ud83e\udd77 \ud83d\udcbb - Part 1")))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/main.2d683875.js b/assets/js/main.2d683875.js new file mode 100644 index 00000000..05ad3056 --- /dev/null +++ b/assets/js/main.2d683875.js @@ -0,0 +1,2 @@ +/*! For license information please see main.2d683875.js.LICENSE.txt */ +(self.webpackChunkmy_website_with_docusaurus=self.webpackChunkmy_website_with_docusaurus||[]).push([[179],{723:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(7294),a=n(7462),o=n(8356),i=n.n(o),s=n(6887);const l={"01a85c17":[()=>Promise.all([n.e(532),n.e(4013)]).then(n.bind(n,4524)),"@theme/BlogTagsListPage",4524],"03181aef":[()=>n.e(876).then(n.bind(n,25)),"@site/src/pages/my-markdown-page.md",25],"0401c31b":[()=>n.e(8570).then(n.t.bind(n,6859,19)),"~blog/default/blog-tags-evm-4da.json",6859],"0ad7ecca":[()=>n.e(378).then(n.t.bind(n,7092,19)),"~docs/default/tag-docs-tags-else-624.json",7092],"0b04e46f":[()=>n.e(7095).then(n.t.bind(n,2153,19)),"~docs/default/tag-docs-tags-send-ether-856.json",2153],"0ce382f1":[()=>n.e(6274).then(n.bind(n,9436)),"@site/docs/Learning/34_CallingOtherContract copy.md",9436],"0e384e19":[()=>n.e(9671).then(n.bind(n,9881)),"@site/docs/intro.md",9881],"10780f15":[()=>n.e(5438).then(n.t.bind(n,9086,19)),"~blog/default/blog-tags-nft-16a-list.json",9086],"11e92c14":[()=>n.e(5501).then(n.t.bind(n,8387,19)),"~docs/default/tag-docs-tags-send-1e8.json",8387],12360405:[()=>n.e(8102).then(n.t.bind(n,5679,19)),"~blog/default/blog-tags-erc-721-74f-list.json",5679],"136ee019":[()=>n.e(8638).then(n.t.bind(n,341,19)),"~docs/default/tag-docs-tags-erc-1155-67f.json",341],"14eb3368":[()=>Promise.all([n.e(532),n.e(9817)]).then(n.bind(n,4228)),"@theme/DocCategoryGeneratedIndexPage",4228],"15d749dc":[()=>n.e(4312).then(n.bind(n,415)),"@site/docs/Learning/16_Function.md",415],17896441:[()=>Promise.all([n.e(532),n.e(210),n.e(7918)]).then(n.bind(n,5154)),"@theme/DocItem",5154],"17d4514f":[()=>n.e(2470).then(n.t.bind(n,4277,19)),"~docs/default/tag-docs-tags-pure-2c7.json",4277],"18861e22":[()=>n.e(9881).then(n.t.bind(n,3113,19)),"~blog/default/blog-tags-private-41f.json",3113],"1999680b":[()=>n.e(7982).then(n.t.bind(n,1774,19)),"~blog/default/blog-tags-ft-801-list.json",1774],"1ac03707":[()=>n.e(7844).then(n.bind(n,2615)),"@site/docs/Ethersjs/2_Provider/readme.md",2615],"1bb91c54":[()=>n.e(2111).then(n.bind(n,2421)),"@site/docs/Learning/8_gasAndGasprice.md",2421],"1be78505":[()=>Promise.all([n.e(532),n.e(9514)]).then(n.bind(n,9963)),"@theme/DocPage",9963],"1c1565a1":[()=>n.e(7058).then(n.bind(n,2553)),"@site/docs/Learning/42_VerifyingSignature copy.md",2553],"1e89cfe5":[()=>n.e(4956).then(n.t.bind(n,277,19)),"~docs/default/category-docs-tutorialsidebar-category-learning-solidity-basics-431.json",277],"1f391b9e":[()=>Promise.all([n.e(532),n.e(210),n.e(3085)]).then(n.bind(n,4247)),"@theme/MDXPage",4247],"23b30e01":[()=>n.e(9876).then(n.t.bind(n,4759,19)),"~docs/default/tag-docs-tags-wallet-05c.json",4759],"24169a5a":[()=>n.e(1586).then(n.t.bind(n,7839,19)),"~blog/default/blog-tags-examples-731.json",7839],24826458:[()=>n.e(6926).then(n.bind(n,7056)),"@site/blog/20230812About-safeERC20/2023-8-12-EVM-deep-dive-part1.md",7056],"260e3745":[()=>n.e(3486).then(n.bind(n,7177)),"@site/blog/opcode-basics/2023-1-8-opcode-basics.md",7177],"27268e5a":[()=>n.e(3407).then(n.t.bind(n,2410,19)),"~docs/default/tag-docs-tags-selector-cb7.json",2410],"275ced8b":[()=>n.e(3129).then(n.t.bind(n,8053,19)),"~blog/default/blog-tags-\u30e1\u30bf\u30d0\u30fc\u30b9-7e1-list.json",8053],"2acd60b0":[()=>n.e(5643).then(n.bind(n,4640)),"@site/docs/Learning/2_anEasyApp.md",4640],"2b026185":[()=>n.e(1021).then(n.t.bind(n,7239,19)),"~docs/default/tag-docs-tags-view-69f.json",7239],"2c6587f4":[()=>n.e(8132).then(n.t.bind(n,385,19)),"~docs/default/tag-docs-tags-if-60a.json",385],"2c846f85":[()=>n.e(9027).then(n.t.bind(n,2469,19)),"~blog/default/blog-tags-zero-knwoledge-b5c-list.json",2469],"2cfaf820":[()=>n.e(4046).then(n.t.bind(n,7814,19)),"~blog/default/blog-tags-variable-2aa.json",7814],"2dd7fbaf":[()=>n.e(2601).then(n.t.bind(n,4457,19)),"~blog/default/blog-tags-\u5e0c\u5c11\u6027-13d-list.json",4457],"2e28a2d7":[()=>n.e(232).then(n.t.bind(n,2300,19)),"~blog/default/blog-tags-variable-2aa-list.json",2300],"2eb6c026":[()=>n.e(3304).then(n.t.bind(n,2458,19)),"~blog/default/blog-tags-\u6b74\u53f2-c55-list.json",2458],"2ebf6dbc":[()=>n.e(7467).then(n.bind(n,2840)),"@site/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md?truncated=true",2840],"2f2d8e65":[()=>n.e(673).then(n.t.bind(n,5906,19)),"~docs/default/category-docs-tutorialsidebar-category-learning-ethersjs-d5b.json",5906],"2f664273":[()=>n.e(6317).then(n.t.bind(n,6362,19)),"~docs/default/tag-docs-tags-inheritance-e16.json",6362],"3288d422":[()=>n.e(4226).then(n.t.bind(n,5365,19)),"~docs/default/tag-docs-tags-array-e59.json",5365],"32f7508e":[()=>n.e(1004).then(n.t.bind(n,9943,19)),"~docs/default/tag-docs-tags-payable-8be.json",9943],"35d0a8fc":[()=>n.e(9814).then(n.bind(n,135)),"@site/docs/SolidityAdvanced/2_Multi-SigWallet.md",135],"37178c25":[()=>n.e(9858).then(n.t.bind(n,676,19)),"~blog/default/blog-tags-web-3-e2d-list.json",676],"3720c009":[()=>Promise.all([n.e(532),n.e(3751)]).then(n.bind(n,727)),"@theme/DocTagsListPage",727],"393be207":[()=>n.e(7414).then(n.bind(n,3123)),"@site/src/pages/markdown-page.md",3123],"3bbd1359":[()=>n.e(1860).then(n.t.bind(n,9902,19)),"~docs/default/tag-docs-tags-function-d15.json",9902],"3dfb6993":[()=>n.e(9301).then(n.bind(n,5785)),"@site/docs/Learning/7_EtherAndWei.md",5785],"3e35503e":[()=>n.e(6668).then(n.bind(n,4534)),"@site/docs/Learning/3_dataType.md",4534],"3e57d2bd":[()=>n.e(4803).then(n.t.bind(n,4906,19)),"~blog/default/blog-tags-erc-721-74f.json",4906],"3fb44fd9":[()=>n.e(5472).then(n.t.bind(n,3230,19)),"~docs/default/tag-docs-tags-error-f13.json",3230],"40a6e957":[()=>n.e(6599).then(n.bind(n,6249)),"@site/docs/Learning/41_HashingWIthKeccak256.md",6249],"4320a1cc":[()=>n.e(3459).then(n.bind(n,4531)),"@site/blog/ERC721/2022-12-22-about-private-var.md?truncated=true",4531],"432649bb":[()=>n.e(8206).then(n.t.bind(n,3149,19)),"~docs/default/tag-docs-tags-nft-bdf.json",3149],"432843e9":[()=>n.e(7920).then(n.bind(n,7287)),"@site/docs/Learning/19_Modifier.md",7287],43577586:[()=>n.e(3676).then(n.t.bind(n,2627,19)),"~docs/default/tag-docs-tags-provider-a75.json",2627],"468416a0":[()=>n.e(5614).then(n.t.bind(n,9557,19)),"~blog/default/blog-tags-blockchain-bb4.json",9557],"4858e9bf":[()=>n.e(7134).then(n.bind(n,340)),"@site/blog/ERC1155/2022-12-25-about-private-var.md",340],"4907635a":[()=>n.e(8461).then(n.bind(n,3443)),"@site/docs/Learning/36_TryAndCatch copy.md",3443],49674999:[()=>n.e(7790).then(n.t.bind(n,5745,19)),"/Users/markwu/projects/01realprjects/Omaeno-website/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",5745],"4993c718":[()=>n.e(5930).then(n.bind(n,39)),"@site/blog/Basics/2022-08-28-what-is-Blockchain.md?truncated=true",39],"4d2df3cd":[()=>n.e(4255).then(n.t.bind(n,3403,19)),"~docs/default/tag-docs-tags-fallback-cf3.json",3403],"4d3529d8":[()=>n.e(227).then(n.bind(n,2158)),"@site/docs/Learning/14_Struct.md",2158],"4eb13500":[()=>n.e(7905).then(n.bind(n,8755)),"@site/docs/Learning/17_View_and_pure.md",8755],"4ebd55d8":[()=>n.e(4153).then(n.bind(n,5635)),"@site/blog/Why-crypto-is-the-future/2022-09-20-what-is-Scaricity.md?truncated=true",5635],"4f61f5d8":[()=>n.e(8814).then(n.t.bind(n,1115,19)),"~docs/default/tag-docs-tags-signature-5d4.json",1115],"5053a7ad":[()=>n.e(6028).then(n.t.bind(n,3582,19)),"~blog/default/blog-tags-examples-731-list.json",3582],"50d3efc6":[()=>n.e(9849).then(n.bind(n,797)),"@site/docs/Learning/11_forWhileLoop.md",797],"55960ee5":[()=>n.e(4121).then(n.t.bind(n,8070,19)),"~docs/default/tags-list-current-prop-15a.json",8070],"55e61e05":[()=>n.e(7138).then(n.t.bind(n,2873,19)),"~blog/default/blog-tags-\u30af\u30ea\u30d7\u30c8-104.json",2873],"563f5093":[()=>n.e(8657).then(n.bind(n,3512)),"@site/docs/Learning/18_Error.md",3512],"5676c0f5":[()=>n.e(7651).then(n.bind(n,6453)),"@site/docs/Learning/23_Practice_BuyMeACoffee.md",6453],"57b8c421":[()=>n.e(9167).then(n.t.bind(n,8696,19)),"~docs/default/tag-docs-tags-call-cef.json",8696],"5aa06fa9":[()=>n.e(8587).then(n.bind(n,3581)),"@site/docs/Learning/22_inheritance.md",3581],"5b099ec5":[()=>n.e(3331).then(n.bind(n,7021)),"@site/blog/What-is-Scaricity/2022-09-02-what-is-Scaricity.md?truncated=true",7021],"5dc20450":[()=>n.e(5557).then(n.t.bind(n,63,19)),"~blog/default/blog-tags-solidity-4e4.json",63],"5df4050f":[()=>n.e(8382).then(n.bind(n,805)),"@site/docs/Learning/6_readingAndWriting.md",805],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,6809)),"@generated/docusaurus.config",6809],"646dc189":[()=>n.e(8941).then(n.t.bind(n,9996,19)),"~blog/default/blog-tags-etheruem-119.json",9996],"6875c492":[()=>Promise.all([n.e(532),n.e(210),n.e(2529),n.e(8610)]).then(n.bind(n,1714)),"@theme/BlogTagsPostsPage",1714],"69ee5218":[()=>n.e(8897).then(n.t.bind(n,4593,19)),"~blog/default/blog-tags-scaricity-561.json",4593],"6a3809a9":[()=>n.e(1666).then(n.t.bind(n,6759,19)),"~blog/default/blog-tags-web-3-e2d.json",6759],"6a8f1a1f":[()=>n.e(4322).then(n.t.bind(n,8120,19)),"~docs/default/tag-docs-tags-public-b95.json",8120],"6d2ba282":[()=>n.e(7151).then(n.bind(n,8067)),"@site/docs/Learning/1_helloWorld.md",8067],"6e05f958":[()=>n.e(4051).then(n.bind(n,1540)),"@site/docs/SolidityAdvanced/4_ERC1155.md",1540],"6e0ff711":[()=>n.e(9197).then(n.bind(n,5773)),"@site/docs/Learning/20_Event.md",5773],"701cdc99":[()=>n.e(2158).then(n.t.bind(n,7303,19)),"~blog/default/blog-tags-\u5909\u6570-c74-list.json",7303],"7076c320":[()=>n.e(4666).then(n.bind(n,8806)),"@site/docs/Learning/10_practice.md",8806],"709b3c27":[()=>n.e(3095).then(n.t.bind(n,5774,19)),"~docs/default/tag-docs-tags-mapping-76f.json",5774],"70ad3ff0":[()=>n.e(147).then(n.t.bind(n,3478,19)),"~blog/default/blog-tags-blockchain-bb4-list.json",3478],"728325ff":[()=>n.e(7548).then(n.t.bind(n,5870,19)),"~docs/default/tag-docs-tags-storage-47c.json",5870],"743bb2bb":[()=>n.e(4678).then(n.bind(n,2133)),"@site/docs/Learning/40_ABIdecode.md",2133],"7479bdd6":[()=>n.e(8875).then(n.t.bind(n,3944,19)),"~docs/default/tag-docs-tags-keccak-256-d1c.json",3944],"747f72f9":[()=>n.e(5387).then(n.bind(n,4638)),"@site/docs/Learning/31_Call.md",4638],74883778:[()=>n.e(1870).then(n.t.bind(n,6241,19)),"~docs/default/tag-docs-tags-abiencode-b09.json",6241],"74ae6181":[()=>n.e(3596).then(n.t.bind(n,3835,19)),"~blog/default/blog-tags-solidity-4e4-list.json",3835],"756ebfac":[()=>n.e(7731).then(n.bind(n,2138)),"@site/docs/Learning/32_Delegatecall.md",2138],"77d8dba7":[()=>n.e(7315).then(n.t.bind(n,161,19)),"~blog/default/blog-tags-\u5909\u6570-c74.json",161],"78afc9f1":[()=>n.e(4389).then(n.t.bind(n,3825,19)),"~blog/default/blog-tags-proof-997-list.json",3825],"78bdd589":[()=>n.e(6091).then(n.t.bind(n,9483,19)),"~docs/default/tag-docs-tags-app-88f.json",9483],"7be95dfa":[()=>n.e(2656).then(n.t.bind(n,4337,19)),"~docs/default/tag-docs-tags-interface-23c.json",4337],"7fa48b17":[()=>n.e(4866).then(n.t.bind(n,3174,19)),"~blog/default/blog-tags-ft-801.json",3174],"814f3328":[()=>n.e(2535).then(n.t.bind(n,5641,19)),"~blog/default/blog-post-list-prop-default.json",5641],"819c147e":[()=>n.e(7634).then(n.bind(n,3451)),"@site/docs/Learning/35_ContractThatCreatesOtherContracts.md.md",3451],"82a72cc3":[()=>n.e(3509).then(n.t.bind(n,1995,19)),"~blog/default/blog-tags-\u6b74\u53f2-c55.json",1995],"82fb9343":[()=>n.e(4328).then(n.t.bind(n,1002,19)),"~docs/default/tag-docs-tags-modifier-d33.json",1002],"841abae8":[()=>n.e(9842).then(n.t.bind(n,4838,19)),"~docs/default/tag-docs-tags-optimization-5bf.json",4838],"854ec393":[()=>n.e(2414).then(n.bind(n,7082)),"@site/blog/About-private-var/2022-12-22-about-private-var.md",7082],"85defb23":[()=>n.e(1486).then(n.t.bind(n,2931,19)),"~blog/default/blog-tags-\u672a\u6765-b61.json",2931],"863a2661":[()=>n.e(6458).then(n.t.bind(n,4099,19)),"~docs/default/tag-docs-tags-gas-c04.json",4099],"86a86318":[()=>n.e(9351).then(n.t.bind(n,274,19)),"~blog/default/blog-tags-opcode-a60.json",274],"874b0776":[()=>n.e(2961).then(n.t.bind(n,4810,19)),"~blog/default/blog-tags-\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3-fb0-list.json",4810],"87c240d6":[()=>n.e(4273).then(n.t.bind(n,2487,19)),"~blog/default/blog-tags-hack-683.json",2487],"88564a32":[()=>n.e(6188).then(n.t.bind(n,8228,19)),"~docs/default/tag-docs-tags-import-80f.json",8228],"891410ee":[()=>n.e(6896).then(n.t.bind(n,2902,19)),"~docs/default/tag-docs-tags-multi-sig-3c6.json",2902],"892dd361":[()=>n.e(1936).then(n.t.bind(n,9005,19)),"~docs/default/tag-docs-tags-visibility-861.json",9005],"896cdb01":[()=>n.e(983).then(n.t.bind(n,2505,19)),"~blog/default/blog-tags-checks-effects-interactions-ad1-list.json",2505],"8a38ba2d":[()=>n.e(6431).then(n.t.bind(n,1393,19)),"~docs/default/tag-docs-tags-calldata-e5a.json",1393],"8a44a887":[()=>n.e(7084).then(n.bind(n,1828)),"@site/blog/checks-effects-interactions/2023-1-10-checks-effects-interactions.md?truncated=true",1828],"8d3bf11d":[()=>n.e(6736).then(n.bind(n,3816)),"@site/blog/ERC1155/2022-12-25-about-private-var.md?truncated=true",3816],"8d4690d5":[()=>n.e(9368).then(n.t.bind(n,4467,19)),"~docs/default/tag-docs-tags-verifying-f83.json",4467],"8eb4e46b":[()=>n.e(1).then(n.t.bind(n,2638,19)),"~blog/default/blog-page-2-677.json",2638],"8f80f78b":[()=>n.e(5697).then(n.bind(n,8294)),"@site/docs/Learning/39_ABIencode.md",8294],"8fdee535":[()=>n.e(1033).then(n.bind(n,1550)),"@site/blog/About-private-var/2022-12-22-about-private-var.md?truncated=true",1550],"931d7221":[()=>n.e(9308).then(n.t.bind(n,503,19)),"~blog/default/blog-tags-checks-effects-interactions-ad1.json",503],93262887:[()=>n.e(8920).then(n.t.bind(n,6766,19)),"~docs/default/category-docs-tutorialsidebar-category-learning-advanced-solidity-e18.json",6766],"935f2afb":[()=>n.e(53).then(n.t.bind(n,1109,19)),"~docs/default/version-current-metadata-prop-751.json",1109],"93e9048b":[()=>n.e(6013).then(n.bind(n,8316)),"@site/blog/Zero-knowledge-proofs/2023-1-8-zero-knowledge-by-examples.md?truncated=true",8316],"94ad08a2":[()=>n.e(1256).then(n.t.bind(n,7704,19)),"~docs/default/tag-docs-tags-balance-bcd.json",7704],"97c3cfbc":[()=>n.e(4174).then(n.bind(n,1617)),"@site/docs/Learning/30_Fallback.md",1617],"9908ff51":[()=>n.e(9391).then(n.bind(n,8017)),"@site/docs/Learning/9_ifElse.md",8017],"9aabfc1e":[()=>n.e(5295).then(n.t.bind(n,5503,19)),"~blog/default/blog-tags-proof-997.json",5503],"9aba0b48":[()=>n.e(600).then(n.t.bind(n,8779,19)),"~blog/default/blog-tags-opcode-a60-list.json",8779],"9d3903f1":[()=>n.e(8302).then(n.t.bind(n,4075,19)),"~docs/default/tag-docs-tags-ft-dc7.json",4075],"9e4087bc":[()=>n.e(3608).then(n.bind(n,3169)),"@theme/BlogArchivePage",3169],"9e6f171d":[()=>n.e(824).then(n.bind(n,3097)),"@site/docs/Learning/5_constants&immutable.md",3097],"9f6838dd":[()=>n.e(3675).then(n.bind(n,4274)),"@site/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md",4274],a3122492:[()=>n.e(8025).then(n.bind(n,3282)),"@site/docs/Learning/26_visibility.md",3282],a50d903c:[()=>n.e(3553).then(n.bind(n,7465)),"@site/blog/opcode-basics/2023-1-8-opcode-basics.md?truncated=true",7465],a5b54f23:[()=>n.e(1093).then(n.t.bind(n,7563,19)),"~blog/default/blog-tags-about-182-list.json",7563],a66a5af4:[()=>n.e(2876).then(n.bind(n,4217)),"@site/blog/Basics/2022-08-28-what-is-Blockchain.md",4217],a6aa9e1f:[()=>Promise.all([n.e(532),n.e(210),n.e(2529),n.e(3089)]).then(n.bind(n,46)),"@theme/BlogListPage",46],a7023ddc:[()=>n.e(1713).then(n.t.bind(n,3457,19)),"~blog/default/blog-tags-tags-4c2.json",3457],ab74ec17:[()=>n.e(3826).then(n.t.bind(n,5950,19)),"~docs/default/tag-docs-tags-new-82b.json",5950],ac0209eb:[()=>n.e(341).then(n.bind(n,8809)),"@site/docs/Learning/4_variables.md",8809],aceb3df0:[()=>n.e(9662).then(n.t.bind(n,9597,19)),"~docs/default/tag-docs-tags-while-8ce.json",9597],ad412ab5:[()=>n.e(605).then(n.bind(n,2403)),"@site/docs/SolidityAdvanced/3_ERC721.md",2403],ae025291:[()=>n.e(8280).then(n.bind(n,4226)),"@site/docs/Learning/28_Payable.md",4226],b0a8e85e:[()=>n.e(500).then(n.t.bind(n,1672,19)),"~blog/default/blog-tags-nft-16a.json",1672],b0e1e685:[()=>n.e(6685).then(n.t.bind(n,5219,19)),"~docs/default/tag-docs-tags-basic-dbe.json",5219],b0e208f7:[()=>n.e(1275).then(n.t.bind(n,5353,19)),"~blog/default/blog-tags-foundry-bb3.json",5353],b2b675dd:[()=>n.e(533).then(n.t.bind(n,8446,19)),"~blog/default/blog-c06.json",8446],b2f554cd:[()=>n.e(1477).then(n.t.bind(n,10,19)),"~blog/default/blog-archive-80c.json",10],b37b7b6b:[()=>n.e(7852).then(n.bind(n,2810)),"@site/blog/EVM-deep-dive-part2/2023-5-13-EVM-deep-dive-part2.md",2810],b4bbf0f0:[()=>n.e(7428).then(n.t.bind(n,3518,19)),"~docs/default/tag-docs-tags-practice-4b9.json",3518],b70af43a:[()=>n.e(4371).then(n.t.bind(n,8136,19)),"~docs/default/tag-docs-tags-delegatecall-cee.json",8136],b7ab5e66:[()=>n.e(4184).then(n.t.bind(n,1882,19)),"~blog/default/blog-tags-foundry-bb3-list.json",1882],b7d2e6aa:[()=>n.e(5767).then(n.bind(n,8654)),"@site/docs/Learning/24_shadowing_inheritance.md",8654],b88b9ec7:[()=>n.e(7672).then(n.t.bind(n,9365,19)),"~blog/default/blog-tags-\u5e0c\u5c11\u6027-13d.json",9365],b8aec804:[()=>n.e(4855).then(n.bind(n,6805)),"@site/docs/Learning/12_Mapping.md",6805],b9d78fee:[()=>n.e(4936).then(n.t.bind(n,9721,19)),"~blog/default/blog-tags-scaricity-561-list.json",9721],b9fbb52d:[()=>n.e(6035).then(n.t.bind(n,2396,19)),"~docs/default/tag-docs-tags-transfer-39d.json",2396],ba96a0ce:[()=>n.e(3401).then(n.t.bind(n,6363,19)),"~docs/default/tag-docs-tags-abidecode-3fe.json",6363],bb476d20:[()=>n.e(6305).then(n.bind(n,1430)),"@site/blog/checks-effects-interactions/2023-1-10-checks-effects-interactions.md",1430],bda59083:[()=>n.e(5448).then(n.t.bind(n,7312,19)),"~blog/default/blog-tags-zero-knwoledge-b5c.json",7312],be90a299:[()=>n.e(8609).then(n.t.bind(n,1653,19)),"~docs/default/tag-docs-tags-contract-72d.json",1653],bef4dc57:[()=>n.e(2276).then(n.t.bind(n,7166,19)),"~blog/default/blog-tags-private-41f-list.json",7166],bf04dd58:[()=>n.e(5854).then(n.bind(n,2143)),"@site/docs/Learning/38_Library.md",2143],c2ff29d8:[()=>n.e(5867).then(n.bind(n,4331)),"@site/blog/20230812About-safeERC20/2023-8-12-EVM-deep-dive-part1.md?truncated=true",4331],c4f5d8e4:[()=>Promise.all([n.e(532),n.e(4195)]).then(n.bind(n,3261)),"@site/src/pages/index.js",3261],c57f437d:[()=>n.e(5943).then(n.bind(n,9632)),"@site/docs/Learning/27_Interface.md",9632],c7d7cc8e:[()=>n.e(1279).then(n.t.bind(n,1473,19)),"~docs/default/tag-docs-tags-advanced-solidity-e3f.json",1473],c8afbef5:[()=>n.e(6002).then(n.bind(n,5112)),"@site/docs/SolidityAdvanced/5_Timelock.md",5112],c9751be9:[()=>n.e(7358).then(n.bind(n,7783)),"@site/docs/Ethersjs/1_HelloVitalik/readme.md",7783],c9a6ff27:[()=>n.e(3500).then(n.bind(n,502)),"@site/docs/Learning/37_Import.md",502],c9faf13f:[()=>n.e(8788).then(n.t.bind(n,5111,19)),"~docs/default/tag-docs-tags-catch-0b3.json",5111],cc7e1a12:[()=>n.e(5211).then(n.t.bind(n,8640,19)),"~blog/default/blog-tags-hack-683-list.json",8640],ccc49370:[()=>Promise.all([n.e(532),n.e(210),n.e(2529),n.e(6103)]).then(n.bind(n,5203)),"@theme/BlogPostPage",5203],cd84dc04:[()=>n.e(6150).then(n.bind(n,7308)),"@site/docs/SolidityAdvanced/1_EtherWallet.md",7308],ceb19874:[()=>n.e(8123).then(n.t.bind(n,1238,19)),"~docs/default/tag-docs-tags-variable-070.json",1238],d06ad05f:[()=>Promise.all([n.e(9633),n.e(6720)]).then(n.bind(n,5750)),"@site/src/pages/unitConverter.js",5750],d1124139:[()=>n.e(4740).then(n.bind(n,1941)),"@site/blog/About-this-blog/2022-08-25-why-I-write-about-blockchain.md",1941],d1745e78:[()=>n.e(2049).then(n.t.bind(n,1758,19)),"~blog/default/blog-tags-evm-4da-list.json",1758],d30104b4:[()=>n.e(5602).then(n.t.bind(n,5019,19)),"~blog/default/blog-tags-etheruem-119-list.json",5019],d3d69a16:[()=>n.e(1207).then(n.t.bind(n,5902,19)),"~blog/default/blog-tags-erc-1155-29a.json",5902],d45c9080:[()=>n.e(1044).then(n.t.bind(n,1161,19)),"~docs/default/tag-docs-tags-parents-599.json",1161],d5700ed7:[()=>n.e(3893).then(n.t.bind(n,3769,19)),"/Users/markwu/projects/01realprjects/Omaeno-website/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",3769],d5ec91ef:[()=>n.e(3475).then(n.t.bind(n,1934,19)),"~docs/default/tag-docs-tags-immutable-95e.json",1934],d7e7485b:[()=>n.e(4356).then(n.bind(n,3606)),"@site/blog/What-is-Scaricity/2022-09-02-what-is-Scaricity.md",3606],d8194936:[()=>n.e(723).then(n.t.bind(n,3733,19)),"~docs/default/tag-docs-tags-internal-a26.json",3733],da105351:[()=>n.e(2268).then(n.t.bind(n,90,19)),"~docs/default/tag-docs-tags-event-d52.json",90],da2e6cb4:[()=>n.e(6976).then(n.t.bind(n,8889,19)),"~blog/default/blog-tags-\u672a\u6765-b61-list.json",8889],daeff1de:[()=>n.e(5403).then(n.t.bind(n,248,19)),"~docs/default/tag-docs-tags-ethersjs-108.json",248],db606d00:[()=>n.e(8017).then(n.bind(n,7926)),"@site/docs/Learning/25_callingParentsFunction.md",7926],dbe5121b:[()=>n.e(189).then(n.bind(n,9278)),"@site/docs/Learning/21_constructor.md",9278],df203c0f:[()=>n.e(9924).then(n.bind(n,491)),"@theme/DocTagDocListPage",491],df8adcdb:[()=>n.e(7136).then(n.t.bind(n,4618,19)),"~docs/default/tag-docs-tags-state-variable-633.json",4618],dff87bb1:[()=>n.e(1375).then(n.bind(n,2909)),"@site/blog/Web3-term-dict/2022-09-29-web3-term-dictionary.md",2909],e18f5f60:[()=>n.e(54).then(n.bind(n,9431)),"@site/docs/Learning/29_Sending_Ether.md",9431],e19c9dc9:[()=>n.e(4523).then(n.t.bind(n,2941,19)),"~docs/default/tag-docs-tags-saving-096.json",2941],e34b55c1:[()=>n.e(4521).then(n.t.bind(n,9546,19)),"~docs/default/tag-docs-tags-first-step-e10.json",9546],e3d1366a:[()=>n.e(6947).then(n.t.bind(n,2430,19)),"~docs/default/tag-docs-tags-erc-721-12f.json",2430],e6f98e57:[()=>n.e(597).then(n.t.bind(n,6441,19)),"~docs/default/tag-docs-tags-constant-c0e.json",6441],e96a37fb:[()=>n.e(2341).then(n.t.bind(n,751,19)),"~blog/default/blog-tags-\u30e1\u30bf\u30d0\u30fc\u30b9-7e1.json",751],e9a35c5c:[()=>n.e(6459).then(n.t.bind(n,2725,19)),"~docs/default/tag-docs-tags-struct-1a7.json",2725],ec273f0b:[()=>n.e(3850).then(n.t.bind(n,2298,19)),"~docs/default/tag-docs-tags-library-77d.json",2298],ed14ae38:[()=>n.e(5647).then(n.bind(n,9395)),"@site/blog/About-this-blog/2022-08-25-why-I-write-about-blockchain.md?truncated=true",9395],ede53b45:[()=>n.e(1413).then(n.bind(n,716)),"@site/blog/ERC721/2022-12-22-about-private-var.md",716],ee654af8:[()=>n.e(2286).then(n.t.bind(n,9584,19)),"~docs/default/tag-docs-tags-solidity-85d.json",9584],eef6edac:[()=>n.e(2917).then(n.t.bind(n,2147,19)),"~blog/default/blog-tags-erc-1155-29a-list.json",2147],ef212305:[()=>n.e(3965).then(n.t.bind(n,3057,19)),"~blog/default/blog-tags-about-182.json",3057],efcb0dc9:[()=>n.e(1918).then(n.bind(n,4537)),"@site/docs/Learning/15_Storage, Memory and calldata.md",4537],f17803ce:[()=>n.e(5970).then(n.bind(n,7625)),"@site/docs/Learning/13_array.md",7625],f4319914:[()=>n.e(4105).then(n.t.bind(n,3768,19)),"~blog/default/blog-tags-\u30af\u30ea\u30d7\u30c8-104-list.json",3768],f4cac7cc:[()=>n.e(12).then(n.t.bind(n,688,19)),"~blog/default/blog-tags-\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3-fb0.json",688],f5271a7f:[()=>n.e(6142).then(n.t.bind(n,7882,19)),"~docs/default/tag-docs-tags-ether-810.json",7882],f5757af3:[()=>n.e(5869).then(n.bind(n,3064)),"@site/blog/Zero-knowledge-proofs/2023-1-8-zero-knowledge-by-examples.md",3064],f59241ec:[()=>n.e(2881).then(n.t.bind(n,1791,19)),"~docs/default/tag-docs-tags-try-12f.json",1791],f6d7b0c1:[()=>n.e(1655).then(n.bind(n,6950)),"@site/blog/EVM-deep-dive-part1/2023-2-26-EVM-deep-dive-part1.md?truncated=true",6950],f79d60ad:[()=>n.e(5790).then(n.t.bind(n,5813,19)),"~docs/default/tag-docs-tags-constructor-564.json",5813],f915b62f:[()=>n.e(4984).then(n.bind(n,7027)),"@site/blog/Web3-term-dict/2022-09-29-web3-term-dictionary.md?truncated=true",7027],f926ae80:[()=>n.e(4376).then(n.bind(n,5960)),"@site/docs/Learning/43_GasSaving.md",5960],faa34f10:[()=>n.e(6015).then(n.bind(n,7774)),"@site/blog/Why-crypto-is-the-future/2022-09-20-what-is-Scaricity.md",7774],faa38a69:[()=>n.e(6874).then(n.t.bind(n,4469,19)),"/Users/markwu/projects/01realprjects/Omaeno-website/.docusaurus/docusaurus-plugin-content-blog/default/plugin-route-context-module-100.json",4469],fc6dc057:[()=>n.e(1213).then(n.t.bind(n,9386,19)),"~docs/default/tag-docs-tags-datatype-a31.json",9386],fc6faf0c:[()=>n.e(5314).then(n.bind(n,6699)),"@site/docs/Learning/33_FunctionSelector.md",6699],fed656c0:[()=>n.e(4018).then(n.t.bind(n,8856,19)),"~docs/default/tag-docs-tags-memory-c5f.json",8856]};function c(e){let{error:t,retry:n,pastDelay:a}=e;return t?r.createElement("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},r.createElement("p",null,String(t)),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},"Retry"))):a?r.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},r.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},r.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},r.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),r.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),r.createElement("circle",{cx:"22",cy:"22",r:"8"},r.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null}var u=n(9670),d=n(226);function f(e,t){if("*"===e)return i()({loading:c,loader:()=>n.e(4972).then(n.bind(n,4972)),modules:["@theme/NotFound"],webpack:()=>[4972],render(e,t){const n=e.default;return r.createElement(d.z,{value:{plugin:{name:"native",id:"default"}}},r.createElement(n,t))}});const o=s[e+"-"+t],f={},p=[],g=[],m=(0,u.Z)(o);return Object.entries(m).forEach((e=>{let[t,n]=e;const r=l[n];r&&(f[t]=r[0],p.push(r[1]),g.push(r[2]))})),i().Map({loading:c,loader:f,modules:p,webpack:()=>g,render(t,n){const i=JSON.parse(JSON.stringify(o));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let o=i;const s=n.split(".");s.slice(0,-1).forEach((e=>{o=o[e]})),o[s[s.length-1]]=a}));const s=i.__comp;delete i.__comp;const l=i.__context;return delete i.__context,r.createElement(d.z,{value:l},r.createElement(s,(0,a.Z)({},i,n)))}})}const p=[{path:"/blog",component:f("/blog","ca3"),exact:!0},{path:"/blog/about-scaricity",component:f("/blog/about-scaricity","bfc"),exact:!0},{path:"/blog/about-why-I-write-about",component:f("/blog/about-why-I-write-about","613"),exact:!0},{path:"/blog/archive",component:f("/blog/archive","469"),exact:!0},{path:"/blog/checks-effects-interactions",component:f("/blog/checks-effects-interactions","9df"),exact:!0},{path:"/blog/EVM-deep-dive-part1",component:f("/blog/EVM-deep-dive-part1","518"),exact:!0},{path:"/blog/EVM-deep-dive-part2",component:f("/blog/EVM-deep-dive-part2","421"),exact:!0},{path:"/blog/fundamental-knowledge",component:f("/blog/fundamental-knowledge","1cf"),exact:!0},{path:"/blog/opcode-basics",component:f("/blog/opcode-basics","d98"),exact:!0},{path:"/blog/page/2",component:f("/blog/page/2","ce5"),exact:!0},{path:"/blog/private-variable-in-solidity-with-code-explained",component:f("/blog/private-variable-in-solidity-with-code-explained","983"),exact:!0},{path:"/blog/tags",component:f("/blog/tags","2a6"),exact:!0},{path:"/blog/tags/about",component:f("/blog/tags/about","ee1"),exact:!0},{path:"/blog/tags/blockchain",component:f("/blog/tags/blockchain","eb4"),exact:!0},{path:"/blog/tags/checks-effects-interactions",component:f("/blog/tags/checks-effects-interactions","a54"),exact:!0},{path:"/blog/tags/erc-1155",component:f("/blog/tags/erc-1155","7e2"),exact:!0},{path:"/blog/tags/erc-721",component:f("/blog/tags/erc-721","a25"),exact:!0},{path:"/blog/tags/etheruem",component:f("/blog/tags/etheruem","e96"),exact:!0},{path:"/blog/tags/evm",component:f("/blog/tags/evm","398"),exact:!0},{path:"/blog/tags/examples",component:f("/blog/tags/examples","635"),exact:!0},{path:"/blog/tags/foundry",component:f("/blog/tags/foundry","081"),exact:!0},{path:"/blog/tags/ft",component:f("/blog/tags/ft","920"),exact:!0},{path:"/blog/tags/hack",component:f("/blog/tags/hack","c40"),exact:!0},{path:"/blog/tags/nft",component:f("/blog/tags/nft","2b8"),exact:!0},{path:"/blog/tags/opcode",component:f("/blog/tags/opcode","533"),exact:!0},{path:"/blog/tags/private",component:f("/blog/tags/private","e0c"),exact:!0},{path:"/blog/tags/proof",component:f("/blog/tags/proof","68a"),exact:!0},{path:"/blog/tags/scaricity",component:f("/blog/tags/scaricity","121"),exact:!0},{path:"/blog/tags/solidity",component:f("/blog/tags/solidity","65e"),exact:!0},{path:"/blog/tags/variable",component:f("/blog/tags/variable","862"),exact:!0},{path:"/blog/tags/web-3",component:f("/blog/tags/web-3","2fe"),exact:!0},{path:"/blog/tags/zero-knwoledge",component:f("/blog/tags/zero-knwoledge","81c"),exact:!0},{path:"/blog/tags/\u30af\u30ea\u30d7\u30c8",component:f("/blog/tags/\u30af\u30ea\u30d7\u30c8","ddd"),exact:!0},{path:"/blog/tags/\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3",component:f("/blog/tags/\u30d6\u30ed\u30c3\u30af\u30c1\u30a7\u30fc\u30f3","5be"),exact:!0},{path:"/blog/tags/\u30e1\u30bf\u30d0\u30fc\u30b9",component:f("/blog/tags/\u30e1\u30bf\u30d0\u30fc\u30b9","33c"),exact:!0},{path:"/blog/tags/\u5909\u6570",component:f("/blog/tags/\u5909\u6570","f32"),exact:!0},{path:"/blog/tags/\u5e0c\u5c11\u6027",component:f("/blog/tags/\u5e0c\u5c11\u6027","074"),exact:!0},{path:"/blog/tags/\u672a\u6765",component:f("/blog/tags/\u672a\u6765","bb2"),exact:!0},{path:"/blog/tags/\u6b74\u53f2",component:f("/blog/tags/\u6b74\u53f2","317"),exact:!0},{path:"/blog/web3-term-dictionary",component:f("/blog/web3-term-dictionary","872"),exact:!0},{path:"/blog/what-is-ERC1155-with-code-explained",component:f("/blog/what-is-ERC1155-with-code-explained","57a"),exact:!0},{path:"/blog/what-is-ERC721-and-NFT-with-code-explained",component:f("/blog/what-is-ERC721-and-NFT-with-code-explained","9e9"),exact:!0},{path:"/blog/What-is-SafeERC20",component:f("/blog/What-is-SafeERC20","b48"),exact:!0},{path:"/blog/why-crypto-is-the-future",component:f("/blog/why-crypto-is-the-future","c9c"),exact:!0},{path:"/blog/Zero-knowledge-proofs-explained-by-examples",component:f("/blog/Zero-knowledge-proofs-explained-by-examples","80c"),exact:!0},{path:"/docs/tags",component:f("/docs/tags","aa4"),exact:!0},{path:"/docs/tags/abidecode",component:f("/docs/tags/abidecode","303"),exact:!0},{path:"/docs/tags/abiencode",component:f("/docs/tags/abiencode","b5c"),exact:!0},{path:"/docs/tags/advanced-solidity",component:f("/docs/tags/advanced-solidity","9f0"),exact:!0},{path:"/docs/tags/app",component:f("/docs/tags/app","9ca"),exact:!0},{path:"/docs/tags/array",component:f("/docs/tags/array","eda"),exact:!0},{path:"/docs/tags/balance",component:f("/docs/tags/balance","cf4"),exact:!0},{path:"/docs/tags/basic",component:f("/docs/tags/basic","844"),exact:!0},{path:"/docs/tags/call",component:f("/docs/tags/call","6ef"),exact:!0},{path:"/docs/tags/calldata",component:f("/docs/tags/calldata","3b6"),exact:!0},{path:"/docs/tags/catch",component:f("/docs/tags/catch","3dc"),exact:!0},{path:"/docs/tags/constant",component:f("/docs/tags/constant","bc4"),exact:!0},{path:"/docs/tags/constructor",component:f("/docs/tags/constructor","567"),exact:!0},{path:"/docs/tags/contract",component:f("/docs/tags/contract","aad"),exact:!0},{path:"/docs/tags/datatype",component:f("/docs/tags/datatype","c60"),exact:!0},{path:"/docs/tags/delegatecall",component:f("/docs/tags/delegatecall","f4e"),exact:!0},{path:"/docs/tags/else",component:f("/docs/tags/else","884"),exact:!0},{path:"/docs/tags/erc-1155",component:f("/docs/tags/erc-1155","4f7"),exact:!0},{path:"/docs/tags/erc-721",component:f("/docs/tags/erc-721","65a"),exact:!0},{path:"/docs/tags/error",component:f("/docs/tags/error","28e"),exact:!0},{path:"/docs/tags/ether",component:f("/docs/tags/ether","2f6"),exact:!0},{path:"/docs/tags/ethersjs",component:f("/docs/tags/ethersjs","f05"),exact:!0},{path:"/docs/tags/event",component:f("/docs/tags/event","c9e"),exact:!0},{path:"/docs/tags/fallback",component:f("/docs/tags/fallback","4ef"),exact:!0},{path:"/docs/tags/first-step",component:f("/docs/tags/first-step","4ea"),exact:!0},{path:"/docs/tags/ft",component:f("/docs/tags/ft","6bd"),exact:!0},{path:"/docs/tags/function",component:f("/docs/tags/function","e89"),exact:!0},{path:"/docs/tags/gas",component:f("/docs/tags/gas","c18"),exact:!0},{path:"/docs/tags/if",component:f("/docs/tags/if","fb1"),exact:!0},{path:"/docs/tags/immutable",component:f("/docs/tags/immutable","386"),exact:!0},{path:"/docs/tags/import",component:f("/docs/tags/import","817"),exact:!0},{path:"/docs/tags/inheritance",component:f("/docs/tags/inheritance","4f1"),exact:!0},{path:"/docs/tags/interface",component:f("/docs/tags/interface","6dd"),exact:!0},{path:"/docs/tags/internal",component:f("/docs/tags/internal","860"),exact:!0},{path:"/docs/tags/keccak-256",component:f("/docs/tags/keccak-256","71c"),exact:!0},{path:"/docs/tags/library",component:f("/docs/tags/library","19d"),exact:!0},{path:"/docs/tags/mapping",component:f("/docs/tags/mapping","429"),exact:!0},{path:"/docs/tags/memory",component:f("/docs/tags/memory","d13"),exact:!0},{path:"/docs/tags/modifier",component:f("/docs/tags/modifier","c16"),exact:!0},{path:"/docs/tags/multi-sig",component:f("/docs/tags/multi-sig","b4e"),exact:!0},{path:"/docs/tags/new",component:f("/docs/tags/new","62c"),exact:!0},{path:"/docs/tags/nft",component:f("/docs/tags/nft","2c1"),exact:!0},{path:"/docs/tags/optimization",component:f("/docs/tags/optimization","244"),exact:!0},{path:"/docs/tags/parents",component:f("/docs/tags/parents","e46"),exact:!0},{path:"/docs/tags/payable",component:f("/docs/tags/payable","91d"),exact:!0},{path:"/docs/tags/practice",component:f("/docs/tags/practice","f7c"),exact:!0},{path:"/docs/tags/provider",component:f("/docs/tags/provider","c67"),exact:!0},{path:"/docs/tags/public",component:f("/docs/tags/public","6f1"),exact:!0},{path:"/docs/tags/pure",component:f("/docs/tags/pure","82d"),exact:!0},{path:"/docs/tags/saving",component:f("/docs/tags/saving","60c"),exact:!0},{path:"/docs/tags/selector",component:f("/docs/tags/selector","ffc"),exact:!0},{path:"/docs/tags/send",component:f("/docs/tags/send","418"),exact:!0},{path:"/docs/tags/send-ether",component:f("/docs/tags/send-ether","fe0"),exact:!0},{path:"/docs/tags/signature",component:f("/docs/tags/signature","bc4"),exact:!0},{path:"/docs/tags/solidity",component:f("/docs/tags/solidity","1eb"),exact:!0},{path:"/docs/tags/state-variable",component:f("/docs/tags/state-variable","600"),exact:!0},{path:"/docs/tags/storage",component:f("/docs/tags/storage","b64"),exact:!0},{path:"/docs/tags/struct",component:f("/docs/tags/struct","0e9"),exact:!0},{path:"/docs/tags/transfer",component:f("/docs/tags/transfer","f55"),exact:!0},{path:"/docs/tags/try",component:f("/docs/tags/try","ae4"),exact:!0},{path:"/docs/tags/variable",component:f("/docs/tags/variable","3f5"),exact:!0},{path:"/docs/tags/verifying",component:f("/docs/tags/verifying","fac"),exact:!0},{path:"/docs/tags/view",component:f("/docs/tags/view","660"),exact:!0},{path:"/docs/tags/visibility",component:f("/docs/tags/visibility","72d"),exact:!0},{path:"/docs/tags/wallet",component:f("/docs/tags/wallet","8e8"),exact:!0},{path:"/docs/tags/while",component:f("/docs/tags/while","3bb"),exact:!0},{path:"/markdown-page",component:f("/markdown-page","3cb"),exact:!0},{path:"/my-markdown-page",component:f("/my-markdown-page","524"),exact:!0},{path:"/unitConverter",component:f("/unitConverter","0d7"),exact:!0},{path:"/docs",component:f("/docs","c17"),routes:[{path:"/docs/category/ethersjs",component:f("/docs/category/ethersjs","80f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/category/solidity-advanced",component:f("/docs/category/solidity-advanced","0cc"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/category/solidity-basics",component:f("/docs/category/solidity-basics","ac3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Ethersjs/HelloVitalik",component:f("/docs/Ethersjs/HelloVitalik","553"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Ethersjs/Provider",component:f("/docs/Ethersjs/Provider","5ef"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/intro",component:f("/docs/intro","aed"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/ABIdecode",component:f("/docs/Learning/ABIdecode","2a1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/ABIencode",component:f("/docs/Learning/ABIencode","81f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/anEasyApp",component:f("/docs/Learning/anEasyApp","296"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/array",component:f("/docs/Learning/array","2c9"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Call",component:f("/docs/Learning/Call","236"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/CallingOtherContract copy",component:f("/docs/Learning/CallingOtherContract copy","043"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/callingParentsFunction",component:f("/docs/Learning/callingParentsFunction","315"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/constants&immutable",component:f("/docs/Learning/constants&immutable","58d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/constructor",component:f("/docs/Learning/constructor","6dd"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/ContractThatCreatesOtherContracts.md",component:f("/docs/Learning/ContractThatCreatesOtherContracts.md","660"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/dataType",component:f("/docs/Learning/dataType","e5c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Delegatecall",component:f("/docs/Learning/Delegatecall","176"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Error",component:f("/docs/Learning/Error","f0e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/EtherAndWei",component:f("/docs/Learning/EtherAndWei","cc8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Event",component:f("/docs/Learning/Event","612"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Fallback",component:f("/docs/Learning/Fallback","7ba"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/forWhileLoop",component:f("/docs/Learning/forWhileLoop","5ff"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Function",component:f("/docs/Learning/Function","868"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/FunctionSelector",component:f("/docs/Learning/FunctionSelector","a08"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/gasAndGasprice",component:f("/docs/Learning/gasAndGasprice","e72"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/GasSaving",component:f("/docs/Learning/GasSaving","e3f"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/HashingWIthKeccak256",component:f("/docs/Learning/HashingWIthKeccak256","149"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/helloWorld",component:f("/docs/Learning/helloWorld","8e1"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/ifElse",component:f("/docs/Learning/ifElse","282"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Import",component:f("/docs/Learning/Import","106"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/inheritance",component:f("/docs/Learning/inheritance","3ac"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Interface",component:f("/docs/Learning/Interface","fd5"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Library",component:f("/docs/Learning/Library","8ff"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Mapping",component:f("/docs/Learning/Mapping","f99"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Modifier",component:f("/docs/Learning/Modifier","2e2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Payable",component:f("/docs/Learning/Payable","f68"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/practice",component:f("/docs/Learning/practice","412"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Practice_BuyMeACoffee",component:f("/docs/Learning/Practice_BuyMeACoffee","8f2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/readingAndWriting",component:f("/docs/Learning/readingAndWriting","8e0"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Sending_Ether",component:f("/docs/Learning/Sending_Ether","814"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/shadowing_inheritance",component:f("/docs/Learning/shadowing_inheritance","3f2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Storage, Memory and calldata",component:f("/docs/Learning/Storage, Memory and calldata","73c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/Struct",component:f("/docs/Learning/Struct","32e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/TryAndCatch copy",component:f("/docs/Learning/TryAndCatch copy","d7c"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/variables",component:f("/docs/Learning/variables","7ca"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/VerifyingSignature copy",component:f("/docs/Learning/VerifyingSignature copy","847"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/View_and_pure",component:f("/docs/Learning/View_and_pure","366"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/Learning/visibility",component:f("/docs/Learning/visibility","986"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/SolidityAdvanced/ERC1155",component:f("/docs/SolidityAdvanced/ERC1155","da6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/SolidityAdvanced/ERC721",component:f("/docs/SolidityAdvanced/ERC721","63e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/SolidityAdvanced/EtherWallet",component:f("/docs/SolidityAdvanced/EtherWallet","19e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/SolidityAdvanced/Multi-SigWallet",component:f("/docs/SolidityAdvanced/Multi-SigWallet","c5e"),exact:!0,sidebar:"tutorialSidebar"},{path:"/docs/SolidityAdvanced/Timelock",component:f("/docs/SolidityAdvanced/Timelock","72a"),exact:!0,sidebar:"tutorialSidebar"}]},{path:"/",component:f("/","798"),exact:!0},{path:"*",component:f("*")}]},8965:(e,t,n)=>{var r,a;!function(){var o,i,s,l,c,u,d,f,p,g,m,h,b,v,y,w,_,E,S,k,x,O,C,L,P,T,I=function(e){var t=new I.Builder;return t.pipeline.add(I.trimmer,I.stopWordFilter,I.stemmer),t.searchPipeline.add(I.stemmer),e.call(t,t),t.build()};I.version="2.3.9",I.utils={},I.utils.warn=(o=this,function(e){o.console&&console.warn&&console.warn(e)}),I.utils.asString=function(e){return null==e?"":e.toString()},I.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r0){var l=I.utils.clone(t)||{};l.position=[i,s],l.index=a.length,a.push(new I.Token(n.slice(i,o),l))}i=o+1}}return a},I.tokenizer.separator=/[\s\-]+/,I.Pipeline=function(){this._stack=[]},I.Pipeline.registeredFunctions=Object.create(null),I.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&I.utils.warn("Overwriting existing registered function: "+t),e.label=t,I.Pipeline.registeredFunctions[e.label]=e},I.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||I.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},I.Pipeline.load=function(e){var t=new I.Pipeline;return e.forEach((function(e){var n=I.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},I.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach((function(e){I.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},I.Pipeline.prototype.after=function(e,t){I.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},I.Pipeline.prototype.before=function(e,t){I.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},I.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},I.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(oe&&(n=a),o!=e);)r=n-t,a=t+Math.floor(r/2),o=this.elements[2*a];return o==e||o>e?2*a:os?c+=2:i==s&&(t+=n[l+1]*r[c+1],l+=2,c+=2);return t},I.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},I.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t0){var o,i=a.str.charAt(0);i in a.node.edges?o=a.node.edges[i]:(o=new I.TokenSet,a.node.edges[i]=o),1==a.str.length&&(o.final=!0),r.push({node:o,editsRemaining:a.editsRemaining,str:a.str.slice(1)})}if(0!=a.editsRemaining){if("*"in a.node.edges)var s=a.node.edges["*"];else{s=new I.TokenSet;a.node.edges["*"]=s}if(0==a.str.length&&(s.final=!0),r.push({node:s,editsRemaining:a.editsRemaining-1,str:a.str}),a.str.length>1&&r.push({node:a.node,editsRemaining:a.editsRemaining-1,str:a.str.slice(1)}),1==a.str.length&&(a.node.final=!0),a.str.length>=1){if("*"in a.node.edges)var l=a.node.edges["*"];else{l=new I.TokenSet;a.node.edges["*"]=l}1==a.str.length&&(l.final=!0),r.push({node:l,editsRemaining:a.editsRemaining-1,str:a.str.slice(1)})}if(a.str.length>1){var c,u=a.str.charAt(0),d=a.str.charAt(1);d in a.node.edges?c=a.node.edges[d]:(c=new I.TokenSet,a.node.edges[d]=c),1==a.str.length&&(c.final=!0),r.push({node:c,editsRemaining:a.editsRemaining-1,str:u+a.str.slice(2)})}}}return n},I.TokenSet.fromString=function(e){for(var t=new I.TokenSet,n=t,r=0,a=e.length;r=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},I.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},I.Index.prototype.search=function(e){return this.query((function(t){new I.QueryParser(e,t).parse()}))},I.Index.prototype.query=function(e){for(var t=new I.Query(this.fields),n=Object.create(null),r=Object.create(null),a=Object.create(null),o=Object.create(null),i=Object.create(null),s=0;s1?1:e},I.Builder.prototype.k1=function(e){this._k1=e},I.Builder.prototype.add=function(e,t){var n=e[this._ref],r=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var a=0;a=this.length)return I.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},I.QueryLexer.prototype.width=function(){return this.pos-this.start},I.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},I.QueryLexer.prototype.backup=function(){this.pos-=1},I.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=I.QueryLexer.EOS&&this.backup()},I.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(I.QueryLexer.TERM)),e.ignore(),e.more())return I.QueryLexer.lexText},I.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(I.QueryLexer.EDIT_DISTANCE),I.QueryLexer.lexText},I.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(I.QueryLexer.BOOST),I.QueryLexer.lexText},I.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(I.QueryLexer.TERM)},I.QueryLexer.termSeparator=I.tokenizer.separator,I.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==I.QueryLexer.EOS)return I.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return I.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(I.QueryLexer.TERM),I.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(I.QueryLexer.TERM),I.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(I.QueryLexer.PRESENCE),I.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(I.QueryLexer.PRESENCE),I.QueryLexer.lexText;if(t.match(I.QueryLexer.termSeparator))return I.QueryLexer.lexTerm}else e.escapeCharacter()}},I.QueryParser=function(e,t){this.lexer=new I.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},I.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=I.QueryParser.parseClause;e;)e=e(this);return this.query},I.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},I.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},I.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},I.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case I.QueryLexer.PRESENCE:return I.QueryParser.parsePresence;case I.QueryLexer.FIELD:return I.QueryParser.parseField;case I.QueryLexer.TERM:return I.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new I.QueryParseError(n,t.start,t.end)}},I.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=I.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=I.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new I.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new I.QueryParseError(n,t.start,t.end)}switch(r.type){case I.QueryLexer.FIELD:return I.QueryParser.parseField;case I.QueryLexer.TERM:return I.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new I.QueryParseError(n,r.start,r.end)}}},I.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),r="unrecognised field '"+t.str+"', possible fields: "+n;throw new I.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var a=e.peekLexeme();if(null==a){r="expecting term, found nothing";throw new I.QueryParseError(r,t.start,t.end)}if(a.type===I.QueryLexer.TERM)return I.QueryParser.parseTerm;r="expecting term, found '"+a.type+"'";throw new I.QueryParseError(r,a.start,a.end)}},I.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(null!=n)switch(n.type){case I.QueryLexer.TERM:return e.nextClause(),I.QueryParser.parseTerm;case I.QueryLexer.FIELD:return e.nextClause(),I.QueryParser.parseField;case I.QueryLexer.EDIT_DISTANCE:return I.QueryParser.parseEditDistance;case I.QueryLexer.BOOST:return I.QueryParser.parseBoost;case I.QueryLexer.PRESENCE:return e.nextClause(),I.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new I.QueryParseError(r,n.start,n.end)}else e.nextClause()}},I.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="edit distance must be numeric";throw new I.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var a=e.peekLexeme();if(null!=a)switch(a.type){case I.QueryLexer.TERM:return e.nextClause(),I.QueryParser.parseTerm;case I.QueryLexer.FIELD:return e.nextClause(),I.QueryParser.parseField;case I.QueryLexer.EDIT_DISTANCE:return I.QueryParser.parseEditDistance;case I.QueryLexer.BOOST:return I.QueryParser.parseBoost;case I.QueryLexer.PRESENCE:return e.nextClause(),I.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+a.type+"'";throw new I.QueryParseError(r,a.start,a.end)}else e.nextClause()}},I.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="boost must be numeric";throw new I.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var a=e.peekLexeme();if(null!=a)switch(a.type){case I.QueryLexer.TERM:return e.nextClause(),I.QueryParser.parseTerm;case I.QueryLexer.FIELD:return e.nextClause(),I.QueryParser.parseField;case I.QueryLexer.EDIT_DISTANCE:return I.QueryParser.parseEditDistance;case I.QueryLexer.BOOST:return I.QueryParser.parseBoost;case I.QueryLexer.PRESENCE:return e.nextClause(),I.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+a.type+"'";throw new I.QueryParseError(r,a.start,a.end)}else e.nextClause()}},void 0===(a="function"==typeof(r=function(){return I})?r.call(t,n,t,e):r)||(e.exports=a)}()},8934:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,t:()=>o});var r=n(7294);const a=r.createContext(!1);function o(e){let{children:t}=e;const[n,o]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{o(!0)}),[]),r.createElement(a.Provider,{value:n},t)}},9383:(e,t,n)=>{"use strict";var r=n(7294),a=n(3935),o=n(3727),i=n(405),s=n(412);const l=[n(2497),n(3310),n(8320),n(2295),n(6657)];var c=n(723),u=n(6775),d=n(8790);function f(e){let{children:t}=e;return r.createElement(r.Fragment,null,t)}var p=n(7462),g=n(5742),m=n(2263),h=n(4996),b=n(6668),v=n(1944),y=n(4711),w=n(9727),_=n(3320),E=n(197);function S(){const{i18n:{defaultLocale:e,localeConfigs:t}}=(0,m.Z)(),n=(0,y.l)();return r.createElement(g.Z,null,Object.entries(t).map((e=>{let[t,{htmlLang:a}]=e;return r.createElement("link",{key:t,rel:"alternate",href:n.createUrl({locale:t,fullyQualified:!0}),hrefLang:a})})),r.createElement("link",{rel:"alternate",href:n.createUrl({locale:e,fullyQualified:!0}),hrefLang:"x-default"}))}function k(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,m.Z)(),a=function(){const{siteConfig:{url:e}}=(0,m.Z)(),{pathname:t}=(0,u.TH)();return e+(0,h.Z)(t)}(),o=t?""+n+t:a;return r.createElement(g.Z,null,r.createElement("meta",{property:"og:url",content:o}),r.createElement("link",{rel:"canonical",href:o}))}function x(){const{i18n:{currentLocale:e}}=(0,m.Z)(),{metadata:t,image:n}=(0,b.L)();return r.createElement(r.Fragment,null,r.createElement(g.Z,null,r.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),r.createElement("body",{className:w.h})),n&&r.createElement(v.d,{image:n}),r.createElement(k,null),r.createElement(S,null),r.createElement(E.Z,{tag:_.HX,locale:e}),r.createElement(g.Z,null,t.map(((e,t)=>r.createElement("meta",(0,p.Z)({key:t},e))))))}const O=new Map;function C(e){if(O.has(e.pathname))return{...e,pathname:O.get(e.pathname)};if((0,d.f)(c.Z,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return O.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return O.set(e.pathname,t),{...e,pathname:t}}var L=n(8934),P=n(8940);function T(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{var r,a;const o=null!=(r=null==(a=t.default)?void 0:a[e])?r:t[e];return null==o?void 0:o(...n)}));return()=>a.forEach((e=>null==e?void 0:e()))}const I=function(e){let{children:t,location:n,previousLocation:a}=e;return(0,r.useLayoutEffect)((()=>{a!==n&&(a&&function(e){const{hash:t}=e;if(t){const e=decodeURIComponent(t.substring(1)),n=document.getElementById(e);null==n||n.scrollIntoView()}else window.scrollTo(0,0)}(n),T("onRouteDidUpdate",{previousLocation:a,location:n}))}),[a,n]),t};function A(e){const t=(0,d.f)(c.Z,e);return Promise.all(t.map((e=>null==e.route.component.preload?void 0:e.route.component.preload())))}class N extends r.Component{constructor(e){super(e),this.previousLocation=void 0,this.routeUpdateCleanupCb=void 0,this.previousLocation=null,this.routeUpdateCleanupCb=s.Z.canUseDOM?T("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=T("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),A(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return r.createElement(I,{previousLocation:this.previousLocation,location:t},r.createElement(u.AW,{location:t,render:()=>e}))}}const j=N,R="docusaurus-base-url-issue-banner-container",D="docusaurus-base-url-issue-banner-suggestion-container",M="__DOCUSAURUS_INSERT_BASEURL_BANNER";function F(e){return"\nwindow['"+M+"'] = true;\n\ndocument.addEventListener('DOMContentLoaded', maybeInsertBanner);\n\nfunction maybeInsertBanner() {\n var shouldInsert = window['"+M+"'];\n shouldInsert && insertBanner();\n}\n\nfunction insertBanner() {\n var bannerContainer = document.getElementById('"+R+"');\n if (!bannerContainer) {\n return;\n }\n var bannerHtml = "+JSON.stringify(function(e){return'\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n
\n'}(e)).replace(/{window[M]=!1}),[]),r.createElement(r.Fragment,null,!s.Z.canUseDOM&&r.createElement(g.Z,null,r.createElement("script",null,F(e))),r.createElement("div",{id:R}))}function U(){const{siteConfig:{baseUrl:e,baseUrlIssueBanner:t}}=(0,m.Z)(),{pathname:n}=(0,u.TH)();return t&&n===e?r.createElement(B,null):null}function z(){const{siteConfig:{favicon:e,title:t},i18n:{currentLocale:n,localeConfigs:a}}=(0,m.Z)(),o=(0,h.Z)(e),{htmlLang:i,direction:s}=a[n];return r.createElement(g.Z,null,r.createElement("html",{lang:i,dir:s}),r.createElement("title",null,t),r.createElement("meta",{property:"og:title",content:t}),e&&r.createElement("link",{rel:"icon",href:o}))}var $=n(4763);function H(){const e=(0,d.H)(c.Z),t=(0,u.TH)();return r.createElement($.Z,null,r.createElement(P.M,null,r.createElement(L.t,null,r.createElement(f,null,r.createElement(z,null),r.createElement(x,null),r.createElement(U,null),r.createElement(j,{location:C(t)},e)))))}var V=n(6887);const W=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{var r,a;if("undefined"==typeof document)return void n();const o=document.createElement("link");o.setAttribute("rel","prefetch"),o.setAttribute("href",e),o.onload=()=>t(),o.onerror=()=>n();const i=null!=(r=document.getElementsByTagName("head")[0])?r:null==(a=document.getElementsByName("script")[0])?void 0:a.parentNode;null==i||i.appendChild(o)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var Z=n(9670);const Q=new Set,q=new Set,G=()=>{var e,t;return(null==(e=navigator.connection)?void 0:e.effectiveType.includes("2g"))||(null==(t=navigator.connection)?void 0:t.saveData)},K={prefetch(e){if(!(e=>!G()&&!q.has(e)&&!Q.has(e))(e))return!1;Q.add(e);const t=(0,d.f)(c.Z,e).flatMap((e=>{return t=e.route.path,Object.entries(V).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,Z.Z)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?W(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!G()&&!q.has(e))(e)&&(q.add(e),A(e))},Y=Object.freeze(K);if(s.Z.canUseDOM){window.docusaurus=Y;const e=a.hydrate;A(window.location.pathname).then((()=>{e(r.createElement(i.B6,null,r.createElement(o.VK,null,r.createElement(H,null))),document.getElementById("__docusaurus"))}))}},8940:(e,t,n)=>{"use strict";n.d(t,{_:()=>u,M:()=>d});var r=n(7294),a=n(6809);const o=JSON.parse('{"@cmfcmf/docusaurus-search-local":{"default":{"titleBoost":5,"contentBoost":1,"tagsBoost":3,"parentCategoriesBoost":2,"indexDocSidebarParentCategories":0,"maxSearchResults":8}},"docusaurus-plugin-google-gtag":{"default":{"trackingID":"G-1RJPDZD7CN","anonymizeIP":true,"id":"default"}},"docusaurus-plugin-content-docs":{"default":{"path":"/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/docs","mainDocId":"Learning/helloWorld","docs":[{"id":"Ethersjs/HelloVitalik/readme","path":"/docs/Ethersjs/HelloVitalik/","sidebar":"tutorialSidebar"},{"id":"Ethersjs/Provider/readme","path":"/docs/Ethersjs/Provider/","sidebar":"tutorialSidebar"},{"id":"intro","path":"/docs/intro","sidebar":"tutorialSidebar"},{"id":"Learning/ABIdecode","path":"/docs/Learning/ABIdecode","sidebar":"tutorialSidebar"},{"id":"Learning/ABIencode","path":"/docs/Learning/ABIencode","sidebar":"tutorialSidebar"},{"id":"Learning/anEasyApp","path":"/docs/Learning/anEasyApp","sidebar":"tutorialSidebar"},{"id":"Learning/array","path":"/docs/Learning/array","sidebar":"tutorialSidebar"},{"id":"Learning/Call","path":"/docs/Learning/Call","sidebar":"tutorialSidebar"},{"id":"Learning/CallingOtherContract copy","path":"/docs/Learning/CallingOtherContract copy","sidebar":"tutorialSidebar"},{"id":"Learning/callingParentsFunction","path":"/docs/Learning/callingParentsFunction","sidebar":"tutorialSidebar"},{"id":"Learning/constants&immutable","path":"/docs/Learning/constants&immutable","sidebar":"tutorialSidebar"},{"id":"Learning/constructor","path":"/docs/Learning/constructor","sidebar":"tutorialSidebar"},{"id":"Learning/ContractThatCreatesOtherContracts.md","path":"/docs/Learning/ContractThatCreatesOtherContracts.md","sidebar":"tutorialSidebar"},{"id":"Learning/dataType","path":"/docs/Learning/dataType","sidebar":"tutorialSidebar"},{"id":"Learning/Delegatecall","path":"/docs/Learning/Delegatecall","sidebar":"tutorialSidebar"},{"id":"Learning/Error","path":"/docs/Learning/Error","sidebar":"tutorialSidebar"},{"id":"Learning/EtherAndWei","path":"/docs/Learning/EtherAndWei","sidebar":"tutorialSidebar"},{"id":"Learning/Event","path":"/docs/Learning/Event","sidebar":"tutorialSidebar"},{"id":"Learning/Fallback","path":"/docs/Learning/Fallback","sidebar":"tutorialSidebar"},{"id":"Learning/forWhileLoop","path":"/docs/Learning/forWhileLoop","sidebar":"tutorialSidebar"},{"id":"Learning/Function","path":"/docs/Learning/Function","sidebar":"tutorialSidebar"},{"id":"Learning/FunctionSelector","path":"/docs/Learning/FunctionSelector","sidebar":"tutorialSidebar"},{"id":"Learning/gasAndGasprice","path":"/docs/Learning/gasAndGasprice","sidebar":"tutorialSidebar"},{"id":"Learning/GasSaving","path":"/docs/Learning/GasSaving","sidebar":"tutorialSidebar"},{"id":"Learning/HashingWIthKeccak256","path":"/docs/Learning/HashingWIthKeccak256","sidebar":"tutorialSidebar"},{"id":"Learning/helloWorld","path":"/docs/Learning/helloWorld","sidebar":"tutorialSidebar"},{"id":"Learning/ifElse","path":"/docs/Learning/ifElse","sidebar":"tutorialSidebar"},{"id":"Learning/Import","path":"/docs/Learning/Import","sidebar":"tutorialSidebar"},{"id":"Learning/inheritance","path":"/docs/Learning/inheritance","sidebar":"tutorialSidebar"},{"id":"Learning/Interface","path":"/docs/Learning/Interface","sidebar":"tutorialSidebar"},{"id":"Learning/Library","path":"/docs/Learning/Library","sidebar":"tutorialSidebar"},{"id":"Learning/Mapping","path":"/docs/Learning/Mapping","sidebar":"tutorialSidebar"},{"id":"Learning/Modifier","path":"/docs/Learning/Modifier","sidebar":"tutorialSidebar"},{"id":"Learning/Payable","path":"/docs/Learning/Payable","sidebar":"tutorialSidebar"},{"id":"Learning/practice","path":"/docs/Learning/practice","sidebar":"tutorialSidebar"},{"id":"Learning/Practice_BuyMeACoffee","path":"/docs/Learning/Practice_BuyMeACoffee","sidebar":"tutorialSidebar"},{"id":"Learning/readingAndWriting","path":"/docs/Learning/readingAndWriting","sidebar":"tutorialSidebar"},{"id":"Learning/Sending_Ether","path":"/docs/Learning/Sending_Ether","sidebar":"tutorialSidebar"},{"id":"Learning/shadowing_inheritance","path":"/docs/Learning/shadowing_inheritance","sidebar":"tutorialSidebar"},{"id":"Learning/Storage, Memory and calldata","path":"/docs/Learning/Storage, Memory and calldata","sidebar":"tutorialSidebar"},{"id":"Learning/Struct","path":"/docs/Learning/Struct","sidebar":"tutorialSidebar"},{"id":"Learning/TryAndCatch copy","path":"/docs/Learning/TryAndCatch copy","sidebar":"tutorialSidebar"},{"id":"Learning/variables","path":"/docs/Learning/variables","sidebar":"tutorialSidebar"},{"id":"Learning/VerifyingSignature copy","path":"/docs/Learning/VerifyingSignature copy","sidebar":"tutorialSidebar"},{"id":"Learning/View_and_pure","path":"/docs/Learning/View_and_pure","sidebar":"tutorialSidebar"},{"id":"Learning/visibility","path":"/docs/Learning/visibility","sidebar":"tutorialSidebar"},{"id":"SolidityAdvanced/ERC1155","path":"/docs/SolidityAdvanced/ERC1155","sidebar":"tutorialSidebar"},{"id":"SolidityAdvanced/ERC721","path":"/docs/SolidityAdvanced/ERC721","sidebar":"tutorialSidebar"},{"id":"SolidityAdvanced/EtherWallet","path":"/docs/SolidityAdvanced/EtherWallet","sidebar":"tutorialSidebar"},{"id":"SolidityAdvanced/Multi-SigWallet","path":"/docs/SolidityAdvanced/Multi-SigWallet","sidebar":"tutorialSidebar"},{"id":"SolidityAdvanced/Timelock","path":"/docs/SolidityAdvanced/Timelock","sidebar":"tutorialSidebar"},{"id":"/category/solidity-basics","path":"/docs/category/solidity-basics","sidebar":"tutorialSidebar"},{"id":"/category/solidity-advanced","path":"/docs/category/solidity-advanced","sidebar":"tutorialSidebar"},{"id":"/category/ethersjs","path":"/docs/category/ethersjs","sidebar":"tutorialSidebar"}],"draftIds":[],"sidebars":{"tutorialSidebar":{"link":{"path":"/docs/category/solidity-basics","label":"Solidity Basics"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"ja","locales":["ja","en"],"path":"i18n","currentLocale":"ja","localeConfigs":{"ja":{"label":"\u65e5\u672c\u8a9e","direction":"ltr","htmlLang":"ja","calendar":"gregory","path":"ja"},"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(7529);const l=JSON.parse('{"docusaurusVersion":"2.0.1","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"2.0.1"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"2.0.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"2.0.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"2.0.1"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"2.0.1"},"docusaurus-plugin-google-gtag":{"type":"package","name":"@docusaurus/plugin-google-gtag","version":"2.0.1"},"@cmfcmf/docusaurus-search-local":{"type":"package","name":"@cmfcmf/docusaurus-search-local","version":"0.11.0"}}}'),c={siteConfig:a.default,siteMetadata:l,globalData:o,i18n:i,codeTranslations:s},u=r.createContext(c);function d(e){let{children:t}=e;return r.createElement(u.Provider,{value:c},t)}},4763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(7294),a=n(412),o=n(5742),i=n(5911);function s(e){let{error:t,tryAgain:n}=e;return r.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"50vh",width:"100%",fontSize:"20px"}},r.createElement("h1",null,"This page crashed."),r.createElement("p",null,t.message),r.createElement("button",{type:"button",onClick:n},"Try again"))}function l(e){let{error:t,tryAgain:n}=e;return r.createElement(u,{fallback:()=>r.createElement(s,{error:t,tryAgain:n})},r.createElement(o.Z,null,r.createElement("title",null,"Page Error")),r.createElement(i.Z,null,r.createElement(s,{error:t,tryAgain:n})))}const c=e=>r.createElement(l,e);class u extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){a.Z.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){var n;const e={error:t,tryAgain:()=>this.setState({error:null})};return(null!=(n=this.props.fallback)?n:c)(e)}return null!=e?e:null}}},412:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5742:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),a=n(405);function o(e){return r.createElement(a.ql,e)}},9960:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(7462),a=n(7294),o=n(3727),i=n(8780),s=n(2263),l=n(3919),c=n(412);const u=a.createContext({collectLink:()=>{}});var d=n(4996);function f(e,t){var n,f;let{isNavLink:p,to:g,href:m,activeClassName:h,isActive:b,"data-noBrokenLinkCheck":v,autoAddBaseUrl:y=!0,...w}=e;const{siteConfig:{trailingSlash:_,baseUrl:E}}=(0,s.Z)(),{withBaseUrl:S}=(0,d.C)(),k=(0,a.useContext)(u),x=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,(()=>x.current));const O=g||m;const C=(0,l.Z)(O),L=null==O?void 0:O.replace("pathname://","");let P=void 0!==L?(T=L,y&&(e=>e.startsWith("/"))(T)?S(T):T):void 0;var T;P&&C&&(P=(0,i.applyTrailingSlash)(P,{trailingSlash:_,baseUrl:E}));const I=(0,a.useRef)(!1),A=p?o.OL:o.rU,N=c.Z.canUseIntersectionObserver,j=(0,a.useRef)();(0,a.useEffect)((()=>(!N&&C&&null!=P&&window.docusaurus.prefetch(P),()=>{N&&j.current&&j.current.disconnect()})),[j,P,N,C]);const R=null!=(n=null==(f=P)?void 0:f.startsWith("#"))&&n,D=!P||!C||R;return D||v||k.collectLink(P),D?a.createElement("a",(0,r.Z)({ref:x,href:P},O&&!C&&{target:"_blank",rel:"noopener noreferrer"},w)):a.createElement(A,(0,r.Z)({},w,{onMouseEnter:()=>{I.current||null==P||(window.docusaurus.preload(P),I.current=!0)},innerRef:e=>{x.current=e,N&&e&&C&&(j.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(j.current.unobserve(e),j.current.disconnect(),null!=P&&window.docusaurus.prefetch(P))}))})),j.current.observe(e))},to:P},p&&{isActive:b,activeClassName:h}))}const p=a.forwardRef(f)},5999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l,I:()=>s});var r=n(7294);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=null==t?void 0:t[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var o=n(7529);function i(e){var t,n;let{id:r,message:a}=e;if(void 0===r&&void 0===a)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=o[null!=r?r:a])?n:a)?t:r}function s(e,t){let{message:n,id:r}=e;return a(i({message:n,id:r}),t)}function l(e){let{children:t,id:n,values:o}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const s=i({message:t,id:n});return r.createElement(r.Fragment,null,a(s,o))}},9935:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});const r="default"},3919:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{Z:()=>a,b:()=>r})},4996:(e,t,n)=>{"use strict";n.d(t,{C:()=>o,Z:()=>i});var r=n(2263),a=n(3919);function o(){const{siteConfig:{baseUrl:e,url:t}}=(0,r.Z)();return{withBaseUrl:(n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:o=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,a.b)(n))return n;if(o)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const s=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+s:s}(t,e,n,r)}}function i(e,t){void 0===t&&(t={});const{withBaseUrl:n}=o();return n(e,t)}},2263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),a=n(8940);function o(){return(0,r.useContext)(a._)}},8084:(e,t,n)=>{"use strict";n.d(t,{OD:()=>o,eZ:()=>i});var r=n(2263),a=n(9935);function o(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,r.Z)();return e}()[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}function i(e,t,n){void 0===t&&(t=a.m),void 0===n&&(n={});const r=o(e),i=null==r?void 0:r[t];if(!i&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return i}},2389:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),a=n(8934);function o(){return(0,r.useContext)(a._)}},9670:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});function r(e){const t={};return function e(n,r){Object.entries(n).forEach((n=>{let[a,o]=n;const i=r?r+"."+a:a;var s;"object"==typeof(s=o)&&s&&Object.keys(s).length>0?e(o,i):t[i]=o}))}(e),t}},226:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,z:()=>o});var r=n(7294);const a=r.createContext(null);function o(e){let{children:t,value:n}=e;const o=r.useContext(a),i=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...null==n?void 0:n.data};return{plugin:t.plugin,data:r}}({parent:o,value:n})),[o,n]);return r.createElement(a.Provider,{value:i},t)}},4104:(e,t,n)=>{"use strict";n.d(t,{Iw:()=>m,gA:()=>d,WS:()=>f,_r:()=>c,Jo:()=>h,zh:()=>u,yW:()=>g,gB:()=>p});var r=n(6775),a=n(8084);const o=e=>e.versions.find((e=>e.isLast));function i(e,t){const n=o(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})))}function s(e,t){const n=i(e,t),a=null==n?void 0:n.docs.find((e=>!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:a,alternateDocVersions:a?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(a.id):{}}}const l={},c=()=>{var e;return null!=(e=(0,a.OD)("docusaurus-plugin-content-docs"))?e:l},u=e=>(0,a.eZ)("docusaurus-plugin-content-docs",e,{failfast:!0});function d(e){void 0===e&&(e={});const t=c(),{pathname:n}=(0,r.TH)();return function(e,t,n){void 0===n&&(n={});const a=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((e=>e.path)).join(", "));return o}(t,n,e)}function f(e){void 0===e&&(e={});const t=d(e),{pathname:n}=(0,r.TH)();if(!t)return;return{activePlugin:t,activeVersion:i(t.pluginData,n)}}function p(e){return u(e).versions}function g(e){const t=u(e);return o(t)}function m(e){const t=u(e),{pathname:n}=(0,r.TH)();return s(t,n)}function h(e){const t=u(e),{pathname:n}=(0,r.TH)();return function(e,t){const n=o(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},6657:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={onRouteDidUpdate(e){let{location:t,previousLocation:n}=e;!n||t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash||setTimeout((()=>{window.gtag("event","page_view",{page_title:document.title,page_location:window.location.href,page_path:t.pathname+t.search+t.hash})}))}}},8320:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(4865),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{a().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){a().done()}}},3310:(e,t,n)=>{"use strict";n.r(t);var r=n(7410),a=n(6809);!function(e){const{themeConfig:{prism:t}}=a.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{n(772)("./prism-"+e)})),delete globalThis.Prism}(r.Z)},9471:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294);const a="iconExternalLink_nPIU";function o(e){let{width:t=13.5,height:n=13.5}=e;return r.createElement("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:a},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},5911:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ja});var r=n(7294),a=n(6010),o=n(4763),i=n(1944),s=n(5281),l=n(9727),c=n(5999),u=n(6775),d=n(5936);function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}const p="skipToContent_fXgn";function g(){const{containerRef:e,handleSkip:t}=function(){const e=(0,r.useRef)(null),{action:t}=(0,u.k6)(),n=(0,r.useCallback)((e=>{var t;e.preventDefault();const n=null!=(t=document.querySelector("main:first-of-type"))?t:document.querySelector("."+s.k.wrapper.main);n&&f(n)}),[]);return(0,d.S)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,handleSkip:n}}();return r.createElement("div",{ref:e,role:"region"},r.createElement("a",{href:"#",className:p,onClick:t},r.createElement(c.Z,{id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"},"Skip to main content")))}var m=n(6668),h=n(9689),b=n(7462);function v(e){let{width:t=21,height:n=21,color:a="currentColor",strokeWidth:o=1.2,className:i,...s}=e;return r.createElement("svg",(0,b.Z)({viewBox:"0 0 15 15",width:t,height:n},s),r.createElement("g",{stroke:a,strokeWidth:o},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}const y="announcementBar_mb4j",w="announcementBarPlaceholder_vyr4",_="announcementBarClose_gvF7",E="announcementBarContent_xLdY";function S(){const{isActive:e,close:t}=(0,h.nT)(),{announcementBar:n}=(0,m.L)();if(!e)return null;const{content:o,backgroundColor:i,textColor:s,isCloseable:l}=n;return r.createElement("div",{className:y,style:{backgroundColor:i,color:s},role:"banner"},l&&r.createElement("div",{className:w}),r.createElement("div",{className:E,dangerouslySetInnerHTML:{__html:o}}),l?r.createElement("button",{type:"button",className:(0,a.Z)("clean-btn close",_),onClick:t,"aria-label":(0,c.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},r.createElement(v,{width:14,height:14,strokeWidth:3.1})):null)}var k=n(2961),x=n(2466);var O=n(902),C=n(3102);const L=r.createContext(null);function P(e){let{children:t}=e;const n=function(){const e=(0,k.e)(),t=(0,C.HY)(),[n,a]=(0,r.useState)(!1),o=null!==t.component,i=(0,O.D9)(o);return(0,r.useEffect)((()=>{o&&!i&&a(!0)}),[o,i]),(0,r.useEffect)((()=>{o?e.shown||a(!0):a(!1)}),[e.shown,o]),(0,r.useMemo)((()=>[n,a]),[n])}();return r.createElement(L.Provider,{value:n},t)}function T(e){if(e.component){const t=e.component;return r.createElement(t,e.props)}}function I(){const e=(0,r.useContext)(L);if(!e)throw new O.i6("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,a=(0,r.useCallback)((()=>n(!1)),[n]),o=(0,C.HY)();return(0,r.useMemo)((()=>({shown:t,hide:a,content:T(o)})),[a,o,t])}function A(e){let{header:t,primaryMenu:n,secondaryMenu:o}=e;const{shown:i}=I();return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,a.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":i})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},o)))}var N=n(2949),j=n(2389);function R(e){return r.createElement("svg",(0,b.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function D(e){return r.createElement("svg",(0,b.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}const M={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function F(e){let{className:t,value:n,onChange:o}=e;const i=(0,j.Z)(),s=(0,c.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===n?(0,c.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,c.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,a.Z)(M.toggle,t)},r.createElement("button",{className:(0,a.Z)("clean-btn",M.toggleButton,!i&&M.toggleButtonDisabled),type:"button",onClick:()=>o("dark"===n?"light":"dark"),disabled:!i,title:s,"aria-label":s},r.createElement(R,{className:(0,a.Z)(M.toggleIcon,M.lightToggleIcon)}),r.createElement(D,{className:(0,a.Z)(M.toggleIcon,M.darkToggleIcon)})))}const B=r.memo(F);function U(e){let{className:t}=e;const n=(0,m.L)().colorMode.disableSwitch,{colorMode:a,setColorMode:o}=(0,N.I)();return n?null:r.createElement(B,{className:t,value:a,onChange:o})}var z=n(1327);function $(){return r.createElement(z.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function H(){const e=(0,k.e)();return r.createElement("button",{type:"button",className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle()},r.createElement(v,{color:"var(--ifm-color-emphasis-600)"}))}function V(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement($,null),r.createElement(U,{className:"margin-right--md"}),r.createElement(H,null))}var W=n(9960),Z=n(4996),Q=n(3919);function q(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var G=n(9471);function K(e){let{activeBasePath:t,activeBaseRegex:n,to:a,href:o,label:i,html:s,isDropdownLink:l,prependBaseUrlToHref:c,...u}=e;const d=(0,Z.Z)(a),f=(0,Z.Z)(t),p=(0,Z.Z)(o,{forcePrependBaseUrl:!0}),g=i&&o&&!(0,Q.Z)(o),m=s?{dangerouslySetInnerHTML:{__html:s}}:{children:r.createElement(r.Fragment,null,i,g&&r.createElement(G.Z,l&&{width:12,height:12}))};return o?r.createElement(W.Z,(0,b.Z)({href:c?p:o},u,m)):r.createElement(W.Z,(0,b.Z)({to:d,isNavLink:!0},(t||n)&&{isActive:(e,t)=>n?q(n,t.pathname):t.pathname.startsWith(f)},u,m))}function Y(e){let{className:t,isDropdownItem:n=!1,...o}=e;const i=r.createElement(K,(0,b.Z)({className:(0,a.Z)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n},o));return n?r.createElement("li",null,i):i}function X(e){let{className:t,isDropdownItem:n,...o}=e;return r.createElement("li",{className:"menu__list-item"},r.createElement(K,(0,b.Z)({className:(0,a.Z)("menu__link",t)},o)))}function J(e){var t;let{mobile:n=!1,position:a,...o}=e;const i=n?X:Y;return r.createElement(i,(0,b.Z)({},o,{activeClassName:null!=(t=o.activeClassName)?t:n?"menu__link--active":"navbar__link--active"}))}var ee=n(6043),te=n(8596),ne=n(2263);function re(e,t){return e.some((e=>function(e,t){return!!(0,te.Mg)(e.to,t)||!!q(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function ae(e){var t;let{items:n,position:o,className:i,onClick:s,...l}=e;const c=(0,r.useRef)(null),[u,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{c.current&&!c.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[c]),r.createElement("div",{ref:c,className:(0,a.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":u})},r.createElement(K,(0,b.Z)({"aria-haspopup":"true","aria-expanded":u,role:"button",href:l.to?void 0:"#",className:(0,a.Z)("navbar__link",i)},l,{onClick:l.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!u))}}),null!=(t=l.children)?t:l.label),r.createElement("ul",{className:"dropdown__menu"},n.map(((e,t)=>r.createElement(ga,(0,b.Z)({isDropdownItem:!0,onKeyDown:e=>{if(t===n.length-1&&"Tab"===e.key){e.preventDefault(),d(!1);const t=c.current.nextElementSibling;if(t){(t instanceof HTMLAnchorElement?t:t.querySelector("a")).focus()}}},activeClassName:"dropdown__link--active"},e,{key:t}))))))}function oe(e){var t;let{items:n,className:o,position:i,onClick:s,...l}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,ne.Z)(),{pathname:t}=(0,u.TH)();return t.replace(e,"/")}(),d=re(n,c),{collapsed:f,toggleCollapsed:p,setCollapsed:g}=(0,ee.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&g(!d)}),[c,d,g]),r.createElement("li",{className:(0,a.Z)("menu__list-item",{"menu__list-item--collapsed":f})},r.createElement(K,(0,b.Z)({role:"button",className:(0,a.Z)("menu__link menu__link--sublist menu__link--sublist-caret",o)},l,{onClick:e=>{e.preventDefault(),p()}}),null!=(t=l.children)?t:l.label),r.createElement(ee.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:f},n.map(((e,t)=>r.createElement(ga,(0,b.Z)({mobile:!0,isDropdownItem:!0,onClick:s,activeClassName:"menu__link--active"},e,{key:t}))))))}function ie(e){let{mobile:t=!1,...n}=e;const a=t?oe:ae;return r.createElement(a,n)}var se=n(4711);function le(e){let{width:t=20,height:n=20,...a}=e;return r.createElement("svg",(0,b.Z)({viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0},a),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}const ce="iconLanguage_nlXk";var ue=n(3935);function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pe(e,t,n){var r,a=t.initialState;return{getState:function(){return a},dispatch:function(r,o){var i=function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var tt,nt,rt,at=null,ot=(tt=-1,nt=-1,rt=void 0,function(e){var t=++tt;return Promise.resolve(e).then((function(e){return rt&&t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var ft=/((gt|sm)-|galaxy nexus)|samsung[- ]/i;var pt=["props","refresh","store"],gt=["inputElement","formElement","panelElement"],mt=["inputElement"],ht=["inputElement","maxLength"],bt=["item","source"];function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Et(e){var t=e.props,n=e.refresh,r=e.store,a=_t(e,pt);return{getEnvironmentProps:function(e){var n=e.inputElement,a=e.formElement,o=e.panelElement;function i(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[a,o].some((function(t){return n=t,r=e.target,n===r||n.contains(r);var n,r}))&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return yt({onTouchStart:i,onMouseDown:i,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},_t(e,gt))},getRootProps:function(e){return yt({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-owns":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label")},e)},getFormProps:function(e){e.inputElement;return yt({action:"",noValidate:!0,role:"search",onSubmit:function(o){var i;o.preventDefault(),t.onSubmit(yt({event:o,refresh:n,state:r.getState()},a)),r.dispatch("submit",null),null===(i=e.inputElement)||void 0===i||i.blur()},onReset:function(o){var i;o.preventDefault(),t.onReset(yt({event:o,refresh:n,state:r.getState()},a)),r.dispatch("reset",null),null===(i=e.inputElement)||void 0===i||i.focus()}},_t(e,mt))},getLabelProps:function(e){return yt({htmlFor:"".concat(t.id,"-input"),id:"".concat(t.id,"-label")},e)},getInputProps:function(e){var o;function i(e){(t.openOnFocus||Boolean(r.getState().query))&&it(yt({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},a)),r.dispatch("focus",null)}var s=e||{},l=(s.inputElement,s.maxLength),c=void 0===l?512:l,u=_t(s,ht),d=Ge(r.getState()),f=function(e){return Boolean(e&&e.match(ft))}((null===(o=t.environment.navigator)||void 0===o?void 0:o.userAgent)||""),p=null!=d&&d.itemUrl&&!f?"go":"search";return yt({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?"".concat(t.id,"-item-").concat(r.getState().activeItemId):void 0,"aria-controls":r.getState().isOpen?"".concat(t.id,"-list"):void 0,"aria-labelledby":"".concat(t.id,"-label"),value:r.getState().completion||r.getState().query,id:"".concat(t.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:p,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:c,type:"search",onChange:function(e){it(yt({event:e,props:t,query:e.currentTarget.value.slice(0,c),refresh:n,store:r},a))},onKeyDown:function(e){!function(e){var t=e.event,n=e.props,r=e.refresh,a=e.store,o=dt(e,st);if("ArrowUp"===t.key||"ArrowDown"===t.key){var i=function(){var e=n.environment.document.getElementById("".concat(n.id,"-item-").concat(a.getState().activeItemId));e&&(e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded(!1):e.scrollIntoView(!1))},s=function(){var e=Ge(a.getState());if(null!==a.getState().activeItemId&&e){var n=e.item,i=e.itemInputValue,s=e.itemUrl,l=e.source;l.onActive(ct({event:t,item:n,itemInputValue:i,itemUrl:s,refresh:r,source:l,state:a.getState()},o))}};t.preventDefault(),!1===a.getState().isOpen&&(n.openOnFocus||Boolean(a.getState().query))?it(ct({event:t,props:n,query:a.getState().query,refresh:r,store:a},o)).then((function(){a.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(i,0)})):(a.dispatch(t.key,{}),s(),i())}else if("Escape"===t.key)t.preventDefault(),a.dispatch(t.key,null),a.pendingRequests.cancelAll();else if("Tab"===t.key)a.dispatch("blur",null),a.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===a.getState().activeItemId||a.getState().collections.every((function(e){return 0===e.items.length})))return void(n.debug||a.pendingRequests.cancelAll());t.preventDefault();var l=Ge(a.getState()),c=l.item,u=l.itemInputValue,d=l.itemUrl,f=l.source;if(t.metaKey||t.ctrlKey)void 0!==d&&(f.onSelect(ct({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:a.getState()},o)),n.navigator.navigateNewTab({itemUrl:d,item:c,state:a.getState()}));else if(t.shiftKey)void 0!==d&&(f.onSelect(ct({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:a.getState()},o)),n.navigator.navigateNewWindow({itemUrl:d,item:c,state:a.getState()}));else if(t.altKey);else{if(void 0!==d)return f.onSelect(ct({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:a.getState()},o)),void n.navigator.navigate({itemUrl:d,item:c,state:a.getState()});it(ct({event:t,nextState:{isOpen:!1},props:n,query:u,refresh:r,store:a},o)).then((function(){f.onSelect(ct({event:t,item:c,itemInputValue:u,itemUrl:d,refresh:r,source:f,state:a.getState()},o))}))}}}(yt({event:e,props:t,refresh:n,store:r},a))},onFocus:i,onBlur:_e,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||i(n)}},u)},getPanelProps:function(e){return yt({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){return yt({role:"listbox","aria-labelledby":"".concat(t.id,"-label"),id:"".concat(t.id,"-list")},e)},getItemProps:function(e){var o=e.item,i=e.source,s=_t(e,bt);return yt({id:"".concat(t.id,"-item-").concat(o.__autocomplete_id),role:"option","aria-selected":r.getState().activeItemId===o.__autocomplete_id,onMouseMove:function(e){if(o.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",o.__autocomplete_id);var t=Ge(r.getState());if(null!==r.getState().activeItemId&&t){var i=t.item,s=t.itemInputValue,l=t.itemUrl,c=t.source;c.onActive(yt({event:e,item:i,itemInputValue:s,itemUrl:l,refresh:n,source:c,state:r.getState()},a))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var s=i.getItemInputValue({item:o,state:r.getState()}),l=i.getItemUrl({item:o,state:r.getState()});(l?Promise.resolve():it(yt({event:e,nextState:{isOpen:!1},props:t,query:s,refresh:n,store:r},a))).then((function(){i.onSelect(yt({event:e,item:o,itemInputValue:s,itemUrl:l,refresh:n,source:i,state:r.getState()},a))}))}},s)}}}var St="1.7.2",kt=[{segment:"autocomplete-core",version:St}];function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ot(e){for(var t=1;t=n?null===r?null:0:a}function It(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function At(e){for(var t=1;t0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:we(),plugins:a,initialState:Le({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)}))},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)}))},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),a.forEach((function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)}))},getSources:function(n){return Promise.all([].concat(xe(a.map((function(e){return e.getSources}))),[e.getSources]).filter(Boolean).map((function(e){return ke(e,n)}))).then((function(e){return ge(e)})).then((function(e){return e.map((function(e){return Le(Le({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach((function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)}))},onActive:function(n){e.onActive(n),t.forEach((function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)}))}})}))}))},navigator:Le({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}(e,t),r=pe(jt,n,(function(e){var t=e.prevState,r=e.state;n.onStateChange(Dt({prevState:t,state:r,refresh:i},a))})),a=function(e){var t=e.store;return{setActiveItemId:function(e){t.dispatch("setActiveItemId",e)},setQuery:function(e){t.dispatch("setQuery",e)},setCollections:function(e){var n=0,r=e.map((function(e){return he(he({},e),{},{items:ge(e.items).map((function(e){return he(he({},e),{},{__autocomplete_id:n++})}))})}));t.dispatch("setCollections",r)},setIsOpen:function(e){t.dispatch("setIsOpen",e)},setStatus:function(e){t.dispatch("setStatus",e)},setContext:function(e){t.dispatch("setContext",e)}}}({store:r}),o=Et(Dt({props:n,refresh:i,store:r},a));function i(){return it(Dt({event:new Event("input"),nextState:{isOpen:r.getState().isOpen},props:n,query:r.getState().query,refresh:i,store:r},a))}return n.plugins.forEach((function(e){var n;return null===(n=e.subscribe)||void 0===n?void 0:n.call(e,Dt(Dt({},a),{},{refresh:i,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})}}))})),function(e){var t,n,r=e.metadata,a=e.environment;if(null===(t=a.navigator)||void 0===t||null===(n=t.userAgent)||void 0===n?void 0:n.includes("Algolia Crawler")){var o=a.document.createElement("meta"),i=a.document.querySelector("head");o.name="algolia:metadata",setTimeout((function(){o.content=JSON.stringify(r),i.appendChild(o)}),0)}}({metadata:Lt({plugins:n.plugins,options:e}),environment:n.environment}),Dt(Dt({refresh:i},o),a)}function Bt(e){return{current:e}}function Ut(e,t){var n=void 0;return function(){for(var r=arguments.length,a=new Array(r),o=0;o=5&&((a||!e&&5===r)&&(i.push(r,0,a,n),r=6),e&&(i.push(r,e,0,n),r=6)),a=""},l=0;l"===t?(r=1,a=""):a=t+a[0]:o?t===o?o="":a+=t:'"'===t||"'"===t?o=t:">"===t?(s(),r=1):r&&("="===t?(r=5,n=a,a=""):"/"===t&&(r<5||">"===e[l][c+1])?(s(),3===r&&(i=i[0]),r=i,(i=i[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(s(),r=2):a+=t),3===r&&"!--"===a&&(r=4,i=i[0])}return s(),i}(e)),t),arguments,[])).length>1?t:t[0]}var Vt=function(e){var t=e.environment,n=t.document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("class","aa-SubmitIcon"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("width","20"),n.setAttribute("height","20"),n.setAttribute("fill","currentColor");var r=t.document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d","M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z"),n.appendChild(r),n},Wt=function(e){var t=e.environment,n=t.document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("class","aa-ClearIcon"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("width","18"),n.setAttribute("height","18"),n.setAttribute("fill","currentColor");var r=t.document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d","M5.293 6.707l5.293 5.293-5.293 5.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-5.293-5.293 5.293-5.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z"),n.appendChild(r),n},Zt=function(e){var t=e.environment.document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("class","aa-LoadingIcon"),t.setAttribute("viewBox","0 0 100 100"),t.setAttribute("width","20"),t.setAttribute("height","20"),t.innerHTML='\n \n',t},Qt=["ontouchstart","ontouchend","ontouchmove","ontouchcancel"];function qt(e,t,n){e[t]=null===n?"":"number"!=typeof n?n:n+"px"}function Gt(e){this._listeners[e.type](e)}function Kt(e,t,n){var r,a,o=e[t];if("style"===t)if("string"==typeof n)e.style=n;else if(null===n)e.style="";else for(t in n)o&&n[t]===o[t]||qt(e.style,t,n[t]);else"o"===t[0]&&"n"===t[1]?(r=t!==(t=t.replace(/Capture$/,"")),((a=t.toLowerCase())in e||Qt.includes(a))&&(t=a),t=t.slice(2),e._listeners||(e._listeners={}),e._listeners[t]=n,n?o||e.addEventListener(t,Gt,r):e.removeEventListener(t,Gt,r)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&"download"!==t&&"href"!==t&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function Yt(e){return"onChange"===e?"onInput":e}function Xt(e,t){for(var n in t)Kt(e,Yt(n),t[n])}function Jt(e,t){for(var n in t)"o"===n[0]&&"n"===n[1]||Kt(e,Yt(n),t[n])}var en=["children"];function tn(e){return function(e){if(Array.isArray(e))return nn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return nn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function an(e){return function(t,n){var r=n.children,a=void 0===r?[]:r,o=rn(n,en),i=e.document.createElement(t);return Xt(i,o),i.append.apply(i,tn(a)),i}}var on=["autocompleteScopeApi","environment","classNames","getInputProps","getInputPropsCore","isDetached","state"];function sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function dn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fn(e){for(var t=1;t2&&(i.children=arguments.length>3?mn.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===i[o]&&(i[o]=e.defaultProps[o]);return On(e,i,r,a,null)}function On(e,t,n,r,a){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++bn:a};return null==a&&null!=hn.vnode&&hn.vnode(o),o}function Cn(e){return e.children}function Ln(e,t){this.props=e,this.context=t}function Pn(e,t){if(null==t)return e.__?Pn(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?On(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)){if(p.__=n,p.__b=n.__b+1,null===(f=b[u])||f&&p.key==f.key&&p.type===f.type)b[u]=void 0;else for(d=0;d0&&void 0!==arguments[0]?arguments[0]:[];return{get:function(){return e},add:function(t){var n=e[e.length-1];(null==n?void 0:n.isHighlighted)===t.isHighlighted?e[e.length-1]={value:n.value+t.value,isHighlighted:n.isHighlighted}:e.push(t)}}}(n?[{value:n,isHighlighted:!1}]:[]);return t.forEach((function(e){var t=e.split("__/aa-highlight__");r.add({value:t[0],isHighlighted:!0}),""!==t[1]&&r.add({value:t[1],isHighlighted:!1})})),r.get()}function Gn(e){return function(e){if(Array.isArray(e))return Kn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Kn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Kn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n",""":'"',"'":"'"},er=new RegExp(/\w/i),tr=/&(amp|quot|lt|gt|#39);/g,nr=RegExp(tr.source);function rr(e,t){var n,r,a,o=e[t],i=(null===(n=e[t+1])||void 0===n?void 0:n.isHighlighted)||!0,s=(null===(r=e[t-1])||void 0===r?void 0:r.isHighlighted)||!0;return er.test((a=o.value)&&nr.test(a)?a.replace(tr,(function(e){return Jn[e]})):a)||s!==i?o.isHighlighted:s}function ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function or(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var _r={clearButton:"aa-ClearButton",detachedCancelButton:"aa-DetachedCancelButton",detachedContainer:"aa-DetachedContainer",detachedFormContainer:"aa-DetachedFormContainer",detachedOverlay:"aa-DetachedOverlay",detachedSearchButton:"aa-DetachedSearchButton",detachedSearchButtonIcon:"aa-DetachedSearchButtonIcon",detachedSearchButtonPlaceholder:"aa-DetachedSearchButtonPlaceholder",form:"aa-Form",input:"aa-Input",inputWrapper:"aa-InputWrapper",inputWrapperPrefix:"aa-InputWrapperPrefix",inputWrapperSuffix:"aa-InputWrapperSuffix",item:"aa-Item",label:"aa-Label",list:"aa-List",loadingIndicator:"aa-LoadingIndicator",panel:"aa-Panel",panelLayout:"aa-PanelLayout aa-Panel--scrollable",root:"aa-Autocomplete",source:"aa-Source",sourceFooter:"aa-SourceFooter",sourceHeader:"aa-SourceHeader",sourceNoResults:"aa-SourceNoResults",submitButton:"aa-SubmitButton"},Er=function(e,t){var n=e.children;(0,e.render)(n,t)},Sr={createElement:xn,Fragment:Cn,render:Zn};function kr(e){var t=e.panelPlacement,n=e.container,r=e.form,a=e.environment,o=n.getBoundingClientRect(),i=(a.pageYOffset||a.document.documentElement.scrollTop||a.document.body.scrollTop||0)+o.top+o.height;switch(t){case"start":return{top:i,left:o.left};case"end":return{top:i,right:a.document.documentElement.clientWidth-(o.left+o.width)};case"full-width":return{top:i,left:0,right:0,width:"unset",maxWidth:"unset"};case"input-wrapper-width":var s=r.getBoundingClientRect();return{top:i,left:s.left,right:a.document.documentElement.clientWidth-(s.left+s.width),width:"unset",maxWidth:"unset"};default:throw new Error("[Autocomplete] The `panelPlacement` value ".concat(JSON.stringify(t)," is not valid."))}}function xr(){return xr=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Hr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vr(e){for(var t=1;t0;if(!f.value.core.openOnFocus&&!t.query)return n;var r=Boolean(c.current||f.value.renderer.renderNoResults);return!n&&r||n},__autocomplete_metadata:{userAgents:Pr,options:e}}))})),m=Bt(Vr({collections:[],completion:null,context:{},isOpen:!1,query:"",activeItemId:null,status:"idle"},f.value.core.initialState)),h={getEnvironmentProps:f.value.renderer.getEnvironmentProps,getFormProps:f.value.renderer.getFormProps,getInputProps:f.value.renderer.getInputProps,getItemProps:f.value.renderer.getItemProps,getLabelProps:f.value.renderer.getLabelProps,getListProps:f.value.renderer.getListProps,getPanelProps:f.value.renderer.getPanelProps,getRootProps:f.value.renderer.getRootProps},b={setActiveItemId:g.value.setActiveItemId,setQuery:g.value.setQuery,setCollections:g.value.setCollections,setIsOpen:g.value.setIsOpen,setStatus:g.value.setStatus,setContext:g.value.setContext,refresh:g.value.refresh},v=s((function(){return Ht.bind(f.value.renderer.renderer.createElement)})),y=s((function(){return gn({autocomplete:g.value,autocompleteScopeApi:b,classNames:f.value.renderer.classNames,environment:f.value.core.environment,isDetached:p.value,placeholder:f.value.core.placeholder,propGetters:h,setIsModalOpen:S,state:m.current,translations:f.value.renderer.translations})}));function w(){Xt(y.value.panel,{style:p.value?{}:kr({panelPlacement:f.value.renderer.panelPlacement,container:y.value.root,form:y.value.form,environment:f.value.core.environment})})}function _(e){m.current=e;var t={autocomplete:g.value,autocompleteScopeApi:b,classNames:f.value.renderer.classNames,components:f.value.renderer.components,container:f.value.renderer.container,html:v.value,dom:y.value,panelContainer:p.value?y.value.detachedContainer:f.value.renderer.panelContainer,propGetters:h,state:m.current,renderer:f.value.renderer.renderer},n=!ve(e)&&!c.current&&f.value.renderer.renderNoResults||f.value.renderer.render;!function(e){var t=e.autocomplete,n=e.autocompleteScopeApi,r=e.dom,a=e.propGetters,o=e.state;Jt(r.root,a.getRootProps(Cr({state:o,props:t.getRootProps({})},n))),Jt(r.input,a.getInputProps(Cr({state:o,props:t.getInputProps({inputElement:r.input}),inputElement:r.input},n))),Xt(r.label,{hidden:"stalled"===o.status}),Xt(r.loadingIndicator,{hidden:"stalled"!==o.status}),Xt(r.clearButton,{hidden:!o.query})}(t),function(e,t){var n=t.autocomplete,r=t.autocompleteScopeApi,a=t.classNames,o=t.html,i=t.dom,s=t.panelContainer,l=t.propGetters,c=t.state,u=t.components,d=t.renderer;if(c.isOpen){s.contains(i.panel)||"loading"===c.status||s.appendChild(i.panel),i.panel.classList.toggle("aa-Panel--stalled","stalled"===c.status);var f=c.collections.filter((function(e){var t=e.source,n=e.items;return t.templates.noResults||n.length>0})).map((function(e,t){var i=e.source,s=e.items;return d.createElement("section",{key:t,className:a.source,"data-autocomplete-source-id":i.sourceId},i.templates.header&&d.createElement("div",{className:a.sourceHeader},i.templates.header({components:u,createElement:d.createElement,Fragment:d.Fragment,items:s,source:i,state:c,html:o})),i.templates.noResults&&0===s.length?d.createElement("div",{className:a.sourceNoResults},i.templates.noResults({components:u,createElement:d.createElement,Fragment:d.Fragment,source:i,state:c,html:o})):d.createElement("ul",xr({className:a.list},l.getListProps(Cr({state:c,props:n.getListProps({})},r))),s.map((function(e){var t=n.getItemProps({item:e,source:i});return d.createElement("li",xr({key:t.id,className:a.item},l.getItemProps(Cr({state:c,props:t},r))),i.templates.item({components:u,createElement:d.createElement,Fragment:d.Fragment,item:e,state:c,html:o}))}))),i.templates.footer&&d.createElement("div",{className:a.sourceFooter},i.templates.footer({components:u,createElement:d.createElement,Fragment:d.Fragment,items:s,source:i,state:c,html:o})))})),p=d.createElement(d.Fragment,null,d.createElement("div",{className:a.panelLayout},f),d.createElement("div",{className:"aa-GradientBottom"})),g=f.reduce((function(e,t){return e[t.props["data-autocomplete-source-id"]]=t,e}),{});e(Cr(Cr({children:p,state:c,sections:f,elements:g},d),{},{components:u,html:o},r),i.panel)}else s.contains(i.panel)&&s.removeChild(i.panel)}(n,t)}function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a();var t=f.value.renderer,n=t.components,r=$r(t,zr);u.current=jr(r,f.value.core,{components:Ur(n,(function(e){return!e.value.hasOwnProperty("__autocomplete_componentName")})),initialState:m.current},e),l(),o(),g.value.refresh().then((function(){_(m.current)}))}function S(e){requestAnimationFrame((function(){var t=f.value.core.environment.document.body.contains(y.value.detachedOverlay);e!==t&&(e?(f.value.core.environment.document.body.appendChild(y.value.detachedOverlay),f.value.core.environment.document.body.classList.add("aa-Detached"),y.value.input.focus()):(f.value.core.environment.document.body.removeChild(y.value.detachedOverlay),f.value.core.environment.document.body.classList.remove("aa-Detached"),g.value.setQuery(""),g.value.refresh()))}))}return r((function(){var e=g.value.getEnvironmentProps({formElement:y.value.form,panelElement:y.value.panel,inputElement:y.value.input});return Xt(f.value.core.environment,e),function(){Xt(f.value.core.environment,Object.keys(e).reduce((function(e,t){return Vr(Vr({},e),{},Wr({},t,void 0))}),{}))}})),r((function(){var e=p.value?f.value.core.environment.document.body:f.value.renderer.panelContainer,t=p.value?y.value.detachedOverlay:y.value.panel;return p.value&&m.current.isOpen&&S(!0),_(m.current),function(){e.contains(t)&&e.removeChild(t)}})),r((function(){var e=f.value.renderer.container;return e.appendChild(y.value.root),function(){e.removeChild(y.value.root)}})),r((function(){var e=Ut((function(e){_(e.state)}),0);return d.current=function(t){var n=t.state,r=t.prevState;(p.value&&r.isOpen!==n.isOpen&&S(n.isOpen),p.value||!n.isOpen||r.isOpen||w(),n.query!==r.query)&&f.value.core.environment.document.querySelectorAll(".aa-Panel--scrollable").forEach((function(e){0!==e.scrollTop&&(e.scrollTop=0)}));e({state:n})},function(){d.current=void 0}})),r((function(){var e=Ut((function(){var e=p.value;p.value=f.value.core.environment.matchMedia(f.value.renderer.detachedMediaQuery).matches,e!==p.value?E({}):requestAnimationFrame(w)}),20);return f.value.core.environment.addEventListener("resize",e),function(){f.value.core.environment.removeEventListener("resize",e)}})),r((function(){if(!p.value)return function(){};function e(e){y.value.detachedContainer.classList.toggle("aa-DetachedContainer--modal",e)}function t(t){e(t.matches)}var n=f.value.core.environment.matchMedia(getComputedStyle(f.value.core.environment.document.documentElement).getPropertyValue("--aa-detached-modal-media-query"));e(n.matches);var r=Boolean(n.addEventListener);return r?n.addEventListener("change",t):n.addListener(t),function(){r?n.removeEventListener("change",t):n.removeListener(t)}})),r((function(){return requestAnimationFrame(w),function(){}})),Vr(Vr({},b),{},{update:E,destroy:function(){a()}})}var Qr=n(5742);const qr=n(8965),Gr=qr,Kr=(n(8965),e=>qr.tokenizer(e).map((e=>e.str))),Yr=Gr;var Xr=n(813),Jr=n.n(Xr);function ea(){var e;const t=(0,u.TH)(),n=(0,u.k6)(),{siteConfig:{baseUrl:a}}=(0,ne.Z)(),[o,i]=(0,r.useState)({terms:[],isDocsOrBlog:!1});return(0,r.useEffect)((()=>{var e;if(null==(e=t.state)||!e.cmfcmfhighlight||0===t.state.cmfcmfhighlight.terms.length)return;i(t.state.cmfcmfhighlight);const{cmfcmfhighlight:r,...a}=t.state;n.replace({...t,state:a})}),[null==(e=t.state)?void 0:e.cmfcmfhighlight,n,t]),(0,r.useEffect)((()=>{if(0===o.terms.length)return;const e=o.isDocsOrBlog?document.getElementsByTagName("article")[0]:document.getElementsByTagName("main")[0];if(!e)return;const t=new(Jr())(e),n={ignoreJoiners:!0};return t.mark(o.terms,n),()=>t.unmark(n)}),[o,a]),null}var ta=n(8084),na=n(3320);function ra(e){let{document:t}=e;const[n,r]=t.sectionRoute.split("#");let a=n;return r&&(a+="#"+r),a}const aa={documents:[],index:Yr((function(){this.ref("id"),this.field("title"),this.field("content")}))};const oa=()=>{const e=(0,j.Z)(),[t,n]=(0,r.useState)((()=>!!e&&"dark"===document.documentElement.getAttribute("data-theme")));(0,r.useEffect)((()=>{const e=new MutationObserver((()=>{n("dark"===document.documentElement.getAttribute("data-theme"))}));return e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>e.disconnect()}),[]);const{siteConfig:{baseUrl:a}}=(0,ne.Z)(),{titleBoost:o,contentBoost:i,tagsBoost:s,parentCategoriesBoost:l,indexDocSidebarParentCategories:d,maxSearchResults:f}=(0,ta.eZ)("@cmfcmf/docusaurus-search-local"),p=(0,u.k6)(),{tags:g}=(0,na._q)(),m=(0,r.useRef)(g);(0,r.useEffect)((()=>{m.current=g}),[g]);const h=(0,r.useRef)({}),b=async e=>{const t=h.current[e];switch(null==t?void 0:t.state){case"ready":return t;case void 0:{const t=[];h.current[e]={state:"loading",callbacks:t};const n=await async function(e,t){{let r;try{const n=await fetch(e+"search-index-"+t+".json");if(!n.ok)return aa;r=await n.json()}catch(n){return aa}return{documents:r.documents,index:Yr.Index.load(r.index)}}}(a,e);return t.forEach((e=>e(n))),h.current[e]={state:"ready",...n}}case"loading":return new Promise((e=>{t.callbacks.push(e)}))}},v=(0,c.I)({message:"cmfcmf/d-s-l.searchBar.placeholder",description:"Placeholder shown in the searchbar"}),y=(0,r.useRef)(null),w=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(y.current)return w.current=Zr({container:y.current,placeholder:v,renderer:{createElement:r.createElement,Fragment:r.Fragment},render(e,t){let{children:n}=e;(0,ue.render)(n,t)},navigator:{navigate(e){let{item:t,itemUrl:n}=e;p.push(n,{cmfcmfhighlight:{terms:t.terms,isDocsOrBlog:"docs"===t.document.type||"blog"===t.document.type}})}},detachedMediaQuery:"",defaultActiveItemId:0,translations:{clearButtonTitle:(0,c.I)({message:"cmfcmf/d-s-l.searchBar.clearButtonTitle",description:"Title of the button to clear the current search input"}),detachedCancelButtonText:(0,c.I)({message:"cmfcmf/d-s-l.searchBar.detachedCancelButtonText",description:"Text of the button to close the detached search window"}),submitButtonTitle:(0,c.I)({message:"cmfcmf/d-s-l.searchBar.submitButtonTitle",description:"Title of the button to submit a new search"})},getSources(e){let{query:t}=e;return[{sourceId:"search-results",templates:{item(e){let{item:t}=e;const n=ra(t);return r.createElement("a",{href:n,className:"aa-ItemLink",onClick:e=>{e.preventDefault(),p.push(n,{cmfcmfhighlight:{terms:t.terms,isDocsOrBlog:"docs"===t.document.type||"blog"===t.document.type}})}},r.createElement("div",{className:"aa-ItemContent"},r.createElement("div",{className:"aa-ItemContentBody"},r.createElement("div",{className:"aa-ItemContentTitle"},t.document.sectionTitle),t.document.pageTitle!==t.document.sectionTitle&&r.createElement("div",{className:"aa-ItemContentDescription"},t.document.pageTitle))),r.createElement("div",{className:"aa-ItemActions"},r.createElement("button",{className:"aa-ItemActionButton aa-DesktopOnly aa-ActiveOnly",type:"button",title:"Select"},r.createElement("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor"},r.createElement("path",{d:"M18.984 6.984h2.016v6h-15.188l3.609 3.609-1.406 1.406-6-6 6-6 1.406 1.406-3.609 3.609h13.172v-4.031z"})))))},noResults:()=>r.createElement("div",{className:"aa-ItemContent"},r.createElement("div",{className:"aa-ItemContentBody"},(0,c.I)({message:"cmfcmf/d-s-l.searchBar.noResults",description:"message shown if no results are found"})))},getItemUrl(e){let{item:t}=e;return ra(t)},async getItems(){const e=m.current,n=await Promise.all(e.map((e=>b(e)))),r=Kr(t);return n.flatMap((e=>{let{index:t,documents:n}=e;return t.query((e=>{e.term(r,{fields:["title"],boost:o}),e.term(r,{fields:["title"],boost:o,wildcard:Yr.Query.wildcard.TRAILING}),e.term(r,{fields:["content"],boost:i}),e.term(r,{fields:["content"],boost:i,wildcard:Yr.Query.wildcard.TRAILING}),e.term(r,{fields:["tags"],boost:s}),e.term(r,{fields:["tags"],boost:s,wildcard:Yr.Query.wildcard.TRAILING}),d&&(e.term(r,{fields:["sidebarParentCategories"],boost:l}),e.term(r,{fields:["sidebarParentCategories"],boost:l,wildcard:Yr.Query.wildcard.TRAILING}))})).slice(0,f).map((e=>({document:n.find((t=>t.id.toString()===e.ref)),score:e.score,terms:r})))})).sort(((e,t)=>t.score-e.score)).slice(0,f)}}]}}),()=>{var e;return null==(e=w.current)?void 0:e.destroy()}}),[f]),r.createElement(r.Fragment,null,r.createElement(Qr.Z,null,r.createElement("body",{"data-theme":t?"dark":"light"})),r.createElement(ea,null),r.createElement("div",{className:"dsla-search-wrapper"},r.createElement("div",{className:"dsla-search-field",ref:y,"data-tags":g.join(",")})))},ia="searchBox_ZlJk";function sa(e){let{children:t,className:n}=e;return r.createElement("div",{className:(0,a.Z)(n,ia)},t)}var la=n(4104),ca=n(2802);var ua=n(373);const da=e=>e.docs.find((t=>t.id===e.mainDocId));const fa={default:J,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:a,...o}=e;const{i18n:{currentLocale:i,locales:s,localeConfigs:l}}=(0,ne.Z)(),u=(0,se.l)(),d=[...n,...s.map((e=>{const n="pathname://"+u.createUrl({locale:e,fullyQualified:!1});return{label:l[e].label,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...a],f=t?(0,c.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):l[i].label;return r.createElement(ie,(0,b.Z)({},o,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(le,{className:ce}),f),items:d}))},search:function(e){let{mobile:t,className:n}=e;return t?null:r.createElement(sa,{className:n},r.createElement(oa,null))},dropdown:ie,html:function(e){let{value:t,className:n,mobile:o=!1,isDropdownItem:i=!1}=e;const s=i?"li":"div";return r.createElement(s,{className:(0,a.Z)({navbar__item:!o&&!i,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:a,...o}=e;const{activeDoc:i}=(0,la.Iw)(a),s=(0,ca.vY)(t,a);return null===s?null:r.createElement(J,(0,b.Z)({exact:!0},o,{isActive:()=>(null==i?void 0:i.path)===s.path||!(null==i||!i.sidebar)&&i.sidebar===s.sidebar,label:null!=n?n:s.id,to:s.path}))},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:a,...o}=e;const{activeDoc:i}=(0,la.Iw)(a),s=(0,ca.oz)(t,a).link;if(!s)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return r.createElement(J,(0,b.Z)({exact:!0},o,{isActive:()=>(null==i?void 0:i.sidebar)===t,label:null!=n?n:s.label,to:s.path}))},docsVersion:function(e){let{label:t,to:n,docsPluginId:a,...o}=e;const i=(0,ca.lO)(a)[0],s=null!=t?t:i.label,l=null!=n?n:(e=>e.docs.find((t=>t.id===e.mainDocId)))(i).path;return r.createElement(J,(0,b.Z)({},o,{label:s,to:l}))},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:a,dropdownItemsBefore:o,dropdownItemsAfter:i,...s}=e;const l=(0,la.Iw)(n),u=(0,la.gB)(n),{savePreferredVersionName:d}=(0,ua.J)(n),f=u.map((e=>{var t;const n=null!=(t=l.alternateDocVersions[e.name])?t:da(e);return{label:e.label,to:n.path,isActive:()=>e===l.activeVersion,onClick:()=>d(e.name)}})),p=[...o,...f,...i],g=(0,ca.lO)(n)[0],m=t&&p.length>1?(0,c.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,h=t&&p.length>1?void 0:da(g).path;return p.length<=1?r.createElement(J,(0,b.Z)({},s,{mobile:t,label:m,to:h,isActive:a?()=>!1:void 0})):r.createElement(ie,(0,b.Z)({},s,{mobile:t,label:m,to:h,items:p,isActive:a?()=>!1:void 0}))}},pa=fa;function ga(e){let{type:t,...n}=e;const a=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=pa[a];if(!o)throw new Error('No NavbarItem component found for type "'+t+'".');return r.createElement(o,n)}function ma(){const e=(0,k.e)(),t=(0,m.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map(((t,n)=>r.createElement(ga,(0,b.Z)({mobile:!0},t,{onClick:()=>e.toggle(),key:n})))))}function ha(e){return r.createElement("button",(0,b.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(c.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function ba(){const e=0===(0,m.L)().navbar.items.length,t=I();return r.createElement(r.Fragment,null,!e&&r.createElement(ha,{onClick:()=>t.hide()}),t.content)}function va(){const e=(0,k.e)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?r.createElement(A,{header:r.createElement(V,null),primaryMenu:r.createElement(ma,null),secondaryMenu:r.createElement(ba,null)}):null}const ya="navbarHideable_m1mJ",wa="navbarHidden_jGov";function _a(e){return r.createElement("div",(0,b.Z)({role:"presentation"},e,{className:(0,a.Z)("navbar-sidebar__backdrop",e.className)}))}function Ea(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:o}}=(0,m.L)(),i=(0,k.e)(),{navbarRef:s,isNavbarVisible:l}=function(e){const[t,n]=(0,r.useState)(e),a=(0,r.useRef)(!1),o=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(o.current=e.getBoundingClientRect().height)}),[]);return(0,x.RF)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i=s?n(!1):i+c{if(e)return t.location.hash?(a.current=!0,void n(!1)):void n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return r.createElement("nav",{ref:s,className:(0,a.Z)("navbar","navbar--fixed-top",n&&[ya,!l&&wa],{"navbar--dark":"dark"===o,"navbar--primary":"primary"===o,"navbar-sidebar--show":i.shown})},t,r.createElement(_a,{onClick:i.toggle}),r.createElement(va,null))}function Sa(e){let{width:t=30,height:n=30,className:a,...o}=e;return r.createElement("svg",(0,b.Z)({className:a,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true"},o),r.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))}function ka(){const e=(0,k.e)();return r.createElement("button",{onClick:e.toggle,onKeyDown:e.toggle,"aria-label":"Navigation bar toggle",className:"navbar__toggle clean-btn",type:"button",tabIndex:0},r.createElement(Sa,null))}const xa="colorModeToggle_DEke";function Oa(e){let{items:t}=e;return r.createElement(r.Fragment,null,t.map(((e,t)=>r.createElement(ga,(0,b.Z)({},e,{key:t})))))}function Ca(e){let{left:t,right:n}=e;return r.createElement("div",{className:"navbar__inner"},r.createElement("div",{className:"navbar__items"},t),r.createElement("div",{className:"navbar__items navbar__items--right"},n))}function La(){const e=(0,k.e)(),t=(0,m.L)().navbar.items,[n,a]=function(e){function t(e){var t;return"left"===(null!=(t=e.position)?t:"right")}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return r.createElement(Ca,{left:r.createElement(r.Fragment,null,!e.disabled&&r.createElement(ka,null),r.createElement($,null),r.createElement(Oa,{items:n})),right:r.createElement(r.Fragment,null,r.createElement(Oa,{items:a}),r.createElement(U,{className:xa}),!o&&r.createElement(sa,null,r.createElement(oa,null)))})}function Pa(){return r.createElement(Ea,null,r.createElement(La,null))}function Ta(e){let{item:t}=e;const{to:n,href:a,label:o,prependBaseUrlToHref:i,...s}=t,l=(0,Z.Z)(n),c=(0,Z.Z)(a,{forcePrependBaseUrl:!0});return r.createElement(W.Z,(0,b.Z)({className:"footer__link-item"},a?{href:i?c:a}:{to:l},s),o,a&&!(0,Q.Z)(a)&&r.createElement(G.Z,null))}function Ia(e){var t;let{item:n}=e;return n.html?r.createElement("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:n.html}}):r.createElement("li",{key:null!=(t=n.href)?t:n.to,className:"footer__item"},r.createElement(Ta,{item:n}))}function Aa(e){let{column:t}=e;return r.createElement("div",{className:"col footer__col"},r.createElement("div",{className:"footer__title"},t.title),r.createElement("ul",{className:"footer__items clean-list"},t.items.map(((e,t)=>r.createElement(Ia,{key:t,item:e})))))}function Na(e){let{columns:t}=e;return r.createElement("div",{className:"row footer__links"},t.map(((e,t)=>r.createElement(Aa,{key:t,column:e}))))}function ja(){return r.createElement("span",{className:"footer__link-separator"},"\xb7")}function Ra(e){let{item:t}=e;return t.html?r.createElement("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):r.createElement(Ta,{item:t})}function Da(e){let{links:t}=e;return r.createElement("div",{className:"footer__links text--center"},r.createElement("div",{className:"footer__links"},t.map(((e,n)=>r.createElement(r.Fragment,{key:n},r.createElement(Ra,{item:e}),t.length!==n+1&&r.createElement(ja,null))))))}function Ma(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?r.createElement(Na,{columns:t}):r.createElement(Da,{links:t})}var Fa=n(941);const Ba="footerLogoLink_BH7S";function Ua(e){var t;let{logo:n}=e;const{withBaseUrl:o}=(0,Z.C)(),i={light:o(n.src),dark:o(null!=(t=n.srcDark)?t:n.src)};return r.createElement(Fa.Z,{className:(0,a.Z)("footer__logo",n.className),alt:n.alt,sources:i,width:n.width,height:n.height,style:n.style})}function za(e){let{logo:t}=e;return t.href?r.createElement(W.Z,{href:t.href,className:Ba,target:t.target},r.createElement(Ua,{logo:t})):r.createElement(Ua,{logo:t})}function $a(e){let{copyright:t}=e;return r.createElement("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function Ha(e){let{style:t,links:n,logo:o,copyright:i}=e;return r.createElement("footer",{className:(0,a.Z)("footer",{"footer--dark":"dark"===t})},r.createElement("div",{className:"container container-fluid"},n,(o||i)&&r.createElement("div",{className:"footer__bottom text--center"},o&&r.createElement("div",{className:"margin-bottom--sm"},o),i)))}function Va(){const{footer:e}=(0,m.L)();if(!e)return null;const{copyright:t,links:n,logo:a,style:o}=e;return r.createElement(Ha,{style:o,links:n&&n.length>0&&r.createElement(Ma,{links:n}),logo:a&&r.createElement(za,{logo:a}),copyright:t&&r.createElement($a,{copyright:t})})}const Wa=r.memo(Va);var Za=n(12);const Qa="docusaurus.tab.",qa=r.createContext(void 0);const Ga=(0,O.Qc)([N.S,h.pl,function(e){let{children:t}=e;const n=function(){const[e,t]=(0,r.useState)({}),n=(0,r.useCallback)(((e,t)=>{(0,Za.W)("docusaurus.tab."+e).set(t)}),[]);(0,r.useEffect)((()=>{try{const e={};(0,Za._)().forEach((t=>{if(t.startsWith(Qa)){const n=t.substring(Qa.length);e[n]=(0,Za.W)(t).get()}})),t(e)}catch(e){console.error(e)}}),[]);const a=(0,r.useCallback)(((e,r)=>{t((t=>({...t,[e]:r}))),n(e,r)}),[n]);return(0,r.useMemo)((()=>({tabGroupChoices:e,setTabGroupChoices:a})),[e,a])}();return r.createElement(qa.Provider,{value:n},t)},x.OC,ua.L5,i.VC,function(e){let{children:t}=e;return r.createElement(C.n2,null,r.createElement(k.M,null,r.createElement(P,null,t)))}]);function Ka(e){let{children:t}=e;return r.createElement(Ga,null,t)}function Ya(e){let{error:t,tryAgain:n}=e;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(c.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},r.createElement(c.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again when the page crashed"},"Try again"))))))}const Xa="mainWrapper_z2l0";function Ja(e){const{children:t,noFooter:n,wrapperClassName:c,title:u,description:d}=e;return(0,l.t)(),r.createElement(Ka,null,r.createElement(i.d,{title:u,description:d}),r.createElement(g,null),r.createElement(S,null),r.createElement(Pa,null),r.createElement("div",{className:(0,a.Z)(s.k.wrapper.main,Xa,c)},r.createElement(o.Z,{fallback:e=>r.createElement(Ya,e)},t)),!n&&r.createElement(Wa,null))}},1327:(e,t,n)=>{"use strict";n.d(t,{Z:()=>d});var r=n(7462),a=n(7294),o=n(9960),i=n(4996),s=n(2263),l=n(6668),c=n(941);function u(e){let{logo:t,alt:n,imageClassName:r}=e;const o={light:(0,i.Z)(t.src),dark:(0,i.Z)(t.srcDark||t.src)},s=a.createElement(c.Z,{className:t.className,sources:o,height:t.height,width:t.width,alt:n,style:t.style});return r?a.createElement("div",{className:r},s):s}function d(e){var t;const{siteConfig:{title:n}}=(0,s.Z)(),{navbar:{title:c,logo:d}}=(0,l.L)(),{imageClassName:f,titleClassName:p,...g}=e,m=(0,i.Z)((null==d?void 0:d.href)||"/"),h=c?"":n,b=null!=(t=null==d?void 0:d.alt)?t:h;return a.createElement(o.Z,(0,r.Z)({to:m},g,(null==d?void 0:d.target)&&{target:d.target}),d&&a.createElement(u,{logo:d,alt:b,imageClassName:f}),null!=c&&a.createElement("b",{className:p},c))}},197:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),a=n(5742);function o(e){let{locale:t,version:n,tag:o}=e;const i=t;return r.createElement(a.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),o&&r.createElement("meta",{name:"docusaurus_tag",content:o}),i&&r.createElement("meta",{name:"docsearch:language",content:i}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),o&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:o}))}},941:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(7462),a=n(7294),o=n(6010),i=n(2389),s=n(2949);const l={themedImage:"themedImage_ToTc","themedImage--light":"themedImage--light_HNdA","themedImage--dark":"themedImage--dark_i4oU"};function c(e){const t=(0,i.Z)(),{colorMode:n}=(0,s.I)(),{sources:c,className:u,alt:d,...f}=e,p=t?"dark"===n?["dark"]:["light"]:["light","dark"];return a.createElement(a.Fragment,null,p.map((e=>a.createElement("img",(0,r.Z)({key:e,src:c[e],alt:d,className:(0,o.Z)(l.themedImage,l["themedImage--"+e],u)},f)))))}},6043:(e,t,n)=>{"use strict";n.d(t,{u:()=>i,z:()=>g});var r=n(7462),a=n(7294),o=n(412);function i(e){let{initialState:t}=e;const[n,r]=(0,a.useState)(null!=t&&t),o=(0,a.useCallback)((()=>{r((e=>!e))}),[]);return{collapsed:n,setCollapsed:r,toggleCollapsed:o}}const s={display:"none",overflow:"hidden",height:"0px"},l={display:"block",overflow:"visible",height:"auto"};function c(e,t){const n=t?s:l;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function u(e){let{collapsibleRef:t,collapsed:n,animation:r}=e;const o=(0,a.useRef)(!1);(0,a.useEffect)((()=>{const e=t.current;function a(){var t,n;const a=e.scrollHeight,o=null!=(t=null==r?void 0:r.duration)?t:function(e){const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(a);return{transition:"height "+o+"ms "+(null!=(n=null==r?void 0:r.easing)?n:"ease-in-out"),height:a+"px"}}function i(){const t=a();e.style.transition=t.transition,e.style.height=t.height}if(!o.current)return c(e,n),void(o.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(i(),requestAnimationFrame((()=>{e.style.height=s.height,e.style.overflow=s.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{i()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,r])}function d(e){if(!o.Z.canUseDOM)return e?s:l}function f(e){let{as:t="div",collapsed:n,children:r,animation:o,onCollapseTransitionEnd:i,className:s,disableSSRStyle:l}=e;const f=(0,a.useRef)(null);return u({collapsibleRef:f,collapsed:n,animation:o}),a.createElement(t,{ref:f,style:l?void 0:d(n),onTransitionEnd:e=>{"height"===e.propertyName&&(c(f.current,n),null==i||i(n))},className:s},r)}function p(e){let{collapsed:t,...n}=e;const[o,i]=(0,a.useState)(!t),[s,l]=(0,a.useState)(t);return(0,a.useLayoutEffect)((()=>{t||i(!0)}),[t]),(0,a.useLayoutEffect)((()=>{o&&l(t)}),[o,t]),o?a.createElement(f,(0,r.Z)({},n,{collapsed:s})):null}function g(e){let{lazy:t,...n}=e;const r=t?p:f;return a.createElement(r,n)}},9689:(e,t,n)=>{"use strict";n.d(t,{nT:()=>g,pl:()=>p});var r=n(7294),a=n(2389),o=n(12),i=n(902),s=n(6668);const l=(0,o.W)("docusaurus.announcement.dismiss"),c=(0,o.W)("docusaurus.announcement.id"),u=()=>"true"===l.get(),d=e=>l.set(String(e)),f=r.createContext(null);function p(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,s.L)(),t=(0,a.Z)(),[n,o]=(0,r.useState)((()=>!!t&&u()));(0,r.useEffect)((()=>{o(u())}),[]);const i=(0,r.useCallback)((()=>{d(!0),o(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=c.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;c.set(t),r&&d(!1),!r&&u()||o(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return r.createElement(f.Provider,{value:n},t)}function g(){const e=(0,r.useContext)(f);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},2949:(e,t,n)=>{"use strict";n.d(t,{I:()=>h,S:()=>m});var r=n(7294),a=n(412),o=n(902),i=n(12),s=n(6668);const l=r.createContext(void 0),c="theme",u=(0,i.W)(c),d="light",f="dark",p=e=>e===f?f:d;function g(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,s.L)(),[o,i]=(0,r.useState)((e=>a.Z.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e))(e));(0,r.useEffect)((()=>{t&&u.del()}),[t]);const l=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:a=!0}=r;t?(i(t),a&&(e=>{u.set(p(e))})(t)):(i(n?window.matchMedia("(prefers-color-scheme: dark)").matches?f:d:e),u.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",p(o))}),[o]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==c)return;const t=u.get();null!==t&&l(p(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,l]);const g=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||g.current?g.current=window.matchMedia("print").matches:l(null)};return e.addListener(r),()=>e.removeListener(r)}),[l,t,n]),(0,r.useMemo)((()=>({colorMode:o,setColorMode:l,get isDarkTheme(){return o===f},setLightTheme(){l(d)},setDarkTheme(){l(f)}})),[o,l])}function m(e){let{children:t}=e;const n=g();return r.createElement(l.Provider,{value:n},t)}function h(){const e=(0,r.useContext)(l);if(null==e)throw new o.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},373:(e,t,n)=>{"use strict";n.d(t,{J:()=>y,L5:()=>b,Oh:()=>w});var r=n(7294),a=n(4104),o=n(9935),i=n(6668),s=n(2802),l=n(902),c=n(12);const u=e=>"docs-preferred-version-"+e,d=(e,t,n)=>{(0,c.W)(u(e),{persistence:t}).set(n)},f=(e,t)=>(0,c.W)(u(e),{persistence:t}).get(),p=(e,t)=>{(0,c.W)(u(e),{persistence:t}).del()};const g=r.createContext(null);function m(){const e=(0,a._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[o,s]=(0,r.useState)((()=>(e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}]))))(n)));(0,r.useEffect)((()=>{s(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function a(e){const t=f(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(p(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,a(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[o,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d(e,t,n),s((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function h(e){let{children:t}=e;const n=m();return r.createElement(g.Provider,{value:n},t)}function b(e){let{children:t}=e;return s.cE?r.createElement(h,null,t):r.createElement(r.Fragment,null,t)}function v(){const e=(0,r.useContext)(g);if(!e)throw new l.i6("DocsPreferredVersionContextProvider");return e}function y(e){var t;void 0===e&&(e=o.m);const n=(0,a.zh)(e),[i,s]=v(),{preferredVersionName:l}=i[e];return{preferredVersion:null!=(t=n.versions.find((e=>e.name===l)))?t:null,savePreferredVersionName:(0,r.useCallback)((t=>{s.savePreferredVersion(e,t)}),[s,e])}}function w(){const e=(0,a._r)(),[t]=v();function n(n){var r;const a=e[n],{preferredVersionName:o}=t[n];return null!=(r=a.versions.find((e=>e.name===o)))?r:null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},1116:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,b:()=>s});var r=n(7294),a=n(902);const o=Symbol("EmptyContext"),i=r.createContext(o);function s(e){let{children:t,name:n,items:a}=e;const o=(0,r.useMemo)((()=>n&&a?{name:n,items:a}:null),[n,a]);return r.createElement(i.Provider,{value:o},t)}function l(){const e=(0,r.useContext)(i);if(e===o)throw new a.i6("DocsSidebarProvider");return e}},4477:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,q:()=>i});var r=n(7294),a=n(902);const o=r.createContext(null);function i(e){let{children:t,version:n}=e;return r.createElement(o.Provider,{value:n},t)}function s(){const e=(0,r.useContext)(o);if(null===e)throw new a.i6("DocsVersionProvider");return e}},2961:(e,t,n)=>{"use strict";n.d(t,{M:()=>f,e:()=>p});var r=n(7294),a=n(3102),o=n(7524),i=n(6775),s=n(902);function l(e){!function(e){const t=(0,i.k6)(),n=(0,s.zX)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}var c=n(6668);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,a.HY)(),{items:t}=(0,c.L)().navbar;return 0===t.length&&!e.component}(),t=(0,o.i)(),n=!e&&"mobile"===t,[i,s]=(0,r.useState)(!1);l((()=>{if(i)return s(!1),!1}));const u=(0,r.useCallback)((()=>{s((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&s(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:i})),[e,n,u,i])}function f(e){let{children:t}=e;const n=d();return r.createElement(u.Provider,{value:n},t)}function p(){const e=r.useContext(u);if(void 0===e)throw new s.i6("NavbarMobileSidebarProvider");return e}},3102:(e,t,n)=>{"use strict";n.d(t,{HY:()=>s,Zo:()=>l,n2:()=>i});var r=n(7294),a=n(902);const o=r.createContext(null);function i(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return r.createElement(o.Provider,{value:n},t)}function s(){const e=(0,r.useContext)(o);if(!e)throw new a.i6("NavbarSecondaryMenuContentProvider");return e[0]}function l(e){let{component:t,props:n}=e;const i=(0,r.useContext)(o);if(!i)throw new a.i6("NavbarSecondaryMenuContentProvider");const[,s]=i,l=(0,a.Ql)(n);return(0,r.useEffect)((()=>{s({component:t,props:l})}),[s,t,l]),(0,r.useEffect)((()=>()=>s({component:null,props:null})),[s]),null}},9727:(e,t,n)=>{"use strict";n.d(t,{h:()=>a,t:()=>o});var r=n(7294);const a="navigation-with-keyboard";function o(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},7524:(e,t,n)=>{"use strict";n.d(t,{i:()=>c});var r=n(7294),a=n(412);const o="desktop",i="mobile",s="ssr";function l(){return a.Z.canUseDOM?window.innerWidth>996?o:i:s}function c(){const[e,t]=(0,r.useState)((()=>l()));return(0,r.useEffect)((()=>{function e(){t(l())}return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),clearTimeout(undefined)}}),[]),e}},5281:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",admonitionType:e=>"theme-admonition-"+e},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>"theme-doc-sidebar-item-category-level-"+e,docSidebarItemLinkLevel:e=>"theme-doc-sidebar-item-link-level-"+e},blog:{}}},2802:(e,t,n)=>{"use strict";n.d(t,{Wl:()=>m,_F:()=>v,cE:()=>f,jA:()=>h,xz:()=>p,hI:()=>S,lO:()=>w,vY:()=>E,oz:()=>_,s1:()=>y});var r=n(7294),a=n(6775),o=n(8790),i=n(4104),s=n(373),l=n(4477),c=n(1116);function u(e){return Array.from(new Set(e))}var d=n(8596);const f=!!i._r;function p(e){const t=(0,l.E)();if(!e)return;const n=t.docs[e];if(!n)throw new Error("no version doc found by id="+e);return n}function g(e,t){for(const n of e)if("category"===n.type){if(t(n))return n;const e=g(n.items,t);if(e)return e}}function m(e){if(e.href)return e.href;for(const t of e.items){if("link"===t.type)return t.href;if("category"===t.type){const e=m(t);if(e)return e}}}function h(){const{pathname:e}=(0,a.TH)(),t=(0,c.V)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=g(t.items,(t=>(0,d.Mg)(t.href,e)));if(!n)throw new Error(e+" is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.");return n}const b=(e,t)=>void 0!==e&&(0,d.Mg)(e,t);function v(e,t){return"link"===e.type?b(e.href,t):"category"===e.type&&(b(e.href,t)||((e,t)=>e.some((e=>v(e,t))))(e.items,t))}function y(){var e;const t=(0,c.V)(),{pathname:n}=(0,a.TH)();if(!1===(null==(e=(0,i.gA)())?void 0:e.pluginData.breadcrumbs)||!t)return null;const r=[];return function e(t){for(const a of t)if("category"===a.type&&((0,d.Mg)(a.href,n)||e(a.items))||"link"===a.type&&(0,d.Mg)(a.href,n))return r.push(a),!0;return!1}(t.items),r.reverse()}function w(e){const{activeVersion:t}=(0,i.Iw)(e),{preferredVersion:n}=(0,s.J)(e),a=(0,i.yW)(e);return(0,r.useMemo)((()=>u([t,n,a].filter(Boolean))),[t,n,a])}function _(e,t){const n=w(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((e=>e.name)).join(", ")+'".\n Available sidebar ids are:\n - '+Object.keys(t).join("\n- "));return r[1]}),[e,n])}function E(e,t){const n=w(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error("DocNavbarItem: couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((e=>e.name)).join(", ")+'".\nAvailable doc ids are:\n- '+u(t.map((e=>e.id))).join("\n- "))}return r}),[e,n])}function S(e){let{route:t,versionMetadata:n}=e;const r=(0,a.TH)(),i=t.routes,s=i.find((e=>(0,a.LX)(r.pathname,e)));if(!s)return null;const l=s.sidebar,c=l?n.docsSidebars[l]:void 0;return{docElement:(0,o.H)(i),sidebarName:l,sidebarItems:c}}},1944:(e,t,n)=>{"use strict";n.d(t,{FG:()=>f,d:()=>u,VC:()=>p});var r=n(7294),a=n(6010),o=n(5742),i=n(226);function s(){const e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=n(4996),c=n(2263);function u(e){let{title:t,description:n,keywords:a,image:i,children:s}=e;const u=function(e){const{siteConfig:t}=(0,c.Z)(),{title:n,titleDelimiter:r}=t;return null!=e&&e.trim().length?e.trim()+" "+r+" "+n:n}(t),{withBaseUrl:d}=(0,l.C)(),f=i?d(i,{absolute:!0}):void 0;return r.createElement(o.Z,null,t&&r.createElement("title",null,u),t&&r.createElement("meta",{property:"og:title",content:u}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),a&&r.createElement("meta",{name:"keywords",content:Array.isArray(a)?a.join(","):a}),f&&r.createElement("meta",{property:"og:image",content:f}),f&&r.createElement("meta",{name:"twitter:image",content:f}),s)}const d=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(d),s=(0,a.Z)(i,t);return r.createElement(d.Provider,{value:s},r.createElement(o.Z,null,r.createElement("html",{className:s})),n)}function p(e){let{children:t}=e;const n=s(),o="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"");const i="plugin-id-"+n.plugin.id;return r.createElement(f,{className:(0,a.Z)(o,i)},t)}},902:(e,t,n)=>{"use strict";n.d(t,{D9:()=>i,Qc:()=>c,Ql:()=>l,i6:()=>s,zX:()=>o});var r=n(7294);const a=n(412).Z.canUseDOM?r.useLayoutEffect:r.useEffect;function o(e){const t=(0,r.useRef)(e);return a((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function i(e){const t=(0,r.useRef)();return a((()=>{t.current=e})),t.current}class s extends Error{constructor(e,t){var n,r,a,o;super(),this.name="ReactContextError",this.message="Hook "+(null!=(n=null==(r=this.stack)||null==(a=r.split("\n")[1])||null==(o=a.match(/at (?:\w+\.)?(?\w+)/))?void 0:o.groups.name)?n:"")+" is called outside the <"+e+">. "+(null!=t?t:"")}}function l(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function c(e){return t=>{let{children:n}=t;return r.createElement(r.Fragment,null,e.reduceRight(((e,t)=>r.createElement(t,null,e)),n))}}},8596:(e,t,n)=>{"use strict";n.d(t,{Mg:()=>i,Ns:()=>s});var r=n(7294),a=n(723),o=n(2263);function i(e,t){const n=e=>{var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function s(){const{baseUrl:e}=(0,o.Z)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function a(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(a).flatMap((e=>{var t;return null!=(t=e.routes)?t:[]})))}(n)}({routes:a.Z,baseUrl:e})),[e])}},2466:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>f,OC:()=>l,RF:()=>d});var r=n(7294),a=n(412),o=n(2389),i=n(902);const s=r.createContext(void 0);function l(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return r.createElement(s.Provider,{value:n},t)}function c(){const e=(0,r.useContext)(s);if(null==e)throw new i.i6("ScrollControllerProvider");return e}const u=()=>a.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function d(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=c(),a=(0,r.useRef)(u()),o=(0,i.zX)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=u();o(e,a.current),a.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[o,n,...t])}function f(){const e=(0,r.useRef)(null),t=(0,o.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const a=document.documentElement.scrollTop;(n&&a>e||!n&&at&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>null==e.current?void 0:e.current()}}},3320:(e,t,n)=>{"use strict";n.d(t,{HX:()=>i,_q:()=>l,os:()=>s});var r=n(4104),a=n(2263),o=n(373);const i="default";function s(e,t){return"docs-"+e+"-"+t}function l(){const{i18n:e}=(0,a.Z)(),t=(0,r._r)(),n=(0,r.WS)(),l=(0,o.Oh)();const c=[i,...Object.keys(t).map((function(e){var r;const a=(null==n?void 0:n.activePlugin.pluginId)===e?n.activeVersion:void 0,o=l[e],i=t[e].versions.find((e=>e.isLast));return s(e,(null!=(r=null!=a?a:o)?r:i).name)}))];return{locale:e.currentLocale,tags:c}}},12:(e,t,n)=>{"use strict";n.d(t,{W:()=>s,_:()=>l});const r="localStorage";function a(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,o||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),o=!0),null}var t}let o=!1;const i={get:()=>null,set:()=>{},del:()=>{}};function s(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t}}(e);const n=a(null==t?void 0:t.persistence);return null===n?i:{get:()=>{try{return n.getItem(e)}catch(t){return console.error("Docusaurus storage error, can't get key="+e,t),null}},set:t=>{try{n.setItem(e,t)}catch(r){console.error("Docusaurus storage error, can't set "+e+"="+t,r)}},del:()=>{try{n.removeItem(e)}catch(t){console.error("Docusaurus storage error, can't delete key="+e,t)}}}}function l(e){void 0===e&&(e=r);const t=a(e);if(!t)return[];const n=[];for(let r=0;r{"use strict";n.d(t,{l:()=>o});var r=n(2263),a=n(6775);function o(){const{siteConfig:{baseUrl:e,url:t},i18n:{defaultLocale:n,currentLocale:o}}=(0,r.Z)(),{pathname:i}=(0,a.TH)(),s=o===n?e:e.replace("/"+o+"/","/"),l=i.replace(e,"");return{createUrl:function(e){let{locale:r,fullyQualified:a}=e;return""+(a?t:"")+function(e){return e===n?""+s:""+s+e+"/"}(r)+l}}}},5936:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var r=n(7294),a=n(6775),o=n(902);function i(e){const t=(0,a.TH)(),n=(0,o.D9)(t),i=(0,o.zX)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6668:(e,t,n)=>{"use strict";n.d(t,{L:()=>a});var r=n(2263);function a(){return(0,r.Z)().siteConfig.themeConfig}},8802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[a]=e.split(/[#?]/),o="/"===a||a===r?a:(i=a,n?function(e){return e.endsWith("/")?e:e+"/"}(i):function(e){return e.endsWith("/")?e.slice(0,-1):e}(i));var i;return e.replace(a,o)}},8780:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="post-content";var a=n(8802);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(a).default}})},6010:(e,t,n)=>{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ta});const a=function(){for(var e,t,n=0,a="";n{"use strict";n.d(t,{lX:()=>w,q_:()=>O,ob:()=>p,PP:()=>L,Ep:()=>f});var r=n(7462);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&a(i[0])||i.unshift("");var g=i.join("/");return n&&"/"!==g.substr(-1)&&(g+="/"),g};var s=n(2177);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.Z)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function g(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=p(e,t,m(),w.location);u.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(9864),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||a}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(g){var a=p(n);a&&a!==g&&e(t,a,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=l(t),m=l(n),h=0;h{"use strict";e.exports=function(e,t,n,r,a,o,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,o,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},5826:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},813:function(e){e.exports=function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=a,this.iframesTimeout=o}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(t){var n=e.filter((function(e){return e.contains(t)})).length>0;-1!==e.indexOf(t)||n||e.push(t)})),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var a=e.contentWindow;if(r=a.document,!a||!r)throw new Error("iframe inaccessible")}catch(o){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,a=!1,o=null,i=function i(){if(!a){a=!0,clearTimeout(o);try{r.isIframeBlank(e)||(e.removeEventListener("load",i),r.getIframeContents(e,t,n))}catch(s){n()}}};e.addEventListener("load",i),o=setTimeout(i,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(r){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,(function(){return!0}),(function(e){r++,n.waitForIframes(e.querySelector("html"),(function(){--r||t()}))}),(function(e){e||t()}))}},{key:"forEachIframe",value:function(t,n,r){var a=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},i=t.querySelectorAll("iframe"),s=i.length,l=0;i=Array.prototype.slice.call(i);var c=function(){--s<=0&&o(l)};s||c(),i.forEach((function(t){e.matches(t,a.exclude)?c():a.onIframeReady(t,(function(e){n(t)&&(l++,r(e)),c()}),c)}))}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:(null===t||e.nextNode())&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var a=!1,o=!1;return r.forEach((function(e,t){e.val===n&&(a=t,o=e.handled)})),this.compareNodeIframe(e,t,n)?(!1!==a||o?!1===a||o||(r[a].handled=!0):r.push({val:n,handled:!0}),!0):(!1===a&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var a=this;e.forEach((function(e){e.handled||a.getIframeContents(e.val,(function(e){a.createInstanceOnIframe(e).forEachNode(t,n,r)}))}))}},{key:"iterateThroughNodes",value:function(e,t,n,r,a){for(var o=this,i=this.createIterator(t,e,r),s=[],l=[],c=void 0,u=void 0,d=function(){var e=o.getIteratorNode(i);return u=e.prevNode,c=e.node};d();)this.iframes&&this.forEachIframe(t,(function(e){return o.checkIframeFilter(c,u,e,s)}),(function(t){o.createInstanceOnIframe(t).forEachNode(e,(function(e){return l.push(e)}),r)})),l.push(c);l.forEach((function(e){n(e)})),this.iframes&&this.handleOpenIframes(s,e,n,r),a()}},{key:"forEachNode",value:function(e,t,n){var r=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),i=o.length;i||a(),o.forEach((function(o){var s=function(){r.iterateThroughNodes(e,o,t,n,(function(){--i<=0&&a()}))};r.iframes?r.waitForIframes(o,s):s()}))}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var a=!1;return n.every((function(t){return!r.call(e,t)||(a=!0,!1)})),a}return!1}}]),e}(),o=function(){function o(e){t(this,o),this.ctx=e,this.ie=!1;var n=window.navigator.userAgent;(n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1)&&(this.ie=!0)}return n(o,[{key:"log",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===(void 0===r?"undefined":e(r))&&"function"==typeof r[n]&&r[n]("mark.js: "+t)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var a in t)if(t.hasOwnProperty(a)){var o=t[a],i="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(a):this.escapeStr(a),s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==i&&""!==s&&(e=e.replace(new RegExp("("+this.escapeStr(i)+"|"+this.escapeStr(s)+")","gm"+n),r+"("+this.processSynomyms(i)+"|"+this.processSynomyms(s)+")"+r))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,(function(e){return"\\"===e.charAt(0)?"?":"\x01"}))).replace(/(?:\\)*\*/g,(function(e){return"\\"===e.charAt(0)?"*":"\x02"}))}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,(function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"}))}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105","A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010d","C\xc7\u0106\u010c","d\u0111\u010f","D\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119","E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012b","I\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142","L\u0141","n\xf1\u0148\u0144","N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014d","O\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159","R\u0158","s\u0161\u015b\u0219\u015f","S\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163","T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016b","U\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xff","Y\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017a","Z\u017d\u017b\u0179"]:["a\xe0\xe1\u1ea3\xe3\u1ea1\u0103\u1eb1\u1eaf\u1eb3\u1eb5\u1eb7\xe2\u1ea7\u1ea5\u1ea9\u1eab\u1ead\xe4\xe5\u0101\u0105A\xc0\xc1\u1ea2\xc3\u1ea0\u0102\u1eb0\u1eae\u1eb2\u1eb4\u1eb6\xc2\u1ea6\u1ea4\u1ea8\u1eaa\u1eac\xc4\xc5\u0100\u0104","c\xe7\u0107\u010dC\xc7\u0106\u010c","d\u0111\u010fD\u0110\u010e","e\xe8\xe9\u1ebb\u1ebd\u1eb9\xea\u1ec1\u1ebf\u1ec3\u1ec5\u1ec7\xeb\u011b\u0113\u0119E\xc8\xc9\u1eba\u1ebc\u1eb8\xca\u1ec0\u1ebe\u1ec2\u1ec4\u1ec6\xcb\u011a\u0112\u0118","i\xec\xed\u1ec9\u0129\u1ecb\xee\xef\u012bI\xcc\xcd\u1ec8\u0128\u1eca\xce\xcf\u012a","l\u0142L\u0141","n\xf1\u0148\u0144N\xd1\u0147\u0143","o\xf2\xf3\u1ecf\xf5\u1ecd\xf4\u1ed3\u1ed1\u1ed5\u1ed7\u1ed9\u01a1\u1edf\u1ee1\u1edb\u1edd\u1ee3\xf6\xf8\u014dO\xd2\xd3\u1ece\xd5\u1ecc\xd4\u1ed2\u1ed0\u1ed4\u1ed6\u1ed8\u01a0\u1ede\u1ee0\u1eda\u1edc\u1ee2\xd6\xd8\u014c","r\u0159R\u0158","s\u0161\u015b\u0219\u015fS\u0160\u015a\u0218\u015e","t\u0165\u021b\u0163T\u0164\u021a\u0162","u\xf9\xfa\u1ee7\u0169\u1ee5\u01b0\u1eeb\u1ee9\u1eed\u1eef\u1ef1\xfb\xfc\u016f\u016bU\xd9\xda\u1ee6\u0168\u1ee4\u01af\u1eea\u1ee8\u1eec\u1eee\u1ef0\xdb\xdc\u016e\u016a","y\xfd\u1ef3\u1ef7\u1ef9\u1ef5\xffY\xdd\u1ef2\u1ef6\u1ef8\u1ef4\u0178","z\u017e\u017c\u017aZ\u017d\u017b\u0179"],r=[];return e.split("").forEach((function(a){n.every((function(n){if(-1!==n.indexOf(a)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),r.push(n)}return!0}))})),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\xa1\xbf",r=this.opt.accuracy,a="string"==typeof r?r:r.value,o="string"==typeof r?[]:r.limiters,i="";switch(o.forEach((function(e){i+="|"+t.escapeStr(e)})),a){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(i="\\s"+(i||this.escapeStr(n)))+"]*"+e+"[^"+i+"]*)";case"exactly":return"(^|\\s"+i+")("+e+")(?=$|\\s"+i+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach((function(e){t.opt.separateWordSearch?e.split(" ").forEach((function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)})):e.trim()&&-1===n.indexOf(e)&&n.push(e)})),{keywords:n.sort((function(e,t){return t.length-e.length})),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort((function(e,t){return e.start-t.start})).forEach((function(e){var a=t.callNoMatchOnInvalidRanges(e,r),o=a.start,i=a.end;a.valid&&(e.start=o,e.length=i-o,n.push(e),r=i)})),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,a=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?a=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:r,valid:a}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,a=!0,o=n.length,i=t-o,s=parseInt(e.start,10)-i;return(r=(s=s>o?o:s)+parseInt(e.length,10))>o&&(r=o,this.log("End range automatically set to the max value of "+o)),s<0||r-s<0||s>o||r>o?(a=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(s,r).replace(/\s+/g,"")&&(a=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:s,end:r,valid:a}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})}),(function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){e({value:n,nodes:r})}))}},{key:"matchesExclude",value:function(e){return a.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",a=e.splitText(t),o=a.splitText(n-t),i=document.createElement(r);return i.setAttribute("data-markjs","true"),this.opt.className&&i.setAttribute("class",this.opt.className),i.textContent=a.textContent,a.parentNode.replaceChild(i,a),o}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,a){var o=this;e.nodes.every((function(i,s){var l=e.nodes[s+1];if(void 0===l||l.start>t){if(!r(i.node))return!1;var c=t-i.start,u=(n>i.end?i.end:n)-i.start,d=e.value.substr(0,i.start),f=e.value.substr(u+i.start);if(i.node=o.wrapRangeInTextNode(i.node,c,u),e.value=d+f,e.nodes.forEach((function(t,n){n>=s&&(e.nodes[n].start>0&&n!==s&&(e.nodes[n].start-=u),e.nodes[n].end-=u)})),n-=u,a(i.node.previousSibling,i.start),!(n>i.end))return!1;t=i.end}return!0}))}},{key:"wrapMatches",value:function(e,t,n,r,a){var o=this,i=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var a=void 0;null!==(a=e.exec(t.textContent))&&""!==a[i];)if(n(a[i],t)){var s=a.index;if(0!==i)for(var l=1;l{"use strict";n.r(t)},2295:(e,t,n)=>{"use strict";n.r(t)},4865:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),c=o.querySelector(r.barSelector),u=r.speed,d=r.easing;return o.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,i(e,u,d)),1===e?(l(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){l(o,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),s=e?"-100":o(n.status||0),c=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function c(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=f(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},7418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,o){for(var i,s,l=a(e),c=1;c{"use strict";n.d(t,{Z:()=>o});var r=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);S+=E.value.length,E=E.next){var k=E.value;if(t.length>e.length)return;if(!(k instanceof a)){var x,O=1;if(v){if(!(x=o(_,S,e,b))||x.index>=e.length)break;var C=x.index,L=x.index+x[0].length,P=S;for(P+=E.value.length;C>=P;)P+=(E=E.next).value.length;if(S=P-=E.value.length,E.value instanceof a)continue;for(var T=E;T!==t.tail&&(Pd.reach&&(d.reach=j);var R=E.prev;if(A&&(R=l(t,R,A),S+=A.length),c(t,R,O),E=l(t,R,new a(f,h?r.tokenize(I,h):I,y,I)),N&&l(t,E,N),O>1){var D={cause:f+","+g,reach:j};i(e,t,n,E.prev,S,D),d&&D.reach>d.reach&&(d.reach=D.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function c(e,t,n){for(var r=t.next,a=0;a"+o.content+""},r}(),a=r;r.default=r,a.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.languages.markup.doctype.inside["internal-subset"].inside=a.languages.markup,a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},a.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(a.languages.markup.tag,"addAttribute",{value:function(e,t){a.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:a.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,a.languages.xml=a.languages.extend("markup",{}),a.languages.ssml=a.languages.xml,a.languages.atom=a.languages.xml,a.languages.rss=a.languages.xml,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,i=0;i]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},a.languages.c=a.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),a.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),a.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},a.languages.c.string],char:a.languages.c.char,comment:a.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:a.languages.c}}}}),a.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete a.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(a),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(a),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},a={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:a,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:a})}(a),a.languages.javascript=a.languages.extend("clike",{"class-name":[a.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,a.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:a.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:a.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),a.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),a.languages.markup&&(a.languages.markup.tag.addInlined("script","javascript"),a.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),a.languages.js=a.languages.javascript,function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(a),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(a),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(a),a.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:a.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},a.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var s=f(/^\{$/,/^\}$/);if(-1===s)continue;for(var l=n;l=0&&p(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function l(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}function c(t){var n={};n["interpolation-punctuation"]=a;var o=e.tokenize(t,n);if(3===o.length){var i=[1,1];i.push.apply(i,l(o[1],e.languages.javascript,"javascript")),o.splice.apply(o,i)}return new e.Token("interpolation",o,r.alias,t)}function u(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),i=0,u={},d=l(a.map((function(e){if("string"==typeof e)return e;for(var n,a=e.content;-1!==t.indexOf(n=s(i++,r)););return u[n]=a,n})).join(""),n,r),f=Object.keys(u);return i=0,function e(t){for(var n=0;n=f.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=f[i],o="string"==typeof r?r:r.content,s=o.indexOf(a);if(-1!==s){++i;var l=o.substring(0,s),d=c(u[a]),p=o.substring(s+a.length),g=[];if(l&&g.push(l),g.push(d),p){var m=[p];e(m),g.push.apply(g,m)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(g)),n+=g.length-1):r.content=g}}else{var h=r.content;Array.isArray(h)?e(h):e([h])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,a=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(a),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return a})),RegExp(e,t)}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},s=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===i(a.content[0].content[1])&&n.pop():"/>"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&n.length>0&&0===n[n.length-1].openedBraces){var l=i(a);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(l=i(t[r-1])+l,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",l,null,l)}a.content&&"string"!=typeof a.content&&s(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)}))}(a),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(a),a.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},a.languages.go=a.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),a.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete a.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,s=i.length;-1!==n.code.indexOf(a=t(r,s));)++s;return i[s]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(s){for(var l=0;l=o.length);l++){var c=s[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=o[a],d=n.tokenStack[u],f="string"==typeof c?c:c.content,p=t(r,u),g=f.indexOf(p);if(g>-1){++a;var m=f.substring(0,g),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=f.substring(g+p.length),v=[];m&&v.push.apply(v,i([m])),v.push(h),b&&v.push.apply(v,i([b])),"string"==typeof c?s.splice.apply(s,[l,1].concat(v)):c.content=v}}else c.content&&i(c.content)}return s}(n.tokens)}}}})}(a),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")})),e.languages.hbs=e.languages.handlebars}(a),a.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},a.languages.webmanifest=a.languages.json,a.languages.less=a.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),a.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),a.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},a.languages.objectivec=a.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete a.languages.objectivec["class-name"],a.languages.objc=a.languages.objectivec,a.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},a.languages.python["string-interpolation"].inside.interpolation.inside.rest=a.languages.python,a.languages.py=a.languages.python,a.languages.reason=a.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),a.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete a.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(a),a.languages.scss=a.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),a.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),a.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),a.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),a.languages.scss.atrule.inside.rest=a.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(a),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(a),a.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};const o=a},893:()=>{Prism.languages.solidity=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),Prism.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),Prism.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),Prism.languages.sol=Prism.languages.solidity},772:(e,t,n)=>{var r={"./prism-solidity":893};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=772},2703:(e,t,n)=>{"use strict";var r=n(414);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:(e,t,n)=>{"use strict";var r=n(7294),a=n(7418),o=n(3840);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n