diff --git a/404.html b/404.html index 44f7faf..1ba7306 100644 --- a/404.html +++ b/404.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/assets/index-6e4e269b.js b/assets/index-b09701d4.js similarity index 99% rename from assets/index-6e4e269b.js rename to assets/index-b09701d4.js index 198ef8c..549b479 100644 --- a/assets/index-6e4e269b.js +++ b/assets/index-b09701d4.js @@ -1172,4 +1172,4 @@ num: public(uint256) @view def addNum(x: uint256) -> uint256: return x + self.num -`,y0=({prev:e,next:n})=>m.jsx(z,{version:d0,title:f0,description:h0,html:m0,prev:e,next:n}),v0=({size:e,className:n=""})=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",width:e,height:e,className:n,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})}),g0="_component_efeb7_1",j0="_icon_efeb7_8",w0="_input_efeb7_12",hl={component:g0,icon:j0,input:w0},x0=({value:e,onChange:n})=>{function t(s){n(s.target.value)}return m.jsxs("div",{className:hl.component,children:[m.jsx(v0,{size:18,className:hl.icon}),m.jsx("input",{className:hl.input,placeholder:"Search",value:e,onChange:t})]})};var k0="Expected a function",Li=0/0,_0="[object Symbol]",S0=/^\s+|\s+$/g,E0=/^[-+]0x[0-9a-f]+$/i,C0=/^0b[01]+$/i,P0=/^0o[0-7]+$/i,N0=parseInt,T0=typeof ds=="object"&&ds&&ds.Object===Object&&ds,L0=typeof self=="object"&&self&&self.Object===Object&&self,R0=T0||L0||Function("return this")(),O0=Object.prototype,I0=O0.toString,D0=Math.max,z0=Math.min,ml=function(){return R0.Date.now()};function A0(e,n,t){var s,r,l,a,o,i,u=0,d=!1,h=!1,y=!0;if(typeof e!="function")throw new TypeError(k0);n=Ri(n)||0,pa(t)&&(d=!!t.leading,h="maxWait"in t,l=h?D0(Ri(t.maxWait)||0,n):l,y="trailing"in t?!!t.trailing:y);function g(k){var E=s,N=r;return s=r=void 0,u=k,a=e.apply(N,E),a}function j(k){return u=k,o=setTimeout(p,n),d?g(k):a}function w(k){var E=k-i,N=k-u,U=n-E;return h?z0(U,l-N):U}function T(k){var E=k-i,N=k-u;return i===void 0||E>=n||E<0||h&&N>=l}function p(){var k=ml();if(T(k))return c(k);o=setTimeout(p,w(k))}function c(k){return o=void 0,y&&s?g(k):(s=r=void 0,a)}function f(){o!==void 0&&clearTimeout(o),u=0,s=i=r=o=void 0}function v(){return o===void 0?a:c(ml())}function _(){var k=ml(),E=T(k);if(s=arguments,r=this,i=k,E){if(o===void 0)return j(i);if(h)return o=setTimeout(p,n),g(i)}return o===void 0&&(o=setTimeout(p,n)),a}return _.cancel=f,_.flush=v,_}function pa(e){var n=typeof e;return!!e&&(n=="object"||n=="function")}function F0(e){return!!e&&typeof e=="object"}function M0(e){return typeof e=="symbol"||F0(e)&&I0.call(e)==_0}function Ri(e){if(typeof e=="number")return e;if(M0(e))return Li;if(pa(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=pa(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=e.replace(S0,"");var t=C0.test(e);return t||P0.test(e)?N0(e.slice(2),t?2:8):E0.test(e)?Li:+e}var $0=A0;const U0=Ai($0),b0={leading:!1,trailing:!0};function V0(e,n,t){return S.useCallback(U0(e,n,b0),t)}function B0(e,n){let t=e;for(let s=0;s0;){const[l,a,o]=n.pop();r&&(s=s.slice(0,a-1),r=!1),s+=l;const i=Object.keys(o);if(i.length>0)for(let u=0;un+r)}const Q0=["/view-pure-functions"],K0=["/view-pure-functions"],Y0=["/view-pure-functions","/payable","/internal-external-functions","/hash-function","/function","/default-function"],X0=["/verify-signature"],G0=["/verify-signature"],Z0=["/verify-signature"],q0=["/values","/references"],J0=["/values","/references"],eg=["/values","/references"],ng=["/values"],tg=["/values"],sg=["/values","/references","/private-public-state-variables"],rg=["/values","/references","/private-public-state-variables"],lg=["/values"],ag=["/values"],og=["/values"],ig=["/values"],ug=["/values"],cg=["/values"],pg=["/values"],dg=["/unsafe-math"],fg=["/unsafe-math"],hg=["/unsafe-math"],mg=["/send-ether"],yg=["/send-ether"],vg=["/send-ether","/raw-call"],gg=["/send-ether","/payable","/default-function"],jg=["/self-destruct"],wg=["/self-destruct"],xg=["/self-destruct"],kg=["/references"],_g=["/references"],Sg=["/references","/dynamic-arrays"],Eg=["/references","/dynamic-arrays"],Cg=["/references"],Pg=["/references"],Ng=["/references"],Tg=["/references"],Lg=["/re-entrancy-lock"],Rg=["/re-entrancy-lock"],Og=["/raw-call"],Ig=["/raw-call","/delegate-call"],Dg=["/private-public-state-variables"],zg=["/print"],Ag=["/print"],Fg=["/internal-external-functions"],Mg=["/internal-external-functions"],$g=["/interface"],Ug=["/immutable"],bg=["/immutable"],Vg=["/immutable","/constants"],Bg=["/immutable","/constants"],Hg=["/if-else"],Wg=["/if-else"],Qg=["/hello-world"],Kg=["/hello-world"],Yg=["/hello-world"],Xg=["/hash-function"],Gg=["/hash-function"],Zg=["/for-loop"],qg=["/for-loop"],Jg=["/for-loop"],e1=["/event"],n1=["/event"],t1=["/error"],s1=["/error"],r1=["/dynamic-arrays"],l1=["/delegate-call"],a1=["/defi/curve-swap","/defi/curve-liquidity"],o1=["/defi/curve-swap"],i1=["/defi/curve-swap","/defi/curve-liquidity"],u1=["/defi/curve-swap","/defi/curve-liquidity"],c1=["/defi/curve-liquidity"],p1=["/default-function"],d1=["/default-function"],f1=["/create-new-contract"],h1=["/create-new-contract"],m1=["/create-new-contract"],y1=["/constructor"],Oi={view:Q0,pure:K0,function:["/view-pure-functions","/payable","/internal-external-functions","/hash-function","/function","/default-function"],functions:Y0,verify:X0,signature:G0,ecrecover:Z0,data:q0,type:J0,types:eg,value:ng,values:tg,variable:sg,variables:rg,bool:lg,int128:ag,uint256:og,decimals:ig,address:ug,bytes32:cg,Bytes:pg,String:["/values"],gas:dg,unsafe:fg,math:hg,send:mg,ether:yg,raw_call:vg,payable:gg,selfdestruct:jg,self:wg,destruct:xg,reference:kg,references:_g,array:Sg,arrays:Eg,struct:Cg,structs:Pg,HashMap:Ng,mapping:Tg,"re-entrancy":["/re-entrancy-lock"],lock:Lg,nonreentrant:Rg,raw:Og,call:Ig,private:["/private-public-state-variables"],public:["/private-public-state-variables"],state:Dg,debug:zg,print:Ag,internal:Fg,external:Mg,interface:["/interface"],interfaces:$g,immutable:Ug,immutables:bg,constant:Vg,constants:Bg,if:["/if-else"],else:["/if-else"],conditional:Hg,statement:Wg,hello:Qg,world:Kg,version:Yg,hash:Xg,keccack256:Gg,for:["/for-loop"],loop:Zg,loops:qg,range:Jg,event:e1,events:n1,error:t1,errors:s1,dynamic:r1,delegate:l1,curve:a1,swap:o1,defi:i1,amm:u1,add:c1,"remove liquidity":["/defi/curve-liquidity"],default:["/default-function"],__default__:p1,fallback:d1,create:f1,new:["/create-new-contract"],contract:h1,create_forwarder_to:m1,constructor:y1},Ii={"/view-pure-functions":["view","pure","function","functions"],"/verify-signature":["verify","signature","ecrecover"],"/values":["data","type","types","value","values","variable","variables","bool","int128","uint256","decimals","address","bytes32","Bytes","String"],"/unsafe-math":["gas","unsafe","math"],"/send-ether":["send","ether","raw_call","payable"],"/self-destruct":["selfdestruct","self","destruct"],"/references":["data","type","types","reference","references","variable","variables","array","arrays","struct","structs","HashMap","mapping"],"/re-entrancy-lock":["re-entrancy","lock","nonreentrant"],"/raw-call":["raw","call","raw_call"],"/private-public-state-variables":["private","public","state","variable","variables"],"/print":["debug","print"],"/payable":["payable","function","functions"],"/internal-external-functions":["internal","external","function","functions"],"/interface":["interface","interfaces"],"/immutable":["immutable","immutables","constant","constants"],"/if-else":["if","else","conditional","statement"],"/hello-world":["hello","world","version"],"/hash-function":["hash","keccack256","function","functions"],"/function":["function","functions"],"/for-loop":["for","loop","loops","range"],"/event":["event","events"],"/error":["error","errors"],"/dynamic-arrays":["dynamic","arrays","array"],"/delegate-call":["delegate","call"],"/defi/curve-swap":["curve","swap","defi","amm"],"/defi/curve-liquidity":["curve","add","remove liquidity","defi","amm"],"/default-function":["default","function","functions","__default__","fallback","payable"],"/create-new-contract":["create","new","contract","create_forwarder_to"],"/constructor":["constructor"],"/constants":["constant","constants"]},hp=[];for(const e of Object.keys(Ii))hp.push(...Ii[e]);const mp={};for(const e of hp)B0(mp,e);function v1(e){return Array.from(new Set(e))}function g1(e){const n=[],t=W0(mp,e.toLowerCase());for(const s of t)Oi[s]&&n.push(...Oi[s]);return n}const j1="_component_1bdlb_1",w1="_updates_1bdlb_8",x1="_search_1bdlb_13",k1="_category_1bdlb_17",_1="_listItem_1bdlb_20",S1="_label_1bdlb_28",E1="_header_1bdlb_31",C1="_youTube_1bdlb_35",P1="_youTubeLogo_1bdlb_41",ue={component:j1,updates:w1,search:x1,category:k1,listItem:_1,label:S1,header:E1,youTube:C1,youTubeLogo:P1},N1=["2023/08/20 - Vyper 0.3.9","2023/06/19 - Chinese translations","2023/03/04 - Unsafe math"];function T1(){const[e,n]=S.useState(""),[t,s]=Fh(),[r,l]=S.useState(null);S.useEffect(()=>{const d=t.get("q");d!=null&&d.length>0&&(n(d),a(d,!1))},[]);function a(d,h){const y=d.trim();if(y.length==0){l(null),h&&s({q:""});return}const g=v1(y.split(" ")),j={};for(const w of g){const T=g1(w);for(const p of T)j[p]=!0}l(j),h&&s({q:y})}const o=V0(d=>a(d,!0),500,[]);function i(d){n(d),o(d)}function u(){return r?Object.keys(r).length==0?m.jsx("div",{children:"No results"}):m.jsx("ul",{className:ue.list,children:mr.filter(({path:d})=>r[d]).map(({path:d,title:h})=>m.jsx("li",{className:ue.listItem,children:m.jsx("a",{href:d,children:h})},d))}):m.jsxs(m.Fragment,{children:[uo.map(({routes:d,title:h},y)=>m.jsxs("div",{children:[h&&m.jsx("h3",{className:ue.category,children:h}),m.jsx("ul",{className:ue.list,children:d.map(({path:g,title:j})=>m.jsx("li",{className:ue.listItem,children:m.jsx("a",{href:g,children:j})},g))})]},y)),m.jsxs("div",{children:[m.jsx("h3",{className:ue.category,children:"Translations"}),Kh.map(({lang:d,url:h})=>m.jsx("li",{className:ue.listItem,children:m.jsx("a",{href:h,target:"__blank",children:d})},h))]})]})}return m.jsxs("div",{className:ue.component,children:[m.jsx(fp,{title:"Vyper by Example | 0.3.9",description:"Learn smart contract programming using Vyper"}),m.jsx("h1",{className:ue.header,children:m.jsx("a",{href:"/",children:"Vyper by Example"})}),m.jsx("div",{className:ue.subHeader,children:"v 0.3.9"}),m.jsxs("div",{className:ue.main,children:[m.jsxs("p",{children:["an introduction to ",m.jsx("a",{href:"https://vyper.readthedocs.io",children:"Vyper"})," with simple examples"]}),m.jsxs("div",{className:ue.youTube,children:[m.jsx("img",{src:dp,alt:"logo",className:ue.youTubeLogo}),m.jsx("a",{href:"https://www.youtube.com/channel/UCJWh7F3AFyQ_x01VKzr9eyA",target:"__blank",children:"Most code are explained here"})]}),m.jsx("div",{className:ue.updates,children:N1.map((d,h)=>m.jsx("div",{children:d},h))}),m.jsx("div",{className:ue.search,children:m.jsx(x0,{value:e,onChange:i})}),u()]})]})}const L1=[{path:"/constants",component:Im},{path:"/constructor",component:Mm},{path:"/create-new-contract",component:Bm},{path:"/default-function",component:Ym},{path:"/defi/curve-liquidity",component:Jm},{path:"/defi/curve-swap",component:ry},{path:"/delegate-call",component:uy},{path:"/dynamic-arrays",component:hy},{path:"/error",component:jy},{path:"/event",component:Sy},{path:"/for-loop",component:Ty},{path:"/function",component:Dy},{path:"/hash-function",component:$y},{path:"/hello-world",component:Hy},{path:"/if-else",component:Xy},{path:"/immutable",component:ev},{path:"/interface",component:lv},{path:"/internal-external-functions",component:cv},{path:"/payable",component:mv},{path:"/print",component:wv},{path:"/private-public-state-variables",component:Ev},{path:"/raw-call",component:Lv},{path:"/re-entrancy-lock",component:zv},{path:"/references",component:Uv},{path:"/self-destruct",component:Wv},{path:"/send-ether",component:Gv},{path:"/unsafe-math",component:n0},{path:"/values",component:a0},{path:"/verify-signature",component:p0},{path:"/view-pure-functions",component:y0},{path:"",component:T1}];function Di(){const{state:e,init:n}=ao();return S.useLayoutEffect(()=>{n({width:window.document.body.clientWidth})},[]),e.initialized?m.jsx(Ah,{basename:"",children:m.jsx(Sm,{children:m.jsx(Ih,{children:L1.map(t=>{const{prev:s,next:r}=Zh(t.path);return m.jsx(pp,{path:t.path,element:Qi.createElement(t.component,{prev:s,next:r})},t.path)})})})}):null}const R1=document.getElementById("root"),O1=qc(R1),zi=document.getElementById("root");zi.hasChildNodes()?Zc(zi,m.jsx(ki,{children:m.jsx(Di,{})})):O1.render(m.jsx(ki,{children:m.jsx(Di,{})})); +`,y0=({prev:e,next:n})=>m.jsx(z,{version:d0,title:f0,description:h0,html:m0,prev:e,next:n}),v0=({size:e,className:n=""})=>m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",width:e,height:e,className:n,children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})}),g0="_component_efeb7_1",j0="_icon_efeb7_8",w0="_input_efeb7_12",hl={component:g0,icon:j0,input:w0},x0=({value:e,onChange:n})=>{function t(s){n(s.target.value)}return m.jsxs("div",{className:hl.component,children:[m.jsx(v0,{size:18,className:hl.icon}),m.jsx("input",{className:hl.input,placeholder:"Search",value:e,onChange:t})]})};var k0="Expected a function",Li=0/0,_0="[object Symbol]",S0=/^\s+|\s+$/g,E0=/^[-+]0x[0-9a-f]+$/i,C0=/^0b[01]+$/i,P0=/^0o[0-7]+$/i,N0=parseInt,T0=typeof ds=="object"&&ds&&ds.Object===Object&&ds,L0=typeof self=="object"&&self&&self.Object===Object&&self,R0=T0||L0||Function("return this")(),O0=Object.prototype,I0=O0.toString,D0=Math.max,z0=Math.min,ml=function(){return R0.Date.now()};function A0(e,n,t){var s,r,l,a,o,i,u=0,d=!1,h=!1,y=!0;if(typeof e!="function")throw new TypeError(k0);n=Ri(n)||0,pa(t)&&(d=!!t.leading,h="maxWait"in t,l=h?D0(Ri(t.maxWait)||0,n):l,y="trailing"in t?!!t.trailing:y);function g(k){var E=s,N=r;return s=r=void 0,u=k,a=e.apply(N,E),a}function j(k){return u=k,o=setTimeout(p,n),d?g(k):a}function w(k){var E=k-i,N=k-u,U=n-E;return h?z0(U,l-N):U}function T(k){var E=k-i,N=k-u;return i===void 0||E>=n||E<0||h&&N>=l}function p(){var k=ml();if(T(k))return c(k);o=setTimeout(p,w(k))}function c(k){return o=void 0,y&&s?g(k):(s=r=void 0,a)}function f(){o!==void 0&&clearTimeout(o),u=0,s=i=r=o=void 0}function v(){return o===void 0?a:c(ml())}function _(){var k=ml(),E=T(k);if(s=arguments,r=this,i=k,E){if(o===void 0)return j(i);if(h)return o=setTimeout(p,n),g(i)}return o===void 0&&(o=setTimeout(p,n)),a}return _.cancel=f,_.flush=v,_}function pa(e){var n=typeof e;return!!e&&(n=="object"||n=="function")}function F0(e){return!!e&&typeof e=="object"}function M0(e){return typeof e=="symbol"||F0(e)&&I0.call(e)==_0}function Ri(e){if(typeof e=="number")return e;if(M0(e))return Li;if(pa(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=pa(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=e.replace(S0,"");var t=C0.test(e);return t||P0.test(e)?N0(e.slice(2),t?2:8):E0.test(e)?Li:+e}var $0=A0;const U0=Ai($0),b0={leading:!1,trailing:!0};function V0(e,n,t){return S.useCallback(U0(e,n,b0),t)}function B0(e,n){let t=e;for(let s=0;s0;){const[l,a,o]=n.pop();r&&(s=s.slice(0,a-1),r=!1),s+=l;const i=Object.keys(o);if(i.length>0)for(let u=0;un+r)}const Q0=["/view-pure-functions"],K0=["/view-pure-functions"],Y0=["/view-pure-functions","/payable","/internal-external-functions","/hash-function","/function","/default-function"],X0=["/verify-signature"],G0=["/verify-signature"],Z0=["/verify-signature"],q0=["/values","/references"],J0=["/values","/references"],eg=["/values","/references"],ng=["/values"],tg=["/values"],sg=["/values","/references","/private-public-state-variables"],rg=["/values","/references","/private-public-state-variables"],lg=["/values"],ag=["/values"],og=["/values"],ig=["/values"],ug=["/values"],cg=["/values"],pg=["/values"],dg=["/unsafe-math"],fg=["/unsafe-math"],hg=["/unsafe-math"],mg=["/send-ether"],yg=["/send-ether"],vg=["/send-ether","/raw-call"],gg=["/send-ether","/payable","/default-function"],jg=["/self-destruct"],wg=["/self-destruct"],xg=["/self-destruct"],kg=["/references"],_g=["/references"],Sg=["/references","/dynamic-arrays"],Eg=["/references","/dynamic-arrays"],Cg=["/references"],Pg=["/references"],Ng=["/references"],Tg=["/references"],Lg=["/re-entrancy-lock"],Rg=["/re-entrancy-lock"],Og=["/raw-call"],Ig=["/raw-call","/delegate-call"],Dg=["/private-public-state-variables"],zg=["/print"],Ag=["/print"],Fg=["/internal-external-functions"],Mg=["/internal-external-functions"],$g=["/interface"],Ug=["/immutable"],bg=["/immutable"],Vg=["/immutable","/constants"],Bg=["/immutable","/constants"],Hg=["/if-else"],Wg=["/if-else"],Qg=["/hello-world"],Kg=["/hello-world"],Yg=["/hello-world"],Xg=["/hash-function"],Gg=["/hash-function"],Zg=["/for-loop"],qg=["/for-loop"],Jg=["/for-loop"],e1=["/event"],n1=["/event"],t1=["/error"],s1=["/error"],r1=["/dynamic-arrays"],l1=["/delegate-call"],a1=["/defi/curve-swap","/defi/curve-liquidity"],o1=["/defi/curve-swap"],i1=["/defi/curve-swap","/defi/curve-liquidity"],u1=["/defi/curve-swap","/defi/curve-liquidity"],c1=["/defi/curve-liquidity"],p1=["/default-function"],d1=["/default-function"],f1=["/create-new-contract"],h1=["/create-new-contract"],m1=["/create-new-contract"],y1=["/constructor"],Oi={view:Q0,pure:K0,function:["/view-pure-functions","/payable","/internal-external-functions","/hash-function","/function","/default-function"],functions:Y0,verify:X0,signature:G0,ecrecover:Z0,data:q0,type:J0,types:eg,value:ng,values:tg,variable:sg,variables:rg,bool:lg,int128:ag,uint256:og,decimals:ig,address:ug,bytes32:cg,Bytes:pg,String:["/values"],gas:dg,unsafe:fg,math:hg,send:mg,ether:yg,raw_call:vg,payable:gg,selfdestruct:jg,self:wg,destruct:xg,reference:kg,references:_g,array:Sg,arrays:Eg,struct:Cg,structs:Pg,HashMap:Ng,mapping:Tg,"re-entrancy":["/re-entrancy-lock"],lock:Lg,nonreentrant:Rg,raw:Og,call:Ig,private:["/private-public-state-variables"],public:["/private-public-state-variables"],state:Dg,debug:zg,print:Ag,internal:Fg,external:Mg,interface:["/interface"],interfaces:$g,immutable:Ug,immutables:bg,constant:Vg,constants:Bg,if:["/if-else"],else:["/if-else"],conditional:Hg,statement:Wg,hello:Qg,world:Kg,version:Yg,hash:Xg,keccack256:Gg,for:["/for-loop"],loop:Zg,loops:qg,range:Jg,event:e1,events:n1,error:t1,errors:s1,dynamic:r1,delegate:l1,curve:a1,swap:o1,defi:i1,amm:u1,add:c1,"remove liquidity":["/defi/curve-liquidity"],default:["/default-function"],__default__:p1,fallback:d1,create:f1,new:["/create-new-contract"],contract:h1,create_forwarder_to:m1,constructor:y1},Ii={"/view-pure-functions":["view","pure","function","functions"],"/verify-signature":["verify","signature","ecrecover"],"/values":["data","type","types","value","values","variable","variables","bool","int128","uint256","decimals","address","bytes32","Bytes","String"],"/unsafe-math":["gas","unsafe","math"],"/send-ether":["send","ether","raw_call","payable"],"/self-destruct":["selfdestruct","self","destruct"],"/references":["data","type","types","reference","references","variable","variables","array","arrays","struct","structs","HashMap","mapping"],"/re-entrancy-lock":["re-entrancy","lock","nonreentrant"],"/raw-call":["raw","call","raw_call"],"/private-public-state-variables":["private","public","state","variable","variables"],"/print":["debug","print"],"/payable":["payable","function","functions"],"/internal-external-functions":["internal","external","function","functions"],"/interface":["interface","interfaces"],"/immutable":["immutable","immutables","constant","constants"],"/if-else":["if","else","conditional","statement"],"/hello-world":["hello","world","version"],"/hash-function":["hash","keccack256","function","functions"],"/function":["function","functions"],"/for-loop":["for","loop","loops","range"],"/event":["event","events"],"/error":["error","errors"],"/dynamic-arrays":["dynamic","arrays","array"],"/delegate-call":["delegate","call"],"/defi/curve-swap":["curve","swap","defi","amm"],"/defi/curve-liquidity":["curve","add","remove liquidity","defi","amm"],"/default-function":["default","function","functions","__default__","fallback","payable"],"/create-new-contract":["create","new","contract","create_forwarder_to"],"/constructor":["constructor"],"/constants":["constant","constants"]},hp=[];for(const e of Object.keys(Ii))hp.push(...Ii[e]);const mp={};for(const e of hp)B0(mp,e);function v1(e){return Array.from(new Set(e))}function g1(e){const n=[],t=W0(mp,e.toLowerCase());for(const s of t)Oi[s]&&n.push(...Oi[s]);return n}const j1="_component_1bdlb_1",w1="_updates_1bdlb_8",x1="_search_1bdlb_13",k1="_category_1bdlb_17",_1="_listItem_1bdlb_20",S1="_label_1bdlb_28",E1="_header_1bdlb_31",C1="_youTube_1bdlb_35",P1="_youTubeLogo_1bdlb_41",ue={component:j1,updates:w1,search:x1,category:k1,listItem:_1,label:S1,header:E1,youTube:C1,youTubeLogo:P1},N1=["2023/08/20 - Vyper 0.3.9","2023/06/19 - Chinese translations","2023/03/04 - Unsafe math"];function T1(){const[e,n]=S.useState(""),[t,s]=Fh(),[r,l]=S.useState(null);S.useEffect(()=>{const d=t.get("q");d!=null&&d.length>0&&(n(d),a(d,!1))},[]);function a(d,h){const y=d.trim();if(y.length==0){l(null),h&&s({q:""});return}const g=v1(y.split(" ")),j={};for(const w of g){const T=g1(w);for(const p of T)j[p]=!0}l(j),h&&s({q:y})}const o=V0(d=>a(d,!0),500,[]);function i(d){n(d),o(d)}function u(){return r?Object.keys(r).length==0?m.jsx("div",{children:"No results"}):m.jsx("ul",{className:ue.list,children:mr.filter(({path:d})=>r[d]).map(({path:d,title:h})=>m.jsx("li",{className:ue.listItem,children:m.jsx("a",{href:d,children:h})},d))}):m.jsxs(m.Fragment,{children:[uo.map(({routes:d,title:h},y)=>m.jsxs("div",{children:[h&&m.jsx("h3",{className:ue.category,children:h}),m.jsx("ul",{className:ue.list,children:d.map(({path:g,title:j})=>m.jsx("li",{className:ue.listItem,children:m.jsx("a",{href:g,children:j})},g))})]},y)),m.jsxs("div",{children:[m.jsx("h3",{className:ue.category,children:"Translations"}),Kh.map(({lang:d,url:h})=>m.jsx("li",{className:ue.listItem,children:m.jsx("a",{href:h,target:"__blank",children:d})},h))]})]})}return m.jsxs("div",{className:ue.component,children:[m.jsx(fp,{title:"Vyper by Example | 0.3.9",description:"Learn smart contract programming using Vyper"}),m.jsx("h1",{className:ue.header,children:m.jsx("a",{href:"/",children:"Vyper by Example"})}),m.jsx("div",{className:ue.subHeader,children:"v 0.3.9"}),m.jsxs("div",{className:ue.main,children:[m.jsxs("p",{children:["an introduction to ",m.jsx("a",{href:"https://vyper.readthedocs.io",children:"Vyper"})," with simple examples"]}),m.jsxs("div",{className:ue.youTube,children:[m.jsx("img",{src:dp,alt:"logo",className:ue.youTubeLogo}),m.jsx("a",{href:"https://www.youtube.com/@smartcontractprogrammer",target:"__blank",children:"Most code are explained here"})]}),m.jsx("div",{className:ue.updates,children:N1.map((d,h)=>m.jsx("div",{children:d},h))}),m.jsx("div",{className:ue.search,children:m.jsx(x0,{value:e,onChange:i})}),u()]})]})}const L1=[{path:"/constants",component:Im},{path:"/constructor",component:Mm},{path:"/create-new-contract",component:Bm},{path:"/default-function",component:Ym},{path:"/defi/curve-liquidity",component:Jm},{path:"/defi/curve-swap",component:ry},{path:"/delegate-call",component:uy},{path:"/dynamic-arrays",component:hy},{path:"/error",component:jy},{path:"/event",component:Sy},{path:"/for-loop",component:Ty},{path:"/function",component:Dy},{path:"/hash-function",component:$y},{path:"/hello-world",component:Hy},{path:"/if-else",component:Xy},{path:"/immutable",component:ev},{path:"/interface",component:lv},{path:"/internal-external-functions",component:cv},{path:"/payable",component:mv},{path:"/print",component:wv},{path:"/private-public-state-variables",component:Ev},{path:"/raw-call",component:Lv},{path:"/re-entrancy-lock",component:zv},{path:"/references",component:Uv},{path:"/self-destruct",component:Wv},{path:"/send-ether",component:Gv},{path:"/unsafe-math",component:n0},{path:"/values",component:a0},{path:"/verify-signature",component:p0},{path:"/view-pure-functions",component:y0},{path:"",component:T1}];function Di(){const{state:e,init:n}=ao();return S.useLayoutEffect(()=>{n({width:window.document.body.clientWidth})},[]),e.initialized?m.jsx(Ah,{basename:"",children:m.jsx(Sm,{children:m.jsx(Ih,{children:L1.map(t=>{const{prev:s,next:r}=Zh(t.path);return m.jsx(pp,{path:t.path,element:Qi.createElement(t.component,{prev:s,next:r})},t.path)})})})}):null}const R1=document.getElementById("root"),O1=qc(R1),zi=document.getElementById("root");zi.hasChildNodes()?Zc(zi,m.jsx(ki,{children:m.jsx(Di,{})})):O1.render(m.jsx(ki,{children:m.jsx(Di,{})})); diff --git a/constants/index.html b/constants/index.html index 44f7faf..1ba7306 100644 --- a/constants/index.html +++ b/constants/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/constructor/index.html b/constructor/index.html index 44f7faf..1ba7306 100644 --- a/constructor/index.html +++ b/constructor/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/create-new-contract/index.html b/create-new-contract/index.html index 44f7faf..1ba7306 100644 --- a/create-new-contract/index.html +++ b/create-new-contract/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/default-function/index.html b/default-function/index.html index 44f7faf..1ba7306 100644 --- a/default-function/index.html +++ b/default-function/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/defi/curve-liquidity/index.html b/defi/curve-liquidity/index.html index 44f7faf..1ba7306 100644 --- a/defi/curve-liquidity/index.html +++ b/defi/curve-liquidity/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/defi/curve-swap/index.html b/defi/curve-swap/index.html index 44f7faf..1ba7306 100644 --- a/defi/curve-swap/index.html +++ b/defi/curve-swap/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/delegate-call/index.html b/delegate-call/index.html index 44f7faf..1ba7306 100644 --- a/delegate-call/index.html +++ b/delegate-call/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/dynamic-arrays/index.html b/dynamic-arrays/index.html index 44f7faf..1ba7306 100644 --- a/dynamic-arrays/index.html +++ b/dynamic-arrays/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/error/index.html b/error/index.html index 44f7faf..1ba7306 100644 --- a/error/index.html +++ b/error/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/event/index.html b/event/index.html index 44f7faf..1ba7306 100644 --- a/event/index.html +++ b/event/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/for-loop/index.html b/for-loop/index.html index 44f7faf..1ba7306 100644 --- a/for-loop/index.html +++ b/for-loop/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/function/index.html b/function/index.html index 44f7faf..1ba7306 100644 --- a/function/index.html +++ b/function/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/hash-function/index.html b/hash-function/index.html index 44f7faf..1ba7306 100644 --- a/hash-function/index.html +++ b/hash-function/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/hello-world/index.html b/hello-world/index.html index 44f7faf..1ba7306 100644 --- a/hello-world/index.html +++ b/hello-world/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/if-else/index.html b/if-else/index.html index 44f7faf..1ba7306 100644 --- a/if-else/index.html +++ b/if-else/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/immutable/index.html b/immutable/index.html index 44f7faf..1ba7306 100644 --- a/immutable/index.html +++ b/immutable/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/index.html b/index.html index 44f7faf..1ba7306 100644 --- a/index.html +++ b/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/interface/index.html b/interface/index.html index 44f7faf..1ba7306 100644 --- a/interface/index.html +++ b/interface/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/internal-external-functions/index.html b/internal-external-functions/index.html index 44f7faf..1ba7306 100644 --- a/internal-external-functions/index.html +++ b/internal-external-functions/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/payable/index.html b/payable/index.html index 44f7faf..1ba7306 100644 --- a/payable/index.html +++ b/payable/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/print/index.html b/print/index.html index 44f7faf..1ba7306 100644 --- a/print/index.html +++ b/print/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/private-public-state-variables/index.html b/private-public-state-variables/index.html index 44f7faf..1ba7306 100644 --- a/private-public-state-variables/index.html +++ b/private-public-state-variables/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/raw-call/index.html b/raw-call/index.html index 44f7faf..1ba7306 100644 --- a/raw-call/index.html +++ b/raw-call/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/re-entrancy-lock/index.html b/re-entrancy-lock/index.html index 44f7faf..1ba7306 100644 --- a/re-entrancy-lock/index.html +++ b/re-entrancy-lock/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/references/index.html b/references/index.html index 44f7faf..1ba7306 100644 --- a/references/index.html +++ b/references/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/self-destruct/index.html b/self-destruct/index.html index 44f7faf..1ba7306 100644 --- a/self-destruct/index.html +++ b/self-destruct/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/send-ether/index.html b/send-ether/index.html index 44f7faf..1ba7306 100644 --- a/send-ether/index.html +++ b/send-ether/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/unsafe-math/index.html b/unsafe-math/index.html index 44f7faf..1ba7306 100644 --- a/unsafe-math/index.html +++ b/unsafe-math/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/values/index.html b/values/index.html index 44f7faf..1ba7306 100644 --- a/values/index.html +++ b/values/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/verify-signature/index.html b/verify-signature/index.html index 44f7faf..1ba7306 100644 --- a/verify-signature/index.html +++ b/verify-signature/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - + diff --git a/view-pure-functions/index.html b/view-pure-functions/index.html index 44f7faf..1ba7306 100644 --- a/view-pure-functions/index.html +++ b/view-pure-functions/index.html @@ -31,7 +31,7 @@ gtag("config", "G-KTVFSR7C2H") - +