diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml index 2c372832476..b74928ff01e 100644 --- a/.github/workflows/crowdin.yml +++ b/.github/workflows/crowdin.yml @@ -2,8 +2,8 @@ name: Crowdin Action on: push: - path: [ "i18n/**" ] - branches: [ main ] + path: ["i18n/**"] + branches: [main] permissions: write-all @@ -23,10 +23,10 @@ jobs: localization_branch_name: l10n_crowdin_translations create_pull_request: true - pull_request_title: 'New Crowdin translations' - pull_request_body: 'New Crowdin pull request with translations' - pull_request_base_branch_name: 'main' + pull_request_title: "New Crowdin translations" + pull_request_body: "New Crowdin pull request with translations" + pull_request_base_branch_name: "main" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} - CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} \ No newline at end of file + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/.yarn/releases/yarn-3.4.1.cjs b/.yarn/releases/yarn-3.4.1.cjs index 2bdb752d860..ea821a333c9 100755 --- a/.yarn/releases/yarn-3.4.1.cjs +++ b/.yarn/releases/yarn-3.4.1.cjs @@ -1,7 +1,7 @@ #!/usr/bin/env node /* eslint-disable */ //prettier-ignore -(()=>{var Mue=Object.create;var Wb=Object.defineProperty;var Kue=Object.getOwnPropertyDescriptor;var Uue=Object.getOwnPropertyNames;var Hue=Object.getPrototypeOf,Gue=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var Yue=(r,e)=>()=>(r&&(e=r(r=0)),e);var w=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ut=(r,e)=>{for(var t in e)Wb(r,t,{get:e[t],enumerable:!0})},jue=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Uue(e))!Gue.call(r,n)&&n!==t&&Wb(r,n,{get:()=>e[n],enumerable:!(i=Kue(e,n))||i.enumerable});return r};var Pe=(r,e,t)=>(t=r!=null?Mue(Hue(r)):{},jue(e||!r||!r.__esModule?Wb(t,"default",{value:r,enumerable:!0}):t,r));var _1=w((O7e,X1)=>{X1.exports=V1;V1.sync=uge;var W1=J("fs");function cge(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{tK.exports=$1;$1.sync=gge;var Z1=J("fs");function $1(r,e,t){Z1.stat(r,function(i,n){t(i,i?!1:eK(n,e))})}function gge(r,e){return eK(Z1.statSync(r),e)}function eK(r,e){return r.isFile()&&fge(r,e)}function fge(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var nK=w((U7e,iK)=>{var K7e=J("fs"),_E;process.platform==="win32"||global.TESTING_WINDOWS?_E=_1():_E=rK();iK.exports=uS;uS.sync=hge;function uS(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){uS(r,e||{},function(s,o){s?n(s):i(o)})})}_E(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function hge(r,e){try{return _E.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var uK=w((H7e,cK)=>{var Ig=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",sK=J("path"),pge=Ig?";":":",oK=nK(),aK=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),AK=(r,e)=>{let t=e.colon||pge,i=r.match(/\//)||Ig&&r.match(/\\/)?[""]:[...Ig?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=Ig?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Ig?n.split(t):[""];return Ig&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},lK=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=AK(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(aK(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=sK.join(h,r),C=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(C,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];oK(c+p,{pathExt:s},(C,y)=>{if(!C&&y)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},dge=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=AK(r,e),s=[];for(let o=0;o{"use strict";var gK=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};gS.exports=gK;gS.exports.default=gK});var CK=w((Y7e,dK)=>{"use strict";var hK=J("path"),Cge=uK(),mge=fK();function pK(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=Cge.sync(r.command,{path:t[mge({env:t})],pathExt:e?hK.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=hK.resolve(n?r.options.cwd:"",o)),o}function Ege(r){return pK(r)||pK(r,!0)}dK.exports=Ege});var mK=w((j7e,hS)=>{"use strict";var fS=/([()\][%!^"`<>&|;, *?])/g;function Ige(r){return r=r.replace(fS,"^$1"),r}function yge(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(fS,"^$1"),e&&(r=r.replace(fS,"^$1")),r}hS.exports.command=Ige;hS.exports.argument=yge});var IK=w((q7e,EK)=>{"use strict";EK.exports=/^#!(.*)/});var wK=w((J7e,yK)=>{"use strict";var wge=IK();yK.exports=(r="")=>{let e=r.match(wge);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var QK=w((W7e,BK)=>{"use strict";var pS=J("fs"),Bge=wK();function Qge(r){let t=Buffer.alloc(150),i;try{i=pS.openSync(r,"r"),pS.readSync(i,t,0,150,0),pS.closeSync(i)}catch{}return Bge(t.toString())}BK.exports=Qge});var xK=w((z7e,vK)=>{"use strict";var bge=J("path"),bK=CK(),SK=mK(),Sge=QK(),vge=process.platform==="win32",xge=/\.(?:com|exe)$/i,Pge=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Dge(r){r.file=bK(r);let e=r.file&&Sge(r.file);return e?(r.args.unshift(r.file),r.command=e,bK(r)):r.file}function kge(r){if(!vge)return r;let e=Dge(r),t=!xge.test(e);if(r.options.forceShell||t){let i=Pge.test(e);r.command=bge.normalize(r.command),r.command=SK.command(r.command),r.args=r.args.map(s=>SK.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function Rge(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:kge(i)}vK.exports=Rge});var kK=w((V7e,DK)=>{"use strict";var dS=process.platform==="win32";function CS(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function Fge(r,e){if(!dS)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=PK(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function PK(r,e){return dS&&r===1&&!e.file?CS(e.original,"spawn"):null}function Nge(r,e){return dS&&r===1&&!e.file?CS(e.original,"spawnSync"):null}DK.exports={hookChildProcess:Fge,verifyENOENT:PK,verifyENOENTSync:Nge,notFoundError:CS}});var IS=w((X7e,yg)=>{"use strict";var RK=J("child_process"),mS=xK(),ES=kK();function FK(r,e,t){let i=mS(r,e,t),n=RK.spawn(i.command,i.args,i.options);return ES.hookChildProcess(n,i),n}function Lge(r,e,t){let i=mS(r,e,t),n=RK.spawnSync(i.command,i.args,i.options);return n.error=n.error||ES.verifyENOENTSync(n.status,i),n}yg.exports=FK;yg.exports.spawn=FK;yg.exports.sync=Lge;yg.exports._parse=mS;yg.exports._enoent=ES});var LK=w((_7e,NK)=>{"use strict";function Tge(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Ml(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ml)}Tge(Ml,Error);Ml.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",ie=me(">>",!1),de=">&",tt=me(">&",!1),Pt=">",It=me(">",!1),Or="<<<",ii=me("<<<",!1),gi="<&",hr=me("<&",!1),fi="<",ni=me("<",!1),Ls=function(m){return{type:"argument",segments:[].concat(...m)}},pr=function(m){return m},Ei="$'",_n=me("$'",!1),oa="'",aA=me("'",!1),eg=function(m){return[{type:"text",text:m}]},Zn='""',AA=me('""',!1),aa=function(){return{type:"text",text:""}},up='"',lA=me('"',!1),cA=function(m){return m},wr=function(m){return{type:"arithmetic",arithmetic:m,quoted:!0}},wl=function(m){return{type:"shell",shell:m,quoted:!0}},tg=function(m){return{type:"variable",...m,quoted:!0}},po=function(m){return{type:"text",text:m}},rg=function(m){return{type:"arithmetic",arithmetic:m,quoted:!1}},gp=function(m){return{type:"shell",shell:m,quoted:!1}},fp=function(m){return{type:"variable",...m,quoted:!1}},vr=function(m){return{type:"glob",pattern:m}},se=/^[^']/,Co=Je(["'"],!0,!1),Dn=function(m){return m.join("")},ig=/^[^$"]/,Qt=Je(["$",'"'],!0,!1),Bl=`\\ +;(()=>{var Mue=Object.create;var Wb=Object.defineProperty;var Kue=Object.getOwnPropertyDescriptor;var Uue=Object.getOwnPropertyNames;var Hue=Object.getPrototypeOf,Gue=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var Yue=(r,e)=>()=>(r&&(e=r(r=0)),e);var w=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ut=(r,e)=>{for(var t in e)Wb(r,t,{get:e[t],enumerable:!0})},jue=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Uue(e))!Gue.call(r,n)&&n!==t&&Wb(r,n,{get:()=>e[n],enumerable:!(i=Kue(e,n))||i.enumerable});return r};var Pe=(r,e,t)=>(t=r!=null?Mue(Hue(r)):{},jue(e||!r||!r.__esModule?Wb(t,"default",{value:r,enumerable:!0}):t,r));var _1=w((O7e,X1)=>{X1.exports=V1;V1.sync=uge;var W1=J("fs");function cge(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{tK.exports=$1;$1.sync=gge;var Z1=J("fs");function $1(r,e,t){Z1.stat(r,function(i,n){t(i,i?!1:eK(n,e))})}function gge(r,e){return eK(Z1.statSync(r),e)}function eK(r,e){return r.isFile()&&fge(r,e)}function fge(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var nK=w((U7e,iK)=>{var K7e=J("fs"),_E;process.platform==="win32"||global.TESTING_WINDOWS?_E=_1():_E=rK();iK.exports=uS;uS.sync=hge;function uS(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){uS(r,e||{},function(s,o){s?n(s):i(o)})})}_E(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function hge(r,e){try{return _E.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var uK=w((H7e,cK)=>{var Ig=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",sK=J("path"),pge=Ig?";":":",oK=nK(),aK=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),AK=(r,e)=>{let t=e.colon||pge,i=r.match(/\//)||Ig&&r.match(/\\/)?[""]:[...Ig?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=Ig?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Ig?n.split(t):[""];return Ig&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},lK=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=AK(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(aK(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=sK.join(h,r),C=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(C,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];oK(c+p,{pathExt:s},(C,y)=>{if(!C&&y)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},dge=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=AK(r,e),s=[];for(let o=0;o{"use strict";var gK=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};gS.exports=gK;gS.exports.default=gK});var CK=w((Y7e,dK)=>{"use strict";var hK=J("path"),Cge=uK(),mge=fK();function pK(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=Cge.sync(r.command,{path:t[mge({env:t})],pathExt:e?hK.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=hK.resolve(n?r.options.cwd:"",o)),o}function Ege(r){return pK(r)||pK(r,!0)}dK.exports=Ege});var mK=w((j7e,hS)=>{"use strict";var fS=/([()\][%!^"`<>&|;, *?])/g;function Ige(r){return r=r.replace(fS,"^$1"),r}function yge(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(fS,"^$1"),e&&(r=r.replace(fS,"^$1")),r}hS.exports.command=Ige;hS.exports.argument=yge});var IK=w((q7e,EK)=>{"use strict";EK.exports=/^#!(.*)/});var wK=w((J7e,yK)=>{"use strict";var wge=IK();yK.exports=(r="")=>{let e=r.match(wge);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var QK=w((W7e,BK)=>{"use strict";var pS=J("fs"),Bge=wK();function Qge(r){let t=Buffer.alloc(150),i;try{i=pS.openSync(r,"r"),pS.readSync(i,t,0,150,0),pS.closeSync(i)}catch{}return Bge(t.toString())}BK.exports=Qge});var xK=w((z7e,vK)=>{"use strict";var bge=J("path"),bK=CK(),SK=mK(),Sge=QK(),vge=process.platform==="win32",xge=/\.(?:com|exe)$/i,Pge=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Dge(r){r.file=bK(r);let e=r.file&&Sge(r.file);return e?(r.args.unshift(r.file),r.command=e,bK(r)):r.file}function kge(r){if(!vge)return r;let e=Dge(r),t=!xge.test(e);if(r.options.forceShell||t){let i=Pge.test(e);r.command=bge.normalize(r.command),r.command=SK.command(r.command),r.args=r.args.map(s=>SK.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function Rge(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:kge(i)}vK.exports=Rge});var kK=w((V7e,DK)=>{"use strict";var dS=process.platform==="win32";function CS(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function Fge(r,e){if(!dS)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=PK(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function PK(r,e){return dS&&r===1&&!e.file?CS(e.original,"spawn"):null}function Nge(r,e){return dS&&r===1&&!e.file?CS(e.original,"spawnSync"):null}DK.exports={hookChildProcess:Fge,verifyENOENT:PK,verifyENOENTSync:Nge,notFoundError:CS}});var IS=w((X7e,yg)=>{"use strict";var RK=J("child_process"),mS=xK(),ES=kK();function FK(r,e,t){let i=mS(r,e,t),n=RK.spawn(i.command,i.args,i.options);return ES.hookChildProcess(n,i),n}function Lge(r,e,t){let i=mS(r,e,t),n=RK.spawnSync(i.command,i.args,i.options);return n.error=n.error||ES.verifyENOENTSync(n.status,i),n}yg.exports=FK;yg.exports.spawn=FK;yg.exports.sync=Lge;yg.exports._parse=mS;yg.exports._enoent=ES});var LK=w((_7e,NK)=>{"use strict";function Tge(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Ml(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ml)}Tge(Ml,Error);Ml.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",ie=me(">>",!1),de=">&",tt=me(">&",!1),Pt=">",It=me(">",!1),Or="<<<",ii=me("<<<",!1),gi="<&",hr=me("<&",!1),fi="<",ni=me("<",!1),Ls=function(m){return{type:"argument",segments:[].concat(...m)}},pr=function(m){return m},Ei="$'",_n=me("$'",!1),oa="'",aA=me("'",!1),eg=function(m){return[{type:"text",text:m}]},Zn='""',AA=me('""',!1),aa=function(){return{type:"text",text:""}},up='"',lA=me('"',!1),cA=function(m){return m},wr=function(m){return{type:"arithmetic",arithmetic:m,quoted:!0}},wl=function(m){return{type:"shell",shell:m,quoted:!0}},tg=function(m){return{type:"variable",...m,quoted:!0}},po=function(m){return{type:"text",text:m}},rg=function(m){return{type:"arithmetic",arithmetic:m,quoted:!1}},gp=function(m){return{type:"shell",shell:m,quoted:!1}},fp=function(m){return{type:"variable",...m,quoted:!1}},vr=function(m){return{type:"glob",pattern:m}},se=/^[^']/,Co=Je(["'"],!0,!1),Dn=function(m){return m.join("")},ig=/^[^$"]/,Qt=Je(["$",'"'],!0,!1),Bl=`\\ `,kn=me(`\\ `,!1),$n=function(){return""},es="\\",gt=me("\\",!1),mo=/^[\\$"`]/,At=Je(["\\","$",'"',"`"],!1,!1),an=function(m){return m},S="\\a",Tt=me("\\a",!1),ng=function(){return"a"},Ql="\\b",hp=me("\\b",!1),pp=function(){return"\b"},dp=/^[Ee]/,Cp=Je(["E","e"],!1,!1),mp=function(){return"\x1B"},G="\\f",yt=me("\\f",!1),uA=function(){return"\f"},ji="\\n",bl=me("\\n",!1),Xe=function(){return` `},Aa="\\r",sg=me("\\r",!1),bE=function(){return"\r"},Ep="\\t",SE=me("\\t",!1),ar=function(){return" "},Rn="\\v",Sl=me("\\v",!1),Ip=function(){return"\v"},Ts=/^[\\'"?]/,la=Je(["\\","'",'"',"?"],!1,!1),An=function(m){return String.fromCharCode(parseInt(m,16))},Te="\\x",og=me("\\x",!1),vl="\\u",Os=me("\\u",!1),xl="\\U",gA=me("\\U",!1),ag=function(m){return String.fromCodePoint(parseInt(m,16))},Ag=/^[0-7]/,ca=Je([["0","7"]],!1,!1),ua=/^[0-9a-fA-f]/,rt=Je([["0","9"],["a","f"],["A","f"]],!1,!1),Eo=nt(),fA="-",Pl=me("-",!1),Ms="+",Dl=me("+",!1),vE=".",yp=me(".",!1),lg=function(m,b,N){return{type:"number",value:(m==="-"?-1:1)*parseFloat(b.join("")+"."+N.join(""))}},wp=function(m,b){return{type:"number",value:(m==="-"?-1:1)*parseInt(b.join(""))}},xE=function(m){return{type:"variable",...m}},kl=function(m){return{type:"variable",name:m}},PE=function(m){return m},cg="*",hA=me("*",!1),Rr="/",DE=me("/",!1),Ks=function(m,b,N){return{type:b==="*"?"multiplication":"division",right:N}},Us=function(m,b){return b.reduce((N,U)=>({left:N,...U}),m)},ug=function(m,b,N){return{type:b==="+"?"addition":"subtraction",right:N}},pA="$((",R=me("$((",!1),q="))",Ce=me("))",!1),Ke=function(m){return m},Re="$(",ze=me("$(",!1),dt=function(m){return m},Ft="${",Fn=me("${",!1),Db=":-",$M=me(":-",!1),e1=function(m,b){return{name:m,defaultValue:b}},kb=":-}",t1=me(":-}",!1),r1=function(m){return{name:m,defaultValue:[]}},Rb=":+",i1=me(":+",!1),n1=function(m,b){return{name:m,alternativeValue:b}},Fb=":+}",s1=me(":+}",!1),o1=function(m){return{name:m,alternativeValue:[]}},Nb=function(m){return{name:m}},a1="$",A1=me("$",!1),l1=function(m){return e.isGlobPattern(m)},c1=function(m){return m},Lb=/^[a-zA-Z0-9_]/,Tb=Je([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Ob=function(){return T()},Mb=/^[$@*?#a-zA-Z0-9_\-]/,Kb=Je(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),u1=/^[(){}<>$|&; \t"']/,gg=Je(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),Ub=/^[<>&; \t"']/,Hb=Je(["<",">","&",";"," "," ",'"',"'"],!1,!1),kE=/^[ \t]/,RE=Je([" "," "],!1,!1),Q=0,Me=0,dA=[{line:1,column:1}],d=0,E=[],I=0,k;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function T(){return r.substring(Me,Q)}function _(){return Et(Me,Q)}function te(m,b){throw b=b!==void 0?b:Et(Me,Q),ki([lt(m)],r.substring(Me,Q),b)}function Be(m,b){throw b=b!==void 0?b:Et(Me,Q),Nn(m,b)}function me(m,b){return{type:"literal",text:m,ignoreCase:b}}function Je(m,b,N){return{type:"class",parts:m,inverted:b,ignoreCase:N}}function nt(){return{type:"any"}}function wt(){return{type:"end"}}function lt(m){return{type:"other",description:m}}function it(m){var b=dA[m],N;if(b)return b;for(N=m-1;!dA[N];)N--;for(b=dA[N],b={line:b.line,column:b.column};Nd&&(d=Q,E=[]),E.push(m))}function Nn(m,b){return new Ml(m,null,null,b)}function ki(m,b,N){return new Ml(Ml.buildMessage(m,b),m,b,N)}function CA(){var m,b;return m=Q,b=Mr(),b===t&&(b=null),b!==t&&(Me=m,b=s(b)),m=b,m}function Mr(){var m,b,N,U,ce;if(m=Q,b=Kr(),b!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();N!==t?(U=ga(),U!==t?(ce=ts(),ce===t&&(ce=null),ce!==t?(Me=m,b=o(b,U,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;if(m===t)if(m=Q,b=Kr(),b!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();N!==t?(U=ga(),U===t&&(U=null),U!==t?(Me=m,b=a(b,U),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;return m}function ts(){var m,b,N,U,ce;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(N=Mr(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,b=l(N),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t;return m}function ga(){var m;return r.charCodeAt(Q)===59?(m=c,Q++):(m=t,I===0&&Qe(u)),m===t&&(r.charCodeAt(Q)===38?(m=g,Q++):(m=t,I===0&&Qe(f))),m}function Kr(){var m,b,N;return m=Q,b=g1(),b!==t?(N=yue(),N===t&&(N=null),N!==t?(Me=m,b=h(b,N),m=b):(Q=m,m=t)):(Q=m,m=t),m}function yue(){var m,b,N,U,ce,Se,ht;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(N=wue(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Kr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Me=m,b=p(N,ce),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;return m}function wue(){var m;return r.substr(Q,2)===C?(m=C,Q+=2):(m=t,I===0&&Qe(y)),m===t&&(r.substr(Q,2)===B?(m=B,Q+=2):(m=t,I===0&&Qe(v))),m}function g1(){var m,b,N;return m=Q,b=bue(),b!==t?(N=Bue(),N===t&&(N=null),N!==t?(Me=m,b=D(b,N),m=b):(Q=m,m=t)):(Q=m,m=t),m}function Bue(){var m,b,N,U,ce,Se,ht;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(N=Que(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=g1(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Me=m,b=L(N,ce),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;return m}function Que(){var m;return r.substr(Q,2)===H?(m=H,Q+=2):(m=t,I===0&&Qe(j)),m===t&&(r.charCodeAt(Q)===124?(m=$,Q++):(m=t,I===0&&Qe(V))),m}function FE(){var m,b,N,U,ce,Se;if(m=Q,b=Q1(),b!==t)if(r.charCodeAt(Q)===61?(N=W,Q++):(N=t,I===0&&Qe(Z)),N!==t)if(U=p1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(Me=m,b=A(b,U),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t;else Q=m,m=t;if(m===t)if(m=Q,b=Q1(),b!==t)if(r.charCodeAt(Q)===61?(N=W,Q++):(N=t,I===0&&Qe(Z)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,b=ae(b),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t;return m}function bue(){var m,b,N,U,ce,Se,ht,Bt,Jr,hi,rs;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(r.charCodeAt(Q)===40?(N=ge,Q++):(N=t,I===0&&Qe(re)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Mr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();if(Se!==t)if(r.charCodeAt(Q)===41?(ht=O,Q++):(ht=t,I===0&&Qe(F)),ht!==t){for(Bt=[],Jr=He();Jr!==t;)Bt.push(Jr),Jr=He();if(Bt!==t){for(Jr=[],hi=Bp();hi!==t;)Jr.push(hi),hi=Bp();if(Jr!==t){for(hi=[],rs=He();rs!==t;)hi.push(rs),rs=He();hi!==t?(Me=m,b=ue(ce,Jr),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;if(m===t){for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t)if(r.charCodeAt(Q)===123?(N=he,Q++):(N=t,I===0&&Qe(ke)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Mr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();if(Se!==t)if(r.charCodeAt(Q)===125?(ht=Fe,Q++):(ht=t,I===0&&Qe(Ne)),ht!==t){for(Bt=[],Jr=He();Jr!==t;)Bt.push(Jr),Jr=He();if(Bt!==t){for(Jr=[],hi=Bp();hi!==t;)Jr.push(hi),hi=Bp();if(Jr!==t){for(hi=[],rs=He();rs!==t;)hi.push(rs),rs=He();hi!==t?(Me=m,b=oe(ce,Jr),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;if(m===t){for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t){for(N=[],U=FE();U!==t;)N.push(U),U=FE();if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t){if(ce=[],Se=h1(),Se!==t)for(;Se!==t;)ce.push(Se),Se=h1();else ce=t;if(ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Me=m,b=le(N,ce),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t;if(m===t){for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t){if(N=[],U=FE(),U!==t)for(;U!==t;)N.push(U),U=FE();else N=t;if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,b=we(N),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}}}return m}function f1(){var m,b,N,U,ce;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t){if(N=[],U=NE(),U!==t)for(;U!==t;)N.push(U),U=NE();else N=t;if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Me=m,b=fe(N),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t;return m}function h1(){var m,b,N;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();if(b!==t?(N=Bp(),N!==t?(Me=m,b=Ae(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t){for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();b!==t?(N=NE(),N!==t?(Me=m,b=Ae(N),m=b):(Q=m,m=t)):(Q=m,m=t)}return m}function Bp(){var m,b,N,U,ce;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();return b!==t?(qe.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(ne)),N===t&&(N=null),N!==t?(U=Sue(),U!==t?(ce=NE(),ce!==t?(Me=m,b=Y(N,U,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function Sue(){var m;return r.substr(Q,2)===pe?(m=pe,Q+=2):(m=t,I===0&&Qe(ie)),m===t&&(r.substr(Q,2)===de?(m=de,Q+=2):(m=t,I===0&&Qe(tt)),m===t&&(r.charCodeAt(Q)===62?(m=Pt,Q++):(m=t,I===0&&Qe(It)),m===t&&(r.substr(Q,3)===Or?(m=Or,Q+=3):(m=t,I===0&&Qe(ii)),m===t&&(r.substr(Q,2)===gi?(m=gi,Q+=2):(m=t,I===0&&Qe(hr)),m===t&&(r.charCodeAt(Q)===60?(m=fi,Q++):(m=t,I===0&&Qe(ni))))))),m}function NE(){var m,b,N;for(m=Q,b=[],N=He();N!==t;)b.push(N),N=He();return b!==t?(N=p1(),N!==t?(Me=m,b=Ae(N),m=b):(Q=m,m=t)):(Q=m,m=t),m}function p1(){var m,b,N;if(m=Q,b=[],N=d1(),N!==t)for(;N!==t;)b.push(N),N=d1();else b=t;return b!==t&&(Me=m,b=Ls(b)),m=b,m}function d1(){var m,b;return m=Q,b=vue(),b!==t&&(Me=m,b=pr(b)),m=b,m===t&&(m=Q,b=xue(),b!==t&&(Me=m,b=pr(b)),m=b,m===t&&(m=Q,b=Pue(),b!==t&&(Me=m,b=pr(b)),m=b,m===t&&(m=Q,b=Due(),b!==t&&(Me=m,b=pr(b)),m=b))),m}function vue(){var m,b,N,U;return m=Q,r.substr(Q,2)===Ei?(b=Ei,Q+=2):(b=t,I===0&&Qe(_n)),b!==t?(N=Fue(),N!==t?(r.charCodeAt(Q)===39?(U=oa,Q++):(U=t,I===0&&Qe(aA)),U!==t?(Me=m,b=eg(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function xue(){var m,b,N,U;return m=Q,r.charCodeAt(Q)===39?(b=oa,Q++):(b=t,I===0&&Qe(aA)),b!==t?(N=kue(),N!==t?(r.charCodeAt(Q)===39?(U=oa,Q++):(U=t,I===0&&Qe(aA)),U!==t?(Me=m,b=eg(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function Pue(){var m,b,N,U;if(m=Q,r.substr(Q,2)===Zn?(b=Zn,Q+=2):(b=t,I===0&&Qe(AA)),b!==t&&(Me=m,b=aa()),m=b,m===t)if(m=Q,r.charCodeAt(Q)===34?(b=up,Q++):(b=t,I===0&&Qe(lA)),b!==t){for(N=[],U=C1();U!==t;)N.push(U),U=C1();N!==t?(r.charCodeAt(Q)===34?(U=up,Q++):(U=t,I===0&&Qe(lA)),U!==t?(Me=m,b=cA(N),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;return m}function Due(){var m,b,N;if(m=Q,b=[],N=m1(),N!==t)for(;N!==t;)b.push(N),N=m1();else b=t;return b!==t&&(Me=m,b=cA(b)),m=b,m}function C1(){var m,b;return m=Q,b=w1(),b!==t&&(Me=m,b=wr(b)),m=b,m===t&&(m=Q,b=B1(),b!==t&&(Me=m,b=wl(b)),m=b,m===t&&(m=Q,b=qb(),b!==t&&(Me=m,b=tg(b)),m=b,m===t&&(m=Q,b=Rue(),b!==t&&(Me=m,b=po(b)),m=b))),m}function m1(){var m,b;return m=Q,b=w1(),b!==t&&(Me=m,b=rg(b)),m=b,m===t&&(m=Q,b=B1(),b!==t&&(Me=m,b=gp(b)),m=b,m===t&&(m=Q,b=qb(),b!==t&&(Me=m,b=fp(b)),m=b,m===t&&(m=Q,b=Tue(),b!==t&&(Me=m,b=vr(b)),m=b,m===t&&(m=Q,b=Lue(),b!==t&&(Me=m,b=po(b)),m=b)))),m}function kue(){var m,b,N;for(m=Q,b=[],se.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Co));N!==t;)b.push(N),se.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Co));return b!==t&&(Me=m,b=Dn(b)),m=b,m}function Rue(){var m,b,N;if(m=Q,b=[],N=E1(),N===t&&(ig.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Qt))),N!==t)for(;N!==t;)b.push(N),N=E1(),N===t&&(ig.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Qt)));else b=t;return b!==t&&(Me=m,b=Dn(b)),m=b,m}function E1(){var m,b,N;return m=Q,r.substr(Q,2)===Bl?(b=Bl,Q+=2):(b=t,I===0&&Qe(kn)),b!==t&&(Me=m,b=$n()),m=b,m===t&&(m=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Qe(gt)),b!==t?(mo.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(At)),N!==t?(Me=m,b=an(N),m=b):(Q=m,m=t)):(Q=m,m=t)),m}function Fue(){var m,b,N;for(m=Q,b=[],N=I1(),N===t&&(se.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Co)));N!==t;)b.push(N),N=I1(),N===t&&(se.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Co)));return b!==t&&(Me=m,b=Dn(b)),m=b,m}function I1(){var m,b,N;return m=Q,r.substr(Q,2)===S?(b=S,Q+=2):(b=t,I===0&&Qe(Tt)),b!==t&&(Me=m,b=ng()),m=b,m===t&&(m=Q,r.substr(Q,2)===Ql?(b=Ql,Q+=2):(b=t,I===0&&Qe(hp)),b!==t&&(Me=m,b=pp()),m=b,m===t&&(m=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Qe(gt)),b!==t?(dp.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Cp)),N!==t?(Me=m,b=mp(),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===G?(b=G,Q+=2):(b=t,I===0&&Qe(yt)),b!==t&&(Me=m,b=uA()),m=b,m===t&&(m=Q,r.substr(Q,2)===ji?(b=ji,Q+=2):(b=t,I===0&&Qe(bl)),b!==t&&(Me=m,b=Xe()),m=b,m===t&&(m=Q,r.substr(Q,2)===Aa?(b=Aa,Q+=2):(b=t,I===0&&Qe(sg)),b!==t&&(Me=m,b=bE()),m=b,m===t&&(m=Q,r.substr(Q,2)===Ep?(b=Ep,Q+=2):(b=t,I===0&&Qe(SE)),b!==t&&(Me=m,b=ar()),m=b,m===t&&(m=Q,r.substr(Q,2)===Rn?(b=Rn,Q+=2):(b=t,I===0&&Qe(Sl)),b!==t&&(Me=m,b=Ip()),m=b,m===t&&(m=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Qe(gt)),b!==t?(Ts.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(la)),N!==t?(Me=m,b=an(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Nue()))))))))),m}function Nue(){var m,b,N,U,ce,Se,ht,Bt,Jr,hi,rs,Jb;return m=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Qe(gt)),b!==t?(N=Gb(),N!==t?(Me=m,b=An(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Te?(b=Te,Q+=2):(b=t,I===0&&Qe(og)),b!==t?(N=Q,U=Q,ce=Gb(),ce!==t?(Se=Ln(),Se!==t?(ce=[ce,Se],U=ce):(Q=U,U=t)):(Q=U,U=t),U===t&&(U=Gb()),U!==t?N=r.substring(N,Q):N=U,N!==t?(Me=m,b=An(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===vl?(b=vl,Q+=2):(b=t,I===0&&Qe(Os)),b!==t?(N=Q,U=Q,ce=Ln(),ce!==t?(Se=Ln(),Se!==t?(ht=Ln(),ht!==t?(Bt=Ln(),Bt!==t?(ce=[ce,Se,ht,Bt],U=ce):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t),U!==t?N=r.substring(N,Q):N=U,N!==t?(Me=m,b=An(N),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===xl?(b=xl,Q+=2):(b=t,I===0&&Qe(gA)),b!==t?(N=Q,U=Q,ce=Ln(),ce!==t?(Se=Ln(),Se!==t?(ht=Ln(),ht!==t?(Bt=Ln(),Bt!==t?(Jr=Ln(),Jr!==t?(hi=Ln(),hi!==t?(rs=Ln(),rs!==t?(Jb=Ln(),Jb!==t?(ce=[ce,Se,ht,Bt,Jr,hi,rs,Jb],U=ce):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t),U!==t?N=r.substring(N,Q):N=U,N!==t?(Me=m,b=ag(N),m=b):(Q=m,m=t)):(Q=m,m=t)))),m}function Gb(){var m;return Ag.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Qe(ca)),m}function Ln(){var m;return ua.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Qe(rt)),m}function Lue(){var m,b,N,U,ce;if(m=Q,b=[],N=Q,r.charCodeAt(Q)===92?(U=es,Q++):(U=t,I===0&&Qe(gt)),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Eo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N===t&&(N=Q,U=Q,I++,ce=b1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Eo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t)),N!==t)for(;N!==t;)b.push(N),N=Q,r.charCodeAt(Q)===92?(U=es,Q++):(U=t,I===0&&Qe(gt)),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Eo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N===t&&(N=Q,U=Q,I++,ce=b1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Eo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t));else b=t;return b!==t&&(Me=m,b=Dn(b)),m=b,m}function Yb(){var m,b,N,U,ce,Se;if(m=Q,r.charCodeAt(Q)===45?(b=fA,Q++):(b=t,I===0&&Qe(Pl)),b===t&&(r.charCodeAt(Q)===43?(b=Ms,Q++):(b=t,I===0&&Qe(Dl))),b===t&&(b=null),b!==t){if(N=[],qe.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Qe(ne)),U!==t)for(;U!==t;)N.push(U),qe.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Qe(ne));else N=t;if(N!==t)if(r.charCodeAt(Q)===46?(U=vE,Q++):(U=t,I===0&&Qe(yp)),U!==t){if(ce=[],qe.test(r.charAt(Q))?(Se=r.charAt(Q),Q++):(Se=t,I===0&&Qe(ne)),Se!==t)for(;Se!==t;)ce.push(Se),qe.test(r.charAt(Q))?(Se=r.charAt(Q),Q++):(Se=t,I===0&&Qe(ne));else ce=t;ce!==t?(Me=m,b=lg(b,N,ce),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;if(m===t){if(m=Q,r.charCodeAt(Q)===45?(b=fA,Q++):(b=t,I===0&&Qe(Pl)),b===t&&(r.charCodeAt(Q)===43?(b=Ms,Q++):(b=t,I===0&&Qe(Dl))),b===t&&(b=null),b!==t){if(N=[],qe.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Qe(ne)),U!==t)for(;U!==t;)N.push(U),qe.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Qe(ne));else N=t;N!==t?(Me=m,b=wp(b,N),m=b):(Q=m,m=t)}else Q=m,m=t;if(m===t&&(m=Q,b=qb(),b!==t&&(Me=m,b=xE(b)),m=b,m===t&&(m=Q,b=Rl(),b!==t&&(Me=m,b=kl(b)),m=b,m===t)))if(m=Q,r.charCodeAt(Q)===40?(b=ge,Q++):(b=t,I===0&&Qe(re)),b!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();if(N!==t)if(U=y1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(r.charCodeAt(Q)===41?(Se=O,Q++):(Se=t,I===0&&Qe(F)),Se!==t?(Me=m,b=PE(U),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t}return m}function jb(){var m,b,N,U,ce,Se,ht,Bt;if(m=Q,b=Yb(),b!==t){for(N=[],U=Q,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(Q)===42?(Se=cg,Q++):(Se=t,I===0&&Qe(hA)),Se===t&&(r.charCodeAt(Q)===47?(Se=Rr,Q++):(Se=t,I===0&&Qe(DE))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=Yb(),Bt!==t?(Me=U,ce=Ks(b,Se,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t;for(;U!==t;){for(N.push(U),U=Q,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(Q)===42?(Se=cg,Q++):(Se=t,I===0&&Qe(hA)),Se===t&&(r.charCodeAt(Q)===47?(Se=Rr,Q++):(Se=t,I===0&&Qe(DE))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=Yb(),Bt!==t?(Me=U,ce=Ks(b,Se,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t}N!==t?(Me=m,b=Us(b,N),m=b):(Q=m,m=t)}else Q=m,m=t;return m}function y1(){var m,b,N,U,ce,Se,ht,Bt;if(m=Q,b=jb(),b!==t){for(N=[],U=Q,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(Q)===43?(Se=Ms,Q++):(Se=t,I===0&&Qe(Dl)),Se===t&&(r.charCodeAt(Q)===45?(Se=fA,Q++):(Se=t,I===0&&Qe(Pl))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=jb(),Bt!==t?(Me=U,ce=ug(b,Se,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t;for(;U!==t;){for(N.push(U),U=Q,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(Q)===43?(Se=Ms,Q++):(Se=t,I===0&&Qe(Dl)),Se===t&&(r.charCodeAt(Q)===45?(Se=fA,Q++):(Se=t,I===0&&Qe(Pl))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=jb(),Bt!==t?(Me=U,ce=ug(b,Se,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t}N!==t?(Me=m,b=Us(b,N),m=b):(Q=m,m=t)}else Q=m,m=t;return m}function w1(){var m,b,N,U,ce,Se;if(m=Q,r.substr(Q,3)===pA?(b=pA,Q+=3):(b=t,I===0&&Qe(R)),b!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();if(N!==t)if(U=y1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(r.substr(Q,2)===q?(Se=q,Q+=2):(Se=t,I===0&&Qe(Ce)),Se!==t?(Me=m,b=Ke(U),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;return m}function B1(){var m,b,N,U;return m=Q,r.substr(Q,2)===Re?(b=Re,Q+=2):(b=t,I===0&&Qe(ze)),b!==t?(N=Mr(),N!==t?(r.charCodeAt(Q)===41?(U=O,Q++):(U=t,I===0&&Qe(F)),U!==t?(Me=m,b=dt(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function qb(){var m,b,N,U,ce,Se;return m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Fn)),b!==t?(N=Rl(),N!==t?(r.substr(Q,2)===Db?(U=Db,Q+=2):(U=t,I===0&&Qe($M)),U!==t?(ce=f1(),ce!==t?(r.charCodeAt(Q)===125?(Se=Fe,Q++):(Se=t,I===0&&Qe(Ne)),Se!==t?(Me=m,b=e1(N,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Fn)),b!==t?(N=Rl(),N!==t?(r.substr(Q,3)===kb?(U=kb,Q+=3):(U=t,I===0&&Qe(t1)),U!==t?(Me=m,b=r1(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Fn)),b!==t?(N=Rl(),N!==t?(r.substr(Q,2)===Rb?(U=Rb,Q+=2):(U=t,I===0&&Qe(i1)),U!==t?(ce=f1(),ce!==t?(r.charCodeAt(Q)===125?(Se=Fe,Q++):(Se=t,I===0&&Qe(Ne)),Se!==t?(Me=m,b=n1(N,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Fn)),b!==t?(N=Rl(),N!==t?(r.substr(Q,3)===Fb?(U=Fb,Q+=3):(U=t,I===0&&Qe(s1)),U!==t?(Me=m,b=o1(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Qe(Fn)),b!==t?(N=Rl(),N!==t?(r.charCodeAt(Q)===125?(U=Fe,Q++):(U=t,I===0&&Qe(Ne)),U!==t?(Me=m,b=Nb(N),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.charCodeAt(Q)===36?(b=a1,Q++):(b=t,I===0&&Qe(A1)),b!==t?(N=Rl(),N!==t?(Me=m,b=Nb(N),m=b):(Q=m,m=t)):(Q=m,m=t)))))),m}function Tue(){var m,b,N;return m=Q,b=Oue(),b!==t?(Me=Q,N=l1(b),N?N=void 0:N=t,N!==t?(Me=m,b=c1(b),m=b):(Q=m,m=t)):(Q=m,m=t),m}function Oue(){var m,b,N,U,ce;if(m=Q,b=[],N=Q,U=Q,I++,ce=S1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Eo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t),N!==t)for(;N!==t;)b.push(N),N=Q,U=Q,I++,ce=S1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Qe(Eo)),ce!==t?(Me=N,U=an(ce),N=U):(Q=N,N=t)):(Q=N,N=t);else b=t;return b!==t&&(Me=m,b=Dn(b)),m=b,m}function Q1(){var m,b,N;if(m=Q,b=[],Lb.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Tb)),N!==t)for(;N!==t;)b.push(N),Lb.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Tb));else b=t;return b!==t&&(Me=m,b=Ob()),m=b,m}function Rl(){var m,b,N;if(m=Q,b=[],Mb.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Kb)),N!==t)for(;N!==t;)b.push(N),Mb.test(r.charAt(Q))?(N=r.charAt(Q),Q++):(N=t,I===0&&Qe(Kb));else b=t;return b!==t&&(Me=m,b=Ob()),m=b,m}function b1(){var m;return u1.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Qe(gg)),m}function S1(){var m;return Ub.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Qe(Hb)),m}function He(){var m,b;if(m=[],kE.test(r.charAt(Q))?(b=r.charAt(Q),Q++):(b=t,I===0&&Qe(RE)),b!==t)for(;b!==t;)m.push(b),kE.test(r.charAt(Q))?(b=r.charAt(Q),Q++):(b=t,I===0&&Qe(RE));else m=t;return m}if(k=n(),k!==t&&Q===r.length)return k;throw k!==t&&Q{"use strict";function Mge(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Ul(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ul)}Mge(Ul,Error);Ul.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gH&&(H=v,j=[]),j.push(ne))}function Ne(ne,Y){return new Ul(ne,null,null,Y)}function oe(ne,Y,pe){return new Ul(Ul.buildMessage(ne,Y),ne,Y,pe)}function le(){var ne,Y,pe,ie;return ne=v,Y=we(),Y!==t?(r.charCodeAt(v)===47?(pe=s,v++):(pe=t,$===0&&Fe(o)),pe!==t?(ie=we(),ie!==t?(D=ne,Y=a(Y,ie),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=we(),Y!==t&&(D=ne,Y=l(Y)),ne=Y),ne}function we(){var ne,Y,pe,ie;return ne=v,Y=fe(),Y!==t?(r.charCodeAt(v)===64?(pe=c,v++):(pe=t,$===0&&Fe(u)),pe!==t?(ie=qe(),ie!==t?(D=ne,Y=g(Y,ie),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=fe(),Y!==t&&(D=ne,Y=f(Y)),ne=Y),ne}function fe(){var ne,Y,pe,ie,de;return ne=v,r.charCodeAt(v)===64?(Y=c,v++):(Y=t,$===0&&Fe(u)),Y!==t?(pe=Ae(),pe!==t?(r.charCodeAt(v)===47?(ie=s,v++):(ie=t,$===0&&Fe(o)),ie!==t?(de=Ae(),de!==t?(D=ne,Y=h(),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=Ae(),Y!==t&&(D=ne,Y=h()),ne=Y),ne}function Ae(){var ne,Y,pe;if(ne=v,Y=[],p.test(r.charAt(v))?(pe=r.charAt(v),v++):(pe=t,$===0&&Fe(C)),pe!==t)for(;pe!==t;)Y.push(pe),p.test(r.charAt(v))?(pe=r.charAt(v),v++):(pe=t,$===0&&Fe(C));else Y=t;return Y!==t&&(D=ne,Y=h()),ne=Y,ne}function qe(){var ne,Y,pe;if(ne=v,Y=[],y.test(r.charAt(v))?(pe=r.charAt(v),v++):(pe=t,$===0&&Fe(B)),pe!==t)for(;pe!==t;)Y.push(pe),y.test(r.charAt(v))?(pe=r.charAt(v),v++):(pe=t,$===0&&Fe(B));else Y=t;return Y!==t&&(D=ne,Y=h()),ne=Y,ne}if(V=n(),V!==t&&v===r.length)return V;throw V!==t&&v{"use strict";function UK(r){return typeof r>"u"||r===null}function Uge(r){return typeof r=="object"&&r!==null}function Hge(r){return Array.isArray(r)?r:UK(r)?[]:[r]}function Gge(r,e){var t,i,n,s;if(e)for(s=Object.keys(e),t=0,i=s.length;t{"use strict";function Op(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Op.prototype=Object.create(Error.prototype);Op.prototype.constructor=Op;Op.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};HK.exports=Op});var jK=w((pXe,YK)=>{"use strict";var GK=Gl();function SS(r,e,t,i,n){this.name=r,this.buffer=e,this.position=t,this.line=i,this.column=n}SS.prototype.getSnippet=function(e,t){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&`\0\r diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8cfa7fec792..85016463715 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ guide in some places. - [Style guide](#style-guide) - [Add images](#add-images) - [Format Markdown and MDX](#format-markdown-and-mdx) - - [Live code blocks](#live-code-blocks) + - [Live code blocks](#live-code-blocks) ## Contribution workflow @@ -34,10 +34,10 @@ To contribute changes: 2. [Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) this repository to your computer and navigate into it. - ```bash - git clone https://github.com/MetaMask/metamask-docs.git - cd metamask-docs - ``` + ```bash + git clone https://github.com/MetaMask/metamask-docs.git + cd metamask-docs + ``` > **Note**: If you don't have write access to this repository, you must [fork the > repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository) @@ -56,9 +56,9 @@ To contribute changes: We recommend including the issue number and a short description in the branch name (for example, `183-doc-cli-option`), which is a reminder to fix only one issue in a PR. - ```bash - git checkout -b - - ``` + ```bash + git checkout -b - + ``` > **Tip:** You can use a Git client such as [Fork](https://fork.dev/) instead of the command line. @@ -68,6 +68,7 @@ To contribute changes: and [format your Markdown correctly](https://docs-template.consensys.net/contribute/format-markdown). > **Notes:** + > > - All documentation content is located in the `wallet` and `snaps` directories. > - If you add a new documentation page, make sure to edit `wallet-sidebar.js` or > `snaps-sidebar.js` to add the page to the @@ -81,11 +82,11 @@ To contribute changes: 6. Add and commit your changes, briefly describing your changes in the commit message. Push your changes to the remote origin. - ```bash - git add . - git commit -m "" - git push origin - ``` + ```bash + git add . + git commit -m "" + git push origin + ``` 7. On [this repository on GitHub](https://github.com/MetaMask/metamask-docs), you’ll see a banner prompting you to create a PR with your recent changes. @@ -93,15 +94,15 @@ To contribute changes: [Link the issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) that your PR fixes by adding `fixes #` to the PR description. -9. Specific reviewers are automatically requested when you submit a PR. +8. Specific reviewers are automatically requested when you submit a PR. You can request additional reviewers in the right sidebar of your PR – for example, the original issue raiser. Make any required changes to your PR based on reviewer feedback, repeating steps 5–7. 9. After your PR is approved by two reviewers, all checks have passed, and your branch has no - conflicts with the main branch, you can merge your PR. - If you don't have merge access, a maintainer will merge your PR for you. - You can delete the topic branch after your PR is merged. + conflicts with the main branch, you can merge your PR. + If you don't have merge access, a maintainer will merge your PR for you. + You can delete the topic branch after your PR is merged. ## Preview locally @@ -160,8 +161,9 @@ If you need to test analytics events in your local development environment be su ```bash export SEGMENT_ANALYTICS_KEY="" ``` + Then build the project in production mode using the following command: ```bash yarn build && yarn serve -``` \ No newline at end of file +``` diff --git a/README.md b/README.md index e1b98dacc66..eaaff841067 100644 --- a/README.md +++ b/README.md @@ -19,31 +19,31 @@ Build the documentation site locally using the following steps. 1. Clone the repository. - ```bash - git clone https://github.com/MetaMask/metamask-docs.git - cd metamask-docs - ``` - - > **Note:** If you don't have write access to this repository, you must [fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository) to your personal account and clone your forked repository instead. [Add an upstream remote](https://docs.github.com/en/get-started/quickstart/fork-a-repo#configuring-git-to-sync-your-fork-with-the-upstream-repository) to be able to pull from and push to the original repository. - > - > ```bash - > git clone https://github.com//metamask-docs.git - > cd metamask-docs - > git remote add upstream https://github.com/MetaMask/metamask-docs.git - > ``` - + ```bash + git clone https://github.com/MetaMask/metamask-docs.git + cd metamask-docs + ``` + + > **Note:** If you don't have write access to this repository, you must [fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository) to your personal account and clone your forked repository instead. [Add an upstream remote](https://docs.github.com/en/get-started/quickstart/fork-a-repo#configuring-git-to-sync-your-fork-with-the-upstream-repository) to be able to pull from and push to the original repository. + > + > ```bash + > git clone https://github.com//metamask-docs.git + > cd metamask-docs + > git remote add upstream https://github.com/MetaMask/metamask-docs.git + > ``` + 2. Install dependencies. - ```bash - yarn install - ``` - + ```bash + yarn install + ``` + 3. Start the development server. - ```bash - yarn start - ``` - - Once the server starts, you can view the documentation at `http://localhost:3000`. + ```bash + yarn start + ``` + + Once the server starts, you can view the documentation at `http://localhost:3000`. For more information on contributing to the documentation, see the [full contribution guidelines](CONTRIBUTING.md). diff --git a/crowdin.yml b/crowdin.yml index ef32981523c..6d4480dcc20 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -13,4 +13,4 @@ files: - source: /services/**/* translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/**/%original_file_name% - source: /docs/**/* - translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/**/%original_file_name% \ No newline at end of file + translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/**/%original_file_name% diff --git a/dashboard-sidebar.js b/dashboard-sidebar.js index 972e459caa7..71f8f72d350 100644 --- a/dashboard-sidebar.js +++ b/dashboard-sidebar.js @@ -19,4 +19,3 @@ const sidebar = { }; module.exports = sidebar; - diff --git a/developer-tools/dashboard/get-started/create-api.md b/developer-tools/dashboard/get-started/create-api.md index 2bacec389ba..9d9e6524452 100644 --- a/developer-tools/dashboard/get-started/create-api.md +++ b/developer-tools/dashboard/get-started/create-api.md @@ -28,13 +28,14 @@ To create an API key: 1. Open the [Infura dashboard](https://infura.io/dashboard). Enter your login details, if required. 1. Select **CREATE NEW API KEY**. -
-
- -
-
+
+
+ +
+
+ 1. From the pop-up window, provide a name, then click **CREATE**. 1. Select the networks that you want your API key to access, and select **Save Changes**. @@ -49,5 +50,5 @@ We recommend the following best practices when creating your API keys: - Group API key endpoints by groups or individuals [sharing the API key](../how-to/project-sharing.md). - Limit the number of networks or services per API key only to the necessary endpoints. - Group the API key endpoints based on shared security considerations such as - [allowlists](../how-to/secure-an-api/use-an-allowlist.md) or - [key request volume limits](../how-to/secure-an-api/set-rate-limits.md). \ No newline at end of file + [allowlists](../how-to/secure-an-api/use-an-allowlist.md) or + [key request volume limits](../how-to/secure-an-api/set-rate-limits.md). diff --git a/developer-tools/dashboard/how-to/dashboard-stats.md b/developer-tools/dashboard/how-to/dashboard-stats.md index 2a34ae4c5b0..1a4405ffecd 100644 --- a/developer-tools/dashboard/how-to/dashboard-stats.md +++ b/developer-tools/dashboard/how-to/dashboard-stats.md @@ -12,26 +12,27 @@ This data is crucial for optimizing your applications and ensuring they run smoo ## Specify stats to view 1. In the top menu of the [Infura dashboard](https://app.infura.io/), select **Stats**. - The stats page displays the total volume of requests sent to Infura over the specified time period. - By default, data is shown from the last 24 hours from all Web3 API keys. + The stats page displays the total volume of requests sent to Infura over the specified time period. + By default, data is shown from the last 24 hours from all Web3 API keys. 2. To change the API key, make a selection from the API keys dropdown. 3. To change the stats time range, make a selection from the time dropdown. - Time values are given in Coordinated Universal Time (UTC). - For Web3 API usage, you can choose from the following options: - - **Last 15 Minutes** - The last completed 15 minutes. - This updates once a minute. - - **Last 1 Hour** - The last fully completed hour, from 0 to 59 minutes and 59 seconds. - - **Last 24 Hours** - The last fully completed 24 consecutive hours. - This is the default. - - **Last 7 Days** - The last fully completed seven consecutive days. - A day appears once it has completed. - - **Last 30 Days** - The last fully completed 30 days. - A day appears once it has completed. + Time values are given in Coordinated Universal Time (UTC). + For Web3 API usage, you can choose from the following options: + + - **Last 15 Minutes** - The last completed 15 minutes. + This updates once a minute. + - **Last 1 Hour** - The last fully completed hour, from 0 to 59 minutes and 59 seconds. + - **Last 24 Hours** - The last fully completed 24 consecutive hours. + This is the default. + - **Last 7 Days** - The last fully completed seven consecutive days. + A day appears once it has completed. + - **Last 30 Days** - The last fully completed 30 days. + A day appears once it has completed. 4. To view your IPFS usage, select **IPFS Usage** in the toggle in the top-right corner. - You can choose to show data from the **Last 24 Hours** (default) or the **Last 7 Days**. + You can choose to show data from the **Last 24 Hours** (default) or the **Last 7 Days**. ## Web3 stats charts diff --git a/developer-tools/dashboard/how-to/network-status.md b/developer-tools/dashboard/how-to/network-status.md index a1e29ad69c1..afe49e8d920 100644 --- a/developer-tools/dashboard/how-to/network-status.md +++ b/developer-tools/dashboard/how-to/network-status.md @@ -6,14 +6,14 @@ sidebar_position: 8 # View the network status View the [Infura status page](https://status.infura.io/) to check for service outages and other incidents, as well as -scheduled maintenance notices. You can also subscribe to status updates via email, SMS, webhook, Slack and Atom/RSS. +scheduled maintenance notices. You can also subscribe to status updates via email, SMS, webhook, Slack, and Atom/RSS. You can also select the **Status** link at the top of the Infura dashboard to view the status page.
-
\ No newline at end of file + diff --git a/developer-tools/dashboard/how-to/project-sharing.md b/developer-tools/dashboard/how-to/project-sharing.md index 90710873843..3d499f1ea62 100644 --- a/developer-tools/dashboard/how-to/project-sharing.md +++ b/developer-tools/dashboard/how-to/project-sharing.md @@ -18,7 +18,7 @@ To share an API key:
@@ -82,7 +82,7 @@ You can view all keys that you own, and all keys shared with you, by selecting *
diff --git a/developer-tools/dashboard/how-to/secure-an-api/_category_.json b/developer-tools/dashboard/how-to/secure-an-api/_category_.json index a0cc75ef363..818d92efe04 100644 --- a/developer-tools/dashboard/how-to/secure-an-api/_category_.json +++ b/developer-tools/dashboard/how-to/secure-an-api/_category_.json @@ -1,11 +1,11 @@ { - "position": 3, - "label": "Secure an API", - "collapsible": true, - "collapsed": true, - "link": { - "type": "generated-index", - "slug": "dashboard/secure-an-api", - "description": "This section provides information about how to secure your API key using Infura's security settings." - } -} \ No newline at end of file + "position": 3, + "label": "Secure an API", + "collapsible": true, + "collapsed": true, + "link": { + "type": "generated-index", + "slug": "dashboard/secure-an-api", + "description": "This section provides information about how to secure your API key using Infura's security settings." + } +} diff --git a/developer-tools/dashboard/how-to/secure-an-api/api-key-secret.md b/developer-tools/dashboard/how-to/secure-an-api/api-key-secret.md index d14d367c649..f0e72a23237 100644 --- a/developer-tools/dashboard/how-to/secure-an-api/api-key-secret.md +++ b/developer-tools/dashboard/how-to/secure-an-api/api-key-secret.md @@ -2,8 +2,8 @@ description: Authenticate all requests to Infura with an API key secret. --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # API key secret @@ -34,7 +34,7 @@ In the API key's **Settings** tab, select **Require API Key secret for all reque
@@ -47,7 +47,7 @@ In the API key's **Settings** tab, select **Require API Key secret for all reque ```bash curl --user : \ https://mainnet.infura.io/v3/ \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` @@ -55,7 +55,7 @@ curl --user : \ ```bash wscat -c wss://mainnet.infura.io/ws/v3/ --auth ":" -> {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1} +> {"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1} ``` diff --git a/developer-tools/dashboard/how-to/secure-an-api/api-key.md b/developer-tools/dashboard/how-to/secure-an-api/api-key.md index 23452bbd46a..7f864315f0a 100644 --- a/developer-tools/dashboard/how-to/secure-an-api/api-key.md +++ b/developer-tools/dashboard/how-to/secure-an-api/api-key.md @@ -2,8 +2,8 @@ description: Secure your API key. --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # API key @@ -22,7 +22,7 @@ security features such as [JSON Web Tokens (JWTs)](use-jwts.md) and [allowlists]
@@ -30,15 +30,15 @@ security features such as [JSON Web Tokens (JWTs)](use-jwts.md) and [allowlists] Securing your Infura API key is crucial to protect your project resources and data. Here are some best practices to secure your Infura API key: -* **Do not share publicly.** Never share your API key publicly, such as in public repositories, client-side code, or public - forums. This is equivalent to giving away your password. +- **Do not share publicly.** Never share your API key publicly, such as in public repositories, client-side code, or public + forums. This is equivalent to giving away your password. -* **Use environment variables.** When developing locally or deploying your application, store your - [API key in environment variables](../../../../../services/how-to/javascript-dotenv) instead of hardcoding it into - your application. This prevents the API key from being exposed in your codebase. +- **Use environment variables.** When developing locally or deploying your application, store your + [API key in environment variables](../../../../../services/how-to/javascript-dotenv) instead of hardcoding it into + your application. This prevents the API key from being exposed in your codebase. -* **Limit usage.** Infura allows you to [set daily request limits on your API key](set-rate-limits.md). Setting a limit can - prevent excessive usage if your API key is exposed accidentally. +- **Limit usage.** Infura allows you to [set daily request limits on your API key](set-rate-limits.md). Setting a limit can + prevent excessive usage if your API key is exposed accidentally. -* **Monitor usage.** Observe the [usage statistics of your API key](../dashboard-stats.md). If you notice an unexpected - increase in usage, it might indicate that your API key has been compromised. +- **Monitor usage.** Observe the [usage statistics of your API key](../dashboard-stats.md). If you notice an unexpected + increase in usage, it might indicate that your API key has been compromised. diff --git a/developer-tools/dashboard/how-to/secure-an-api/set-rate-limits.md b/developer-tools/dashboard/how-to/secure-an-api/set-rate-limits.md index ef56e75ad68..77ab9769891 100644 --- a/developer-tools/dashboard/how-to/secure-an-api/set-rate-limits.md +++ b/developer-tools/dashboard/how-to/secure-an-api/set-rate-limits.md @@ -10,7 +10,7 @@ Set rate limits to control access to the API key and to limit costs in case of a
diff --git a/developer-tools/dashboard/how-to/secure-an-api/use-an-allowlist.md b/developer-tools/dashboard/how-to/secure-an-api/use-an-allowlist.md index 5a57ef8c61f..b244166351b 100644 --- a/developer-tools/dashboard/how-to/secure-an-api/use-an-allowlist.md +++ b/developer-tools/dashboard/how-to/secure-an-api/use-an-allowlist.md @@ -21,7 +21,7 @@ Add the restriction details in the **ALLOWLISTS** section of your API key's **Se
@@ -57,25 +57,28 @@ To allow a specific Ethereum address, click **ADD** and input it into the **CONT
- Test with a method from the list. ```bash curl https://mainnet.infura.io/v3/ \ - -H 'Content-Type: application/json' \ - -X POST \ - -d '{"id":1, "jsonrpc": "2.0", "method": "eth_getBalance","params":["0xfe05a3e72235c9f92fd9f2282f41a8154d6d342b", "latest"]}' + -H 'Content-Type: application/json' \ + -X POST \ + -d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xfe05a3e72235c9f92fd9f2282f41a8154d6d342b", "latest"], "id": 1}' ``` Result: ```bash -{"jsonrpc":"2.0","id":1,"result":"0x0"} +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x0" +} ``` ## User agents @@ -105,7 +108,7 @@ the **USER AGENTS** allowlist.
@@ -114,15 +117,21 @@ Test with a simple call from a desktop terminal. ```bash curl https://mainnet.infura.io/v3/ \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` Result: ```bash -{"jsonrpc":"2.0","error":{"code":-32002,"message":"rejected due to project ID settings"}}ash +{ + "jsonrpc": "2.0", + "error": { + "code": -32002, + "message": "rejected due to project ID settings" + } +} ``` ## Origins @@ -167,7 +176,7 @@ Use the dropdown list to select a method.
@@ -186,7 +195,7 @@ URL isn't on your allowlist, provided they include both the API key and the API
@@ -194,14 +203,14 @@ URL isn't on your allowlist, provided they include both the API key and the API This feature provides the following benefits: - **Principle of least privilege on the client side** - On the client side of your dapp, you may wish - to limit the actions possible with your API key to only those necessary for the application's - functionality. Allowlists ensure the API key is used solely for authorized locations, smart contract - addresses, or methods. + to limit the actions possible with your API key to only those necessary for the application's + functionality. Allowlists ensure the API key is used solely for authorized locations, smart contract + addresses, or methods. - **No restrictions server side** - On the server side, where the API key secret can be stored - securely, you might need to carry out a broader range of actions without the constraints of - allowlists. Using the API key secret allows you to circumvent these restrictions, giving your - server-side application unrestricted use of the API key. + securely, you might need to carry out a broader range of actions without the constraints of + allowlists. Using the API key secret allows you to circumvent these restrictions, giving your + server-side application unrestricted use of the API key. ## Best practices diff --git a/developer-tools/dashboard/how-to/secure-an-api/use-jwts.md b/developer-tools/dashboard/how-to/secure-an-api/use-jwts.md index ed8d85eec94..51b6302a615 100644 --- a/developer-tools/dashboard/how-to/secure-an-api/use-jwts.md +++ b/developer-tools/dashboard/how-to/secure-an-api/use-jwts.md @@ -11,7 +11,7 @@ Input the **JWT PUBLIC KEY NAME** and the key and select **ADD**.
diff --git a/developer-tools/dashboard/how-to/submit-a-help-ticket.md b/developer-tools/dashboard/how-to/submit-a-help-ticket.md index 382cee666b1..6d58d48feae 100644 --- a/developer-tools/dashboard/how-to/submit-a-help-ticket.md +++ b/developer-tools/dashboard/how-to/submit-a-help-ticket.md @@ -14,14 +14,15 @@ To request help from the Infura customer support team, submit a help ticket usin 2. If you can't find what you're looking for, in the bottom right corner, select **Support**. 3. In the ticket form that pops up, enter the following information: - - **Name and email address** - Include your contact information so the Infura customer support - team can respond to you. - - **Ticket type** - Select only the area that relates to your issue. - - **Subject and description** - Include a specific subject and description for your issue. - Include details such as what request you ran when you encountered the issue, what API key you - used, and what the issue or error looks like. - Be as detailed as possible. - - **Attachments** - Attach up to five files, such as screenshots, to help demonstrate your issue. + + - **Name and email address** - Include your contact information so the Infura customer support + team can respond to you. + - **Ticket type** - Select only the area that relates to your issue. + - **Subject and description** - Include a specific subject and description for your issue. + Include details such as what request you ran when you encountered the issue, what API key you + used, and what the issue or error looks like. + Be as detailed as possible. + - **Attachments** - Attach up to five files, such as screenshots, to help demonstrate your issue. 4. Select **Send** to submit your ticket. Someone from the Infura customer support team will respond to your ticket as soon as possible. diff --git a/developer-tools/dashboard/how-to/troubleshoot.md b/developer-tools/dashboard/how-to/troubleshoot.md index d87982daa15..bf0f1f139f6 100644 --- a/developer-tools/dashboard/how-to/troubleshoot.md +++ b/developer-tools/dashboard/how-to/troubleshoot.md @@ -10,11 +10,11 @@ sidebar_position: 9 If you receive a "Suspicious activity detected" message during registration, it might be for of one of the following reasons: -* You have another account: Infura does not allow users to create multiple accounts, so if - you have already registered, you will not be able to create another account with the same information. -* You have an ad blocker running: Our system requires users to turn off their ad blockers during registration - to allow us to perform the necessary checks required for registration. Disable your ad blocker and try again. -* You're using a VPN: Try turning it off temporarily during registration. +- You have another account: Infura does not allow users to create multiple accounts, so if + you have already registered, you will not be able to create another account with the same information. +- You have an ad blocker running: Our system requires users to turn off their ad blockers during registration + to allow us to perform the necessary checks required for registration. Disable your ad blocker and try again. +- You're using a VPN: Try turning it off temporarily during registration. ### Over API key allotment error @@ -28,4 +28,4 @@ a paid tier, which allows you to create ten API keys. If you've lost access to your two-factor authentication (2FA) device, you can recover access to your account using the backup code provided back when you initially set up 2FA on your Infura account. -For more information, see the [2FA documentation](two-factor-authentication.md#enable-2fa-on-your-account). \ No newline at end of file +For more information, see the [2FA documentation](two-factor-authentication.md#enable-2fa-on-your-account). diff --git a/developer-tools/dashboard/how-to/two-factor-authentication.md b/developer-tools/dashboard/how-to/two-factor-authentication.md index 59d1a48f3e2..7f12b9827e1 100644 --- a/developer-tools/dashboard/how-to/two-factor-authentication.md +++ b/developer-tools/dashboard/how-to/two-factor-authentication.md @@ -60,7 +60,7 @@ To log in without a 2FA device, log in to Infura with your username and password
diff --git a/developer-tools/dashboard/index.md b/developer-tools/dashboard/index.md index 9b407b34e3c..ab1d687e5cc 100644 --- a/developer-tools/dashboard/index.md +++ b/developer-tools/dashboard/index.md @@ -36,4 +36,4 @@ Select one of the cards below to learn more about using the Infura dashboard. description: "Learn how to use the dashboard to view API call stats." } ]} -/> \ No newline at end of file +/> diff --git a/docs/whats-new.md b/docs/whats-new.md index 95b25fc4b30..e3d16a8684c 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -5,7 +5,7 @@ description: Summary of the latest updates to this documentation. # What's new in the documentation? -The latest major MetaMask documentation updates are listed by the month they were added to the documentation. +The latest major MetaMask documentation updates are listed by the month they were added to the documentation. For a comprehensive list of recent product changes, visit the "Release Notes" section at the bottom of the [MetaMask developer page](https://metamask.io/developer/). @@ -26,8 +26,8 @@ of the [MetaMask developer page](https://metamask.io/developer/). ## May 2024 -- Added a beginner tutorial for [creating a simple dapp](/wallet/tutorials/javascript-dapp-simple) using vanilla JavaScript. - ([#1276](https://github.com/MetaMask/metamask-docs/pull/1276)) +- Added a beginner tutorial for [creating a simple dapp](/wallet/tutorials/javascript-dapp-simple) using vanilla JavaScript. + ([#1276](https://github.com/MetaMask/metamask-docs/pull/1276)) - Discontinued support for [`eth_sign`](/wallet/concepts/signing-methods/#eth_sign). ([#1319](https://github.com/MetaMask/metamask-docs/pull/1319/)) - Updated [React dapp with local state tutorial](/wallet/tutorials/react-dapp-local-state) with diff --git a/docusaurus.config.js b/docusaurus.config.js index cf683e6c010..27716636646 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -27,7 +27,7 @@ const config = { // to replace "en" with "zh-Hans". i18n: { defaultLocale: "en", - locales: ["en"/*, "zh", "ko"*/], + locales: ["en" /*, "zh", "ko"*/], }, customFields: { @@ -37,8 +37,14 @@ const config = { trailingSlash: true, scripts: [ - { src: "https://cmp.osano.com/AzZMxHTbQDOQD8c1J/a2e89f0e-f467-4542-bfea-30ea2c1a6648/osano.js" }, - { src: "https://plausible.io/js/script.js", defer: true, "data-domain": "docs.metamask.io" }, + { + src: "https://cmp.osano.com/AzZMxHTbQDOQD8c1J/a2e89f0e-f467-4542-bfea-30ea2c1a6648/osano.js", + }, + { + src: "https://plausible.io/js/script.js", + defer: true, + "data-domain": "docs.metamask.io", + }, { src: "/js/feedback-script.js", defer: true, async: true }, { src: "/js/getfeedback.js", defer: true, async: true }, ], @@ -60,13 +66,17 @@ const config = { breadcrumbs: false, editUrl: "https://github.com/MetaMask/metamask-docs/edit/main/", remarkPlugins: [ - [remarkCodesandbox, { - mode: "iframe", - autoDeploy: process.env.NODE_ENV === "production", - }], + [ + remarkCodesandbox, + { + mode: "iframe", + autoDeploy: process.env.NODE_ENV === "production", + }, + ], ], openrpc: { - openrpcDocument: "https://metamask.github.io/api-specs/0.9.3/openrpc.json", + openrpcDocument: + "https://metamask.github.io/api-specs/0.9.3/openrpc.json", path: "reference", sidebarLabel: "JSON-RPC API", }, @@ -80,7 +90,7 @@ const config = { plugins: [ [ "@docusaurus/plugin-content-docs", - ({ + { id: "snaps", path: "snaps", routeBasePath: "snaps", @@ -101,7 +111,7 @@ const config = { "flaskOnly", ], }, - }), + }, ], [ "@docusaurus/plugin-content-docs", @@ -137,23 +147,22 @@ const config = { }, ], "./src/plugins/plugin-json-rpc.ts", - isProd ? - [ - "docusaurus-plugin-segment", - { - apiKey: process.env.SEGMENT_ANALYTICS_KEY, - load: { cookie: { sameSite: "None", secure: true } }, - page: true, - }, - ] : null, + isProd + ? [ + "docusaurus-plugin-segment", + { + apiKey: process.env.SEGMENT_ANALYTICS_KEY, + load: { cookie: { sameSite: "None", secure: true } }, + page: true, + }, + ] + : null, "./src/plugins/launchdarkly", ], themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ - metadata: [ - { name: "og:image", content: "/img/metamaskog.jpeg" }, - ], + metadata: [{ name: "og:image", content: "/img/metamaskog.jpeg" }], navbar: { title: " │ ‎ Documentation", logo: { @@ -305,7 +314,7 @@ const config = { }, prism: { theme: codeTheme, - additionalLanguages: ["csharp","gradle","bash","json"], + additionalLanguages: ["csharp", "gradle", "bash", "json"], }, algolia: { // The application ID provided by Algolia @@ -324,7 +333,7 @@ const config = { // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs replaceSearchResultPathname: { - from: "/", + from: "/", to: process.env.DEST || "/", }, diff --git a/package.json b/package.json index f6c4685eab8..285576e4c7d 100644 --- a/package.json +++ b/package.json @@ -105,4 +105,4 @@ "$root$": false } } -} +} \ No newline at end of file diff --git a/services-sidebar.js b/services-sidebar.js index c34523850f1..852d38976c8 100644 --- a/services-sidebar.js +++ b/services-sidebar.js @@ -28,7 +28,7 @@ const sidebar = { link: { type: "generated-index", slug: "/tutorials" }, collapsed: true, items: [{ type: "autogenerated", dirName: "tutorials" }], - }, + }, { type: "category", label: "Reference", @@ -40,4 +40,3 @@ const sidebar = { }; module.exports = sidebar; - diff --git a/services/concepts/_category_.json b/services/concepts/_category_.json index fa118c677aa..f89ee5a39df 100644 --- a/services/concepts/_category_.json +++ b/services/concepts/_category_.json @@ -1,10 +1,10 @@ { - "label": "Concepts", - "collapsible": true, - "collapsed": true, - "link": { - "type": "generated-index", - "slug": "services/concepts/", - "description": "This section provides background information and context around various key concepts." - } -} \ No newline at end of file + "label": "Concepts", + "collapsible": true, + "collapsed": true, + "link": { + "type": "generated-index", + "slug": "services/concepts/", + "description": "This section provides background information and context around various key concepts." + } +} diff --git a/services/concepts/curl.md b/services/concepts/curl.md index ea71206b829..327e4033efb 100644 --- a/services/concepts/curl.md +++ b/services/concepts/curl.md @@ -25,9 +25,9 @@ Many Infura requests take the form: ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` The code snippet above is an API call to Infura's Ethereum mainnet endpoint. @@ -76,12 +76,12 @@ The `-d` or `--data` flag specifies more information sent along with the curl re In the example, the data object is a list of key value pairs in JSON format. This follows the [JSON RPC 2.0 specification ](https://www.jsonrpc.org/specification)which requires the four specific keys seen here. -The `method` , `params` , and `id` values are modifiable. +The `method`, `params`, and `id` values are modifiable. The `jsonrpc` value is required by the specification. ```bash --d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' +-d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` #### Running curl @@ -93,5 +93,5 @@ Enter curl code in a terminal window, or a command line tool from your computer' curl returns a response object if the request is successful. ```bash -{"jsonrpc":"2.0","id":3,"result":"0xe0a763"} -``` \ No newline at end of file +{"jsonrpc": "2.0", "id": 3, "result": "0xe0a763"} +``` diff --git a/services/concepts/failover-protection.md b/services/concepts/failover-protection.md index afbed21ddd0..e92d7c8aae7 100644 --- a/services/concepts/failover-protection.md +++ b/services/concepts/failover-protection.md @@ -10,11 +10,11 @@ Failover protection is available on the following networks for customers on the - [Arbitrum](../reference/arbitrum/index.md) - [Avalanche (C-Chain)](../reference/avalanche-c-chain/index.md) - [Optimism](../reference/optimism/index.md) -- [Polygon](../reference/polygon-pos/index.md) +- [Polygon](../reference/polygon-pos/index.md) The failover protection feature ensures API requests are fulfilled even if Infura experiences a service issue or outage. This is achieved by routing requests to a select partner. Failover protection is enabled on a per-request basis by adding the failover header to your API request (see [Enable API request forwarding](../how-to/enable-api-forwarding.md)). This gives -you control over which requests you'd like fulfilled by Infura's partner if failover protection should be needed. \ No newline at end of file +you control over which requests you'd like fulfilled by Infura's partner if failover protection should be needed. diff --git a/services/concepts/gas.md b/services/concepts/gas.md index ead7ea60cdd..bfe907697d7 100644 --- a/services/concepts/gas.md +++ b/services/concepts/gas.md @@ -25,10 +25,10 @@ network and other EVM chains. Before EIP-1559, users specified a gas price, which was the amount they were willing to pay for a transaction to be mined. The auction-style system meant gas prices often fluctuated wildly. After EIP-1559, this has been replaced by two new values: -- Base fee: The minimum transaction fee for every transaction to be included in a block. This is calculated by the network +- **Base fee**: The minimum transaction fee for every transaction to be included in a block. This is calculated by the network and is affected by the number of transactions included in the previous block. The base fee gets burned, meaning Ethereum is deflationary. -- Max priority fee: The optional transaction fee to prioritize your transactions over others. This is the tip that goes +- **Max priority fee**: The optional transaction fee to prioritize your transactions over others. This is the tip that goes to miners. ## Gas API @@ -37,4 +37,4 @@ The [Gas API](../reference/gas-api/index.md) allows you to get current and histo The APIs provide recommended gas prices to get your transactions included in a block, based on your priority requirements. This allows you to optimize your transactions for speed and cost-effectiveness. By using the Gas API, developers -can get real-time insights into the gas market and make informed decisions about how much to pay for transaction fees. \ No newline at end of file +can get real-time insights into the gas market and make informed decisions about how much to pay for transaction fees. diff --git a/services/concepts/transaction-types.md b/services/concepts/transaction-types.md index 0c03dc0e5b7..f796d8d66d2 100644 --- a/services/concepts/transaction-types.md +++ b/services/concepts/transaction-types.md @@ -22,9 +22,9 @@ Transactions with type `0x0` are legacy transactions that use the transaction fo ## Access list transactions -Transactions with type `0x1` are transactions introduced in [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930). They contain, along with the [legacy parameters](#legacy-transactions), an `accessList` parameter, which specifies an array of addresses and storage keys that the transaction plans to access (an _access list_). Access list transactions must specify an access list, and they don’t incorporate [EIP-1559 fee market changes](#eip-1559-transactions). +Transactions with type `0x1` are transactions introduced in [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930). They contain, along with the [legacy parameters](#legacy-transactions), an `accessList` parameter, which specifies an array of addresses and storage keys that the transaction plans to access (an _access list_). Access list transactions must specify an access list, and they don’t incorporate [EIP-1559 fee market changes](#eip-1559-transactions). -Also, access list transactions contain the `yParity` parameter. The returned values for this parameter can either be `0x0` or `0x1`. This is the parity (0 for even, 1 for odd) of the y-value of a [`secp256k1`](https://eips.ethereum.org/EIPS/eip-2098#:~:text=A%20secp256k1%20signature%20is%20made%20up%20of%203%20parameters%2C%20r%2C%20s%20and%20yParity.) signature. +Also, access list transactions contain the `yParity` parameter. The returned values for this parameter can either be `0x0` or `0x1`. This is the parity (0 for even, 1 for odd) of the y-value of a [`secp256k1`](https://eips.ethereum.org/EIPS/eip-2098#:~:text=A%20secp256k1%20signature%20is%20made%20up%20of%203%20parameters%2C%20r%2C%20s%20and%20yParity.) signature. Use the [`eth_createAccessList`](../reference/ethereum/json-rpc-methods/eth_createaccesslist.mdx) API to simulate a transaction which returns the addresses and storage keys that may be used to send the real transaction, and the approximate gas cost. @@ -47,4 +47,3 @@ They also contain a `maxPriorityFeePerGas` parameter, which specifies the maximu An EIP-1559 transaction always pays the base fee of the block it’s included in, and it pays a priority fee as priced by `maxPriorityFeePerGas` or, if the base fee per gas + `maxPriorityFeePerGas` exceeds `maxFeePerGas`, it pays a priority fee as priced by `maxFeePerGas` minus the base fee per gas. The base fee is burned, and the priority fee is paid to the miner that included the transaction. A transaction’s priority fee per gas incentivizes miners to include the transaction over other transactions with lower priority fees per gas. Read the [ConsenSys EIP-1559 primer](https://consensys.net/blog/quorum/what-is-eip-1559-how-will-it-change-ethereum/) for more information on how EIP-1559 changes Ethereum. - diff --git a/services/concepts/websockets.md b/services/concepts/websockets.md index e8d49faa19d..12196e08d81 100644 --- a/services/concepts/websockets.md +++ b/services/concepts/websockets.md @@ -44,12 +44,12 @@ For information about how to use the subscription methods to subscribe to events Infura support subscriptions over WebSockets for the following networks: -- Ethereum -- Arbitrum -- Avalanche (C-Chain) -- Linea -- Optimism -- Polygon +- [Ethereum](../reference/ethereum/index.md) +- [Arbitrum](../reference/arbitrum/index.md) +- [Avalanche (C-Chain)](../reference/avalanche-c-chain/index.md) +- [Linea](../reference/linea/index.md) +- [Optimism](../reference/optimism/index.md) +- [Polygon](../reference/polygon/index.md) :::info @@ -77,4 +77,4 @@ for more information about your request limits. Infura might change the pricing model and implement some limitations on subscriptions over WebSockets in the future. Before implementing any changes, customers will receive advanced notification, so they can consider the best option for their needs. -::: \ No newline at end of file +::: diff --git a/services/get-started/endpoints.md b/services/get-started/endpoints.md index 75e8f16ab3f..bbec61a7137 100644 --- a/services/get-started/endpoints.md +++ b/services/get-started/endpoints.md @@ -13,7 +13,7 @@ Ensure that you replace `` with an API key from your [Infura dashboard] ## Arbitrum | Network | Description | URL | -|-------------------|-------------------------|----------------------------------------------------| +| ----------------- | ----------------------- | -------------------------------------------------- | | Mainnet | JSON-RPC over HTTPS | `https://arbitrum-mainnet.infura.io/v3/` | | Mainnet | JSON-RPC over Websocket | `wss://arbitrum-mainnet.io/ws/v3/` | | Testnet (Sepolia) | JSON-RPC over HTTPS | `https://arbitrum-sepolia.infura.io/v3/` | @@ -22,7 +22,7 @@ Ensure that you replace `` with an API key from your [Infura dashboard] ## Avalanche (C-Chain) | Network | Description | URL | -|----------------|-------------------------|----------------------------------------------------| +| -------------- | ----------------------- | -------------------------------------------------- | | Mainnet | JSON-RPC over HTTPS | `https://avalanche-mainnet.infura.io/v3/` | | Mainnet | JSON-RPC over Websocket | `wss://avalanche-mainnet.io/ws/v3/` | | Testnet (Fuji) | JSON-RPC over HTTPS | `https://avalanche-fuji.infura.io/v3/` | @@ -36,14 +36,14 @@ request to `support@infura.io` and we will assess if your request can be accommo ::: | Network | Description | URL | -|-------------------|---------------------|-----------------------------------------------| +| ----------------- | ------------------- | --------------------------------------------- | | Mainnet | JSON-RPC over HTTPS | `https://base-mainnet.infura.io/v3/` | | Testnet (Sepolia) | JSON-RPC over HTTPS | `https://base-sepolia.infura.io/v3/` | ## Blast -| Network | Description | URL | -|-------------------|---------------------|-----------------------------------------------| +| Network | Description | URL | +| ----------------- | ------------------- | ---------------------------------------------- | | Mainnet | JSON-RPC over HTTPS | `https://blast-mainnet.infura.io/v3/` | | Testnet (Sepolia) | JSON-RPC over HTTPS | `https://blast-sepolia.infura.io/v3/` | @@ -63,7 +63,7 @@ service and does not currently support WebSockets. ::: | Network | Description | URL | -|---------|-------------------------|-------------------------------------------| +| ------- | ----------------------- | ----------------------------------------- | | Mainnet | JSON-RPC over HTTPS | `https://mainnet.infura.io/v3/` | | Mainnet | JSON-RPC over WebSocket | `wss://mainnet.infura.io/ws/v3/` | | Holesky | JSON-RPC over HTTPS | `https://holesky.infura.io/v3/` | @@ -95,30 +95,30 @@ Linea Goerli is being deprecated. We discourage new development with this testne Sepolia instead. ::: -| Network | Description | URL | +| Network | Description | URL | |-------------------|-------------------------|-------------------------------------------------| -| Mainnet | JSON-RPC over HTTPS | `https://linea-mainnet.infura.io/v3/` | -| Mainnet | JSON-RPC over WebSocket | `wss://linea-mainnet.infura.io/ws/v3/` | -| Testnet (Goerli) | JSON-RPC over HTTPS | `https://linea-goerli.infura.io/v3/` | -| Testnet (Goerli) | JSON-RPC over WebSocket | `wss://linea-goerli.infura.io/ws/v3//` | -| Testnet (Sepolia) | JSON-RPC over HTTPS | `https://linea-sepolia.infura.io/v3/` | -| Testnet (Sepolia) | JSON-RPC over WebSocket | `wss://linea-sepolia.infura.io/ws/v3/` | +| Mainnet | JSON-RPC over HTTPS | `https://linea-mainnet.infura.io/v3/` | +| Mainnet | JSON-RPC over WebSocket | `wss://linea-mainnet.infura.io/ws/v3/` | +| Testnet (Goerli) | JSON-RPC over HTTPS | `https://linea-goerli.infura.io/v3/` | +| Testnet (Goerli) | JSON-RPC over WebSocket | `wss://linea-goerli.infura.io/ws/v3//` | +| Testnet (Sepolia) | JSON-RPC over HTTPS | `https://linea-sepolia.infura.io/v3/` | +| Testnet (Sepolia) | JSON-RPC over WebSocket | `wss://linea-sepolia.infura.io/ws/v3/` | ## Mantle -| Network | Description | URL | -|-------------------|-------------------------|--------------------------------------------------| -| Mainnet | JSON-RPC over HTTPS | `https://mantle-mainnet.infura.io/v3/` | -| Testnet (Sepolia) | JSON-RPC over HTTPS | `https://mantle-sepolia.infura.io/v3/` | +| Network | Description | URL | +| ----------------- | ------------------- | ----------------------------------------------- | +| Mainnet | JSON-RPC over HTTPS | `https://mantle-mainnet.infura.io/v3/` | +| Testnet (Sepolia) | JSON-RPC over HTTPS | `https://mantle-sepolia.infura.io/v3/` | ## Optimism -| Network | Transport type | URL | -|-------------------|-------------------------|---------------------------------------------------| -| Mainnet | JSON-RPC over HTTPS | `https://optimism-mainnet.infura.io/v3/` | -| Mainnet | JSON-RPC over WebSocket | `wss://optimism-mainnet.infura.io/ws/v3/` | -| Testnet (Sepolia) | JSON-RPC over HTTPS | `https://optimism-sepolia.infura.io/v3/` | -| Testnet (Sepolia) | JSON-RPC over WebSocket | `wss://optimism-mainnet.infura.io/ws/v3/` | +| Network | Transport type | URL | +| ----------------- | ----------------------- | -------------------------------------------------- | +| Mainnet | JSON-RPC over HTTPS | `https://optimism-mainnet.infura.io/v3/` | +| Mainnet | JSON-RPC over WebSocket | `wss://optimism-mainnet.infura.io/ws/v3/` | +| Testnet (Sepolia) | JSON-RPC over HTTPS | `https://optimism-sepolia.infura.io/v3/` | +| Testnet (Sepolia) | JSON-RPC over WebSocket | `wss://optimism-mainnet.infura.io/ws/v3/` | ## Palm @@ -129,24 +129,24 @@ Sepolia instead. ## Polygon PoS -| Network | Description | URL | -|------------------|-------------------------|---------------------------------------------------| -| Mainnet | JSON-RPC over HTTPS | `https://polygon-mainnet.infura.io/v3/` | -| Mainnet | JSON-RPC over WebSocket | `wss://polygon-mainnet.infura.io/ws/v3/` | -| Testnet (Amoy) | JSON-RPC over HTTPS | `https://polygon-amoy.infura.io/v3/` | -| Testnet (Amoy) | JSON-RPC over WebSocket | `wss://polygon-amoy.infura.io/ws/v3/` | +| Network | Description | URL | +| -------------- | ----------------------- | ------------------------------------------------- | +| Mainnet | JSON-RPC over HTTPS | `https://polygon-mainnet.infura.io/v3/` | +| Mainnet | JSON-RPC over WebSocket | `wss://polygon-mainnet.infura.io/ws/v3/` | +| Testnet (Amoy) | JSON-RPC over HTTPS | `https://polygon-amoy.infura.io/v3/` | +| Testnet (Amoy) | JSON-RPC over WebSocket | `wss://polygon-amoy.infura.io/ws/v3/` | ## StarkNet | Network | Description | URL | -|-------------------|---------------------|---------------------------------------------------| +| ----------------- | ------------------- | ------------------------------------------------- | | Mainnet | JSON-RPC over HTTPS | `https://starknet-mainnet.infura.io/v3/` | | Testnet (Sepolia) | JSON-RPC over HTTPS | `https://starknet-sepolia.infura.io/v3/` | ## ZKsync Era | Network | Description | URL | -|-------------------|---------------------|-------------------------------------------------| +| ----------------- | ------------------- | ----------------------------------------------- | | Mainnet | JSON-RPC over HTTPS | `https://zksync-mainnet.infura.io/v3/` | | Testnet (Sepolia) | JSON-RPC over HTTPS | `https://zksync-sepolia.infura.io/v3/` | @@ -169,7 +169,6 @@ Specify the chain ID in your request to interact with the relevant network. | ------- | -------- | | Mainnet | 43114 | - #### Base | Network | Chain ID | @@ -218,9 +217,9 @@ Specify the chain ID in your request to interact with the relevant network. #### Optimism -| Network | Chain ID | -| ------- | ----------- | -| Mainnet | 10 | +| Network | Chain ID | +| ------- | -------- | +| Mainnet | 10 | #### Polygon diff --git a/services/get-started/infura.md b/services/get-started/infura.md index a02fe11d094..121d6936669 100644 --- a/services/get-started/infura.md +++ b/services/get-started/infura.md @@ -3,8 +3,8 @@ description: Get started with Infura; create your Infura API key and send reques sidebar_position: 1 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Get started with Infura @@ -81,9 +81,9 @@ Retrieve the current block number. ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}' + -X POST \ + -H "Content-Type: application/json" \ + --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}' ``` @@ -94,10 +94,10 @@ URL: https://mainnet.infura.io/v3/YOUR-API-KEY Request_Type: POST Body: { - "jsonrpc":"2.0", - "method":"eth_blockNumber", - "params":[], - "id":1 + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 } ``` @@ -107,7 +107,7 @@ Body: You'll receive a response similar to: ```bash -{"jsonrpc":"2.0","id":1,"result":"0xde5fba"} +{"jsonrpc": "2.0", "id": 1, "result": "0xde5fba"} ``` The data returned is in hexadecimal, prefixed with `0x`. If you [convert](https://www.rapidtables.com/convert/number/hex-to-decimal.html) `de5fba` to decimal, the resulting number is 14573498, representing the current block number at the time the query was made. @@ -123,9 +123,9 @@ The example code checks the latest balance of the Ethereum Proof of Stake (PoS) ```bash curl https://mainnet.infura.io/v3/API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0x00000000219ab540356cBB839Cbe05303d7705Fa", "latest"],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0x00000000219ab540356cBB839Cbe05303d7705Fa", "latest"], "id": 1}' ``` @@ -136,13 +136,13 @@ URL: https://mainnet.infura.io/v3/YOUR-PROJECT-ID Request_Type: POST Body: { - "jsonrpc":"2.0", - "method":"eth_getBalance", + "jsonrpc": "2.0", + "method": "eth_getBalance", "params": [ - "0x00000000219ab540356cBB839Cbe05303d7705Fa", - "latest" + "0x00000000219ab540356cBB839Cbe05303d7705Fa", + "latest" ], - "id":1 + "id": 1 } ``` @@ -152,7 +152,7 @@ Body: You'll receive a result similar to: ```bash -{"jsonrpc":"2.0","id":1,"result":"0x96c8e932f1e499c855045"} +{"jsonrpc": "2.0", "id": 1, "result": "0x96c8e932f1e499c855045"} ``` This result is the hexadecimal value of the contract in Wei (the smallest denomination of Ether). @@ -165,10 +165,11 @@ Configure security settings in the **Settings** tab. This is optional. Force API requests to include the API key secret and/or [JSON Web Tokens (JWTs)](../how-to/json-web-token-jwt.md). -
-
+
+
Settings Tab
@@ -178,7 +179,7 @@ Use an allowlist to restrict API key access. See to the [allowlist documentation
@@ -192,7 +193,7 @@ Optimize your app and better understand your users by
@@ -202,14 +203,14 @@ Optimize your app and better understand your users by Find additional settings in **Settings** to manage your account. You can do the following: - [Set notifications for daily limits](../how-to/avoid-rate-limiting.md#tips-to-avoid-rate-limiting) - from the **Account** option. + from the **Account** option. - Manage your billing information in the **Billing** option. - Manage [shared API keys](../../../developer-tools/dashboard/how-to/project-sharing) in the **Key Sharing** option.
-
\ No newline at end of file +
diff --git a/services/how-to/enable-api-forwarding.md b/services/how-to/enable-api-forwarding.md index 8267ce6f189..444a5ef3c24 100644 --- a/services/how-to/enable-api-forwarding.md +++ b/services/how-to/enable-api-forwarding.md @@ -3,9 +3,8 @@ description: Enable API forwarding sidebar_position: 6 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Enable API request forwarding @@ -23,77 +22,84 @@ Failover support is available on Mainnet only. ## Request -In the code tabs, the `eth_blockNumber` method is used as an example. +In the code tabs, the `eth_blockNumber` method is used as an example. ```bash curl https://.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Enable-Failover: true" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Enable-Failover: true" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ```js -const { Web3 } = require('web3'); -const https = require('https'); +const { Web3 } = require("web3") +const https = require("https") const options = { - headers: { - "Enable-Failover": "true", - }, -}; + headers: { + "Enable-Failover": "true", + }, +} -const provider = new https.Agent(options); +const provider = new https.Agent(options) -const web3 = new Web3(new Web3.providers.HttpProvider('https://.infura.io/v3/YOUR-API-KEY', { agent: provider })); +const web3 = new Web3( + new Web3.providers.HttpProvider( + "https://.infura.io/v3/YOUR-API-KEY", + { agent: provider } + ) +) -web3.eth.getBlockNumber().then(console.log); +web3.eth.getBlockNumber().then(console.log) ``` ```js -const ethers = require('ethers'); -const fetch = require('node-fetch'); +const ethers = require("ethers") +const fetch = require("node-fetch") class InfuraJsonRpcProvider extends ethers.providers.JsonRpcProvider { - constructor(network, apiKey) { - super(network, apiKey); - this.fetchFunc = async (url, json, processFunc) => { - const response = await fetch(url, { - method: 'POST', - body: json.body, - headers: { - 'Content-Type': 'application/json', - 'Enable-Failover': 'true' - } - }); - - const text = await response.text(); - const fetchJsonResponse = { - jsonrpc: json.jsonrpc, - id: json.id, - result: JSON.parse(text).result, - error: JSON.parse(text).error - }; - - return processFunc(fetchJsonResponse); - }; + constructor(network, apiKey) { + super(network, apiKey) + this.fetchFunc = async (url, json, processFunc) => { + const response = await fetch(url, { + method: "POST", + body: json.body, + headers: { + "Content-Type": "application/json", + "Enable-Failover": "true", + }, + }) + + const text = await response.text() + const fetchJsonResponse = { + jsonrpc: json.jsonrpc, + id: json.id, + result: JSON.parse(text).result, + error: JSON.parse(text).error, + } + + return processFunc(fetchJsonResponse) } + } } -const provider = new InfuraJsonRpcProvider('https://.infura.io/v3/YOUR-API-KEY'); +const provider = new InfuraJsonRpcProvider( + "https://.infura.io/v3/YOUR-API-KEY" +) provider.getBlockNumber().then((blockNumber) => { - console.log(blockNumber); -}); + console.log(blockNumber) +}) ``` - \ No newline at end of file + diff --git a/services/how-to/interact-with-erc-20-tokens.md b/services/how-to/interact-with-erc-20-tokens.md index e6c5ffbc52a..2b8bef60915 100644 --- a/services/how-to/interact-with-erc-20-tokens.md +++ b/services/how-to/interact-with-erc-20-tokens.md @@ -3,8 +3,8 @@ description: Interact with ERC 20 tokens sidebar_position: 2 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem" # Interact with ERC-20 tokens @@ -45,15 +45,14 @@ The JSON-RPC format expects `eth_sendRawTransaction` to have a specific data fie ```javascript -web3.sha3('Transfer(address,address,uint256)')[0..4] +web3.sha3("Transfer(address, address, uint256)")[0..4] ``` - ```javascript -0x70a08231; +0x70a08231 ``` @@ -66,9 +65,9 @@ The first four bytes of this hash comprise its four-byte signature. Take this fo ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id": 1}' ``` @@ -104,9 +103,9 @@ The following example uses `eth_getLogs` on the DAI ERC-20 Solidity contract [`0 ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d {"jsonrpc":"2.0","method":"eth_getLogs","id":1,"params":[{"fromBlock":"Ox91F37C","toBlock":"0x91F37C","topics":[ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x000000000000000000000000ee25e1ba53c225d250861c8e5a9a3e0fe19c790e", "0x000000000000000000000000dfbaf3e4c7496dad574a1b842bc85b402bdc298d" ],"address":"0x6B175474E89094C44Da98b954EedeAC495271d0F"}]} + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "id": 1, "params": [{"fromBlock": "0x91F37C", "toBlock": "0x91F37C", "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x000000000000000000000000ee25e1ba53c225d250861c8e5a9a3e0fe19c790e", "0x000000000000000000000000dfbaf3e4c7496dad574a1b842bc85b402bdc298d"], "address": "0x6B175474E89094C44Da98b954EedeAC495271d0F"}]}' ``` @@ -161,14 +160,14 @@ To find out which topic (event) it actually was, create the [function selector]( ```javascript -web3.sha3("Approval(address,address,uint256)"); +web3.sha3("Approval(address,address,uint256)") ``` ```javascript -0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925; +0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925 ``` @@ -180,13 +179,14 @@ The resulting hash doesn’t match the hash provided in the initial request resp ```javascript -web3.sha3("Transfer(address,address,uint256)"); +web3.sha3("Transfer(address,address,uint256)") ``` + ```javascript -0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; +0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef ``` diff --git a/services/how-to/javascript-dotenv.md b/services/how-to/javascript-dotenv.md index 14efcc958fe..8ff16171004 100644 --- a/services/how-to/javascript-dotenv.md +++ b/services/how-to/javascript-dotenv.md @@ -1,5 +1,5 @@ --- -description: Use dotenv to load environment variables from a file. +description: Use dotenv to load environment variables from a file. sidebar_position: 7 --- @@ -52,24 +52,24 @@ Never disclose your private keys or secret recovery phrases. Anyone with your pr Give your project access to the `.env` information by including the following line at the top of your project script: ```javascript -require("dotenv").config(); +require("dotenv").config() ``` Access the environment variables using `process.env.`. For example, the following is a `hardhat.config.js` file for a Hardhat project: ```javascript -require('@nomiclabs/hardhat-waffle'); -require('dotenv').config(); +require("@nomiclabs/hardhat-waffle") +require("dotenv").config() module.exports = { - solidity: '0.8.0', + solidity: "0.8.0", networks: { rinkeby: { url: process.env.INFURA_API_KEY, - accounts: [process.env.PRIVATE_KEY] + accounts: [process.env.PRIVATE_KEY], }, }, -}; +} ``` ### Create a `.gitignore` file diff --git a/services/how-to/json-web-token-jwt.md b/services/how-to/json-web-token-jwt.md index 73c259542ed..fb014bdcf44 100644 --- a/services/how-to/json-web-token-jwt.md +++ b/services/how-to/json-web-token-jwt.md @@ -3,8 +3,8 @@ description: Use JSON Web Tokens to secure data exchange. sidebar_position: 8 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Use JSON Web Token (JWT) @@ -74,51 +74,51 @@ Upload the contents of the public key file that you [generated earlier](json-web 1. Go to the **SECURITY** section in your project settings. - ![Security settings](../images/security-page.png) +![Security settings](../images/security-page.png) - :::info +:::info - You must implement separate security settings for each project. +You must implement separate security settings for each project. - ::: +::: 2. Check the **Require JWT for all requests** box to enforce JWT on all requests. This is optional. - :::info - - Use allowlists to specify a subset of requests that must use JWTs. +:::info - ::: +Use allowlists to specify a subset of requests that must use JWTs. + +::: 3. Give the public key a name. 4. Paste the public key into the **JWT PUBLIC KEY** input box. It looks something like this: - ``` - -----BEGIN PUBLIC KEY----- - MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr7VlNytvNFt9wVkjJ8vG - L4F0+id4kS1CpG7UMh1kghrLg9KMb8gauy7Bxk6PRz5Ckv1FnG4FL+Z3Cdzwd6c8 - jJlzJxbRTYvNi3elqAyItE3tRl6CatRur49t9nGepgFOrwmPP5We52G5O0BsW6Mx - w/neqQH+Y/bXqs0PG/0ZbpTyr044Lh+p9grSuPIogIGIY5JM4AI+fpdH6hVnA7od - PkinkWhQqAW+F8jngwZK+JCFS1GAeobTZVbvsiHZQGuP/T7hqE8z5Q8HYO4ymnkI - MPH6zSKhSxsQRs/kWU5lXqY67ORC3DIMA+I/AJujLuoqC+YaMP0fO81XjrwXPf2j - 4wIDAQAB - -----END PUBLIC KEY----- - ``` +``` +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr7VlNytvNFt9wVkjJ8vG +L4F0+id4kS1CpG7UMh1kghrLg9KMb8gauy7Bxk6PRz5Ckv1FnG4FL+Z3Cdzwd6c8 +jJlzJxbRTYvNi3elqAyItE3tRl6CatRur49t9nGepgFOrwmPP5We52G5O0BsW6Mx +w/neqQH+Y/bXqs0PG/0ZbpTyr044Lh+p9grSuPIogIGIY5JM4AI+fpdH6hVnA7od +PkinkWhQqAW+F8jngwZK+JCFS1GAeobTZVbvsiHZQGuP/T7hqE8z5Q8HYO4ymnkI +MPH6zSKhSxsQRs/kWU5lXqY67ORC3DIMA+I/AJujLuoqC+YaMP0fO81XjrwXPf2j +4wIDAQAB +-----END PUBLIC KEY----- +``` 5. Click **ADD** to add the key to the settings. 6. The key is added to security settings. - ![JWT set up](../images/jwt-set-up.png) +![JWT set up](../images/jwt-set-up.png) 7. The key has a **NAME**, **ID**, **FINGERPRINT**. These are used for creating and verifying JWTs. You'll need the **ID** to [generate the JWT](json-web-token-jwt.md#generate-a-jwt). - :::info +:::info - For key rotation, upload up to three keys for each project. +For key rotation, upload up to three keys for each project. - ::: +::: ## Send requests with JWTs @@ -126,9 +126,9 @@ If JWTs are required for all requests, the following fails with an `invalid JWT` ```bash curl -X POST \ --H "Content-Type: application/json" \ ---data '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}' \ -"https://optimism-sepolia.infura.io/v3/" + -H "Content-Type: application/json" \ + --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}' \ + "https://optimism-sepolia.infura.io/v3/" ``` To get the request to pass, generate a JWT, and add it to the request. @@ -159,14 +159,14 @@ Copy the encoded token as part of the `-H "Authorization: Bearer` entry: ```bash curl -X POST \ --H "Content-Type: application/json" \ --H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjQyZjUxODRlMzE1ZTQwZDRiNzkzMjU3Nzg2OTEwOTNhIn0.eyJleHAiOjE4OTM0NTI0MDAsImF1ZCI6ImluZnVyYS5pbyJ9.rIBKHmxDsSEiiqEcbWPWkN6F28R95a0beGdnVgVQnnD7ESOKGosr2t9iQ7QyGvNO8-74gaPy_DqVn4sy1FvnullrWQc8Tmf5PrrX2ULiGfSUATvr-JPOga-KAgS6ftcStoACNmcN7QI-n7Gv7NqZC3zWMGzK_1SvYcSodXzoWwtkWmrMW9uPiu4MvROQH0sK7MJ4WHBIHii-x4wogH4PHEdGi_vFZohq2bRaaDKXBeJK7Tkke2whcydTHGuiAPQvRiHu5_wVptgDbTbKIQ28ZFQ4LpYStXE9Bck4JoVDeRQezWJN8Dx9ThU7j1xhWQqxQFWw3SPHry-cIejAWEfDTQ" \ ---data '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}' \ -"https://mainnet.infura.io/v3/" + -H "Content-Type: application/json" \ + -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjQyZjUxODRlMzE1ZTQwZDRiNzkzMjU3Nzg2OTEwOTNhIn0.eyJleHAiOjE4OTM0NTI0MDAsImF1ZCI6ImluZnVyYS5pbyJ9.rIBKHmxDsSEiiqEcbWPWkN6F28R95a0beGdnVgVQnnD7ESOKGosr2t9iQ7QyGvNO8-74gaPy_DqVn4sy1FvnullrWQc8Tmf5PrrX2ULiGfSUATvr-JPOga-KAgS6ftcStoACNmcN7QI-n7Gv7NqZC3zWMGzK_1SvYcSodXzoWwtkWmrMW9uPiu4MvROQH0sK7MJ4WHBIHii-x4wogH4PHEdGi_vFZohq2bRaaDKXBeJK7Tkke2whcydTHGuiAPQvRiHu5_wVptgDbTbKIQ28ZFQ4LpYStXE9Bck4JoVDeRQezWJN8Dx9ThU7j1xhWQqxQFWw3SPHry-cIejAWEfDTQ" \ + --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}' \ + "https://mainnet.infura.io/v3/" ``` ```bash -{"jsonrpc":"2.0","id":1,"result":"0x1cc23d4"} +{"jsonrpc": "2.0", "id": 1, "result": "0x1cc23d4"} ``` ### Set up allowlists @@ -213,14 +213,14 @@ The following example JWT definition allows only `eth_getBalance` requests, on a ```bash curl -X POST \ --H "Content-Type: application/json" \ --H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjQyZjUxODRlMzE1ZTQwZDRiNzkzMjU3Nzg2OTEwOTNhIn0.eyJleHAiOjE4OTM0NTI0MDAsImF1ZCI6ImluZnVyYS5pbyIsImFkZHJlc3NlcyI6WyIweDE5MzdjNWM1MTUwNTc1NTNjY2JkNDZkNTg2NjQ1NWNlNjYyOTAyODQiXSwibWV0aG9kcyI6WyJldGhfZ2V0QmFsYW5jZSJdfQ.SwonSCVgybdT_GPQXe5SfhujmyzG-qpgH6zzVEzLZbZpZKsVQzOzFu3X1zHydvITzl3WhKXq5q8acHdMEO8y2TpUeyeLB25A-bnSZj8YlxacQvsnSNzm4ySJrTglmjD9rsr6JzKfgub03RuHuz0AWWO4omD6UrPcfcpxUF9YXEcT98SIsodPP_41WPrRvBuo8kLhmByr2Qs-XQRCDzxHxHb5jXI5RzoxLeEjTU_3GfWqgqgh4XHogcK43_VFGz9gv8QEoUiPnySafV6H80WXo12XwTeF-lr2cy_q79ZOvSp0WC4_j8dQMhNwj2dhZv1VPsViZMeHjBAJwK5mzIxBlQ" \ ---data '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBalance", "params": [ "0x1937c5c515057553ccbd46d5866455ce66290284", "latest"]}' \ -"https://mainnet.infura.io/v3/" + -H "Content-Type: application/json" \ + -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjQyZjUxODRlMzE1ZTQwZDRiNzkzMjU3Nzg2OTEwOTNhIn0.eyJleHAiOjE4OTM0NTI0MDAsImF1ZCI6ImluZnVyYS5pbyIsImFkZHJlc3NlcyI6WyIweDE5MzdjNWM1MTUwNTc1NTNjY2JkNDZkNTg2NjQ1NWNlNjYyOTAyODQiXSwibWV0aG9kcyI6WyJldGhfZ2V0QmFsYW5jZSJdfQ.SwonSCVgybdT_GPQXe5SfhujmyzG-qpgH6zzVEzLZbZpZKsVQzOzFu3X1zHydvITzl3WhKXq5q8acHdMEO8y2TpUeyeLB25A-bnSZj8YlxacQvsnSNzm4ySJrTglmjD9rsr6JzKfgub03RuHuz0AWWO4omD6UrPcfcpxUF9YXEcT98SIsodPP_41WPrRvBuo8kLhmByr2Qs-XQRCDzxHxHb5jXI5RzoxLeEjTU_3GfWqgqgh4XHogcK43_VFGz9gv8QEoUiPnySafV6H80WXo12XwTeF-lr2cy_q79ZOvSp0WC4_j8dQMhNwj2dhZv1VPsViZMeHjBAJwK5mzIxBlQ" \ + --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_getBalance", "params": [ "0x1937c5c515057553ccbd46d5866455ce66290284", "latest"]}' \ + "https://mainnet.infura.io/v3/" ``` ```bash -{"jsonrpc":"2.0","id":1,"result":"0x1a66d865b7f200"}% +{"jsonrpc": "2.0", "id": 1, "result": "0x1a66d865b7f200"}% ``` ## Verify JWTs @@ -244,4 +244,4 @@ openssl ec -in private.pem -pubout -outform DER | openssl sha256 -binary | opens ``` - \ No newline at end of file + diff --git a/services/how-to/make-batch-requests.md b/services/how-to/make-batch-requests.md index 63933299eca..e2f13ff1797 100644 --- a/services/how-to/make-batch-requests.md +++ b/services/how-to/make-batch-requests.md @@ -6,7 +6,7 @@ sidebar_position: 3 # Make batch requests Multiple requests can be sent at the same time in an array. This is called a [batch](https://www.jsonrpc.org/specification#batch) -request, and conforms to the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification). Batch is also commonly +request, and conforms to the [JSON-RPC 2.0 specification](https://www.jsonrpc.org/specification). Batch is also commonly eferred to as "multi-call." :::info @@ -24,38 +24,37 @@ Example batch request (containing 30 requests plus the batch request itself): ```json curl --request POST \ --url https://mainnet.infura.io/v3/ \ - --header 'Content-Type: application/json' \ + --header "Content-Type: application/json" \ --data '[ - {"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 2, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 3, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 4, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 5, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 6, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 7, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 8, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 9, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 10, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 11, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 12, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 13, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 14, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 15, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 16, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 17, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 18, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 19, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 20, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 21, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 22, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 23, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 24, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 25, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 26, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 27, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 28, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 29, "method": "eth_blockNumber", "params": []}, - {"jsonrpc": "2.0", "id": 30, "method": "eth_accounts", "params": []} -]' - + {"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 2, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 3, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 4, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 5, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 6, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 7, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 8, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 9, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 10, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 11, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 12, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 13, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 14, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 15, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 16, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 17, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 18, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 19, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 20, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 21, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 22, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 23, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 24, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 25, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 26, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 27, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 28, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 29, "method": "eth_blockNumber", "params": []}, + {"jsonrpc": "2.0", "id": 30, "method": "eth_accounts", "params": []} + ]' ``` diff --git a/services/how-to/trace-transactions.md b/services/how-to/trace-transactions.md index b00a333845c..eede9d73d3b 100644 --- a/services/how-to/trace-transactions.md +++ b/services/how-to/trace-transactions.md @@ -3,8 +3,8 @@ description: Trace transactions sidebar_position: 5 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Trace transactions @@ -68,9 +68,9 @@ This example represents a call to the `transfer` function of an ERC-20 token con ```bash curl https://mainnet.infura.io/v3/ \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "method": "trace_transaction","params": ["0x1e404c4bf580688c5527df2ce5aceb3db5de49479ab7dd321dd4615e4f5a7a5c"],"id": 1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "trace_transaction", "params": ["0x1e404c4bf580688c5527df2ce5aceb3db5de49479ab7dd321dd4615e4f5a7a5c"], "id": 1}' ``` diff --git a/services/how-to/use-ipfs/_category_.json b/services/how-to/use-ipfs/_category_.json index 4aa9d9207fe..92888fd6741 100644 --- a/services/how-to/use-ipfs/_category_.json +++ b/services/how-to/use-ipfs/_category_.json @@ -8,4 +8,4 @@ "slug": "services/how-to/", "description": "This section has information on using the Interplanetary File System (IPFS)." } -} \ No newline at end of file +} diff --git a/services/how-to/use-ipfs/access-ipfs-content/_category_.json b/services/how-to/use-ipfs/access-ipfs-content/_category_.json index 2b6272c0989..01e70caef78 100644 --- a/services/how-to/use-ipfs/access-ipfs-content/_category_.json +++ b/services/how-to/use-ipfs/access-ipfs-content/_category_.json @@ -8,4 +8,4 @@ "slug": "use-ipfs/access-ips-content", "description": "This section provides information about how to access IPFS content." } -} \ No newline at end of file +} diff --git a/services/how-to/use-ipfs/access-ipfs-content/dedicated-gateways.md b/services/how-to/use-ipfs/access-ipfs-content/dedicated-gateways.md index 243b5a52f9a..716338b7112 100644 --- a/services/how-to/use-ipfs/access-ipfs-content/dedicated-gateways.md +++ b/services/how-to/use-ipfs/access-ipfs-content/dedicated-gateways.md @@ -17,7 +17,7 @@ Toggle **DEDICATED GATEWAYS** to enable.
Dedicated gateways in project settings
@@ -35,10 +35,10 @@ For example, `https://meme-nft.infura-ipfs.io/ipfs/QmW5sPVbZDueZwvSuibteAwDFwFXh Enter a **UNIQUE SUBDOMAIN NAME** for your dedicated gateway and click **SAVE SUBDOMAIN**. -
-
+
+
Enter unique subdomain
diff --git a/services/how-to/use-ipfs/access-ipfs-content/index.md b/services/how-to/use-ipfs/access-ipfs-content/index.md index ef77b96a995..d40a4e47ac7 100644 --- a/services/how-to/use-ipfs/access-ipfs-content/index.md +++ b/services/how-to/use-ipfs/access-ipfs-content/index.md @@ -15,7 +15,7 @@ A solution is to use a custom-built private gateway or an Infura project-specifi :::info - [Content identifiers](https://docs.ipfs.io/concepts/content-addressing/) must use CIDv1 (not CIDv0) because some browsers - and user agents force lowercase for the authority part of URLs. -- The Infura IPFS public gateway was deprecated on August 10, 2022. + and user agents force lowercase for the authority part of URLs. +- The Infura IPFS public gateway was deprecated on August 10, 2022. ::: diff --git a/services/how-to/use-ipfs/authenticate-requests.md b/services/how-to/use-ipfs/authenticate-requests.md index e5f6bf45855..01981afd28b 100644 --- a/services/how-to/use-ipfs/authenticate-requests.md +++ b/services/how-to/use-ipfs/authenticate-requests.md @@ -12,7 +12,7 @@ involves sending a base64-encoded string that contains your username and passwor :::info To access the IPFS network through Infura, you'll need to add a billing card to your account, even if you're using a free account. Refer -to the [billing details](access-ipfs-content/dedicated-gateways.md#stats-and-billing) for more information. +to the [billing details](access-ipfs-content/dedicated-gateways.md#stats-and-billing) for more information. ::: diff --git a/services/how-to/use-ipfs/manage-files.md b/services/how-to/use-ipfs/manage-files.md index 771f706d215..3b7d3c213c8 100644 --- a/services/how-to/use-ipfs/manage-files.md +++ b/services/how-to/use-ipfs/manage-files.md @@ -17,14 +17,14 @@ Infura doesn't currently support remote pinning services on IPFS Desktop. ```bash curl -X POST -F file=@myfile \ --u ":" \ -"https://ipfs.infura.io:5001/api/v0/add" + -u ":" \ + "https://ipfs.infura.io:5001/api/v0/add" > { - "Name":"ipfs_file_docs_getting_started_demo.txt", - "Hash":"QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn", - "Size":"44" - } + "Name": "ipfs_file_docs_getting_started_demo.txt", + "Hash": "QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn", + "Size": "44" +} ``` When you upload a file using the `/api/v0/add` endpoint, the file is automatically pinned, and it isn't necessary to `pin` again. @@ -86,7 +86,7 @@ not removed during the [IPFS garbage collection process](https://docs.ipfs.io/co ```bash curl -X POST -u ":" \ -"https://ipfs.infura.io:5001/api/v0/pin/add?arg=QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn" + "https://ipfs.infura.io:5001/api/v0/pin/add?arg=QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn" ``` A pinned file will appear in your project's dashboard explorer. You can [unpin](manage-files.md#unpin-a-file) it at any @@ -102,14 +102,14 @@ Alternatively, use the IPFS API to unpin content. ```bash curl -X POST -u ":" \ -"https://ipfs.infura.io:5001/api/v0/pin/rm?arg=QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn" + "https://ipfs.infura.io:5001/api/v0/pin/rm?arg=QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn" ``` ### Read a file ```bash curl -X POST -u ":" \ -"https://ipfs.infura.io:5001/api/v0/cat?arg=QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn" + "https://ipfs.infura.io:5001/api/v0/cat?arg=QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn" > Infura IPFS - Getting started demo. ``` diff --git a/services/how-to/use-ipfs/set-quotas.md b/services/how-to/use-ipfs/set-quotas.md index d860138d29c..9bc43290fb5 100644 --- a/services/how-to/use-ipfs/set-quotas.md +++ b/services/how-to/use-ipfs/set-quotas.md @@ -10,7 +10,7 @@ Control monthly quotas from your API key's settings page.
diff --git a/services/index.md b/services/index.md index 58d1cafdf38..f81c3f13cec 100644 --- a/services/index.md +++ b/services/index.md @@ -21,15 +21,15 @@ dapps and Snaps. Infura offers a robust set of features designed to enhance the development, deployment, and management of dapps. These features include: -* **Broad access to major networks** - Infura supports the major networks, allowing you to take advantage of Ethereums's smart +- **Broad access to major networks** - Infura supports the major networks, allowing you to take advantage of Ethereums's smart contracts, IPFS's distributed file system, or high performing layer 2 networks. -* **Failover support for APIs** - Currently available on select networks for customers on Growth or Custom plans; if an Infura API +- **Failover support for APIs** - Currently available on select networks for customers on Growth or Custom plans; if an Infura API endpoint becomes unavailable for any reason, requests can be forwarded to a partner to fulfill the request. This ensures that your application remains up and running, providing uninterrupted service to your users. -* **Archive data querying** - [Access historical state data](concepts/archive-data.md) at any given +- **Archive data querying** - [Access historical state data](concepts/archive-data.md) at any given block height. This is an invaluable feature for those who need to perform deep analyses of past transactions, contract states, or balances. With this feature, developers can build applications that are not only data-rich but also comprehensive. -* **Expansion APIs** - +- **Expansion APIs** - [Access Infura's multi-chain Gas API](reference/gas-api/api-reference/index.md). Use the Gas API used by the MetaMask wallet to analyze and optimize gas costs on EIP-1559 compatible chains. @@ -44,4 +44,3 @@ include: Click below to explore the supported networks. - diff --git a/services/reference/_partials/_eth_accounts-description.mdx b/services/reference/_partials/_eth_accounts-description.mdx index 9d85fa6692f..ff6f25b9d14 100644 --- a/services/reference/_partials/_eth_accounts-description.mdx +++ b/services/reference/_partials/_eth_accounts-description.mdx @@ -1 +1 @@ -Returns a list of addresses owned by client. \ No newline at end of file +Returns a list of addresses owned by client. diff --git a/services/reference/_partials/_eth_accounts-example.mdx b/services/reference/_partials/_eth_accounts-example.mdx index 9f7546de129..47f187cb22e 100644 --- a/services/reference/_partials/_eth_accounts-example.mdx +++ b/services/reference/_partials/_eth_accounts-example.mdx @@ -1,2 +1 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - diff --git a/services/reference/_partials/_eth_accounts-request.mdx b/services/reference/_partials/_eth_accounts-request.mdx index 7c35f93ba97..388fc2b2692 100644 --- a/services/reference/_partials/_eth_accounts-request.mdx +++ b/services/reference/_partials/_eth_accounts-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` - - diff --git a/services/reference/_partials/_eth_accounts-response.mdx b/services/reference/_partials/_eth_accounts-response.mdx index 880ba338cee..8c3bf0d6eb5 100644 --- a/services/reference/_partials/_eth_accounts-response.mdx +++ b/services/reference/_partials/_eth_accounts-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -14,4 +14,3 @@ import TabItem from '@theme/TabItem'; - diff --git a/services/reference/_partials/_eth_accounts-returns.mdx b/services/reference/_partials/_eth_accounts-returns.mdx index 6c1254ab4a0..074c1db61b5 100644 --- a/services/reference/_partials/_eth_accounts-returns.mdx +++ b/services/reference/_partials/_eth_accounts-returns.mdx @@ -3,4 +3,3 @@ An array of hexadecimals as strings representing the addresses owned by the clie :::caution Infura will not return any accounts While this JSON-RPC method is supported by Infura, it will _not_ return any accounts as Infura does not support "unlocking" accounts. Instead, users should send pre-signed raw transactions using [`eth_sendRawTransaction`](../ethereum/json-rpc-methods/eth_sendrawtransaction.mdx). ::: - diff --git a/services/reference/_partials/_eth_blobbasefee-description.mdx b/services/reference/_partials/_eth_blobbasefee-description.mdx index c26afa78c32..507022cb163 100644 --- a/services/reference/_partials/_eth_blobbasefee-description.mdx +++ b/services/reference/_partials/_eth_blobbasefee-description.mdx @@ -1,2 +1 @@ Returns the expected base fee for blobs in the next block. - diff --git a/services/reference/_partials/_eth_blobbasefee-example.mdx b/services/reference/_partials/_eth_blobbasefee-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_blobbasefee-example.mdx +++ b/services/reference/_partials/_eth_blobbasefee-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_blobbasefee-request.mdx b/services/reference/_partials/_eth_blobbasefee-request.mdx index 458cbb5cb3e..068d5b7130c 100644 --- a/services/reference/_partials/_eth_blobbasefee-request.mdx +++ b/services/reference/_partials/_eth_blobbasefee-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blobBaseFee","params": [],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blobBaseFee", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_blobBaseFee","params": [],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_blobBaseFee", "params": [], "id":1}' +``` - diff --git a/services/reference/_partials/_eth_blobbasefee-response.mdx b/services/reference/_partials/_eth_blobbasefee-response.mdx index 56fc0ef4377..555cde4f524 100644 --- a/services/reference/_partials/_eth_blobbasefee-response.mdx +++ b/services/reference/_partials/_eth_blobbasefee-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -14,4 +14,3 @@ import TabItem from '@theme/TabItem'; - diff --git a/services/reference/_partials/_eth_blobbasefee-returns.mdx b/services/reference/_partials/_eth_blobbasefee-returns.mdx index 218dff51f97..a19d190baff 100644 --- a/services/reference/_partials/_eth_blobbasefee-returns.mdx +++ b/services/reference/_partials/_eth_blobbasefee-returns.mdx @@ -1,2 +1 @@ The expected base fee in wei, represented as a hexadecimal. - diff --git a/services/reference/_partials/_eth_blocknumber-description.mdx b/services/reference/_partials/_eth_blocknumber-description.mdx index 627c0db2be9..43b963a7a1a 100644 --- a/services/reference/_partials/_eth_blocknumber-description.mdx +++ b/services/reference/_partials/_eth_blocknumber-description.mdx @@ -1,2 +1 @@ Returns the current latest block number. - diff --git a/services/reference/_partials/_eth_blocknumber-example.mdx b/services/reference/_partials/_eth_blocknumber-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_blocknumber-example.mdx +++ b/services/reference/_partials/_eth_blocknumber-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_blocknumber-request.mdx b/services/reference/_partials/_eth_blocknumber-request.mdx index 425258e5f27..27f6e08deca 100644 --- a/services/reference/_partials/_eth_blocknumber-request.mdx +++ b/services/reference/_partials/_eth_blocknumber-request.mdx @@ -1,24 +1,23 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params":[], "id": 1}' ``` - diff --git a/services/reference/_partials/_eth_blocknumber-response.mdx b/services/reference/_partials/_eth_blocknumber-response.mdx index 15f7eb1c35d..8dfeafd3592 100644 --- a/services/reference/_partials/_eth_blocknumber-response.mdx +++ b/services/reference/_partials/_eth_blocknumber-response.mdx @@ -1,16 +1,17 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```js - { - "jsonrpc": "2.0", - "id": 1, - "result": "0x65a8db" - } - ``` +```js +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x65a8db" +} +``` + diff --git a/services/reference/_partials/_eth_blocknumber-returns.mdx b/services/reference/_partials/_eth_blocknumber-returns.mdx index b7406213144..07a663878dc 100644 --- a/services/reference/_partials/_eth_blocknumber-returns.mdx +++ b/services/reference/_partials/_eth_blocknumber-returns.mdx @@ -1,2 +1 @@ A hexadecimal of an integer representing the current block number the client is on. - diff --git a/services/reference/_partials/_eth_call-description.mdx b/services/reference/_partials/_eth_call-description.mdx index d7348a819a5..68a9b0f5cbc 100644 --- a/services/reference/_partials/_eth_call-description.mdx +++ b/services/reference/_partials/_eth_call-description.mdx @@ -6,4 +6,3 @@ To prevent API abuse, the `gas` parameter in [`eth_estimateGas`](../ethereum/jso this [`eth_call`](../ethereum/json-rpc-methods/eth_call.mdx) method is capped at 10x (1000%) the current block gas limit. ::: - diff --git a/services/reference/_partials/_eth_call-example.mdx b/services/reference/_partials/_eth_call-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_call-example.mdx +++ b/services/reference/_partials/_eth_call-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_call-parameters.mdx b/services/reference/_partials/_eth_call-parameters.mdx index 0b9e70bcb32..5ed3c621913 100644 --- a/services/reference/_partials/_eth_call-parameters.mdx +++ b/services/reference/_partials/_eth_call-parameters.mdx @@ -7,4 +7,3 @@ - `value`: Hexadecimal of the value sent with this transaction. - `data`: Hash of the method signature and encoded parameters. See [Ethereum contract ABI specification](https://docs.soliditylang.org/en/latest/abi-spec.html). - `block parameter`: [_Required_] A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - diff --git a/services/reference/_partials/_eth_call-request.mdx b/services/reference/_partials/_eth_call-request.mdx index 49b3983d3ec..2f8c16a57b7 100644 --- a/services/reference/_partials/_eth_call-request.mdx +++ b/services/reference/_partials/_eth_call-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_call-response.mdx b/services/reference/_partials/_eth_call-response.mdx index 985fb848532..2b881d7a6a2 100644 --- a/services/reference/_partials/_eth_call-response.mdx +++ b/services/reference/_partials/_eth_call-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_call-returns.mdx b/services/reference/_partials/_eth_call-returns.mdx index f22e8a5cf82..bd0f180260b 100644 --- a/services/reference/_partials/_eth_call-returns.mdx +++ b/services/reference/_partials/_eth_call-returns.mdx @@ -1,4 +1,4 @@ -The returned value of the executed contract. +The returned value of the executed contract. If this call causes the EVM to execute a `REVERT` operation, an error response of the following form is returned, with the revert reason pre-decoded as a string: @@ -14,4 +14,3 @@ the revert reason pre-decoded as a string: } } ``` - diff --git a/services/reference/_partials/_eth_chainid-description.mdx b/services/reference/_partials/_eth_chainid-description.mdx index 09530e17ee4..29620428245 100644 --- a/services/reference/_partials/_eth_chainid-description.mdx +++ b/services/reference/_partials/_eth_chainid-description.mdx @@ -1,2 +1 @@ Returns the currently configured chain ID, a value used in replay-protected transaction signing as introduced by [EIP-155](https://eips.ethereum.org/EIPS/eip-155). - diff --git a/services/reference/_partials/_eth_chainid-request.mdx b/services/reference/_partials/_eth_chainid-request.mdx index 3067032fbf4..5ae02a64fd5 100644 --- a/services/reference/_partials/_eth_chainid-request.mdx +++ b/services/reference/_partials/_eth_chainid-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` - - diff --git a/services/reference/_partials/_eth_chainid-response.mdx b/services/reference/_partials/_eth_chainid-response.mdx index 19e1054c7de..555cde4f524 100644 --- a/services/reference/_partials/_eth_chainid-response.mdx +++ b/services/reference/_partials/_eth_chainid-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_chainid-returns.mdx b/services/reference/_partials/_eth_chainid-returns.mdx index c8e98c3c3bb..0abbb529e0c 100644 --- a/services/reference/_partials/_eth_chainid-returns.mdx +++ b/services/reference/_partials/_eth_chainid-returns.mdx @@ -1,2 +1 @@ A hexadecimal of the current chain ID. - diff --git a/services/reference/_partials/_eth_createaccesslist-description.mdx b/services/reference/_partials/_eth_createaccesslist-description.mdx index 94cf56d4aa1..9f2c288ee7b 100644 --- a/services/reference/_partials/_eth_createaccesslist-description.mdx +++ b/services/reference/_partials/_eth_createaccesslist-description.mdx @@ -7,4 +7,3 @@ Use this method to optimize your smart contract interactions. Access lists are a See the Infura article [Optimizing Ethereum Transactions with eth_createAccessList](https://blog.infura.io/post/optimizing-ethereum-transactions-with-eth_createaccesslist) that describes how `eth_createAccessList` can help optimize gas costs, reduce out-of-gas errors, and verify clients for infrastructure access. ::: - diff --git a/services/reference/_partials/_eth_createaccesslist-example.mdx b/services/reference/_partials/_eth_createaccesslist-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_createaccesslist-example.mdx +++ b/services/reference/_partials/_eth_createaccesslist-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_createaccesslist-parameters.mdx b/services/reference/_partials/_eth_createaccesslist-parameters.mdx index 8d2ef881c91..b3351d6c158 100644 --- a/services/reference/_partials/_eth_createaccesslist-parameters.mdx +++ b/services/reference/_partials/_eth_createaccesslist-parameters.mdx @@ -8,4 +8,3 @@ - `value`: _[optional]_ Hexadecimal of the value transferred, in Wei. - `data`: _[optional]_ Hash of the method signature and encoded parameters. See [Ethereum contract ABI specification](https://docs.soliditylang.org/en/latest/abi-spec.html). - `block number` or `block hash`: _[required]_ A string representing a block number, block hash, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - diff --git a/services/reference/_partials/_eth_createaccesslist-request.mdx b/services/reference/_partials/_eth_createaccesslist-request.mdx index 607984b5b8e..ac36937ba9a 100644 --- a/services/reference/_partials/_eth_createaccesslist-request.mdx +++ b/services/reference/_partials/_eth_createaccesslist-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"method":"eth_createAccessList","params":[{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"],"id":1,"jsonrpc":"2.0"}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"method": "eth_createAccessList", "params": [{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"], "id": 1, "jsonrpc": "2.0"}' ``` ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"method":"eth_createAccessList","params":[{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"],"id":1,"jsonrpc":"2.0"}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"method": "eth_createAccessList", "params": [{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"], "id": 1, "jsonrpc": "2.0"}' ``` - - diff --git a/services/reference/_partials/_eth_createaccesslist-response.mdx b/services/reference/_partials/_eth_createaccesslist-response.mdx index 1b1a06d4b4e..51678601849 100644 --- a/services/reference/_partials/_eth_createaccesslist-response.mdx +++ b/services/reference/_partials/_eth_createaccesslist-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_createaccesslist-returns.mdx b/services/reference/_partials/_eth_createaccesslist-returns.mdx index 502d491a26b..6ff335e8cdf 100644 --- a/services/reference/_partials/_eth_createaccesslist-returns.mdx +++ b/services/reference/_partials/_eth_createaccesslist-returns.mdx @@ -4,4 +4,3 @@ Access list object with the following fields: - `address`: Addresses to be accessed by the transaction. - `storageKeys`: Storage keys to be accessed by the transaction. - `gasUsed`: A hexadecimal string representing the approximate gas cost for the transaction if the access list is included. - diff --git a/services/reference/_partials/_eth_estimategas-description.mdx b/services/reference/_partials/_eth_estimategas-description.mdx index 14872f147c7..d0e59d8d6c2 100644 --- a/services/reference/_partials/_eth_estimategas-description.mdx +++ b/services/reference/_partials/_eth_estimategas-description.mdx @@ -4,5 +4,3 @@ Generates and returns an estimate of how much gas is necessary to allow the tran To prevent abuse of the API, the `gas` parameter in this `eth_estimateGas` method and in [`eth_call`](../reference/ethereum/json-rpc-methods/eth_call.mdx) is capped at 10x (1000%) the current block gas limit. You can recreate this behavior in your local test environment (besu, geth, or other client) via the [`rpc.gascap`](https://geth.ethereum.org/docs/fundamentals/command-line-options#commands) command-line option. ::: - - diff --git a/services/reference/_partials/_eth_estimategas-example.mdx b/services/reference/_partials/_eth_estimategas-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_estimategas-example.mdx +++ b/services/reference/_partials/_eth_estimategas-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_estimategas-parameters.mdx b/services/reference/_partials/_eth_estimategas-parameters.mdx index 36dedf87157..830f7d58928 100644 --- a/services/reference/_partials/_eth_estimategas-parameters.mdx +++ b/services/reference/_partials/_eth_estimategas-parameters.mdx @@ -2,15 +2,15 @@ - `from`: _\[optional]_ 20 Bytes - The address the transaction is sent from. - `to`: 20 Bytes - The address the transaction is directed to. - `gas`: _\[optional]_ Hexadecimal value of the gas provided for the transaction execution. `eth_estimateGas` consumes - zero gas, but this parameter may be needed by some executions. + zero gas, but this parameter may be needed by some executions. - `gasPrice`: _\[optional]_ Hexadecimal value of the gas price used for each paid gas. - `maxPriorityFeePerGas`: _\[optional]_ Maximum fee, in Wei, the sender is willing to pay per gas above the base fee. - See [EIP-1559 transactions](../../concepts/transaction-types.md#eip-1559-transactions). + See [EIP-1559 transactions](../../concepts/transaction-types.md#eip-1559-transactions). - `maxFeePerGas`: _\[optional]_ Maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. - See [EIP-1559 transactions](../../concepts/transaction-types.md#eip-1559-transactions). + See [EIP-1559 transactions](../../concepts/transaction-types.md#eip-1559-transactions). - `value`: _\[optional]_ Hexadecimal value of the value sent with this transaction. - `data`: _\[optional]_ Hash of the method signature and encoded parameters. See the - [Ethereum contract ABI specification](https://docs.soliditylang.org/en/latest/abi-spec.html). + [Ethereum contract ABI specification](https://docs.soliditylang.org/en/latest/abi-spec.html). - `block number`: _[required]_ A string representing a block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). @@ -18,4 +18,3 @@ If no gas limit is specified, geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit. - diff --git a/services/reference/_partials/_eth_estimategas-request.mdx b/services/reference/_partials/_eth_estimategas-request.mdx index 3ea47ffc771..2cd7038a908 100644 --- a/services/reference/_partials/_eth_estimategas-request.mdx +++ b/services/reference/_partials/_eth_estimategas-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_estimategas-response.mdx b/services/reference/_partials/_eth_estimategas-response.mdx index 8b5b9461935..8a392da5902 100644 --- a/services/reference/_partials/_eth_estimategas-response.mdx +++ b/services/reference/_partials/_eth_estimategas-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -14,4 +14,3 @@ import TabItem from '@theme/TabItem'; - diff --git a/services/reference/_partials/_eth_estimategas-returns.mdx b/services/reference/_partials/_eth_estimategas-returns.mdx index 6e6d2340a26..fc09c061866 100644 --- a/services/reference/_partials/_eth_estimategas-returns.mdx +++ b/services/reference/_partials/_eth_estimategas-returns.mdx @@ -1,4 +1,4 @@ -A hexadecimal of the estimate of the gas for the given transaction. +A hexadecimal of the estimate of the gas for the given transaction. If this call causes the EVM to execute a `REVERT` operation, an error response of the following form is returned, with the revert reason pre-decoded as a string: @@ -13,4 +13,3 @@ If this call causes the EVM to execute a `REVERT` operation, an error response o } } ``` - diff --git a/services/reference/_partials/_eth_feehistory-description.mdx b/services/reference/_partials/_eth_feehistory-description.mdx index c243f542bfb..2baf4c89646 100644 --- a/services/reference/_partials/_eth_feehistory-description.mdx +++ b/services/reference/_partials/_eth_feehistory-description.mdx @@ -1,2 +1 @@ Returns historical gas information, allowing you to track trends over time. - diff --git a/services/reference/_partials/_eth_feehistory-example.mdx b/services/reference/_partials/_eth_feehistory-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_feehistory-example.mdx +++ b/services/reference/_partials/_eth_feehistory-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_feehistory-parameters.mdx b/services/reference/_partials/_eth_feehistory-parameters.mdx index 4dc22f368e7..0b08197f71c 100644 --- a/services/reference/_partials/_eth_feehistory-parameters.mdx +++ b/services/reference/_partials/_eth_feehistory-parameters.mdx @@ -1,4 +1,3 @@ - `blockCount`: (integer) Number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. If blocks in the specified block range are not available, then only the fee history for available blocks is returned. - `newestBlock`: (string) Integer representing the highest number block of the requested range, or one of the string tags `latest`, `earliest`, or `pending`. - `array` of `integers`: (optional) A monotonically increasing list of percentile values to sample from each block's effective priority fees per gas in ascending order, weighted by gas used. - diff --git a/services/reference/_partials/_eth_feehistory-request.mdx b/services/reference/_partials/_eth_feehistory-request.mdx index d6ab6fad0d6..9870fd99714 100644 --- a/services/reference/_partials/_eth_feehistory-request.mdx +++ b/services/reference/_partials/_eth_feehistory-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x5", "latest", []],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", []], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_feehistory-response.mdx b/services/reference/_partials/_eth_feehistory-response.mdx index 5fd430136af..c3d4e13e64b 100644 --- a/services/reference/_partials/_eth_feehistory-response.mdx +++ b/services/reference/_partials/_eth_feehistory-response.mdx @@ -1,56 +1,55 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```js { - "jsonrpc": "2.0", - "result": { - "baseFeePerGas": [ - "0x3da8e7618", - "0x3e1ba3b1b", - "0x3dfd72b90", - "0x3d64eee76", - "0x3d4da2da0", - "0x3ccbcac6b" - ], - "gasUsedRatio": [ - 0.5290747666666666, - 0.49240453333333334, - 0.4615576, - 0.49407083333333335, - 0.4669053 - ], - "oldestBlock": "0xfab8ac", - "reward": [ - [ - "0x59682f00", - "0x59682f00" - ], - [ - "0x59682f00", - "0x59682f00" - ], - [ - "0x3b9aca00", - "0x59682f00" - ], - [ - "0x510b0870", - "0x59682f00" - ], - [ - "0x3b9aca00", - "0x59682f00" - ] - ] - }, - "id": 0 + "jsonrpc": "2.0", + "result": { + "baseFeePerGas": [ + "0x3da8e7618", + "0x3e1ba3b1b", + "0x3dfd72b90", + "0x3d64eee76", + "0x3d4da2da0", + "0x3ccbcac6b" + ], + "gasUsedRatio": [ + 0.5290747666666666, + 0.49240453333333334, + 0.4615576, + 0.49407083333333335, + 0.4669053 + ], + "oldestBlock": "0xfab8ac", + "reward": [ + [ + "0x59682f00", + "0x59682f00" + ], + [ + "0x59682f00", + "0x59682f00" + ], + [ + "0x3b9aca00", + "0x59682f00" + ], + [ + "0x510b0870", + "0x59682f00" + ], + [ + "0x3b9aca00", + "0x59682f00" + ] + ] + }, + "id": 0 } ``` - diff --git a/services/reference/_partials/_eth_feehistory-returns.mdx b/services/reference/_partials/_eth_feehistory-returns.mdx index f4bd3ac08c0..d7a5bae1c0a 100644 --- a/services/reference/_partials/_eth_feehistory-returns.mdx +++ b/services/reference/_partials/_eth_feehistory-returns.mdx @@ -2,4 +2,3 @@ - `baseFeePerGas`: An array of block base fees per gas, including an extra block value. The extra value is the next block after the newest block in the returned range. Returns zeroes for blocks created before [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559). - `gasUsedRatio`: An array of block gas used ratios. These are calculated as the ratio of `gasUsed` and `gasLimit`. - `reward`: An array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty. - diff --git a/services/reference/_partials/_eth_gasprice-description.mdx b/services/reference/_partials/_eth_gasprice-description.mdx index 5a64391ae6c..9db52abaf8b 100644 --- a/services/reference/_partials/_eth_gasprice-description.mdx +++ b/services/reference/_partials/_eth_gasprice-description.mdx @@ -1,2 +1 @@ Returns the current gas price in wei. - diff --git a/services/reference/_partials/_eth_gasprice-example.mdx b/services/reference/_partials/_eth_gasprice-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_gasprice-example.mdx +++ b/services/reference/_partials/_eth_gasprice-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_gasprice-request.mdx b/services/reference/_partials/_eth_gasprice-request.mdx index 429fe65572d..b6c906e5d2e 100644 --- a/services/reference/_partials/_eth_gasprice-request.mdx +++ b/services/reference/_partials/_eth_gasprice-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_gasprice-response.mdx b/services/reference/_partials/_eth_gasprice-response.mdx index 70b1ce5c083..d41980c551d 100644 --- a/services/reference/_partials/_eth_gasprice-response.mdx +++ b/services/reference/_partials/_eth_gasprice-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -14,4 +14,3 @@ import TabItem from '@theme/TabItem'; - diff --git a/services/reference/_partials/_eth_gasprice-returns.mdx b/services/reference/_partials/_eth_gasprice-returns.mdx index c54453c1a82..606dfd7c796 100644 --- a/services/reference/_partials/_eth_gasprice-returns.mdx +++ b/services/reference/_partials/_eth_gasprice-returns.mdx @@ -1,2 +1 @@ A hexadecimal equivalent of an integer representing the current gas price in wei. - diff --git a/services/reference/_partials/_eth_getbalance-description.mdx b/services/reference/_partials/_eth_getbalance-description.mdx index cd847f4cf76..0645c40ee52 100644 --- a/services/reference/_partials/_eth_getbalance-description.mdx +++ b/services/reference/_partials/_eth_getbalance-description.mdx @@ -1,2 +1 @@ Returns the balance of the account of a given address. - diff --git a/services/reference/_partials/_eth_getbalance-example.mdx b/services/reference/_partials/_eth_getbalance-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getbalance-example.mdx +++ b/services/reference/_partials/_eth_getbalance-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_getbalance-parameters.mdx b/services/reference/_partials/_eth_getbalance-parameters.mdx index 4f168d94370..f14b93c8632 100644 --- a/services/reference/_partials/_eth_getbalance-parameters.mdx +++ b/services/reference/_partials/_eth_getbalance-parameters.mdx @@ -1,3 +1,2 @@ - `address`: [_Required_] A string representing the address (20 bytes) to check for balance. - `block parameter`: [_Required_] A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - diff --git a/services/reference/_partials/_eth_getbalance-request.mdx b/services/reference/_partials/_eth_getbalance-request.mdx index 6945aa19271..46d75374fdd 100644 --- a/services/reference/_partials/_eth_getbalance-request.mdx +++ b/services/reference/_partials/_eth_getbalance-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0","method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getbalance-response.mdx b/services/reference/_partials/_eth_getbalance-response.mdx index a23fa87507b..91c37e7eeb0 100644 --- a/services/reference/_partials/_eth_getbalance-response.mdx +++ b/services/reference/_partials/_eth_getbalance-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_getbalance-returns.mdx b/services/reference/_partials/_eth_getbalance-returns.mdx index 59bcb160ff4..f6ba05bc577 100644 --- a/services/reference/_partials/_eth_getbalance-returns.mdx +++ b/services/reference/_partials/_eth_getbalance-returns.mdx @@ -1,2 +1 @@ A hexadecimal of the current balance in the account at the given address. The balance is in wei. - diff --git a/services/reference/_partials/_eth_getblockbyhash-description.mdx b/services/reference/_partials/_eth_getblockbyhash-description.mdx index 60d51680658..dd90a078981 100644 --- a/services/reference/_partials/_eth_getblockbyhash-description.mdx +++ b/services/reference/_partials/_eth_getblockbyhash-description.mdx @@ -1,2 +1 @@ Returns information about a block whose hash is in the request. - diff --git a/services/reference/_partials/_eth_getblockbyhash-example.mdx b/services/reference/_partials/_eth_getblockbyhash-example.mdx index 9f7546de129..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getblockbyhash-example.mdx +++ b/services/reference/_partials/_eth_getblockbyhash-example.mdx @@ -1,2 +1 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - diff --git a/services/reference/_partials/_eth_getblockbyhash-parameters.mdx b/services/reference/_partials/_eth_getblockbyhash-parameters.mdx index c74ed142ade..d9f8d24591e 100644 --- a/services/reference/_partials/_eth_getblockbyhash-parameters.mdx +++ b/services/reference/_partials/_eth_getblockbyhash-parameters.mdx @@ -1,3 +1,2 @@ - `hash`: (string) [_Required_] A string representing the hash (32 bytes) of a block. - `transaction details flag`: (boolean) [_Required_] If set to `true`, returns the full transaction objects, if `false` returns only the hashes of the transactions. - diff --git a/services/reference/_partials/_eth_getblockbyhash-request.mdx b/services/reference/_partials/_eth_getblockbyhash-request.mdx index 0abcdb7ab6f..0a209243a08 100644 --- a/services/reference/_partials/_eth_getblockbyhash-request.mdx +++ b/services/reference/_partials/_eth_getblockbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getblockbyhash-response.mdx b/services/reference/_partials/_eth_getblockbyhash-response.mdx index de30e0bce5a..40faaca5718 100644 --- a/services/reference/_partials/_eth_getblockbyhash-response.mdx +++ b/services/reference/_partials/_eth_getblockbyhash-response.mdx @@ -1,49 +1,46 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```json - { - "jsonrpc": "2.0", - "id": 1, - "result": { - "difficulty": "0xbfabcdbd93dda", - "extraData": "0x737061726b706f6f6c2d636e2d6e6f64652d3132", - "gasLimit": "0x79f39e", - "gasUsed": "0x79ccd3", - "hash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", - "logsBloom": "0x4848112002a2020aaa0812180045840210020005281600c80104264300080008000491220144461026015300100000128005018401002090a824a4150015410020140400d808440106689b29d0280b1005200007480ca950b15b010908814e01911000054202a020b05880b914642a0000300003010044044082075290283516be82504082003008c4d8d14462a8800c2990c88002a030140180036c220205201860402001014040180002006860810ec0a1100a14144148408118608200060461821802c081000042d0810104a8004510020211c088200420822a082040e10104c00d010064004c122692020c408a1aa2348020445403814002c800888208b1", - "miner": "0x5a0b54d5dc17e0aadc383d2db43b0a0d3e029c4c", - "mixHash": "0x3d1fdd16f15aeab72e7db1013b9f034ee33641d92f71c0736beab4e67d34c7a7", - "nonce": "0x4db7a1c01d8a8072", - "number": "0x5bad55", - "parentHash": "0x61a8ad530a8a43e3583f8ec163f773ad370329b2375d66433eb82f005e1d6202", - "receiptsRoot": "0x5eced534b3d84d3d732ddbc714f5fd51d98a941b28182b6efe6df3a0fe90004b", - "sha3Uncles": "0x8a562e7634774d3e3a36698ac4915e37fc84a2cd0044cb84fa5d80263d2af4f6", - "size": "0x41c7", - "stateRoot": "0xf5208fffa2ba5a3f3a2f64ebd5ca3d098978bedd75f335f56b705d8715ee2305", - "timestamp": "0x5b541449", - "totalDifficulty": "0x12ac11391a2f3872fcd", - "transactions": [ - "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f", - "0x311be6a9b58748717ac0f70eb801d29973661aaf1365960d159e4ec4f4aa2d7f", - "0xe42b0256058b7cad8a14b136a0364acda0b4c36f5b02dea7e69bfd82cef252a2", - "0x4eb05376055c6456ed883fc843bc43df1dcf739c321ba431d518aecd7f98ca11", - "0x994dd9e72b212b7dc5fd0466ab75adf7d391cf4f206a65b7ad2a1fd032bb06d7", - "0xf6feecbb9ab0ac58591a4bc287059b1133089c499517e91a274e6a1f5e7dce53", - "0x7e537d687a5525259480440c6ea2e1a8469cd98906eaff8597f3d2a44422ff97", - "0xa762220e92bed6d77a2c19ffc60dad77d71bd5028c5230c896ab4b9552a39b50", - "0xf1fa677edda7e5add8e794732c7554cd5459a5c12781dc71de73c7937dfb2775", - "0x241d89f7888fbcfadfd415ee967882fec6fdd67c07ca8a00f2ca4c910a84c7dd" - ], - "transactionsRoot": "0xf98631e290e88f58a46b7032f025969039aa9b5696498efc76baf436fa69b262", - "uncles": [ - "0x824cce7c7c2ec6874b9fa9a9a898eb5f27cbaf3991dfa81084c3af60d1db618c" - ] - } +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": { + "difficulty": "0xbfabcdbd93dda", + "extraData": "0x737061726b706f6f6c2d636e2d6e6f64652d3132", + "gasLimit": "0x79f39e", + "gasUsed": "0x79ccd3", + "hash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", + "logsBloom": "0x4848112002a2020aaa0812180045840210020005281600c80104264300080008000491220144461026015300100000128005018401002090a824a4150015410020140400d808440106689b29d0280b1005200007480ca950b15b010908814e01911000054202a020b05880b914642a0000300003010044044082075290283516be82504082003008c4d8d14462a8800c2990c88002a030140180036c220205201860402001014040180002006860810ec0a1100a14144148408118608200060461821802c081000042d0810104a8004510020211c088200420822a082040e10104c00d010064004c122692020c408a1aa2348020445403814002c800888208b1", + "miner": "0x5a0b54d5dc17e0aadc383d2db43b0a0d3e029c4c", + "mixHash": "0x3d1fdd16f15aeab72e7db1013b9f034ee33641d92f71c0736beab4e67d34c7a7", + "nonce": "0x4db7a1c01d8a8072", + "number": "0x5bad55", + "parentHash": "0x61a8ad530a8a43e3583f8ec163f773ad370329b2375d66433eb82f005e1d6202", + "receiptsRoot": "0x5eced534b3d84d3d732ddbc714f5fd51d98a941b28182b6efe6df3a0fe90004b", + "sha3Uncles": "0x8a562e7634774d3e3a36698ac4915e37fc84a2cd0044cb84fa5d80263d2af4f6", + "size": "0x41c7", + "stateRoot": "0xf5208fffa2ba5a3f3a2f64ebd5ca3d098978bedd75f335f56b705d8715ee2305", + "timestamp": "0x5b541449", + "totalDifficulty": "0x12ac11391a2f3872fcd", + "transactions": [ + "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f", + "0x311be6a9b58748717ac0f70eb801d29973661aaf1365960d159e4ec4f4aa2d7f", + "0xe42b0256058b7cad8a14b136a0364acda0b4c36f5b02dea7e69bfd82cef252a2", + "0x4eb05376055c6456ed883fc843bc43df1dcf739c321ba431d518aecd7f98ca11", + "0x994dd9e72b212b7dc5fd0466ab75adf7d391cf4f206a65b7ad2a1fd032bb06d7", + "0xf6feecbb9ab0ac58591a4bc287059b1133089c499517e91a274e6a1f5e7dce53", + "0x7e537d687a5525259480440c6ea2e1a8469cd98906eaff8597f3d2a44422ff97", + "0xa762220e92bed6d77a2c19ffc60dad77d71bd5028c5230c896ab4b9552a39b50", + "0xf1fa677edda7e5add8e794732c7554cd5459a5c12781dc71de73c7937dfb2775", + "0x241d89f7888fbcfadfd415ee967882fec6fdd67c07ca8a00f2ca4c910a84c7dd" + ] } +} ``` + diff --git a/services/reference/_partials/_eth_getblockbyhash-returns.mdx b/services/reference/_partials/_eth_getblockbyhash-returns.mdx index 0c24a961026..28a1dc5369a 100644 --- a/services/reference/_partials/_eth_getblockbyhash-returns.mdx +++ b/services/reference/_partials/_eth_getblockbyhash-returns.mdx @@ -19,4 +19,3 @@ A block object matching the hash in the request, or null when no block was found - `transactions`: [Array] An array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter. - `transactionsRoot`: 32 bytes. The root of the transaction trie of the block. - `uncles`: [Array] An Array of uncle hashes. - diff --git a/services/reference/_partials/_eth_getblockbynumber-description.mdx b/services/reference/_partials/_eth_getblockbynumber-description.mdx index 464a27dc504..e1404c8e475 100644 --- a/services/reference/_partials/_eth_getblockbynumber-description.mdx +++ b/services/reference/_partials/_eth_getblockbynumber-description.mdx @@ -1,2 +1 @@ Returns information about a block by hash. - diff --git a/services/reference/_partials/_eth_getblockbynumber-parameters.mdx b/services/reference/_partials/_eth_getblockbynumber-parameters.mdx index fa49882f657..81ede62940f 100644 --- a/services/reference/_partials/_eth_getblockbynumber-parameters.mdx +++ b/services/reference/_partials/_eth_getblockbynumber-parameters.mdx @@ -1,3 +1,2 @@ - `block parameter`: [_Required_] A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - `show transaction details flag`: [_Required_] If set to `true`, returns the full transaction objects. If `false` returns only the hashes of the transactions. - diff --git a/services/reference/_partials/_eth_getblockbynumber-request.mdx b/services/reference/_partials/_eth_getblockbynumber-request.mdx index c89129f178c..ea1fedcade7 100644 --- a/services/reference/_partials/_eth_getblockbynumber-request.mdx +++ b/services/reference/_partials/_eth_getblockbynumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x5BAD55",false],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55",false], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params": ["0x5BAD55",false],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getblockbynumber-response.mdx b/services/reference/_partials/_eth_getblockbynumber-response.mdx index 487ec23f7ba..d3517720e33 100644 --- a/services/reference/_partials/_eth_getblockbynumber-response.mdx +++ b/services/reference/_partials/_eth_getblockbynumber-response.mdx @@ -1,49 +1,50 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```js { - "id" : 1, - "jsonrpc" : "2.0", - "result" : { - "difficulty" : "0xbfabcdbd93dda", - "extraData" : "0x737061726b706f6f6c2d636e2d6e6f64652d3132", - "gasLimit" : "0x79f39e", - "gasUsed" : "0x79ccd3", - "hash" : "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", - "logsBloom" : "0x4848112002a2020aaa0812180045840210020005281600c80104264300080008000491220144461026015300100000128005018401002090a824a4150015410020140400d808440106689b29d0280b1005200007480ca950b15b010908814e01911000054202a020b05880b914642a0000300003010044044082075290283516be82504082003008c4d8d14462a8800c2990c88002a030140180036c220205201860402001014040180002006860810ec0a1100a14144148408118608200060461821802c081000042d0810104a8004510020211c088200420822a082040e10104c00d010064004c122692020c408a1aa2348020445403814002c800888208b1", - "miner" : "0x5a0b54d5dc17e0aadc383d2db43b0a0d3e029c4c", - "mixHash" : "0x3d1fdd16f15aeab72e7db1013b9f034ee33641d92f71c0736beab4e67d34c7a7", - "nonce" : "0x4db7a1c01d8a8072", - "number" : "0x5bad55", - "parentHash" : "0x61a8ad530a8a43e3583f8ec163f773ad370329b2375d66433eb82f005e1d6202", - "receiptsRoot" : "0x5eced534b3d84d3d732ddbc714f5fd51d98a941b28182b6efe6df3a0fe90004b", - "sha3Uncles" : "0x8a562e7634774d3e3a36698ac4915e37fc84a2cd0044cb84fa5d80263d2af4f6", - "size" : "0x41c7", - "stateRoot" : "0xf5208fffa2ba5a3f3a2f64ebd5ca3d098978bedd75f335f56b705d8715ee2305", - "timestamp" : "0x5b541449", - "totalDifficulty" : "0x12ac11391a2f3872fcd", - "transactions" : [ - "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f", - "0x311be6a9b58748717ac0f70eb801d29973661aaf1365960d159e4ec4f4aa2d7f", - "0xe42b0256058b7cad8a14b136a0364acda0b4c36f5b02dea7e69bfd82cef252a2", - "0x4eb05376055c6456ed883fc843bc43df1dcf739c321ba431d518aecd7f98ca11", - "0x994dd9e72b212b7dc5fd0466ab75adf7d391cf4f206a65b7ad2a1fd032bb06d7", - ... - "0xf1cd627c97746bc75727c2f0efa2d0dc66cca1b36d8e45d897e18a9b19af2f60", - "0x241d89f7888fbcfadfd415ee967882fec6fdd67c07ca8a00f2ca4c910a84c7dd" - ], - "transactionsRoot" : "0xf98631e290e88f58a46b7032f025969039aa9b5696498efc76baf436fa69b262", - "uncles" : [ - "0x824cce7c7c2ec6874b9fa9a9a898eb5f27cbaf3991dfa81084c3af60d1db618c" - ] - } + "jsonrpc": "2.0", + "id": 1, + "result": { + "difficulty": "0xbfabcdbd93dda", + "extraData": "0x737061726b706f6f6c2d636e2d6e6f64652d3132", + "gasLimit": "0x79f39e", + "gasUsed": "0x79ccd3", + "hash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", + "logsBloom": "0x4848112002a2020aaa0812180045840210020005281600c80104264300080008000491220144461026015300100000128005018401002090a824a4150015410020140400d808440106689b29d0280b1005200007480ca950b15b010908814e01911000054202a020b05880b914642a0000300003010044044082075290283516be82504082003008c4d8d14462a8800c2990c88002a030140180036c220205201860402001014040180002006860810ec0a1100a14144148408118608200060461821802c081000042d0810104a8004510020211c088200420822a082040e10104c00d010064004c122692020c408a1aa2348020445403814002c800888208b1", + "miner": "0x5a0b54d5dc17e0aadc383d2db43b0a0d3e029c4c", + "mixHash": "0x3d1fdd16f15aeab72e7db1013b9f034ee33641d92f71c0736beab4e67d34c7a7", + "nonce": "0x4db7a1c01d8a8072", + "number": "0x5bad55", + "parentHash": "0x61a8ad530a8a43e3583f8ec163f773ad370329b2375d66433eb82f005e1d6202", + "receiptsRoot": "0x5eced534b3d84d3d732ddbc714f5fd51d98a941b28182b6efe6df3a0fe90004b", + "sha3Uncles": "0x8a562e7634774d3e3a36698ac4915e37fc84a2cd0044cb84fa5d80263d2af4f6", + "size": "0x41c7", + "stateRoot": "0xf5208fffa2ba5a3f3a2f64ebd5ca3d098978bedd75f335f56b705d8715ee2305", + "timestamp": "0x5b541449", + "totalDifficulty": "0x12ac11391a2f3872fcd", + "transactions": [ + "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f", + "0x311be6a9b58748717ac0f70eb801d29973661aaf1365960d159e4ec4f4aa2d7f", + "0xe42b0256058b7cad8a14b136a0364acda0b4c36f5b02dea7e69bfd82cef252a2", + "0x4eb05376055c6456ed883fc843bc43df1dcf739c321ba431d518aecd7f98ca11", + "0x994dd9e72b212b7dc5fd0466ab75adf7d391cf4f206a65b7ad2a1fd032bb06d7", + "0xf6feecbb9ab0ac58591a4bc287059b1133089c499517e91a274e6a1f5e7dce53", + "0x7e537d687a5525259480440c6ea2e1a8469cd98906eaff8597f3d2a44422ff97", + "0xa762220e92bed6d77a2c19ffc60dad77d71bd5028c5230c896ab4b9552a39b50", + "0xf1fa677edda7e5add8e794732c7554cd5459a5c12781dc71de73c7937dfb2775", + "0x241d89f7888fbcfadfd415ee967882fec6fdd67c07ca8a00f2ca4c910a84c7dd" + ], + "transactionsRoot": "0xf98631e290e88f58a46b7032f025969039aa9b5696498efc76baf436fa69b262", + "uncles": [ + "0x824cce7c7c2ec6874b9fa9a9a898eb5f27cbaf3991dfa81084c3af60d1db618c" + ] + } } ``` - diff --git a/services/reference/_partials/_eth_getblockbynumber-returns.mdx b/services/reference/_partials/_eth_getblockbynumber-returns.mdx index 5edaa672a8d..a134ca3702d 100644 --- a/services/reference/_partials/_eth_getblockbynumber-returns.mdx +++ b/services/reference/_partials/_eth_getblockbynumber-returns.mdx @@ -19,4 +19,3 @@ A block object, or null when no block was found. The returned block object conta - `transactions`: [Array] An array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter. - `transactionsRoot`: 32 bytes. The root of the transaction trie of the block. - `uncles`: [Array] An array of uncle hashes. - diff --git a/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx b/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx index 4d9dd1e318f..5e2186c497f 100644 --- a/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx +++ b/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx @@ -1,2 +1 @@ Returns the number of transactions in the block with the given block hash. - diff --git a/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx b/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx +++ b/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx b/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx index 3b1fca33cad..907c00a0d99 100644 --- a/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx +++ b/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx @@ -1,2 +1 @@ `block hash`:[_Required_] A string representing the hash (32 bytes) of a block. - diff --git a/services/reference/_partials/_eth_getblocktransactioncountbyhash-request.mdx b/services/reference/_partials/_eth_getblocktransactioncountbyhash-request.mdx index ecc6e5ec797..f8315d33fea 100644 --- a/services/reference/_partials/_eth_getblocktransactioncountbyhash-request.mdx +++ b/services/reference/_partials/_eth_getblocktransactioncountbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx b/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx index 915bfc61c1f..affe48f97f8 100644 --- a/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx +++ b/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx b/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx index 4241b6c3e8d..2fe52384af5 100644 --- a/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx +++ b/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx @@ -1,3 +1 @@ `block transaction count`: A hexadecimal equivalent of the integer representing the number of transactions in the block. - - diff --git a/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx b/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx index 3b52d598be0..a476d1ac354 100644 --- a/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx +++ b/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx @@ -1,2 +1 @@ Returns the number of transactions in the block with the given block number. - diff --git a/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx b/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx +++ b/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx b/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx index bb1c036fcfb..65946186dd8 100644 --- a/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx +++ b/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx @@ -1,2 +1 @@ `block number`:[_Required_] A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - diff --git a/services/reference/_partials/_eth_getblocktransactioncountbynumber-request.mdx b/services/reference/_partials/_eth_getblocktransactioncountbynumber-request.mdx index 864ac0d8d0e..770b99c54e7 100644 --- a/services/reference/_partials/_eth_getblocktransactioncountbynumber-request.mdx +++ b/services/reference/_partials/_eth_getblocktransactioncountbynumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx b/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx index 225fc03ecae..df720d61927 100644 --- a/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx +++ b/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx b/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx index 4241b6c3e8d..2fe52384af5 100644 --- a/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx +++ b/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx @@ -1,3 +1 @@ `block transaction count`: A hexadecimal equivalent of the integer representing the number of transactions in the block. - - diff --git a/services/reference/_partials/_eth_getcode-description.mdx b/services/reference/_partials/_eth_getcode-description.mdx index 45eb7961658..6693110dd42 100644 --- a/services/reference/_partials/_eth_getcode-description.mdx +++ b/services/reference/_partials/_eth_getcode-description.mdx @@ -1,2 +1 @@ Returns the compiled byte code of a smart contract, if any, at a given address. - diff --git a/services/reference/_partials/_eth_getcode-example.mdx b/services/reference/_partials/_eth_getcode-example.mdx index 9f7546de129..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getcode-example.mdx +++ b/services/reference/_partials/_eth_getcode-example.mdx @@ -1,2 +1 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - diff --git a/services/reference/_partials/_eth_getcode-parameters.mdx b/services/reference/_partials/_eth_getcode-parameters.mdx index b4da827b5e7..45787d95d4c 100644 --- a/services/reference/_partials/_eth_getcode-parameters.mdx +++ b/services/reference/_partials/_eth_getcode-parameters.mdx @@ -1,3 +1,2 @@ - `address`: [_Required_] A string representing the address (20 bytes) of the smart contract, from which the compiled byte code will be obtained. - `block number`:[_Required_] A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - diff --git a/services/reference/_partials/_eth_getcode-request.mdx b/services/reference/_partials/_eth_getcode-request.mdx index d64643bdfed..e5db05f2e94 100644 --- a/services/reference/_partials/_eth_getcode-request.mdx +++ b/services/reference/_partials/_eth_getcode-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getcode-response.mdx b/services/reference/_partials/_eth_getcode-response.mdx index 0e8cad13f11..617c6f43982 100644 --- a/services/reference/_partials/_eth_getcode-response.mdx +++ b/services/reference/_partials/_eth_getcode-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_getcode-returns.mdx b/services/reference/_partials/_eth_getcode-returns.mdx index a7daeca627b..ab9e7bd3f2c 100644 --- a/services/reference/_partials/_eth_getcode-returns.mdx +++ b/services/reference/_partials/_eth_getcode-returns.mdx @@ -1,2 +1 @@ The compiled byte code of the smart contract at the given address. - diff --git a/services/reference/_partials/_eth_getlogs-description.mdx b/services/reference/_partials/_eth_getlogs-description.mdx index 29780e290c9..42d64e88da7 100644 --- a/services/reference/_partials/_eth_getlogs-description.mdx +++ b/services/reference/_partials/_eth_getlogs-description.mdx @@ -1,2 +1 @@ Returns an array of all the logs matching the given filter object. See also the below [Constraints](#constraints) section. - diff --git a/services/reference/_partials/_eth_getlogs-example.mdx b/services/reference/_partials/_eth_getlogs-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getlogs-example.mdx +++ b/services/reference/_partials/_eth_getlogs-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_getlogs-parameters.mdx b/services/reference/_partials/_eth_getlogs-parameters.mdx index 721e2175732..8d3fe0abe0c 100644 --- a/services/reference/_partials/_eth_getlogs-parameters.mdx +++ b/services/reference/_partials/_eth_getlogs-parameters.mdx @@ -4,5 +4,4 @@ A filter object containing the following: - `fromBlock`: _[optional, default is "latest"]_ A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - `toBlock`: _[optional, default is "latest"]_ A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - `topics`: _[optional]_ Array of 32 bytes DATA topics. Topics are order-dependent. -- `blockhash`: _[optional]_ Restricts the logs returned to the single block referenced in the 32-byte hash `blockHash`. Using `blockHash` is equivalent to setting `fromBlock` and `toBlock` to the block number referenced in the `blockHash`. If `blockHash` is present in in the filter criteria, then neither `fromBlock` nor `toBlock` are allowed. - +- `blockhash`: _[optional]_ Restricts the logs returned to the single block referenced in the 32-byte hash `blockHash`. Using `blockHash` is equivalent to setting `fromBlock` and `toBlock` to the block number referenced in the `blockHash`. If `blockHash` is present in in the filter criteria, then neither `fromBlock` nor `toBlock` are allowed. diff --git a/services/reference/_partials/_eth_getlogs-request.mdx b/services/reference/_partials/_eth_getlogs-request.mdx index 0274dc56f02..89b8f9c22f8 100644 --- a/services/reference/_partials/_eth_getlogs-request.mdx +++ b/services/reference/_partials/_eth_getlogs-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id":1}' +``` - diff --git a/services/reference/_partials/_eth_getlogs-response.mdx b/services/reference/_partials/_eth_getlogs-response.mdx index b4a32cb762a..7a4d89167eb 100644 --- a/services/reference/_partials/_eth_getlogs-response.mdx +++ b/services/reference/_partials/_eth_getlogs-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_getlogs-returns.mdx b/services/reference/_partials/_eth_getlogs-returns.mdx index 61a953cfbdc..5c8fd4d2ec7 100644 --- a/services/reference/_partials/_eth_getlogs-returns.mdx +++ b/services/reference/_partials/_eth_getlogs-returns.mdx @@ -1,12 +1,11 @@ `log objects`: An array of log objects, or an empty array if nothing has changed since last poll. Log objects contain the following keys and their values: - - `removed`: (boolean) `true` when the log was removed, due to a chain reorganization. `false` if it's a valid log. - - `logIndex`: Hexadecimal of the log index position in the block. `Null` when it is a pending log. - - `transactionIndex`: Hexadecimal of the transactions index position from which the log created. `Null` when it is a pending log. - - `transactionHash`: 32 bytes. Hash of the transactions from which this log was created. `Null` when it is a pending log. - - `blockHash`: 32 bytes. Hash of the block where this log was in. `Null` when it is a pending log. - - `blockNumber`: Block number where this log was in. `Null` when it is a pending log. - - `address`: 20 bytes. Address from which this log originated. - - `data`: Contains one or more 32-bytes non-indexed arguments of the log. - - `topics`: An array of 0 to 4 indexed log arguments, each 32 bytes. In solidity the first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except when you declared the event with the anonymous specifier. - +- `removed`: (boolean) `true` when the log was removed, due to a chain reorganization. `false` if it's a valid log. +- `logIndex`: Hexadecimal of the log index position in the block. `Null` when it is a pending log. +- `transactionIndex`: Hexadecimal of the transactions index position from which the log created. `Null` when it is a pending log. +- `transactionHash`: 32 bytes. Hash of the transactions from which this log was created. `Null` when it is a pending log. +- `blockHash`: 32 bytes. Hash of the block where this log was in. `Null` when it is a pending log. +- `blockNumber`: Block number where this log was in. `Null` when it is a pending log. +- `address`: 20 bytes. Address from which this log originated. +- `data`: Contains one or more 32-bytes non-indexed arguments of the log. +- `topics`: An array of 0 to 4 indexed log arguments, each 32 bytes. In solidity the first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except when you declared the event with the anonymous specifier. diff --git a/services/reference/_partials/_eth_getproof-description.mdx b/services/reference/_partials/_eth_getproof-description.mdx index b21f897bd3d..30ecc67cf10 100644 --- a/services/reference/_partials/_eth_getproof-description.mdx +++ b/services/reference/_partials/_eth_getproof-description.mdx @@ -1,2 +1 @@ Returns the account and storage values, including the Merkle proof, of the specified account. - diff --git a/services/reference/_partials/_eth_getproof-example.mdx b/services/reference/_partials/_eth_getproof-example.mdx index 9f7546de129..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getproof-example.mdx +++ b/services/reference/_partials/_eth_getproof-example.mdx @@ -1,2 +1 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - diff --git a/services/reference/_partials/_eth_getproof-parameters.mdx b/services/reference/_partials/_eth_getproof-parameters.mdx index c64b341d50e..6600ee2f5c1 100644 --- a/services/reference/_partials/_eth_getproof-parameters.mdx +++ b/services/reference/_partials/_eth_getproof-parameters.mdx @@ -2,4 +2,3 @@ - `storageKeys`: An array of 32-byte storage keys to be proofed and included. - `blockParameter`: A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - diff --git a/services/reference/_partials/_eth_getproof-request.mdx b/services/reference/_partials/_eth_getproof-request.mdx index ab99c7d7fa3..b84ec7cb554 100644 --- a/services/reference/_partials/_eth_getproof-request.mdx +++ b/services/reference/_partials/_eth_getproof-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0","method": "eth_getProof","id": 1,"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getProof", "id": 1, "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getProof","params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getproof-response.mdx b/services/reference/_partials/_eth_getproof-response.mdx index 7e2aab2015a..93e16bd59b5 100644 --- a/services/reference/_partials/_eth_getproof-response.mdx +++ b/services/reference/_partials/_eth_getproof-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -16,17 +16,17 @@ import TabItem from '@theme/TabItem'; "0xf90211a...0675b80", "0xf90151a0...ca08080" ], - "address" : "0x7f0d15c7faae65896648c8273b6d7e43f58fa842", - "balance" : "0x0", - "codeHash" : "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", - "nonce" : "0x0", - "storageHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "storageProof" : [ - { - "key" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "proof" : [], - "value" : "0x0" - } + "address": "0x7f0d15c7faae65896648c8273b6d7e43f58fa842", + "balance": "0x0", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "nonce": "0x0", + "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "storageProof": [ + { + "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "proof": [], + "value": "0x0" + } ] } } diff --git a/services/reference/_partials/_eth_getproof-returns.mdx b/services/reference/_partials/_eth_getproof-returns.mdx index e26cd8ee0fb..5efc9698de3 100644 --- a/services/reference/_partials/_eth_getproof-returns.mdx +++ b/services/reference/_partials/_eth_getproof-returns.mdx @@ -7,4 +7,3 @@ - `key`: The requested storage key. - `value`: The storage value. - `proof`: An array of RLP-serialized MerkleTree-Nodes, starting with the storageHash-Node, following the path of the SHA3 (key) as path. - diff --git a/services/reference/_partials/_eth_getstorageat-description.mdx b/services/reference/_partials/_eth_getstorageat-description.mdx index 703a580534c..faa3175c24a 100644 --- a/services/reference/_partials/_eth_getstorageat-description.mdx +++ b/services/reference/_partials/_eth_getstorageat-description.mdx @@ -1,2 +1 @@ Returns the value from a storage position at a given address. - diff --git a/services/reference/_partials/_eth_getstorageat-example.mdx b/services/reference/_partials/_eth_getstorageat-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getstorageat-example.mdx +++ b/services/reference/_partials/_eth_getstorageat-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_getstorageat-parameters.mdx b/services/reference/_partials/_eth_getstorageat-parameters.mdx index 46b3fa74fca..902f51a06b7 100644 --- a/services/reference/_partials/_eth_getstorageat-parameters.mdx +++ b/services/reference/_partials/_eth_getstorageat-parameters.mdx @@ -1,4 +1,3 @@ - `address`: [_Required_] A string representing the address (20 bytes) of the storage. - `storage position`: [_Required_] A hexadecimal code of the position in the storage. - `block parameter`: [_Required_] A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - diff --git a/services/reference/_partials/_eth_getstorageat-request.mdx b/services/reference/_partials/_eth_getstorageat-request.mdx index a4f1a6ddda3..0022347764e 100644 --- a/services/reference/_partials/_eth_getstorageat-request.mdx +++ b/services/reference/_partials/_eth_getstorageat-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getstorageat-response.mdx b/services/reference/_partials/_eth_getstorageat-response.mdx index 776285e2b52..7a606d3f85c 100644 --- a/services/reference/_partials/_eth_getstorageat-response.mdx +++ b/services/reference/_partials/_eth_getstorageat-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -17,17 +17,17 @@ import TabItem from '@theme/TabItem'; ## Additional notes -Calculating the correct position depends on the storage to retrieve. Consider the following contract deployed at `0x295a70b2de5e3953354a6a8344e616ed314d7251` by address `0x391694e7e0b0cce554cb130d723a9d27458f9298`, +Calculating the correct position depends on the storage to retrieve. Consider the following contract deployed at `0x295a70b2de5e3953354a6a8344e616ed314d7251` by address `0x391694e7e0b0cce554cb130d723a9d27458f9298`: ```solidity contract Storage { - uint pos0; - mapping(address => uint) pos1; + uint pos0; + mapping(address => uint) pos1; - function Storage() { - pos0 = 1234; - pos1[msg.sender] = 5678; - } + function Storage() public { + pos0 = 1234; + pos1[msg.sender] = 5678; + } } ``` @@ -35,9 +35,9 @@ Retrieving the value of pos0 is straight forward: ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "0x65a8db"], "id": 1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "0x65a8db"], "id": 1}' ``` ```json @@ -60,9 +60,9 @@ This means to retrieve the storage on `pos1["0x391694e7e0b0cce554cb130d723a9d274 keccak( decodeHex( "000000000000000000000000391694e7e0b0cce554cb130d723a9d27458f9298" + - "0000000000000000000000000000000000000000000000000000000000000001", - ), -); + "0000000000000000000000000000000000000000000000000000000000000001" + ) +) ``` The geth console which comes with the web3 library can be used to make the calculation: @@ -78,9 +78,9 @@ Now to fetch the storage: ```bash curl https://mainnet.infura.io/v3/YOUR-PROJECT-ID \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' ``` ```json diff --git a/services/reference/_partials/_eth_getstorageat-returns.mdx b/services/reference/_partials/_eth_getstorageat-returns.mdx index 0d12e57610a..91f467d40eb 100644 --- a/services/reference/_partials/_eth_getstorageat-returns.mdx +++ b/services/reference/_partials/_eth_getstorageat-returns.mdx @@ -1,3 +1 @@ `storage value`: A hexadecimal equivalent of the integer indicating the value of the storage position at the provided address. - - diff --git a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx index ffd0aa485f3..60539c04659 100644 --- a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx @@ -1,2 +1 @@ Returns information about a transaction given block hash and transaction index position. - diff --git a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx index 0606dbedb61..7100bb86208 100644 --- a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx @@ -1,3 +1,2 @@ - `block hash`: [_Required_] A string representing the hash (32 bytes) of a block. - `transaction index position`: [_Required_] A hexadecimal of the integer representing the position in the block. - diff --git a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-request.mdx b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-request.mdx index 095174432f3..79d44fbb7d7 100644 --- a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-request.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response-yparity.mdx b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response-yparity.mdx index 6fc3efb99c9..d12c4e33a03 100644 --- a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response-yparity.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response-yparity.mdx @@ -1,35 +1,37 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```json { - "id" : 1, - "jsonrpc" : "2.0", - "result":{ - "accessList":[], - "blockHash":"0xfdc2fb4ce6356fef28fda948d675182d5759d0c885ec9a4b7fff604a8167a118", - "blockNumber":"0x11dd3de", - "chainId":"0x1", - "from":"0x1f9090aae28b8a3dceadf281b0f12828e676c326","gas":"0x565f","gasPrice":"0x6f4d3132b", - "hash":"0x24ea08c3b1bc777a23d0373dd3f8a980455c7817d814c5f34df5a3e3caf5c9a1", - "input":"0x", - "maxFeePerGas":"0x6f4d3132b", - "maxPriorityFeePerGas":"0x0", - "nonce":"0x63dbc", - "r":"0xd38fcf50bab3898938058cd0337e655d0fdc302b57807da83f59b27035055ed5", - "s":"0x300ae498fe06a5fa65ebb69fc2bd99a3fbbf991543ff3dce2c45c3b43c5113fd", - "to":"0x388c818ca8b9251b393131c08a736a67ccb19297", - "transactionIndex":"0xa2", - "type":"0x2", - "v":"0x1", - "value":"0x2e463634a25a9a2", - "yParity":"0x1" - } + "id": 1, + "jsonrpc": "2.0", + "result": { + "accessList": [], + "blockHash": "0xfdc2fb4ce6356fef28fda948d675182d5759d0c885ec9a4b7fff604a8167a118", + "blockNumber": "0x11dd3de", + "chainId": "0x1", + "from": "0x1f9090aae28b8a3dceadf281b0f12828e676c326", + "gas": "0x565f", + "gasPrice": "0x6f4d3132b", + "hash": "0x24ea08c3b1bc777a23d0373dd3f8a980455c7817d814c5f34df5a3e3caf5c9a1", + "input": "0x", + "maxFeePerGas": "0x6f4d3132b", + "maxPriorityFeePerGas": "0x0", + "nonce": "0x63dbc", + "r": "0xd38fcf50bab3898938058cd0337e655d0fdc302b57807da83f59b27035055ed5", + "s": "0x300ae498fe06a5fa65ebb69fc2bd99a3fbbf991543ff3dce2c45c3b43c5113fd", + "to": "0x388c818ca8b9251b393131c08a736a67ccb19297", + "transactionIndex": "0xa2", + "type": "0x2", + "v": "0x1", + "value": "0x2e463634a25a9a2", + "yParity": "0x1" + } } ``` - \ No newline at end of file + diff --git a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx index 66adf23211c..3a1251cb9d5 100644 --- a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx @@ -1,31 +1,31 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```json { - "id" : 1, - "jsonrpc" : "2.0", - "result" : { - "blockHash" : "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", - "blockNumber" : "0x5bad55", - "chainId" : "0x1", - "from" : "0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98", - "gas" : "0x249f0", - "gasPrice" : "0x174876e800", - "hash" : "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f", - "input" : "0x6ea056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bd8d7fa6f8cc00", - "nonce" : "0x5e4724", - "r" : "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec", - "s" : "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410", - "to" : "0x4b9c25ca0224aef6a7522cabdbc3b2e125b7ca50", - "transactionIndex" : "0x0", - "type" : "0x0", - "v" : "0x25", - "value" : "0x0" - } + "id": 1, + "jsonrpc": "2.0", + "result": { + "blockHash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", + "blockNumber": "0x5bad55", + "chainId": "0x1", + "from": "0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98", + "gas": "0x249f0", + "gasPrice": "0x174876e800", + "hash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f", + "input": "0x6ea056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bd8d7fa6f8cc00", + "nonce": "0x5e4724", + "r": "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec", + "s": "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410", + "to": "0x4b9c25ca0224aef6a7522cabdbc3b2e125b7ca50", + "transactionIndex": "0x0", + "type": "0x0", + "v": "0x25", + "value": "0x0" + } } ``` diff --git a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns-yparity.mdx b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns-yparity.mdx index 7abfe0a55e9..4ee81f43641 100644 --- a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns-yparity.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns-yparity.mdx @@ -20,4 +20,4 @@ A transaction object, or null when no transaction was found. The transaction obj - `v`: The ECDSA recovery ID. - `value`: The value transferred in Wei. - `yParity`: [_optional_] Parity (`0x0` for even, `0x1` for odd) of the y-value of a -[`secp256k1`](https://eips.ethereum.org/EIPS/eip-2098#:~:text=A%20secp256k1%20signature%20is%20made%20up%20of%203%20parameters%2C%20r%2C%20s%20and%20yParity.) signature. \ No newline at end of file + [`secp256k1`](https://eips.ethereum.org/EIPS/eip-2098#:~:text=A%20secp256k1%20signature%20is%20made%20up%20of%203%20parameters%2C%20r%2C%20s%20and%20yParity.) signature. diff --git a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx index 65a6a32a9c3..2a42981b0e8 100644 --- a/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx @@ -19,4 +19,3 @@ A transaction object, or null when no transaction was found. The transaction obj - `type`: The [transaction type](../../concepts/transaction-types.md). - `v`: The ECDSA recovery ID. - `value`: The value transferred in Wei. - diff --git a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx index e5bb097fdad..6c7fc633fad 100644 --- a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx @@ -1,2 +1 @@ Returns information about a transaction given block number and transaction index position. - diff --git a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx index a48710382f0..0d9c656ef21 100644 --- a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx @@ -1,3 +1,2 @@ - `block parameter`: [_Required_] A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - `transaction index position`: [_Required_] A hexadecimal of the integer representing the position in the block. - diff --git a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-request.mdx b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-request.mdx index eb522e1868c..f126273619e 100644 --- a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-request.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response-yparity.mdx b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response-yparity.mdx index 9e90eb3101b..c8c75a55197 100644 --- a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response-yparity.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response-yparity.mdx @@ -1,35 +1,35 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```json { - "id" : 1, - "jsonrpc" : "2.0", - "result" : { - "accessList":[], - "blockHash":"0x1682216b3a937e57aeb8c7fcf64a8851ac9a5dd2407f7a76e01aad1ccc0aee19", - "blockNumber":"0x11dca94", - "chainId":"0x1", - "from":"0x1f9090aae28b8a3dceadf281b0f12828e676c326", - "gas":"0x565f", - "gasPrice":"0xef8230501", - "hash":"0x140fc3229057d6a484227cbcae16331f586310f68f2095dbc75b3af53d4874bd", - "input":"0x", - "maxFeePerGas":"0xef8230501", - "maxPriorityFeePerGas":"0x0", - "nonce":"0x63b1f", - "r":"0x483a889fdbe4bcebd02fcef8b0644dd710de2b2b2f36f4762b90738016e5c639", - "s":"0x39efb4a71072e6585223e9e77e63920fa65f3de5091d510667782d4cd34ce0a4", - "to":"0x388c818ca8b9251b393131c08a736a67ccb19297", - "transactionIndex":"0xa4", - "type":"0x2", - "v":"0x1", - "value":"0x12ff2241f48fc83", - "yParity":"0x1" - } + "id": 1, + "jsonrpc": "2.0", + "result": { + "accessList": [], + "blockHash": "0x1682216b3a937e57aeb8c7fcf64a8851ac9a5dd2407f7a76e01aad1ccc0aee19", + "blockNumber": "0x11dca94", + "chainId": "0x1", + "from": "0x1f9090aae28b8a3dceadf281b0f12828e676c326", + "gas": "0x565f", + "gasPrice": "0xef8230501", + "hash": "0x140fc3229057d6a484227cbcae16331f586310f68f2095dbc75b3af53d4874bd", + "input": "0x", + "maxFeePerGas": "0xef8230501", + "maxPriorityFeePerGas": "0x0", + "nonce": "0x63b1f", + "r": "0x483a889fdbe4bcebd02fcef8b0644dd710de2b2b2f36f4762b90738016e5c639", + "s": "0x39efb4a71072e6585223e9e77e63920fa65f3de5091d510667782d4cd34ce0a4", + "to": "0x388c818ca8b9251b393131c08a736a67ccb19297", + "transactionIndex": "0xa4", + "type": "0x2", + "v": "0x1", + "value": "0x12ff2241f48fc83", + "yParity": "0x1" + } } ``` diff --git a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx index 24dae3961e5..3a1251cb9d5 100644 --- a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx @@ -1,34 +1,33 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```json { - "id" : 1, - "jsonrpc" : "2.0", - "result" : { - "blockHash" : "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", - "blockNumber" : "0x5bad55", - "chainId" : "0x1", - "from" : "0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98", - "gas" : "0x249f0", - "gasPrice" : "0x174876e800", - "hash" : "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f", - "input" : "0x6ea056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bd8d7fa6f8cc00", - "nonce" : "0x5e4724", - "r" : "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec", - "s" : "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410", - "to" : "0x4b9c25ca0224aef6a7522cabdbc3b2e125b7ca50", - "transactionIndex" : "0x0", - "type" : "0x0", - "v" : "0x25", - "value" : "0x0" - } + "id": 1, + "jsonrpc": "2.0", + "result": { + "blockHash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", + "blockNumber": "0x5bad55", + "chainId": "0x1", + "from": "0xfbb1b73c4f0bda4f67dca266ce6ef42f520fbb98", + "gas": "0x249f0", + "gasPrice": "0x174876e800", + "hash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f", + "input": "0x6ea056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bd8d7fa6f8cc00", + "nonce": "0x5e4724", + "r": "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec", + "s": "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410", + "to": "0x4b9c25ca0224aef6a7522cabdbc3b2e125b7ca50", + "transactionIndex": "0x0", + "type": "0x0", + "v": "0x25", + "value": "0x0" + } } ``` - diff --git a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns-yparity.mdx b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns-yparity.mdx index 4e3f922d84b..4ee81f43641 100644 --- a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns-yparity.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns-yparity.mdx @@ -20,4 +20,4 @@ A transaction object, or null when no transaction was found. The transaction obj - `v`: The ECDSA recovery ID. - `value`: The value transferred in Wei. - `yParity`: [_optional_] Parity (`0x0` for even, `0x1` for odd) of the y-value of a -[`secp256k1`](https://eips.ethereum.org/EIPS/eip-2098#:~:text=A%20secp256k1%20signature%20is%20made%20up%20of%203%20parameters%2C%20r%2C%20s%20and%20yParity.) signature. \ No newline at end of file + [`secp256k1`](https://eips.ethereum.org/EIPS/eip-2098#:~:text=A%20secp256k1%20signature%20is%20made%20up%20of%203%20parameters%2C%20r%2C%20s%20and%20yParity.) signature. diff --git a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx index 65a6a32a9c3..2a42981b0e8 100644 --- a/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx +++ b/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx @@ -19,4 +19,3 @@ A transaction object, or null when no transaction was found. The transaction obj - `type`: The [transaction type](../../concepts/transaction-types.md). - `v`: The ECDSA recovery ID. - `value`: The value transferred in Wei. - diff --git a/services/reference/_partials/_eth_gettransactionbyhash-description.mdx b/services/reference/_partials/_eth_gettransactionbyhash-description.mdx index 6929611f5e7..7bf5c059817 100644 --- a/services/reference/_partials/_eth_gettransactionbyhash-description.mdx +++ b/services/reference/_partials/_eth_gettransactionbyhash-description.mdx @@ -1,2 +1 @@ Returns information about a transaction for a given hash. - diff --git a/services/reference/_partials/_eth_gettransactionbyhash-example.mdx b/services/reference/_partials/_eth_gettransactionbyhash-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_gettransactionbyhash-example.mdx +++ b/services/reference/_partials/_eth_gettransactionbyhash-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx b/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx index 4e97d2cbf0f..9784bd359fc 100644 --- a/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx +++ b/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx @@ -1,2 +1 @@ `transaction hash`: [_Required_] A string representing the hash (32 bytes) of a transaction. - diff --git a/services/reference/_partials/_eth_gettransactionbyhash-request.mdx b/services/reference/_partials/_eth_gettransactionbyhash-request.mdx index 5c58604a0a3..b6306160695 100644 --- a/services/reference/_partials/_eth_gettransactionbyhash-request.mdx +++ b/services/reference/_partials/_eth_gettransactionbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_gettransactionbyhash-response-yparity.mdx b/services/reference/_partials/_eth_gettransactionbyhash-response-yparity.mdx index 729966007e3..ff807063072 100644 --- a/services/reference/_partials/_eth_gettransactionbyhash-response-yparity.mdx +++ b/services/reference/_partials/_eth_gettransactionbyhash-response-yparity.mdx @@ -1,35 +1,35 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```json { - "id":1, - "jsonrpc":"2.0", - "result":{ - "accessList":[], - "blockHash":"0x0155db99111f10086bad292d3bd0be9472aff9cf0f33d7d35f2db4814ffad0f6", - "blockNumber":"0x112418d", - "chainId":"0x1", - "from":"0xe2a467bfe1e1bedcdf1343d3a45f60c50e988696", - "gas":"0x3c546", - "gasPrice":"0x20706def53", - "hash":"0xce0aadd04968e21f569167570011abc8bc17de49d4ae3aed9476de9e03facff9", - "input":"0xb6f9de9500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000e2a467bfe1e1bedcdf1343d3a45f60c50e9886960000000000000000000000000000000000000000000000000000000064e54a3b0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000de15b9919539113a1930d3eed5088cd10338abb5", - "maxFeePerGas":"0x22b05d8efd", - "maxPriorityFeePerGas":"0x1bf08eb000", - "nonce":"0x12c", - "r":"0xa07fd6c16e169f0e54b394235b3a8201101bb9d0eba9c8ae52dbdf556a363388", - "s":"0x36f5da9310b87fefbe9260c3c05ec6cbefc426f1ff3b3a41ea21b5533a787dfc", - "to":"0x7a250d5630b4cf539739df2c5dacb4c659f2488d", - "transactionIndex":"0x0", - "type":"0x2", - "v":"0x1", - "value":"0x2c68af0bb140000", - "yParity":"0x1" - } + "id": 1, + "jsonrpc": "2.0", + "result": { + "accessList": [], + "blockHash": "0x0155db99111f10086bad292d3bd0be9472aff9cf0f33d7d35f2db4814ffad0f6", + "blockNumber": "0x112418d", + "chainId": "0x1", + "from": "0xe2a467bfe1e1bedcdf1343d3a45f60c50e988696", + "gas": "0x3c546", + "gasPrice": "0x20706def53", + "hash": "0xce0aadd04968e21f569167570011abc8bc17de49d4ae3aed9476de9e03facff9", + "input": "0xb6f9de9500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000e2a467bfe1e1bedcdf1343d3a45f60c50e9886960000000000000000000000000000000000000000000000000000000064e54a3b0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000de15b9919539113a1930d3eed5088cd10338abb5", + "maxFeePerGas": "0x22b05d8efd", + "maxPriorityFeePerGas": "0x1bf08eb000", + "nonce": "0x12c", + "r": "0xa07fd6c16e169f0e54b394235b3a8201101bb9d0eba9c8ae52dbdf556a363388", + "s": "0x36f5da9310b87fefbe9260c3c05ec6cbefc426f1ff3b3a41ea21b5533a787dfc", + "to": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d", + "transactionIndex": "0x0", + "type": "0x2", + "v": "0x1", + "value": "0x2c68af0bb140000", + "yParity": "0x1" + } } ``` diff --git a/services/reference/_partials/_eth_gettransactionbyhash-response.mdx b/services/reference/_partials/_eth_gettransactionbyhash-response.mdx index 4816b390ada..c7c760599b6 100644 --- a/services/reference/_partials/_eth_gettransactionbyhash-response.mdx +++ b/services/reference/_partials/_eth_gettransactionbyhash-response.mdx @@ -1,34 +1,33 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```json { - "id" : 1, - "jsonrpc" : "2.0", - "result" : { - "blockHash" : "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", - "blockNumber" : "0x5bad55", - "chainId" : "0x1", - "from" : "0x398137383b3d25c92898c656696e41950e47316b", - "gas" : "0x1d45e", - "gasPrice" : "0xfa56ea00", - "hash" : "0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0", - "input" : "0xf7d8c88300000000000000000000000000000000000000000000000000000000000cee6100000000000000000000000000000000000000000000000000000000000ac3e1", - "nonce" : "0x18", - "r" : "0x2a378831cf81d99a3f06a18ae1b6ca366817ab4d88a70053c41d7a8f0368e031", - "s" : "0x450d831a05b6e418724436c05c155e0a1b7b921015d0fbc2f667aed709ac4fb5", - "to" : "0x06012c8cf97bead5deae237070f9587f8e7a266d", - "transactionIndex" : "0x11", - "type" : "0x0", - "v" : "0x25", - "value" : "0x1c6bf526340000" - } + "id": 1, + "jsonrpc": "2.0", + "result": { + "blockHash": "0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", + "blockNumber": "0x5bad55", + "chainId": "0x1", + "from": "0x398137383b3d25c92898c656696e41950e47316b", + "gas": "0x1d45e", + "gasPrice": "0xfa56ea00", + "hash": "0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0", + "input": "0xf7d8c88300000000000000000000000000000000000000000000000000000000000cee6100000000000000000000000000000000000000000000000000000000000ac3e1", + "nonce": "0x18", + "r": "0x2a378831cf81d99a3f06a18ae1b6ca366817ab4d88a70053c41d7a8f0368e031", + "s": "0x450d831a05b6e418724436c05c155e0a1b7b921015d0fbc2f667aed709ac4fb5", + "to": "0x06012c8cf97bead5deae237070f9587f8e7a266d", + "transactionIndex": "0x11", + "type": "0x0", + "v": "0x25", + "value": "0x1c6bf526340000" + } } ``` - diff --git a/services/reference/_partials/_eth_gettransactionbyhash-returns-yparity.mdx b/services/reference/_partials/_eth_gettransactionbyhash-returns-yparity.mdx index 4e3f922d84b..4ee81f43641 100644 --- a/services/reference/_partials/_eth_gettransactionbyhash-returns-yparity.mdx +++ b/services/reference/_partials/_eth_gettransactionbyhash-returns-yparity.mdx @@ -20,4 +20,4 @@ A transaction object, or null when no transaction was found. The transaction obj - `v`: The ECDSA recovery ID. - `value`: The value transferred in Wei. - `yParity`: [_optional_] Parity (`0x0` for even, `0x1` for odd) of the y-value of a -[`secp256k1`](https://eips.ethereum.org/EIPS/eip-2098#:~:text=A%20secp256k1%20signature%20is%20made%20up%20of%203%20parameters%2C%20r%2C%20s%20and%20yParity.) signature. \ No newline at end of file + [`secp256k1`](https://eips.ethereum.org/EIPS/eip-2098#:~:text=A%20secp256k1%20signature%20is%20made%20up%20of%203%20parameters%2C%20r%2C%20s%20and%20yParity.) signature. diff --git a/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx b/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx index 65a6a32a9c3..2a42981b0e8 100644 --- a/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx +++ b/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx @@ -19,4 +19,3 @@ A transaction object, or null when no transaction was found. The transaction obj - `type`: The [transaction type](../../concepts/transaction-types.md). - `v`: The ECDSA recovery ID. - `value`: The value transferred in Wei. - diff --git a/services/reference/_partials/_eth_gettransactioncount-description.mdx b/services/reference/_partials/_eth_gettransactioncount-description.mdx index 565a5e5f2d9..69535db32f5 100644 --- a/services/reference/_partials/_eth_gettransactioncount-description.mdx +++ b/services/reference/_partials/_eth_gettransactioncount-description.mdx @@ -1,2 +1 @@ Returns the number of transactions sent from an address. - diff --git a/services/reference/_partials/_eth_gettransactioncount-example.mdx b/services/reference/_partials/_eth_gettransactioncount-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_gettransactioncount-example.mdx +++ b/services/reference/_partials/_eth_gettransactioncount-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_gettransactioncount-parameters.mdx b/services/reference/_partials/_eth_gettransactioncount-parameters.mdx index efae75f38b4..86aa8eb4ccb 100644 --- a/services/reference/_partials/_eth_gettransactioncount-parameters.mdx +++ b/services/reference/_partials/_eth_gettransactioncount-parameters.mdx @@ -1,3 +1,2 @@ - `address`: [_Required_] A string representing the address (20 bytes). - `block parameter`: [_Required_] A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - diff --git a/services/reference/_partials/_eth_gettransactioncount-request.mdx b/services/reference/_partials/_eth_gettransactioncount-request.mdx index e46f1de89cb..b5dc40ad32c 100644 --- a/services/reference/_partials/_eth_gettransactioncount-request.mdx +++ b/services/reference/_partials/_eth_gettransactioncount-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_gettransactioncount-response.mdx b/services/reference/_partials/_eth_gettransactioncount-response.mdx index 0050b1a83af..efe97251ecb 100644 --- a/services/reference/_partials/_eth_gettransactioncount-response.mdx +++ b/services/reference/_partials/_eth_gettransactioncount-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_gettransactioncount-returns.mdx b/services/reference/_partials/_eth_gettransactioncount-returns.mdx index e7e186d5035..f3fbba7e8a3 100644 --- a/services/reference/_partials/_eth_gettransactioncount-returns.mdx +++ b/services/reference/_partials/_eth_gettransactioncount-returns.mdx @@ -1,2 +1 @@ `transaction count`: A hexadecimal equivalent of the integer representing the number of transactions sent from the given address. - diff --git a/services/reference/_partials/_eth_gettransactionreceipt-description.mdx b/services/reference/_partials/_eth_gettransactionreceipt-description.mdx index 074a7efd902..90bf584c68a 100644 --- a/services/reference/_partials/_eth_gettransactionreceipt-description.mdx +++ b/services/reference/_partials/_eth_gettransactionreceipt-description.mdx @@ -1,2 +1 @@ Returns the receipt of a transaction given transaction hash. Note that the receipt is not available for pending transactions. - diff --git a/services/reference/_partials/_eth_gettransactionreceipt-example.mdx b/services/reference/_partials/_eth_gettransactionreceipt-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_gettransactionreceipt-example.mdx +++ b/services/reference/_partials/_eth_gettransactionreceipt-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx b/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx index 4e97d2cbf0f..9784bd359fc 100644 --- a/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx +++ b/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx @@ -1,2 +1 @@ `transaction hash`: [_Required_] A string representing the hash (32 bytes) of a transaction. - diff --git a/services/reference/_partials/_eth_gettransactionreceipt-request.mdx b/services/reference/_partials/_eth_gettransactionreceipt-request.mdx index 06b2bdb61c1..59cbb23b741 100644 --- a/services/reference/_partials/_eth_gettransactionreceipt-request.mdx +++ b/services/reference/_partials/_eth_gettransactionreceipt-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_gettransactionreceipt-response.mdx b/services/reference/_partials/_eth_gettransactionreceipt-response.mdx index 5830d21004d..10c21725a46 100644 --- a/services/reference/_partials/_eth_gettransactionreceipt-response.mdx +++ b/services/reference/_partials/_eth_gettransactionreceipt-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -9,37 +9,37 @@ import TabItem from '@theme/TabItem'; "jsonrpc": "2.0", "id": 1, "result": { - "blockHash":"0x0a79eca9f5ca58a1d5d5030a0fabfdd8e815b8b77a9f223f74d59aa39596e1c7", - "blockNumber":"0x11e5883", - "contractAddress":null, - "cumulativeGasUsed":"0xc5f3e7", - "effectiveGasPrice":"0xa45b9a444", - "from":"0x690b9a9e9aa1c9db991c7721a92d351db4fac990", - "gasUsed":"0x565f", + "blockHash": "0x0a79eca9f5ca58a1d5d5030a0fabfdd8e815b8b77a9f223f74d59aa39596e1c7", + "blockNumber": "0x11e5883", + "contractAddress": null, + "cumulativeGasUsed": "0xc5f3e7", + "effectiveGasPrice": "0xa45b9a444", + "from": "0x690b9a9e9aa1c9db991c7721a92d351db4fac990", + "gasUsed": "0x565f", "logs": [ { - "address":"0x388c818ca8b9251b393131c08a736a67ccb19297", - "blockHash":"0x0a79eca9f5ca58a1d5d5030a0fabfdd8e815b8b77a9f223f74d59aa39596e1c7", - "blockNumber":"0x11e5883", - "data":"0x00000000000000000000000000000000000000000000000011b6b79503fb875d", - "logIndex":"0x187", - "removed":false, + "address": "0x388c818ca8b9251b393131c08a736a67ccb19297", + "blockHash": "0x0a79eca9f5ca58a1d5d5030a0fabfdd8e815b8b77a9f223f74d59aa39596e1c7", + "blockNumber": "0x11e5883", + "data": "0x00000000000000000000000000000000000000000000000011b6b79503fb875d", + "logIndex": "0x187", + "removed": false, "topics": [ "0x27f12abfe35860a9a927b465bb3d4a9c23c8428174b83f278fe45ed7b4da2662" ], - "transactionHash":"0x7114b4da1a6ed391d5d781447ed443733dcf2b508c515b81c17379dea8a3c9af", - "transactionIndex":"0x76" + "transactionHash": "0x7114b4da1a6ed391d5d781447ed443733dcf2b508c515b81c17379dea8a3c9af", + "transactionIndex": "0x76" } ], - "logsBloom":"0x00000000000000000000000000000000000100004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000", - "status":"0x1", - "to":"0x388c818ca8b9251b393131c08a736a67ccb19297", - "transactionHash":"0x7114b4da1a6ed391d5d781447ed443733dcf2b508c515b81c17379dea8a3c9af", - "transactionIndex":"0x76", - "type":"0x2" + "logsBloom": "0x00000000000000000000000000000000000100004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000", + "status": "0x1", + "to": "0x388c818ca8b9251b393131c08a736a67ccb19297", + "transactionHash": "0x7114b4da1a6ed391d5d781447ed443733dcf2b508c515b81c17379dea8a3c9af", + "transactionIndex": "0x76", + "type": "0x2" } } ``` - \ No newline at end of file + diff --git a/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx b/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx index 32456c9261f..ae3d0308e9a 100644 --- a/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx +++ b/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx @@ -16,4 +16,3 @@ A transaction receipt object, or null when no receipt was found. The transaction - `transactionHash`: 32 bytes. The hash of the transaction. - `transactionIndex`: Hexadecimal of the transaction's index position in the block. - `type`: the [transaction type](../../concepts/transaction-types.md). - diff --git a/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx b/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx index 776b7705f20..6d1b0d13a70 100644 --- a/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx +++ b/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx @@ -1,2 +1 @@ Returns information about a uncle of a block given the block hash and the uncle index position. - diff --git a/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx b/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx +++ b/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx b/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx index c6f4099a79e..7c4a1cf30ef 100644 --- a/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx +++ b/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx @@ -1,3 +1,2 @@ - `block hash`: [_Required_] A string representing the hash (32 bytes) of a block. - `uncle index position`: [_Required_] A hexadecimal equivalent of the integer indicating the uncle's index position. - diff --git a/services/reference/_partials/_eth_getunclebyblockhashandindex-request.mdx b/services/reference/_partials/_eth_getunclebyblockhashandindex-request.mdx index 8f61e1c692e..9b805dd624a 100644 --- a/services/reference/_partials/_eth_getunclebyblockhashandindex-request.mdx +++ b/services/reference/_partials/_eth_getunclebyblockhashandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx b/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx index 971933670ca..670a771289a 100644 --- a/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx +++ b/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx @@ -1,37 +1,36 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```json { - "id" : 1, - "jsonrpc" : "2.0", - "result" : { - "difficulty": "0x57f117f5c", - "extraData": "0x476574682f76312e302e302f77696e646f77732f676f312e342e32", - "gasLimit": "0x1388", - "gasUsed": "0x0", - "hash": "0x932bdf904546a2287a2c9b2ede37925f698a7657484b172d4e5184f80bdd464d", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "miner": "0x5bf5e9cf9b456d6591073513de7fd69a9bef04bc", - "mixHash": "0x4500aa4ee2b3044a155252e35273770edeb2ab6f8cb19ca8e732771484462169", - "nonce": "0x24732773618192ac", - "number": "0x299", - "parentHash": "0xa779859b1ee558258b7008bbabff272280136c5dd3eb3ea3bfa8f6ae03bf91e5", - "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "size": "0x21d", - "stateRoot": "0x2604fbf5183f5360da249b51f1b9f1e0f315d2ff3ffa1a4143ff221ad9ca1fec", - "timestamp": "0x55ba4827", - "totalDifficulty": null, - "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "uncles": [] - } + "id": 1, + "jsonrpc": "2.0", + "result": { + "difficulty": "0x57f117f5c", + "extraData": "0x476574682f76312e302e302f77696e646f77732f676f312e342e32", + "gasLimit": "0x1388", + "gasUsed": "0x0", + "hash": "0x932bdf904546a2287a2c9b2ede37925f698a7657484b172d4e5184f80bdd464d", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "miner": "0x5bf5e9cf9b456d6591073513de7fd69a9bef04bc", + "mixHash": "0x4500aa4ee2b3044a155252e35273770edeb2ab6f8cb19ca8e732771484462169", + "nonce": "0x24732773618192ac", + "number": "0x299", + "parentHash": "0xa779859b1ee558258b7008bbabff272280136c5dd3eb3ea3bfa8f6ae03bf91e5", + "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x21d", + "stateRoot": "0x2604fbf5183f5360da249b51f1b9f1e0f315d2ff3ffa1a4143ff221ad9ca1fec", + "timestamp": "0x55ba4827", + "totalDifficulty": null, + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncles": [] + } } ``` - diff --git a/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx b/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx index d46812bf1cc..d3e0c97b2fa 100644 --- a/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx +++ b/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx @@ -18,4 +18,3 @@ A block object, or null when no block was found. The block object returned will - `gasUsed`: Total used gas by all transactions in this block. - `timestamp`: The unix timestamp for when the block was collated. - `uncles`: (Array). An array of uncle hashes. - diff --git a/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx b/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx index 55813944e74..51fbeacad8f 100644 --- a/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx +++ b/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx @@ -1,3 +1 @@ Returns information about a uncle of a block given the block number and the uncle index position. - - diff --git a/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx b/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx +++ b/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx b/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx index 83dbf1dc130..d8197fb4f4e 100644 --- a/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx +++ b/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx @@ -1,3 +1,2 @@ - `block parameter`: [_Required_] A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - `uncle index position`: [_Required_] A hexadecimal equivalent of the integer indicating the uncle's index position. - diff --git a/services/reference/_partials/_eth_getunclebyblocknumberandindex-request.mdx b/services/reference/_partials/_eth_getunclebyblocknumberandindex-request.mdx index d763a1ce2a7..2402cb9fa96 100644 --- a/services/reference/_partials/_eth_getunclebyblocknumberandindex-request.mdx +++ b/services/reference/_partials/_eth_getunclebyblocknumberandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx b/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx index bf5d6137ae4..778881be27d 100644 --- a/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx +++ b/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -34,4 +34,3 @@ import TabItem from '@theme/TabItem'; - diff --git a/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx b/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx index 84bdf045b34..11e89cc5d69 100644 --- a/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx +++ b/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx @@ -22,4 +22,3 @@ A block object, or null when no block was found. The block object returned will :::note An uncle doesn't contain individual transactions. ::: - diff --git a/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx b/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx index 4104ddcbb4a..4e34e1dc1fa 100644 --- a/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx +++ b/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx @@ -1,2 +1 @@ Returns the number of uncles in a block from a block matching the given block hash. - diff --git a/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx b/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx +++ b/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx b/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx index c7360f84d6f..b6102894423 100644 --- a/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx +++ b/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx @@ -1,2 +1 @@ `block hash`: [_Required_] A string representing the hash (32 bytes) of a block. - diff --git a/services/reference/_partials/_eth_getunclecountbyblockhash-request.mdx b/services/reference/_partials/_eth_getunclecountbyblockhash-request.mdx index d0519358b6f..636cf57d269 100644 --- a/services/reference/_partials/_eth_getunclecountbyblockhash-request.mdx +++ b/services/reference/_partials/_eth_getunclecountbyblockhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx b/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx index 7db99ddeb80..fddef70a02a 100644 --- a/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx +++ b/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -14,4 +14,3 @@ import TabItem from '@theme/TabItem'; - diff --git a/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx b/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx index 77bf4fe7acf..7cd9f674693 100644 --- a/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx +++ b/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx @@ -1,2 +1 @@ `block uncle count`: A hexadecimal equivalent of the integer representing the number of uncles in the block. - diff --git a/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx b/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx index 8c02e8d98e4..7a75b367abc 100644 --- a/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx +++ b/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx @@ -1,2 +1 @@ Returns the number of uncles in a block from a block matching the given block number. - diff --git a/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx b/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx +++ b/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx b/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx index 04113c69f0e..22cca8eea8b 100644 --- a/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx +++ b/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx @@ -1,2 +1 @@ `block parameter`: [_Required_] A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - diff --git a/services/reference/_partials/_eth_getunclecountbyblocknumber-request.mdx b/services/reference/_partials/_eth_getunclecountbyblocknumber-request.mdx index e9047fc9270..c1a926171e3 100644 --- a/services/reference/_partials/_eth_getunclecountbyblocknumber-request.mdx +++ b/services/reference/_partials/_eth_getunclecountbyblocknumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx b/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx index 6886a2564a1..fddef70a02a 100644 --- a/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx +++ b/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx b/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx index 77bf4fe7acf..7cd9f674693 100644 --- a/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx +++ b/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx @@ -1,2 +1 @@ `block uncle count`: A hexadecimal equivalent of the integer representing the number of uncles in the block. - diff --git a/services/reference/_partials/_eth_getwork-description.mdx b/services/reference/_partials/_eth_getwork-description.mdx index cd6209563cc..77bbfb43a1f 100644 --- a/services/reference/_partials/_eth_getwork-description.mdx +++ b/services/reference/_partials/_eth_getwork-description.mdx @@ -1,2 +1 @@ Returns the hash of the current block, the seedHash, and the boundary condition to be met ("target"). - diff --git a/services/reference/_partials/_eth_getwork-example.mdx b/services/reference/_partials/_eth_getwork-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_getwork-example.mdx +++ b/services/reference/_partials/_eth_getwork-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_getwork-parameters.mdx b/services/reference/_partials/_eth_getwork-parameters.mdx index 0e96b596055..ed30b68824b 100644 --- a/services/reference/_partials/_eth_getwork-parameters.mdx +++ b/services/reference/_partials/_eth_getwork-parameters.mdx @@ -1,2 +1 @@ None. - diff --git a/services/reference/_partials/_eth_getwork-request.mdx b/services/reference/_partials/_eth_getwork-request.mdx index e2c46938f02..f7611087b8e 100644 --- a/services/reference/_partials/_eth_getwork-request.mdx +++ b/services/reference/_partials/_eth_getwork-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getWork","params": [],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getWork", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getWork","params": [],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getWork", "params": [], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_getwork-response.mdx b/services/reference/_partials/_eth_getwork-response.mdx index 732a8add609..6fee101fe44 100644 --- a/services/reference/_partials/_eth_getwork-response.mdx +++ b/services/reference/_partials/_eth_getwork-response.mdx @@ -1,9 +1,9 @@ -:::note +:::note While Infura will allow this method, `eth_getWork` will not actually return mining work. ::: -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -21,4 +21,3 @@ import TabItem from '@theme/TabItem'; - diff --git a/services/reference/_partials/_eth_getwork-returns.mdx b/services/reference/_partials/_eth_getwork-returns.mdx index 1f519eadc44..69279b626f9 100644 --- a/services/reference/_partials/_eth_getwork-returns.mdx +++ b/services/reference/_partials/_eth_getwork-returns.mdx @@ -1,5 +1,5 @@ An array with the following properties: - - Current block header pow-hash (32 bytes). - - The seed hash used for the DAG (32 bytes). - - The boundary condition ("target") (32 bytes), 2^256 / difficulty. +- Current block header pow-hash (32 bytes). +- The seed hash used for the DAG (32 bytes). +- The boundary condition ("target") (32 bytes), 2^256 / difficulty. diff --git a/services/reference/_partials/_eth_hashrate-description.mdx b/services/reference/_partials/_eth_hashrate-description.mdx index a145e282509..04d5477970c 100644 --- a/services/reference/_partials/_eth_hashrate-description.mdx +++ b/services/reference/_partials/_eth_hashrate-description.mdx @@ -1,2 +1 @@ Returns the number of hashes per second that the node is mining with. Only applicable when the node is mining. - diff --git a/services/reference/_partials/_eth_hashrate-example.mdx b/services/reference/_partials/_eth_hashrate-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_hashrate-example.mdx +++ b/services/reference/_partials/_eth_hashrate-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_hashrate-parameters.mdx b/services/reference/_partials/_eth_hashrate-parameters.mdx index 0e96b596055..ed30b68824b 100644 --- a/services/reference/_partials/_eth_hashrate-parameters.mdx +++ b/services/reference/_partials/_eth_hashrate-parameters.mdx @@ -1,2 +1 @@ None. - diff --git a/services/reference/_partials/_eth_hashrate-request.mdx b/services/reference/_partials/_eth_hashrate-request.mdx index a6a6bacb484..abe97f2ec35 100644 --- a/services/reference/_partials/_eth_hashrate-request.mdx +++ b/services/reference/_partials/_eth_hashrate-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_hashrate","params": [],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_hashrate", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_hashrate","params": [],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_hashrate", "params": [], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_hashrate-response.mdx b/services/reference/_partials/_eth_hashrate-response.mdx index 4675a8d1384..1cf978e5124 100644 --- a/services/reference/_partials/_eth_hashrate-response.mdx +++ b/services/reference/_partials/_eth_hashrate-response.mdx @@ -1,9 +1,9 @@ -:::note +:::note Infura will always return a `0x0` mining hash rate. ::: -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -18,4 +18,3 @@ import TabItem from '@theme/TabItem'; - diff --git a/services/reference/_partials/_eth_hashrate-returns.mdx b/services/reference/_partials/_eth_hashrate-returns.mdx index 1ccc7ac6f54..3618b28985b 100644 --- a/services/reference/_partials/_eth_hashrate-returns.mdx +++ b/services/reference/_partials/_eth_hashrate-returns.mdx @@ -1,2 +1 @@ `hashrate`: A hexadecimal equivalent of an integer representing the number of hashes per second. - diff --git a/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx b/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx index 0836054d2b2..1a3928ce94a 100644 --- a/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx +++ b/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx @@ -1,2 +1 @@ Returns an estimate of how much priority fee, in wei, you need to be included in a block. - diff --git a/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx b/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx +++ b/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx b/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx index 0e96b596055..ed30b68824b 100644 --- a/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx +++ b/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx @@ -1,2 +1 @@ None. - diff --git a/services/reference/_partials/_eth_maxpriorityfeepergas-request.mdx b/services/reference/_partials/_eth_maxpriorityfeepergas-request.mdx index 572d6c6fb32..3c38105ef84 100644 --- a/services/reference/_partials/_eth_maxpriorityfeepergas-request.mdx +++ b/services/reference/_partials/_eth_maxpriorityfeepergas-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/d23391e03c6d40738530a1b4b679e66e -x '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/d23391e03c6d40738530a1b4b679e66e -x '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx b/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx index f01e4d34a50..1992dc06e4e 100644 --- a/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx +++ b/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx b/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx index fc989021927..d6bceeded99 100644 --- a/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx +++ b/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx @@ -1,2 +1 @@ `result`: A hexadecimal value of the priority fee, in wei, needed to be included in a block. - diff --git a/services/reference/_partials/_eth_mining-description.mdx b/services/reference/_partials/_eth_mining-description.mdx index 50dcea6989f..28961a21604 100644 --- a/services/reference/_partials/_eth_mining-description.mdx +++ b/services/reference/_partials/_eth_mining-description.mdx @@ -1,2 +1 @@ Returns true if client is actively mining new blocks. - diff --git a/services/reference/_partials/_eth_mining-example.mdx b/services/reference/_partials/_eth_mining-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_mining-example.mdx +++ b/services/reference/_partials/_eth_mining-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_mining-parameters.mdx b/services/reference/_partials/_eth_mining-parameters.mdx index 0e96b596055..ed30b68824b 100644 --- a/services/reference/_partials/_eth_mining-parameters.mdx +++ b/services/reference/_partials/_eth_mining-parameters.mdx @@ -1,2 +1 @@ None. - diff --git a/services/reference/_partials/_eth_mining-request.mdx b/services/reference/_partials/_eth_mining-request.mdx index 2a66e9df33a..6d369f64d28 100644 --- a/services/reference/_partials/_eth_mining-request.mdx +++ b/services/reference/_partials/_eth_mining-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_mining","params": [],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_mining", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_mining","params": [],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_mining", "params": [], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_mining-response.mdx b/services/reference/_partials/_eth_mining-response.mdx index c316324daa8..4d638cbeb2c 100644 --- a/services/reference/_partials/_eth_mining-response.mdx +++ b/services/reference/_partials/_eth_mining-response.mdx @@ -1,9 +1,9 @@ -:::note +:::note Infura will always return `false` in response to `eth_mining`. ::: -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_mining-returns.mdx b/services/reference/_partials/_eth_mining-returns.mdx index 43665ede25c..3960f7be46d 100644 --- a/services/reference/_partials/_eth_mining-returns.mdx +++ b/services/reference/_partials/_eth_mining-returns.mdx @@ -1,2 +1 @@ `is mining flag`: A boolean indicating if the client is mining. - diff --git a/services/reference/_partials/_eth_protocolversion-example.mdx b/services/reference/_partials/_eth_protocolversion-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_protocolversion-example.mdx +++ b/services/reference/_partials/_eth_protocolversion-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_protocolversion-parameters.mdx b/services/reference/_partials/_eth_protocolversion-parameters.mdx index 0e96b596055..ed30b68824b 100644 --- a/services/reference/_partials/_eth_protocolversion-parameters.mdx +++ b/services/reference/_partials/_eth_protocolversion-parameters.mdx @@ -1,2 +1 @@ None. - diff --git a/services/reference/_partials/_eth_protocolversion-request.mdx b/services/reference/_partials/_eth_protocolversion-request.mdx index 983a8df9f12..2603ef334b8 100644 --- a/services/reference/_partials/_eth_protocolversion-request.mdx +++ b/services/reference/_partials/_eth_protocolversion-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_protocolVersion", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_protocolVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_protocolversion-response.mdx b/services/reference/_partials/_eth_protocolversion-response.mdx index 83d06d108ca..0020913271a 100644 --- a/services/reference/_partials/_eth_protocolversion-response.mdx +++ b/services/reference/_partials/_eth_protocolversion-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_sendrawtransaction-description.mdx b/services/reference/_partials/_eth_sendrawtransaction-description.mdx index ecdee795aed..b9ea82ce662 100644 --- a/services/reference/_partials/_eth_sendrawtransaction-description.mdx +++ b/services/reference/_partials/_eth_sendrawtransaction-description.mdx @@ -1,2 +1 @@ Submits a pre-signed transaction for broadcast to the Ethereum network. - diff --git a/services/reference/_partials/_eth_sendrawtransaction-example.mdx b/services/reference/_partials/_eth_sendrawtransaction-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_sendrawtransaction-example.mdx +++ b/services/reference/_partials/_eth_sendrawtransaction-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx b/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx index da4a6375650..3f47b785436 100644 --- a/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx +++ b/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx @@ -1,2 +1 @@ `transaction data`: [_Required_] The signed transaction data. - diff --git a/services/reference/_partials/_eth_sendrawtransaction-request.mdx b/services/reference/_partials/_eth_sendrawtransaction-request.mdx index 193720d558d..8125540f28b 100644 --- a/services/reference/_partials/_eth_sendrawtransaction-request.mdx +++ b/services/reference/_partials/_eth_sendrawtransaction-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_sendrawtransaction-response.mdx b/services/reference/_partials/_eth_sendrawtransaction-response.mdx index aba7b3a6812..ae1d961246f 100644 --- a/services/reference/_partials/_eth_sendrawtransaction-response.mdx +++ b/services/reference/_partials/_eth_sendrawtransaction-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_sendrawtransaction-returns.mdx b/services/reference/_partials/_eth_sendrawtransaction-returns.mdx index 6711eb35210..553ed6ab7c3 100644 --- a/services/reference/_partials/_eth_sendrawtransaction-returns.mdx +++ b/services/reference/_partials/_eth_sendrawtransaction-returns.mdx @@ -1,2 +1 @@ `transaction hash`: 32 bytes. The transaction hash, or the zero hash if the transaction is not yet available. Use [`eth_getTransactionReceipt`](../ethereum/json-rpc-methods/eth_gettransactionreceipt.mdx) to get the contract address, after the transaction was mined, when you created a contract. - diff --git a/services/reference/_partials/_eth_submitwork-description.mdx b/services/reference/_partials/_eth_submitwork-description.mdx index 92284b2edb4..a63d784b490 100644 --- a/services/reference/_partials/_eth_submitwork-description.mdx +++ b/services/reference/_partials/_eth_submitwork-description.mdx @@ -1,2 +1 @@ Used for submitting a proof-of-work solution. - diff --git a/services/reference/_partials/_eth_submitwork-example.mdx b/services/reference/_partials/_eth_submitwork-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_submitwork-example.mdx +++ b/services/reference/_partials/_eth_submitwork-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_submitwork-parameters.mdx b/services/reference/_partials/_eth_submitwork-parameters.mdx index cff1633c9da..3da95341c08 100644 --- a/services/reference/_partials/_eth_submitwork-parameters.mdx +++ b/services/reference/_partials/_eth_submitwork-parameters.mdx @@ -1,6 +1,5 @@ A `work array` array with the following properties: - - 8 bytes: The nonce found (64 bits) - - 32 bytes: The header's pow-hash (256 bits) - - 32 bytes: The mix digest (256 bits) - +- 8 bytes: The nonce found (64 bits) +- 32 bytes: The header's pow-hash (256 bits) +- 32 bytes: The mix digest (256 bits) diff --git a/services/reference/_partials/_eth_submitwork-request.mdx b/services/reference/_partials/_eth_submitwork-request.mdx index a574a470853..c48597b1d69 100644 --- a/services/reference/_partials/_eth_submitwork-request.mdx +++ b/services/reference/_partials/_eth_submitwork-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_submitWork", "params": ["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_submitWork", "params": ["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_submitwork-response.mdx b/services/reference/_partials/_eth_submitwork-response.mdx index 5a677e2ea2a..b95954415d0 100644 --- a/services/reference/_partials/_eth_submitwork-response.mdx +++ b/services/reference/_partials/_eth_submitwork-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -14,4 +14,3 @@ import TabItem from '@theme/TabItem'; - diff --git a/services/reference/_partials/_eth_submitwork-returns.mdx b/services/reference/_partials/_eth_submitwork-returns.mdx index 52d7b1ab591..ae8b42223e0 100644 --- a/services/reference/_partials/_eth_submitwork-returns.mdx +++ b/services/reference/_partials/_eth_submitwork-returns.mdx @@ -1,2 +1 @@ `is valid flag`: (boolean): Returns `true` if the provided solution is valid, otherwise `false`. - diff --git a/services/reference/_partials/_eth_syncing-description.mdx b/services/reference/_partials/_eth_syncing-description.mdx index 1ba18006254..c71522b4741 100644 --- a/services/reference/_partials/_eth_syncing-description.mdx +++ b/services/reference/_partials/_eth_syncing-description.mdx @@ -1,2 +1 @@ Returns an object with data about the sync status or `false`. - diff --git a/services/reference/_partials/_eth_syncing-example.mdx b/services/reference/_partials/_eth_syncing-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_eth_syncing-example.mdx +++ b/services/reference/_partials/_eth_syncing-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_eth_syncing-parameters.mdx b/services/reference/_partials/_eth_syncing-parameters.mdx index 0e96b596055..ed30b68824b 100644 --- a/services/reference/_partials/_eth_syncing-parameters.mdx +++ b/services/reference/_partials/_eth_syncing-parameters.mdx @@ -1,2 +1 @@ None. - diff --git a/services/reference/_partials/_eth_syncing-request.mdx b/services/reference/_partials/_eth_syncing-request.mdx index 93c4f940129..4b30f746099 100644 --- a/services/reference/_partials/_eth_syncing-request.mdx +++ b/services/reference/_partials/_eth_syncing-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` - diff --git a/services/reference/_partials/_eth_syncing-response.mdx b/services/reference/_partials/_eth_syncing-response.mdx index f77d46a8914..b95954415d0 100644 --- a/services/reference/_partials/_eth_syncing-response.mdx +++ b/services/reference/_partials/_eth_syncing-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_eth_syncing-returns.mdx b/services/reference/_partials/_eth_syncing-returns.mdx index 950fd562663..237ff04c143 100644 --- a/services/reference/_partials/_eth_syncing-returns.mdx +++ b/services/reference/_partials/_eth_syncing-returns.mdx @@ -1,6 +1,5 @@ - `sync status`: (boolean) Returns `false` only when not syncing. - `sync blocks`: - `startingBlock`: A hexadecimal equivalent the integer indicating the block at which the import started (will only be reset after the sync reaches the head). - - `currentBlock`: A hexadecimal equivalent the integer indicating the current block, same as [`eth_blockNumber`](../ethereum/json-rpc-methods/eth_blocknumber.mdx). + - `currentBlock`: A hexadecimal equivalent the integer indicating the current block, same as [`eth_blockNumber`](../ethereum/json-rpc-methods/eth_blocknumber.mdx). - `highestBlock`: A hexadecimal equivalent the integer indicating the highest block. - diff --git a/services/reference/_partials/_net_listening-description.mdx b/services/reference/_partials/_net_listening-description.mdx index 0e8f6660743..9bb51ea3cea 100644 --- a/services/reference/_partials/_net_listening-description.mdx +++ b/services/reference/_partials/_net_listening-description.mdx @@ -1,2 +1 @@ Returns `true` if client is actively listening for network connections. - diff --git a/services/reference/_partials/_net_listening-example.mdx b/services/reference/_partials/_net_listening-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_net_listening-example.mdx +++ b/services/reference/_partials/_net_listening-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_net_listening-parameters.mdx b/services/reference/_partials/_net_listening-parameters.mdx index 0e96b596055..ed30b68824b 100644 --- a/services/reference/_partials/_net_listening-parameters.mdx +++ b/services/reference/_partials/_net_listening-parameters.mdx @@ -1,2 +1 @@ None. - diff --git a/services/reference/_partials/_net_listening-request.mdx b/services/reference/_partials/_net_listening-request.mdx index 1b27fa9bf55..b6997b52384 100644 --- a/services/reference/_partials/_net_listening-request.mdx +++ b/services/reference/_partials/_net_listening-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` - diff --git a/services/reference/_partials/_net_listening-response.mdx b/services/reference/_partials/_net_listening-response.mdx index 9c4d7480031..276e3a761c7 100644 --- a/services/reference/_partials/_net_listening-response.mdx +++ b/services/reference/_partials/_net_listening-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_net_listening-returns.mdx b/services/reference/_partials/_net_listening-returns.mdx index c2ebc88e178..627141b8d60 100644 --- a/services/reference/_partials/_net_listening-returns.mdx +++ b/services/reference/_partials/_net_listening-returns.mdx @@ -1,2 +1 @@ `listening flag`: (boolean) Indicating whether the client is actively listening for network connections. - diff --git a/services/reference/_partials/_net_peercount-description.mdx b/services/reference/_partials/_net_peercount-description.mdx index 1d0015518db..737759c3b9b 100644 --- a/services/reference/_partials/_net_peercount-description.mdx +++ b/services/reference/_partials/_net_peercount-description.mdx @@ -1,2 +1 @@ Returns the number of peers currently connected to the client. - diff --git a/services/reference/_partials/_net_peercount-example.mdx b/services/reference/_partials/_net_peercount-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_net_peercount-example.mdx +++ b/services/reference/_partials/_net_peercount-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_net_peercount-parameters.mdx b/services/reference/_partials/_net_peercount-parameters.mdx index d24252a4367..b0047fa49f0 100644 --- a/services/reference/_partials/_net_peercount-parameters.mdx +++ b/services/reference/_partials/_net_peercount-parameters.mdx @@ -1,2 +1 @@ None - diff --git a/services/reference/_partials/_net_peercount-request.mdx b/services/reference/_partials/_net_peercount-request.mdx index b5e4ac715f5..3ccce1ec5af 100644 --- a/services/reference/_partials/_net_peercount-request.mdx +++ b/services/reference/_partials/_net_peercount-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - diff --git a/services/reference/_partials/_net_peercount-response.mdx b/services/reference/_partials/_net_peercount-response.mdx index 97a3b4c92bb..df61200ef55 100644 --- a/services/reference/_partials/_net_peercount-response.mdx +++ b/services/reference/_partials/_net_peercount-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_net_peercount-returns.mdx b/services/reference/_partials/_net_peercount-returns.mdx index d831a9093a7..bef7f0b3854 100644 --- a/services/reference/_partials/_net_peercount-returns.mdx +++ b/services/reference/_partials/_net_peercount-returns.mdx @@ -1,2 +1 @@ `peer count`: A hexadecimal of the number of connected peers. - diff --git a/services/reference/_partials/_net_version-description.mdx b/services/reference/_partials/_net_version-description.mdx index 30aa64801c9..39a99785497 100644 --- a/services/reference/_partials/_net_version-description.mdx +++ b/services/reference/_partials/_net_version-description.mdx @@ -1,2 +1 @@ Returns the current network ID. - diff --git a/services/reference/_partials/_net_version-example.mdx b/services/reference/_partials/_net_version-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_net_version-example.mdx +++ b/services/reference/_partials/_net_version-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_net_version-parameters.mdx b/services/reference/_partials/_net_version-parameters.mdx index 0e96b596055..ed30b68824b 100644 --- a/services/reference/_partials/_net_version-parameters.mdx +++ b/services/reference/_partials/_net_version-parameters.mdx @@ -1,2 +1 @@ None. - diff --git a/services/reference/_partials/_net_version-request.mdx b/services/reference/_partials/_net_version-request.mdx index 72580d4bc41..559a6fa205e 100644 --- a/services/reference/_partials/_net_version-request.mdx +++ b/services/reference/_partials/_net_version-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - diff --git a/services/reference/_partials/_net_version-response.mdx b/services/reference/_partials/_net_version-response.mdx index 1f82a7b0a26..93111b16fbd 100644 --- a/services/reference/_partials/_net_version-response.mdx +++ b/services/reference/_partials/_net_version-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_net_version-returns.mdx b/services/reference/_partials/_net_version-returns.mdx index ec88978331a..388f208ae4c 100644 --- a/services/reference/_partials/_net_version-returns.mdx +++ b/services/reference/_partials/_net_version-returns.mdx @@ -1,2 +1 @@ `network ID`: A string representing the current network ID. - diff --git a/services/reference/_partials/_web3_clientversion-description.mdx b/services/reference/_partials/_web3_clientversion-description.mdx index 12e06918284..73b595da935 100644 --- a/services/reference/_partials/_web3_clientversion-description.mdx +++ b/services/reference/_partials/_web3_clientversion-description.mdx @@ -1,2 +1 @@ Returns the current client version. - diff --git a/services/reference/_partials/_web3_clientversion-example.mdx b/services/reference/_partials/_web3_clientversion-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/_web3_clientversion-example.mdx +++ b/services/reference/_partials/_web3_clientversion-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/_web3_clientversion-parameters.mdx b/services/reference/_partials/_web3_clientversion-parameters.mdx index 0e96b596055..ed30b68824b 100644 --- a/services/reference/_partials/_web3_clientversion-parameters.mdx +++ b/services/reference/_partials/_web3_clientversion-parameters.mdx @@ -1,2 +1 @@ None. - diff --git a/services/reference/_partials/_web3_clientversion-request.mdx b/services/reference/_partials/_web3_clientversion-request.mdx index 621ef2c7923..6a3247132c2 100644 --- a/services/reference/_partials/_web3_clientversion-request.mdx +++ b/services/reference/_partials/_web3_clientversion-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/_partials/_web3_clientversion-response.mdx b/services/reference/_partials/_web3_clientversion-response.mdx index 5d08186b270..e82b97282bb 100644 --- a/services/reference/_partials/_web3_clientversion-response.mdx +++ b/services/reference/_partials/_web3_clientversion-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/_web3_clientversion-returns.mdx b/services/reference/_partials/_web3_clientversion-returns.mdx index eab57f8a2e3..d6bf93ef85b 100644 --- a/services/reference/_partials/_web3_clientversion-returns.mdx +++ b/services/reference/_partials/_web3_clientversion-returns.mdx @@ -1,2 +1 @@ A string representing the current client version. - diff --git a/services/reference/_partials/filter-methods/_eth_getfilterchanges-description.mdx b/services/reference/_partials/filter-methods/_eth_getfilterchanges-description.mdx index 04ec28f6196..001e5fcf2f5 100644 --- a/services/reference/_partials/filter-methods/_eth_getfilterchanges-description.mdx +++ b/services/reference/_partials/filter-methods/_eth_getfilterchanges-description.mdx @@ -1,3 +1,2 @@ -Polling method for a filter, which returns an array of logs which occurred since last poll. +Polling method for a filter, which returns an array of logs which occurred since last poll. Filter must be created by calling either [`eth_newFilter`](../../ethereum/json-rpc-methods/filter-methods/eth_newfilter.mdx) or [`eth_newBlockFilter`](../../ethereum/json-rpc-methods/filter-methods/eth_newblockfilter.mdx). - diff --git a/services/reference/_partials/filter-methods/_eth_getfilterchanges-example.mdx b/services/reference/_partials/filter-methods/_eth_getfilterchanges-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/filter-methods/_eth_getfilterchanges-example.mdx +++ b/services/reference/_partials/filter-methods/_eth_getfilterchanges-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/filter-methods/_eth_getfilterchanges-parameters.mdx b/services/reference/_partials/filter-methods/_eth_getfilterchanges-parameters.mdx index b827c453d2f..5520cc9a486 100644 --- a/services/reference/_partials/filter-methods/_eth_getfilterchanges-parameters.mdx +++ b/services/reference/_partials/filter-methods/_eth_getfilterchanges-parameters.mdx @@ -1,2 +1 @@ - `filter ID`: A string denoting the filter ID. - diff --git a/services/reference/_partials/filter-methods/_eth_getfilterchanges-request.mdx b/services/reference/_partials/filter-methods/_eth_getfilterchanges-request.mdx index 18e608cb187..bb13d684e93 100644 --- a/services/reference/_partials/filter-methods/_eth_getfilterchanges-request.mdx +++ b/services/reference/_partials/filter-methods/_eth_getfilterchanges-request.mdx @@ -1,25 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - - + ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ -X POST \ -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x10ff0bfbedb01f0dbd4106d14eb719ec38b6eb5b821c"],"id":1}' + -d '{"jsonrpc": "2.0", "method": "eth_getFilterChanges", "params": ["0x10ff0bfbedb01f0dbd4106d14eb719ec38b6eb5b821c"], "id": 1}' ``` ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0x10ff0bfbedb01f0dbd4106d14eb719ec38b6eb5b821c"],"id":1}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getFilterChanges", "params": ["0x10ff0bfbedb01f0dbd4106d14eb719ec38b6eb5b821c"], "id": 1}' ``` - - diff --git a/services/reference/_partials/filter-methods/_eth_getfilterchanges-response.mdx b/services/reference/_partials/filter-methods/_eth_getfilterchanges-response.mdx index 57bf93b7434..d586f25e887 100644 --- a/services/reference/_partials/filter-methods/_eth_getfilterchanges-response.mdx +++ b/services/reference/_partials/filter-methods/_eth_getfilterchanges-response.mdx @@ -1,25 +1,30 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```json { - "jsonrpc": "2.0", - "id": 73, - "result": [{ - "address": "0xb5a5f22694352c15b00323844ad545abb2b11028", - "blockHash": "0x99e8663c7b6d8bba3c7627a17d774238eae3e793dee30008debb2699666657de", - "blockNumber": "0x5d12ab", - "data": "0x0000000000000000000000000000000000000000000000a247d7a2955b61d000", - "logIndex": "0x0", - "removed": false, - "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x000000000000000000000000bdc0afe57b8e9468aa95396da2ab2063e595f37e", "0x0000000000000000000000007503e090dc2b64a88f034fb45e247cbd82b8741e"], - "transactionHash": "0xa74c2432c9cf7dbb875a385a2411fd8f13ca9ec12216864b1a1ead3c99de99cd", - "transactionIndex": "0x3" - }, - ], + "jsonrpc": "2.0", + "id": 73, + "result": [ + { + "address": "0xb5a5f22694352c15b00323844ad545abb2b11028", + "blockHash": "0x99e8663c7b6d8bba3c7627a17d774238eae3e793dee30008debb2699666657de", + "blockNumber": "0x5d12ab", + "data": "0x0000000000000000000000000000000000000000000000a247d7a2955b61d000", + "logIndex": "0x0", + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000bdc0afe57b8e9468aa95396da2ab2063e595f37e", + "0x0000000000000000000000007503e090dc2b64a88f034fb45e247cbd82b8741e" + ], + "transactionHash": "0xa74c2432c9cf7dbb875a385a2411fd8f13ca9ec12216864b1a1ead3c99de99cd", + "transactionIndex": "0x3" + } + ] } ``` diff --git a/services/reference/_partials/filter-methods/_eth_getfilterchanges-returns.mdx b/services/reference/_partials/filter-methods/_eth_getfilterchanges-returns.mdx index 6cf0ad0bd70..0b80ec7e123 100644 --- a/services/reference/_partials/filter-methods/_eth_getfilterchanges-returns.mdx +++ b/services/reference/_partials/filter-methods/_eth_getfilterchanges-returns.mdx @@ -1,14 +1,12 @@ - `log object array`: (array) An array of log objects, or an empty array if nothing has changed since last poll. - For filters created with [`eth_newBlockFilter`](../../ethereum/json-rpc-methods/filter-methods/eth_newblockfilter.mdx) the return values are block hashes (32 bytes), e.g. `["0x3454645634534..."]`. - For filters created with [`eth_newFilter`](../../ethereum/json-rpc-methods/filter-methods/eth_newfilter.mdx) the logs are objects with the following params: - - `address`: 20 bytes. Address from which this log originated. - - `blockHash`: 32 bytes. The hash of the block where this log was in. `Null` when it is a pending log. - - `blockNumber`: The block number where this log was in. `Null` when it is a pending log. - - `data`: DATA. Contains the non-indexed arguments of the log. - - `logIndex`: A hexadecimal of the log index position in the block. `Null` when it is a pending log. - - `removed`: `true` when the log was removed, due to a chain reorganization. `false` if it is a valid log. - - `topics`: Array of DATA. An array of 0 to 4 32-bytes DATA of indexed log arguments. In Solidity the first `topic` is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except when you declared the event with the anonymous specifier. - - `transactionHash`: 32 bytes. A hash of the transactions from which this log was created. `Null` when it is a pending log. - - `transactionIndex`: A hexadecimal of the transactions index position from which this log was created. `Null` when it is a pending log. - - + - `address`: 20 bytes. Address from which this log originated. + - `blockHash`: 32 bytes. The hash of the block where this log was in. `Null` when it is a pending log. + - `blockNumber`: The block number where this log was in. `Null` when it is a pending log. + - `data`: DATA. Contains the non-indexed arguments of the log. + - `logIndex`: A hexadecimal of the log index position in the block. `Null` when it is a pending log. + - `removed`: `true` when the log was removed, due to a chain reorganization. `false` if it is a valid log. + - `topics`: Array of DATA. An array of 0 to 4 32-bytes DATA of indexed log arguments. In Solidity the first `topic` is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except when you declared the event with the anonymous specifier. + - `transactionHash`: 32 bytes. A hash of the transactions from which this log was created. `Null` when it is a pending log. + - `transactionIndex`: A hexadecimal of the transactions index position from which this log was created. `Null` when it is a pending log. diff --git a/services/reference/_partials/filter-methods/_eth_getfilterlogs-description.mdx b/services/reference/_partials/filter-methods/_eth_getfilterlogs-description.mdx index 27edf85212e..325b393373f 100644 --- a/services/reference/_partials/filter-methods/_eth_getfilterlogs-description.mdx +++ b/services/reference/_partials/filter-methods/_eth_getfilterlogs-description.mdx @@ -1,2 +1 @@ Returns an array of all logs matching filter with given filter ID. - diff --git a/services/reference/_partials/filter-methods/_eth_getfilterlogs-example.mdx b/services/reference/_partials/filter-methods/_eth_getfilterlogs-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/filter-methods/_eth_getfilterlogs-example.mdx +++ b/services/reference/_partials/filter-methods/_eth_getfilterlogs-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/filter-methods/_eth_getfilterlogs-parameters.mdx b/services/reference/_partials/filter-methods/_eth_getfilterlogs-parameters.mdx index b429ce79f63..47049a136e1 100644 --- a/services/reference/_partials/filter-methods/_eth_getfilterlogs-parameters.mdx +++ b/services/reference/_partials/filter-methods/_eth_getfilterlogs-parameters.mdx @@ -1,7 +1,7 @@ A `filter object` with the fillowing keys and their values: + - `fromBlock`: _[optional, default: `latest`]_ A hexadecimal block number, or `latest` for the last mined block. The `pending` option is not currently supported. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - `toBlock`: _[optional, default: `latest`]_ A hexadecimal block number, or `latest` for the last mined block. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - `address`: _[optional]_ (20 bytes). Contract address or a list of addresses from which logs should originate. - `topics`: _[optional]_ An array of 32 bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with `or` options. - blockHash: _[optional]_ With the addition of EIP-234, `blockHash` restricts the logs returned to the single block with the 32-byte hash `blockHash`. Using `blockHash` is equivalent to `fromBlock` = `toBlock` = the block number with hash `blockHash`. If `blockHash` is present in the filter criteria, then neither `fromBlock` nor `toBlock` are allowed. - diff --git a/services/reference/_partials/filter-methods/_eth_getfilterlogs-request.mdx b/services/reference/_partials/filter-methods/_eth_getfilterlogs-request.mdx index e0b468f7ef0..3ead8a5b0d9 100644 --- a/services/reference/_partials/filter-methods/_eth_getfilterlogs-request.mdx +++ b/services/reference/_partials/filter-methods/_eth_getfilterlogs-request.mdx @@ -1,25 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - - + ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getFilterLogs","params":["0x10ff0bfbedb01f0dbd4106d14eb719ec38b6eb5b821c"],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getFilterLogs", "params": ["0x10ff0bfbedb01f0dbd4106d14eb719ec38b6eb5b821c"], "id": 1}' ``` ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getFilterLogs","params":["0x10ff0bfbedb01f0dbd4106d14eb719ec38b6eb5b821c"],"id":1}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getFilterLogs", "params": ["0x10ff0bfbedb01f0dbd4106d14eb719ec38b6eb5b821c"], "id": 1}' ``` - - diff --git a/services/reference/_partials/filter-methods/_eth_getfilterlogs-response.mdx b/services/reference/_partials/filter-methods/_eth_getfilterlogs-response.mdx index 1e4be80b512..d586f25e887 100644 --- a/services/reference/_partials/filter-methods/_eth_getfilterlogs-response.mdx +++ b/services/reference/_partials/filter-methods/_eth_getfilterlogs-response.mdx @@ -1,25 +1,30 @@ - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```json { - "jsonrpc": "2.0", - "id": 73, - "result": [{ - "address": "0xb5a5f22694352c15b00323844ad545abb2b11028", - "blockHash": "0x99e8663c7b6d8bba3c7627a17d774238eae3e793dee30008debb2699666657de", - "blockNumber": "0x5d12ab", - "data": "0x0000000000000000000000000000000000000000000000a247d7a2955b61d000", - "logIndex": "0x0", - "removed": false, - "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x000000000000000000000000bdc0afe57b8e9468aa95396da2ab2063e595f37e", "0x0000000000000000000000007503e090dc2b64a88f034fb45e247cbd82b8741e"], - "transactionHash": "0xa74c2432c9cf7dbb875a385a2411fd8f13ca9ec12216864b1a1ead3c99de99cd", - "transactionIndex": "0x3" + "jsonrpc": "2.0", + "id": 73, + "result": [ + { + "address": "0xb5a5f22694352c15b00323844ad545abb2b11028", + "blockHash": "0x99e8663c7b6d8bba3c7627a17d774238eae3e793dee30008debb2699666657de", + "blockNumber": "0x5d12ab", + "data": "0x0000000000000000000000000000000000000000000000a247d7a2955b61d000", + "logIndex": "0x0", + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000bdc0afe57b8e9468aa95396da2ab2063e595f37e", + "0x0000000000000000000000007503e090dc2b64a88f034fb45e247cbd82b8741e" + ], + "transactionHash": "0xa74c2432c9cf7dbb875a385a2411fd8f13ca9ec12216864b1a1ead3c99de99cd", + "transactionIndex": "0x3" } + ] } ``` diff --git a/services/reference/_partials/filter-methods/_eth_getfilterlogs-returns.mdx b/services/reference/_partials/filter-methods/_eth_getfilterlogs-returns.mdx index e9001dd3464..ca340f25d49 100644 --- a/services/reference/_partials/filter-methods/_eth_getfilterlogs-returns.mdx +++ b/services/reference/_partials/filter-methods/_eth_getfilterlogs-returns.mdx @@ -1,11 +1,10 @@ - `log object array`: (array) An array of log objects that match filter. For an array of logs that occurred since the last poll, use [eth_getFilterChanges](../../ethereum/json-rpc-methods/filter-methods/eth_getfilterchanges.mdx). Log objects contain the following keys and their values: - - `address`: 20 bytes. Address from which this log originated. - - `blockHash`: 32 bytes. The hash of the block where this log was in. `Null` when it is a pending log. - - `blockNumber`: The block number where this log was in. `Null` when it is a pending log. - - `data`: DATA. Contains the non-indexed arguments of the log. - - `logIndex`: A hexadecimal of the log index position in the block. `Null` when it is a pending log. - - `removed`: `true` when the log was removed, due to a chain reorganization. `false` if it is a valid log. - - `topics`: Array of DATA. An array of 0 to 4 32-bytes DATA of indexed log arguments. In Solidity the first `topic` is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except when you declared the event with the anonymous specifier. - - `transactionHash`: 32 bytes. A hash of the transactions from which this log was created. `Null` when it is a pending log. - - `transactionIndex`: A hexadecimal of the transactions index position from which this log was created. `Null` when it is a pending log. - + - `address`: 20 bytes. Address from which this log originated. + - `blockHash`: 32 bytes. The hash of the block where this log was in. `Null` when it is a pending log. + - `blockNumber`: The block number where this log was in. `Null` when it is a pending log. + - `data`: DATA. Contains the non-indexed arguments of the log. + - `logIndex`: A hexadecimal of the log index position in the block. `Null` when it is a pending log. + - `removed`: `true` when the log was removed, due to a chain reorganization. `false` if it is a valid log. + - `topics`: Array of DATA. An array of 0 to 4 32-bytes DATA of indexed log arguments. In Solidity the first `topic` is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except when you declared the event with the anonymous specifier. + - `transactionHash`: 32 bytes. A hash of the transactions from which this log was created. `Null` when it is a pending log. + - `transactionIndex`: A hexadecimal of the transactions index position from which this log was created. `Null` when it is a pending log. diff --git a/services/reference/_partials/filter-methods/_eth_newblockfilter-description.mdx b/services/reference/_partials/filter-methods/_eth_newblockfilter-description.mdx index 24622d064dc..ad1673d5a13 100644 --- a/services/reference/_partials/filter-methods/_eth_newblockfilter-description.mdx +++ b/services/reference/_partials/filter-methods/_eth_newblockfilter-description.mdx @@ -3,4 +3,3 @@ Creates a filter in the node, to notify when a new block arrives. To check if th :::tip Valid for fifteen minutes Filter IDs will be valid for up to fifteen minutes, and can polled by any connection using the same `YOUR-API-KEY`. ::: - diff --git a/services/reference/_partials/filter-methods/_eth_newblockfilter-example.mdx b/services/reference/_partials/filter-methods/_eth_newblockfilter-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/filter-methods/_eth_newblockfilter-example.mdx +++ b/services/reference/_partials/filter-methods/_eth_newblockfilter-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/filter-methods/_eth_newblockfilter-request.mdx b/services/reference/_partials/filter-methods/_eth_newblockfilter-request.mdx index c3eb47e2664..688491bde4d 100644 --- a/services/reference/_partials/filter-methods/_eth_newblockfilter-request.mdx +++ b/services/reference/_partials/filter-methods/_eth_newblockfilter-request.mdx @@ -1,25 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - - + ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_newBlockFilter","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_newBlockFilter", "params": [], "id": 1}' ``` ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_newBlockFilter","params":[],"id":1}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_newBlockFilter", "params": [], "id": 1}' ``` - - diff --git a/services/reference/_partials/filter-methods/_eth_newblockfilter-response.mdx b/services/reference/_partials/filter-methods/_eth_newblockfilter-response.mdx index 190d31cc3d4..da5a9e89488 100644 --- a/services/reference/_partials/filter-methods/_eth_newblockfilter-response.mdx +++ b/services/reference/_partials/filter-methods/_eth_newblockfilter-response.mdx @@ -1,6 +1,5 @@ - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/filter-methods/_eth_newblockfilter-returns.mdx b/services/reference/_partials/filter-methods/_eth_newblockfilter-returns.mdx index 573a9b8e35d..181e4cc628d 100644 --- a/services/reference/_partials/filter-methods/_eth_newblockfilter-returns.mdx +++ b/services/reference/_partials/filter-methods/_eth_newblockfilter-returns.mdx @@ -1,2 +1 @@ `filter ID`: A hexadecimal denoting the newly created filter ID. - diff --git a/services/reference/_partials/filter-methods/_eth_newfilter-description.mdx b/services/reference/_partials/filter-methods/_eth_newfilter-description.mdx index 92f889d3720..ddeacc0e2f6 100644 --- a/services/reference/_partials/filter-methods/_eth_newfilter-description.mdx +++ b/services/reference/_partials/filter-methods/_eth_newfilter-description.mdx @@ -3,4 +3,3 @@ Creates a filter object based on the given filter options, to notify when the st :::tip Valid for fifteen minutes Filter IDs will be valid for up to fifteen minutes, and can polled by any connection using the same `YOUR-API-KEY`. ::: - diff --git a/services/reference/_partials/filter-methods/_eth_newfilter-example.mdx b/services/reference/_partials/filter-methods/_eth_newfilter-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/filter-methods/_eth_newfilter-example.mdx +++ b/services/reference/_partials/filter-methods/_eth_newfilter-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/filter-methods/_eth_newfilter-parameters.mdx b/services/reference/_partials/filter-methods/_eth_newfilter-parameters.mdx index 0b4a10e32d1..fea97a7feb8 100644 --- a/services/reference/_partials/filter-methods/_eth_newfilter-parameters.mdx +++ b/services/reference/_partials/filter-methods/_eth_newfilter-parameters.mdx @@ -14,4 +14,3 @@ Topics are order-dependent. A transaction with a log with topics `[A, B]` will b - `[null, B]`: Anything in first position AND `B` in second position, and anything after. - `[A, B]`: `A` in the first position AND `B` in second position, and anything after. - `[[A, B], [A, B]]`: `(A OR B)` in first position AND `(A OR B)` in second position, and anything after. - diff --git a/services/reference/_partials/filter-methods/_eth_newfilter-request.mdx b/services/reference/_partials/filter-methods/_eth_newfilter-request.mdx index 635271e26eb..9a6829c9f0d 100644 --- a/services/reference/_partials/filter-methods/_eth_newfilter-request.mdx +++ b/services/reference/_partials/filter-methods/_eth_newfilter-request.mdx @@ -1,25 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - - + ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_newFilter", "params": [{"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}], "id": 1}' ``` ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}],"id":1}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_newFilter", "params": [{"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}], "id": 1}' ``` - - + - diff --git a/services/reference/_partials/filter-methods/_eth_newfilter-response.mdx b/services/reference/_partials/filter-methods/_eth_newfilter-response.mdx index 744b4b508e3..e8b7a0d8938 100644 --- a/services/reference/_partials/filter-methods/_eth_newfilter-response.mdx +++ b/services/reference/_partials/filter-methods/_eth_newfilter-response.mdx @@ -1,6 +1,5 @@ - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/filter-methods/_eth_newfilter-returns.mdx b/services/reference/_partials/filter-methods/_eth_newfilter-returns.mdx index 573a9b8e35d..181e4cc628d 100644 --- a/services/reference/_partials/filter-methods/_eth_newfilter-returns.mdx +++ b/services/reference/_partials/filter-methods/_eth_newfilter-returns.mdx @@ -1,2 +1 @@ `filter ID`: A hexadecimal denoting the newly created filter ID. - diff --git a/services/reference/_partials/filter-methods/_eth_uninstallfilter-description.mdx b/services/reference/_partials/filter-methods/_eth_uninstallfilter-description.mdx index 24fdb2b3aaf..7090b7eb6b4 100644 --- a/services/reference/_partials/filter-methods/_eth_uninstallfilter-description.mdx +++ b/services/reference/_partials/filter-methods/_eth_uninstallfilter-description.mdx @@ -1,2 +1 @@ Uninstalls a filter with given ID. This method should always be called when watching is no longer needed. Additionally, filters time out when they aren't requested with [`eth_getFilterChanges`](../../ethereum/json-rpc-methods/filter-methods/eth_getfilterchanges.mdx) for a period of time. - diff --git a/services/reference/_partials/filter-methods/_eth_uninstallfilter-example.mdx b/services/reference/_partials/filter-methods/_eth_uninstallfilter-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/filter-methods/_eth_uninstallfilter-example.mdx +++ b/services/reference/_partials/filter-methods/_eth_uninstallfilter-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/filter-methods/_eth_uninstallfilter-parameters.mdx b/services/reference/_partials/filter-methods/_eth_uninstallfilter-parameters.mdx index 1b6bd8be89f..fb3ff20ec08 100644 --- a/services/reference/_partials/filter-methods/_eth_uninstallfilter-parameters.mdx +++ b/services/reference/_partials/filter-methods/_eth_uninstallfilter-parameters.mdx @@ -1,2 +1 @@ - `filter ID`: A string denoting the ID of the filter to be uninstalled. - diff --git a/services/reference/_partials/filter-methods/_eth_uninstallfilter-request.mdx b/services/reference/_partials/filter-methods/_eth_uninstallfilter-request.mdx index c42a8694f18..91b5310b5ad 100644 --- a/services/reference/_partials/filter-methods/_eth_uninstallfilter-request.mdx +++ b/services/reference/_partials/filter-methods/_eth_uninstallfilter-request.mdx @@ -1,25 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - - + ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_uninstallFilter","params":["0x10ff0bfba9472c87932c56632eef8f5cc70910e8e71d"],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_uninstallFilter", "params": ["0x10ff0bfba9472c87932c56632eef8f5cc70910e8e71d"], "id": 1}' ``` ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_uninstallFilter","params":["0x10ff0bfba9472c87932c56632eef8f5cc70910e8e71d"],"id":1}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_uninstallFilter", "params": ["0x10ff0bfba9472c87932c56632eef8f5cc70910e8e71d"], "id": 1}' ``` - - diff --git a/services/reference/_partials/filter-methods/_eth_uninstallfilter-response.mdx b/services/reference/_partials/filter-methods/_eth_uninstallfilter-response.mdx index 0c2bd2f6811..276e3a761c7 100644 --- a/services/reference/_partials/filter-methods/_eth_uninstallfilter-response.mdx +++ b/services/reference/_partials/filter-methods/_eth_uninstallfilter-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -14,4 +14,3 @@ import TabItem from '@theme/TabItem'; - diff --git a/services/reference/_partials/filter-methods/_eth_uninstallfilter-returns.mdx b/services/reference/_partials/filter-methods/_eth_uninstallfilter-returns.mdx index 70fe1ab750d..b4f76b77018 100644 --- a/services/reference/_partials/filter-methods/_eth_uninstallfilter-returns.mdx +++ b/services/reference/_partials/filter-methods/_eth_uninstallfilter-returns.mdx @@ -1,2 +1 @@ `uninstalled flag`: (boolean) `true` if the filter was successfully uninstalled, otherwise `false`. - diff --git a/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx b/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx index 332ef77a19a..b8029645073 100644 --- a/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx +++ b/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx @@ -1,8 +1,7 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). :::tip WebSocket connections only Subscription methods are available for [WebSocket](../../../concepts/websockets.md) connections only. ::: - diff --git a/services/reference/_partials/subscription-methods/_eth_subscribe-request.mdx b/services/reference/_partials/subscription-methods/_eth_subscribe-request.mdx index a50247df213..62aa6179ce3 100644 --- a/services/reference/_partials/subscription-methods/_eth_subscribe-request.mdx +++ b/services/reference/_partials/subscription-methods/_eth_subscribe-request.mdx @@ -1,18 +1,18 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' ``` ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' ``` @@ -20,9 +20,8 @@ wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}' ``` - diff --git a/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx b/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx index e611fef9ae4..dbe0bdb44bc 100644 --- a/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx +++ b/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -46,16 +46,21 @@ import TabItem from '@theme/TabItem'; ```json { - "jsonrpc":"2.0", - "method":"eth_subscription", + "jsonrpc": "2.0", + "method": "eth_subscription", "params": { - "subscription":"0x4a8a4c0517381924f9838102c5a4dcb7", + "subscription": "0x4a8a4c0517381924f9838102c5a4dcb7", "result": { - "address":"0x8320fe7702b96808f7bbc0d4a888ed1468216cfd","blockHash":"0x61cdb2a09ab99abf791d474f20c2ea89bf8de2923a2d42bb49944c8c993cbf04", - "blockNumber":"0x29e87","data":"0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003", - "logIndex":"0x0", - "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"],"transactionHash":"0xe044554a0a55067caafd07f8020ab9f2af60bdfe337e395ecd84b4877a3d1ab4", - "transactionIndex":"0x0" + "address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", + "blockHash": "0x61cdb2a09ab99abf791d474f20c2ea89bf8de2923a2d42bb49944c8c993cbf04", + "blockNumber": "0x29e87", + "data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003", + "logIndex": "0x0", + "topics": [ + "0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902" + ], + "transactionHash": "0xe044554a0a55067caafd07f8020ab9f2af60bdfe337e395ecd84b4877a3d1ab4", + "transactionIndex": "0x0" } } } diff --git a/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx b/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx index 235d57ee015..b6275210f56 100644 --- a/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx +++ b/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -46,16 +46,21 @@ import TabItem from '@theme/TabItem'; ```json { - "jsonrpc":"2.0", - "method":"eth_subscription", + "jsonrpc": "2.0", + "method": "eth_subscription", "params": { - "subscription":"0x4a8a4c0517381924f9838102c5a4dcb7", + "subscription": "0x4a8a4c0517381924f9838102c5a4dcb7", "result": { - "address":"0x8320fe7702b96808f7bbc0d4a888ed1468216cfd","blockHash":"0x61cdb2a09ab99abf791d474f20c2ea89bf8de2923a2d42bb49944c8c993cbf04", - "blockNumber":"0x29e87","data":"0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003", - "logIndex":"0x0", - "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"],"transactionHash":"0xe044554a0a55067caafd07f8020ab9f2af60bdfe337e395ecd84b4877a3d1ab4", - "transactionIndex":"0x0" + "address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", + "blockHash": "0x61cdb2a09ab99abf791d474f20c2ea89bf8de2923a2d42bb49944c8c993cbf04", + "blockNumber": "0x29e87", + "data": "0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003", + "logIndex": "0x0", + "topics": [ + "0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902" + ], + "transactionHash": "0xe044554a0a55067caafd07f8020ab9f2af60bdfe337e395ecd84b4877a3d1ab4", + "transactionIndex": "0x0" } } } @@ -67,15 +72,14 @@ import TabItem from '@theme/TabItem'; ```json { - "jsonrpc":"2.0", - "method":"eth_subscription", - "params":{ - "subscription":"0xc3b33aa549fb9a60e95d21862596617c", - "result":"0xd6fdc5cc41a9959e922f30cb772a9aef46f4daea279307bc5f7024edc4ccd7fa" + "jsonrpc": "2.0", + "method": "eth_subscription", + "params": { + "subscription": "0xc3b33aa549fb9a60e95d21862596617c", + "result": "0xd6fdc5cc41a9959e922f30cb772a9aef46f4daea279307bc5f7024edc4ccd7fa" } } ``` - diff --git a/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx b/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx index d62eec2dfce..e801b588d03 100644 --- a/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx +++ b/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx @@ -1,2 +1 @@ - `subscription ID`: The ID of the newly created subscription on the node. - diff --git a/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx b/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx index 332ef77a19a..b8029645073 100644 --- a/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx +++ b/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx @@ -1,8 +1,7 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). :::tip WebSocket connections only Subscription methods are available for [WebSocket](../../../concepts/websockets.md) connections only. ::: - diff --git a/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx b/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx index 70e97359ffe..e90befb93ed 100644 --- a/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx +++ b/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx @@ -1,2 +1 @@ - `subscription ID`: The ID of the subscription you want to unsubscribe. - diff --git a/services/reference/_partials/subscription-methods/_eth_unsubscribe-request.mdx b/services/reference/_partials/subscription-methods/_eth_unsubscribe-request.mdx index 3041da8d41b..504da5ae67b 100644 --- a/services/reference/_partials/subscription-methods/_eth_unsubscribe-request.mdx +++ b/services/reference/_partials/subscription-methods/_eth_unsubscribe-request.mdx @@ -1,14 +1,13 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash -wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}' +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}' ``` - diff --git a/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx b/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx index fdf46cb873f..1e980b8ff0e 100644 --- a/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx +++ b/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx @@ -1,6 +1,5 @@ - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx b/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx index 368b14db9ae..cd90dd5fe0c 100644 --- a/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx +++ b/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx @@ -1,2 +1 @@ - `unsubscribed flag`: (boolean) `True` if the subscription is canceled successfully. - diff --git a/services/reference/_partials/trace-methods/_trace_block-description.mdx b/services/reference/_partials/trace-methods/_trace_block-description.mdx index 026120566bd..6d3ca6d3bf1 100644 --- a/services/reference/_partials/trace-methods/_trace_block-description.mdx +++ b/services/reference/_partials/trace-methods/_trace_block-description.mdx @@ -1,2 +1 @@ Get trace information about all the transactions in a given block. This can be useful for debugging purposes or for analyzing the behavior of a blockchain. - diff --git a/services/reference/_partials/trace-methods/_trace_block-example.mdx b/services/reference/_partials/trace-methods/_trace_block-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/trace-methods/_trace_block-example.mdx +++ b/services/reference/_partials/trace-methods/_trace_block-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/trace-methods/_trace_block-parameters.mdx b/services/reference/_partials/trace-methods/_trace_block-parameters.mdx index 6420c03a65f..c7add6a8617 100644 --- a/services/reference/_partials/trace-methods/_trace_block-parameters.mdx +++ b/services/reference/_partials/trace-methods/_trace_block-parameters.mdx @@ -1,2 +1 @@ - `block parameter` [_Required_] A hexadecimal block number, or the string `latest`, `earliest`, or `pending`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - diff --git a/services/reference/_partials/trace-methods/_trace_block-request.mdx b/services/reference/_partials/trace-methods/_trace_block-request.mdx index 0d66206fcdd..a0d393e2611 100644 --- a/services/reference/_partials/trace-methods/_trace_block-request.mdx +++ b/services/reference/_partials/trace-methods/_trace_block-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"trace_block","params":["0x6"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "trace_block", "params": ["0x6"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"trace_block","params":["0x6"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "trace_block", "params": ["0x6"], "id": 1}' +``` - diff --git a/services/reference/_partials/trace-methods/_trace_block-response.mdx b/services/reference/_partials/trace-methods/_trace_block-response.mdx index ef2831c0c65..7a94a71a7ff 100644 --- a/services/reference/_partials/trace-methods/_trace_block-response.mdx +++ b/services/reference/_partials/trace-methods/_trace_block-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" diff --git a/services/reference/_partials/trace-methods/_trace_block-returns.mdx b/services/reference/_partials/trace-methods/_trace_block-returns.mdx index cff7549796f..9fc3e52f084 100644 --- a/services/reference/_partials/trace-methods/_trace_block-returns.mdx +++ b/services/reference/_partials/trace-methods/_trace_block-returns.mdx @@ -1,2 +1 @@ A list of [calls to other contracts](../../ethereum/json-rpc-methods/trace-methods/index.md#trace) containing one object per call, in transaction execution order. - diff --git a/services/reference/_partials/trace-methods/_trace_call-description.mdx b/services/reference/_partials/trace-methods/_trace_call-description.mdx index 2499c826264..99230ba8b58 100644 --- a/services/reference/_partials/trace-methods/_trace_call-description.mdx +++ b/services/reference/_partials/trace-methods/_trace_call-description.mdx @@ -1,3 +1,2 @@ Executes the given call and returns a number of possible traces for it. Use this API to retrieve detailed information about the transaction execution, including state changes and logs generated during the process. - diff --git a/services/reference/_partials/trace-methods/_trace_call-example.mdx b/services/reference/_partials/trace-methods/_trace_call-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/trace-methods/_trace_call-example.mdx +++ b/services/reference/_partials/trace-methods/_trace_call-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/trace-methods/_trace_call-parameters.mdx b/services/reference/_partials/trace-methods/_trace_call-parameters.mdx index 854ebb564fa..08c1a1403e9 100644 --- a/services/reference/_partials/trace-methods/_trace_call-parameters.mdx +++ b/services/reference/_partials/trace-methods/_trace_call-parameters.mdx @@ -13,4 +13,3 @@ - `block parameter` : _[Required]_ The hexadecimal block number, or the string `latest`, `earliest`, or `pending`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - `options`: A list of tracing options. Tracing options are [`trace`](../../ethereum/json-rpc-methods/trace-methods/index.md#trace) and [`stateDiff`](../../ethereum/json-rpc-methods/trace-methods/index.md#statediff). - diff --git a/services/reference/_partials/trace-methods/_trace_call-request.mdx b/services/reference/_partials/trace-methods/_trace_call-request.mdx index 98ddf134217..058e9840784 100644 --- a/services/reference/_partials/trace-methods/_trace_call-request.mdx +++ b/services/reference/_partials/trace-methods/_trace_call-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"trace_call","params":[{"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","to":"0x0010000000000000000000000000000000000000","gas":"0xfffff2","gasPrice":"0xef","value":"0x0","data":"0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002","nonce":"0x0"},["trace"],"latest"],"id":1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "trace_call", "params": [{"from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "to": "0x0010000000000000000000000000000000000000", "gas": "0xfffff2", "gasPrice": "0xef", "value": "0x0", "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002", "nonce": "0x0"}, ["trace"], "latest"], "id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"trace_call","params":[{"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","to":0x0010000000000000000000000000000000000000","gas":"0xfffff2","gasPrice":"0xef","value":"0x0","data":"0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002","nonce":"0x0"},["trace"],"latest"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "trace_call", "params": [{"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "to": 0x0010000000000000000000000000000000000000", "gas": "0xfffff2", "gasPrice": "0xef", "value": "0x0", "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002", "nonce": "0x0"}, ["trace"], "latest"], "id":1}' +``` - diff --git a/services/reference/_partials/trace-methods/_trace_call-response.mdx b/services/reference/_partials/trace-methods/_trace_call-response.mdx index 327e1693459..a0811737161 100644 --- a/services/reference/_partials/trace-methods/_trace_call-response.mdx +++ b/services/reference/_partials/trace-methods/_trace_call-response.mdx @@ -1,35 +1,37 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```json { - "jsonrpc": "2.0", - "result": { - "output" : "0x", - "stateDiff" : null, - "trace" : [ { - "action" : { - "callType" : "call", - "from" : "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", - "gas" : "0xffabba", - "input" : "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002", - "to" : "0x0010000000000000000000000000000000000000", - "value" : "0x0" - }, - "result" : { - "gasUsed" : "0x9c58", - "output" : "0x" - }, - "subtraces" : 0, - "traceAddress" : [ ], - "type" : "call" - } ], - "vmTrace" : null - }, -"id" : 2 + "jsonrpc": "2.0", + "result": { + "output": "0x", + "stateDiff": null, + "trace": [ + { + "action": { + "callType": "call", + "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", + "gas": "0xffabba", + "input": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002", + "to": "0x0010000000000000000000000000000000000000", + "value": "0x0" + }, + "result": { + "gasUsed": "0x9c58", + "output": "0x" + }, + "subtraces": 0, + "traceAddress": [], + "type": "call" + } + ], + "vmTrace": null + }, + "id": 2 } ``` diff --git a/services/reference/_partials/trace-methods/_trace_call-returns.mdx b/services/reference/_partials/trace-methods/_trace_call-returns.mdx index c9bc6c98e2f..2b8fea0fb8c 100644 --- a/services/reference/_partials/trace-methods/_trace_call-returns.mdx +++ b/services/reference/_partials/trace-methods/_trace_call-returns.mdx @@ -1,2 +1 @@ - `result`: A trace object that includes the [`trace`](../../ethereum/json-rpc-methods/trace-methods/index.md#trace) and [`stateDiff`](../../ethereum/json-rpc-methods/trace-methods/index.md#statediff). - diff --git a/services/reference/_partials/trace-methods/_trace_callmany-description.mdx b/services/reference/_partials/trace-methods/_trace_callmany-description.mdx index af35f26cfec..06d6c293e30 100644 --- a/services/reference/_partials/trace-methods/_trace_callmany-description.mdx +++ b/services/reference/_partials/trace-methods/_trace_callmany-description.mdx @@ -1,2 +1 @@ Performs multiple call-traces on top of the same block. You can analyze the interactions between different transactions and contracts. - diff --git a/services/reference/_partials/trace-methods/_trace_callmany-example.mdx b/services/reference/_partials/trace-methods/_trace_callmany-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/trace-methods/_trace_callmany-example.mdx +++ b/services/reference/_partials/trace-methods/_trace_callmany-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/trace-methods/_trace_callmany-parameters.mdx b/services/reference/_partials/trace-methods/_trace_callmany-parameters.mdx index 3185d971804..8c9f4fc4d6a 100644 --- a/services/reference/_partials/trace-methods/_trace_callmany-parameters.mdx +++ b/services/reference/_partials/trace-methods/_trace_callmany-parameters.mdx @@ -1,3 +1,2 @@ - `block parameter`: _[Required]_ The hexadecimal block number, or the string `latest`, `earliest`, or `pending`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - `options`: A list of tracing options. Tracing options are [`trace`](../../ethereum/json-rpc-methods/trace-methods/index.md#trace) and [`stateDiff`](../../ethereum/json-rpc-methods/trace-methods/index.md#statediff). Specify both options or none. - diff --git a/services/reference/_partials/trace-methods/_trace_callmany-request.mdx b/services/reference/_partials/trace-methods/_trace_callmany-request.mdx index a1d3d4e38de..6a3403a0933 100644 --- a/services/reference/_partials/trace-methods/_trace_callmany-request.mdx +++ b/services/reference/_partials/trace-methods/_trace_callmany-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"trace_callMany","params":[[[{"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1","to":"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b","value":"0x186a0"},["trace"]],[{"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1","to":"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b","value":"0x186a0"},["trace"]]],"latest"],"latest"],"id":1} - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "trace_callMany", "params": [[[{"from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1", "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "value": "0x186a0"}, ["trace"]], [{"from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1", "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "value": "0x186a0"}, ["trace"]]], "latest"], "latest"], "id": 1} +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"trace_callMany","params":[[[{"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1","to":"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b","value":"0x186a0"},["trace"]],[{"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1","to":"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b","value":"0x186a0"},["trace"]]],"latest"],"latest"],"id":1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "trace_callMany", "params": [[[{"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1","to":"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "value": "0x186a0"}, ["trace"]], [{"from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1", "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "value": "0x186a0"}, ["trace"]]], "latest"], "latest"], "id": 1}' +``` - diff --git a/services/reference/_partials/trace-methods/_trace_callmany-response.mdx b/services/reference/_partials/trace-methods/_trace_callmany-response.mdx index 1658dc2bcad..4ebf9b89c36 100644 --- a/services/reference/_partials/trace-methods/_trace_callmany-response.mdx +++ b/services/reference/_partials/trace-methods/_trace_callmany-response.mdx @@ -1,59 +1,63 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```json { - "jsonrpc": "2.0", - "result": [ - { - "output" : "0x", - "stateDiff" : null, - "trace" : [ { - "action" : { - "callType" : "call", - "from" : "0x407d73d8a49eeb85d32cf465507dd71d507100c1", - "gas" : "0x1dcd12f8", - "input" : "0x", - "to" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", - "value" : "0x186a0" - }, - "result" : { - "gasUsed" : "0x0", - "output" : "0x" - }, - "subtraces" : 0, - "traceAddress" : [ ], - "type" : "call" - } ], - "vmTrace" : null - }, + "jsonrpc": "2.0", + "result": [ { - "output" : "0x", - "stateDiff" : null, - "trace" : [ { - "action" : { - "callType" : "call", - "from" : "0x407d73d8a49eeb85d32cf465507dd71d507100c1", - "gas" : "0x1dcd12f8", - "input" : "0x", - "to" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", - "value" : "0x186a0" - }, - "result" : { - "gasUsed" : "0x0", - "output" : "0x" - }, - "subtraces" : 0, - "traceAddress" : [ ], - "type" : "call" - } ], - "vmTrace" : null + "output": "0x", + "stateDiff": null, + "trace": [ + { + "action": { + "callType": "call", + "from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "gas": "0x1dcd12f8", + "input": "0x", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value": "0x186a0" + }, + "result": { + "gasUsed": "0x0", + "output": "0x" + }, + "subtraces": 0, + "traceAddress": [], + "type": "call" + } + ], + "vmTrace": null }, + { + "output": "0x", + "stateDiff": null, + "trace": [ + { + "action": { + "callType": "call", + "from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "gas": "0x1dcd12f8", + "input": "0x", + "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value": "0x186a0" + }, + "result": { + "gasUsed": "0x0", + "output": "0x" + }, + "subtraces": 0, + "traceAddress": [], + "type": "call" + } + ], + "vmTrace": null + } ], -"id" : 1 + "id": 1 } ``` diff --git a/services/reference/_partials/trace-methods/_trace_callmany-returns.mdx b/services/reference/_partials/trace-methods/_trace_callmany-returns.mdx index c9bc6c98e2f..2b8fea0fb8c 100644 --- a/services/reference/_partials/trace-methods/_trace_callmany-returns.mdx +++ b/services/reference/_partials/trace-methods/_trace_callmany-returns.mdx @@ -1,2 +1 @@ - `result`: A trace object that includes the [`trace`](../../ethereum/json-rpc-methods/trace-methods/index.md#trace) and [`stateDiff`](../../ethereum/json-rpc-methods/trace-methods/index.md#statediff). - diff --git a/services/reference/_partials/trace-methods/_trace_filter-description.mdx b/services/reference/_partials/trace-methods/_trace_filter-description.mdx index d07297ed86b..467bf68707f 100644 --- a/services/reference/_partials/trace-methods/_trace_filter-description.mdx +++ b/services/reference/_partials/trace-methods/_trace_filter-description.mdx @@ -1,2 +1 @@ Returns traces matching the specified filter. The response is limited to 10000 traces per response. - diff --git a/services/reference/_partials/trace-methods/_trace_filter-example.mdx b/services/reference/_partials/trace-methods/_trace_filter-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/trace-methods/_trace_filter-example.mdx +++ b/services/reference/_partials/trace-methods/_trace_filter-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/trace-methods/_trace_filter-parameters.mdx b/services/reference/_partials/trace-methods/_trace_filter-parameters.mdx index 2e2c765214f..3072c6e18aa 100644 --- a/services/reference/_partials/trace-methods/_trace_filter-parameters.mdx +++ b/services/reference/_partials/trace-methods/_trace_filter-parameters.mdx @@ -5,4 +5,3 @@ - `toAddress`: _[optional]_ Include only traces with this destination address. - `after`: _[optional]_ The offset trace number. - `count`: _[optional]_ Number of traces to display in a batch. - diff --git a/services/reference/_partials/trace-methods/_trace_filter-request.mdx b/services/reference/_partials/trace-methods/_trace_filter-request.mdx index a045ff06ddd..3d7b0ee977b 100644 --- a/services/reference/_partials/trace-methods/_trace_filter-request.mdx +++ b/services/reference/_partials/trace-methods/_trace_filter-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"trace_filter","params":[{"fromBlock":"0x1","toBlock":"0x21","after":2,"count":2,"fromAddress":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"]}],"id":415}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "trace_filter", "params": [{"fromBlock": "0x1", "toBlock": "0x21", "after": 2, "count": 2, "fromAddress": ["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"]}], "id": 415}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"trace_filter","params":[{"fromBlock":"0x1","toBlock":"0x21","after":2,"count":2,"fromAddress":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"]}],"id":415}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "trace_filter", "params": [{"fromBlock": "0x1", "toBlock": "0x21", "after": 2, "count":2, "fromAddress": ["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"]}], "id": 415}' +``` - diff --git a/services/reference/_partials/trace-methods/_trace_filter-response.mdx b/services/reference/_partials/trace-methods/_trace_filter-response.mdx index 5460db1073d..66ab946e83e 100644 --- a/services/reference/_partials/trace-methods/_trace_filter-response.mdx +++ b/services/reference/_partials/trace-methods/_trace_filter-response.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -57,4 +57,3 @@ import TabItem from '@theme/TabItem'; - diff --git a/services/reference/_partials/trace-methods/_trace_filter-returns.mdx b/services/reference/_partials/trace-methods/_trace_filter-returns.mdx index 6317512cab6..1d6de706fd8 100644 --- a/services/reference/_partials/trace-methods/_trace_filter-returns.mdx +++ b/services/reference/_partials/trace-methods/_trace_filter-returns.mdx @@ -1,2 +1 @@ A [`trace`](../../ethereum/json-rpc-methods/trace-methods/index.md#trace) list that matches the supplied filter. - diff --git a/services/reference/_partials/trace-methods/_trace_transaction-description.mdx b/services/reference/_partials/trace-methods/_trace_transaction-description.mdx index 58ad60458aa..829972e0fc1 100644 --- a/services/reference/_partials/trace-methods/_trace_transaction-description.mdx +++ b/services/reference/_partials/trace-methods/_trace_transaction-description.mdx @@ -1,2 +1 @@ Provides transaction processing of type [`trace`](../../ethereum/json-rpc-methods/trace-methods/index.md#trace) for the specified transaction. Use this API to improve smart contract performance by analyzing its internal transactions and execution steps. You can use this information to identify bottlenecks and optimize the contract for better performance. - diff --git a/services/reference/_partials/trace-methods/_trace_transaction-example.mdx b/services/reference/_partials/trace-methods/_trace_transaction-example.mdx index 200396c75fa..47f187cb22e 100644 --- a/services/reference/_partials/trace-methods/_trace_transaction-example.mdx +++ b/services/reference/_partials/trace-methods/_trace_transaction-example.mdx @@ -1,2 +1 @@ -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). - +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/_partials/trace-methods/_trace_transaction-parameters.mdx b/services/reference/_partials/trace-methods/_trace_transaction-parameters.mdx index bb10a6574d6..0e885814b79 100644 --- a/services/reference/_partials/trace-methods/_trace_transaction-parameters.mdx +++ b/services/reference/_partials/trace-methods/_trace_transaction-parameters.mdx @@ -1,2 +1 @@ - `transaction hash`: _[Required]_ The transaction hash. - diff --git a/services/reference/_partials/trace-methods/_trace_transaction-request.mdx b/services/reference/_partials/trace-methods/_trace_transaction-request.mdx index 62d8c460715..b195952d4f2 100644 --- a/services/reference/_partials/trace-methods/_trace_transaction-request.mdx +++ b/services/reference/_partials/trace-methods/_trace_transaction-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "method": "trace_transaction","params": ["0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7"],"id": 1}' - ``` +```bash +curl https://mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "trace_transaction","params": ["0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7"],"id": 1}' +``` - ```bash - wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "trace_transaction","params": ["0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7"],"id": 1}' - ``` +```bash +wscat -c wss://mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "trace_transaction", "params": ["0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7"], "id": 1}' +``` - diff --git a/services/reference/_partials/trace-methods/_trace_transaction-response.mdx b/services/reference/_partials/trace-methods/_trace_transaction-response.mdx index 9fd60a69158..c279214afaa 100644 --- a/services/reference/_partials/trace-methods/_trace_transaction-response.mdx +++ b/services/reference/_partials/trace-methods/_trace_transaction-response.mdx @@ -1,37 +1,37 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```json { - "jsonrpc": "2.0", - "result": [ - { - "action": { - "callType": "call", - "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", - "gas": "0xffad82", - "input": "0x0000000000000000000000000000000000000999", - "to": "0x0020000000000000000000000000000000000000", - "value": "0x0" - }, - "blockHash": "0x71512d31e18f828cef069a87bc2c7514a8ca334f9ee72625efdf5cc2d43768dd", - "blockNumber": 6, - "result": { - "gasUsed": "0x7536", - "output": "0x" - }, - "subtraces": 1, - "traceAddress": [], - "transactionHash": "0x91eeabc671e2dd2b1c8ddebb46ba59e8cb3e7d189f80bcc868a9787728c6e59e", - "transactionPosition": 0, - "type": "call" + "jsonrpc": "2.0", + "result": [ + { + "action": { + "callType": "call", + "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", + "gas": "0xffad82", + "input": "0x0000000000000000000000000000000000000999", + "to": "0x0020000000000000000000000000000000000000", + "value": "0x0" }, + "blockHash": "0x71512d31e18f828cef069a87bc2c7514a8ca334f9ee72625efdf5cc2d43768dd", + "blockNumber": 6, + "result": { + "gasUsed": "0x7536", + "output": "0x" + }, + "subtraces": 1, + "traceAddress": [], + "transactionHash": "0x91eeabc671e2dd2b1c8ddebb46ba59e8cb3e7d189f80bcc868a9787728c6e59e", + "transactionPosition": 0, + "type": "call" + } + ] } ``` - diff --git a/services/reference/_partials/trace-methods/_trace_transaction-returns.mdx b/services/reference/_partials/trace-methods/_trace_transaction-returns.mdx index 66b48622ff9..3887d10abb3 100644 --- a/services/reference/_partials/trace-methods/_trace_transaction-returns.mdx +++ b/services/reference/_partials/trace-methods/_trace_transaction-returns.mdx @@ -1,2 +1 @@ - A list of [traces](../../ethereum/json-rpc-methods/trace-methods/index.md#trace) in the order called by the transaction. - diff --git a/services/reference/arbitrum/index.md b/services/reference/arbitrum/index.md index f5b0fc5646c..d99e24f604e 100644 --- a/services/reference/arbitrum/index.md +++ b/services/reference/arbitrum/index.md @@ -8,7 +8,7 @@ import CardList from '@site/src/components/CardList' :::note Failover protection -Arbitrum [failover support](../../concepts/failover-protection.md) is available for customers on the Growth or Custom plans. +Arbitrum [failover support](../../concepts/failover-protection.md) is available for customers on the Growth or Custom plans. Arbitrum failover support is available on Mainnet only. Calls to the network are routed to [partner infrastructure providers](#partners-and-privacy-policies). @@ -24,11 +24,11 @@ MetaMask. :::info See also - View the [official Arbitrum docs](https://docs.arbitrum.io/) for more information about building on the Arbitrum blockchain. -- View the [differences between developing on Ethereum versus Arbitrum](https://docs.arbitrum.io/for-devs/concepts/differences-between-arbitrum-ethereum/overview). +- View the [differences between developing on Ethereum versus Arbitrum](https://docs.arbitrum.io/for-devs/concepts/differences-between-arbitrum-ethereum/overview). ::: -Select one of the following options to get started with the Arbitrum network: +Select one of the following options to get started with the Arbitrum network: ```bash curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_accounts", "params":[], "id": 1}' ``` ```bash -wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` - - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_blocknumber-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_blocknumber-request.mdx index f808ed2d64a..24d8dcf6b91 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_blocknumber-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_blocknumber-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ```bash -wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` - - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_call-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_call-request.mdx index 66f01ac5382..f9ca4b8e300 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_call-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_call-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_chainid-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_chainid-request.mdx index d48d0c6ced9..147f568816c 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_chainid-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_chainid-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` ```bash -wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` - - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_createaccesslist-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_createaccesslist-request.mdx index 76ca5cb011e..f5ed944d37a 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_createaccesslist-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_createaccesslist-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"method":"eth_createAccessList","params":[{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"],"id":1,"jsonrpc":"2.0"}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"], "id": 1}' ``` ```bash -wscat -c wss:///arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"method":"eth_createAccessList","params":[{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"],"id":1,"jsonrpc":"2.0"}' +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_createAccessList", "params": [{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"], "id": 1}' ``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_estimategas-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_estimategas-request.mdx index f5814401b22..5ff868a54e0 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_estimategas-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_estimategas-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_feehistory-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_feehistory-request.mdx index 3720c4ac8ad..2b1f9bc12b9 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_feehistory-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_feehistory-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20, 30]], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x5", "latest", []],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", []], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_gasprice-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_gasprice-request.mdx index 67917cdfaee..3b852a82e48 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_gasprice-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_gasprice-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getbalance-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getbalance-request.mdx index 115abb8508c..a3c1a50b2b9 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getbalance-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getbalance-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getblockbyhash-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getblockbyhash-request.mdx index e50092f03d2..b547881d30b 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getblockbyhash-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getblockbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getblockbynumber-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getblockbynumber-request.mdx index 57bf130e91f..facb4ec7920 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getblockbynumber-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getblockbynumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x5BAD55",false],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params": ["0x5BAD55",false],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx index 9d51c90551c..599a2b3835d 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx index 386590946ca..73ecfaa760e 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getcode-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getcode-request.mdx index b8e430bae01..28eac4a69e8 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getcode-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getcode-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id":1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getlogs-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getlogs-request.mdx index ccd6549d183..15a02e5a257 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getlogs-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getlogs-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics": ["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getproof-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getproof-request.mdx index 8a29a385018..bfef07a9de8 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getproof-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getproof-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0","method": "eth_getProof","id": 1,"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getProof", "id": 1, "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getProof","params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getstorageat-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getstorageat-request.mdx index 891b89a3b2c..d9f2589eb23 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getstorageat-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getstorageat-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx index 09d9130d2b5..72814ef983e 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx index e0d03098ba2..5e12486daf7 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionbyhash-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionbyhash-request.mdx index 393666a653d..2a25a7d4502 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionbyhash-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_gettransactioncount-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_gettransactioncount-request.mdx index 6d2fd85ba21..d762fcdd064 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_gettransactioncount-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_gettransactioncount-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionreceipt-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionreceipt-request.mdx index e8fc7eb769d..02d27ca5cbf 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionreceipt-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_gettransactionreceipt-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx index 67a7844a9ac..76f9a5a567a 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx index b09fe6d9159..15cba3d1794 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx index 4bc9c5960c7..f29bd4deaa3 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id":1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method":"eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx index 1b583da2fa9..ba53cb5c2fc 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx index cd3e3eae3ed..67162b7cf7c 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/d23391e03c6d40738530a1b4b679e66e -x '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/d23391e03c6d40738530a1b4b679e66e -x '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_sendrawtransaction-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_sendrawtransaction-request.mdx index 26e36bdc1db..5b5cf8de87f 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_sendrawtransaction-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_sendrawtransaction-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_eth_syncing-request.mdx b/services/reference/arbitrum/json-rpc-methods/_eth_syncing-request.mdx index 53148501103..e6654567100 100644 --- a/services/reference/arbitrum/json-rpc-methods/_eth_syncing-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_eth_syncing-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_net_listening-request.mdx b/services/reference/arbitrum/json-rpc-methods/_net_listening-request.mdx index 01018ca71f6..4a3ffc00b31 100644 --- a/services/reference/arbitrum/json-rpc-methods/_net_listening-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_net_listening-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_net_peercount-request.mdx b/services/reference/arbitrum/json-rpc-methods/_net_peercount-request.mdx index 00b571451d2..da81e409d33 100644 --- a/services/reference/arbitrum/json-rpc-methods/_net_peercount-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_net_peercount-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_net_version-request.mdx b/services/reference/arbitrum/json-rpc-methods/_net_version-request.mdx index aed15ed7947..716fcef8e02 100644 --- a/services/reference/arbitrum/json-rpc-methods/_net_version-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_net_version-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/_web3_clientversion-request.mdx b/services/reference/arbitrum/json-rpc-methods/_web3_clientversion-request.mdx index 2b2c410b85b..24190675d80 100644 --- a/services/reference/arbitrum/json-rpc-methods/_web3_clientversion-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/_web3_clientversion-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/arbitrum/json-rpc-methods/eth_accounts.mdx b/services/reference/arbitrum/json-rpc-methods/eth_accounts.mdx index 0cc7304b6ec..0dafbcb7389 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_accounts.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_accounts.mdx @@ -2,39 +2,39 @@ title: "eth_accounts" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_accounts-description.mdx"; +import Description from "/services/reference/_partials/_eth_accounts-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_accounts-example.mdx"; +import Example from "/services/reference/_partials/_eth_accounts-example.mdx" ### Request -import Request from "./_eth_accounts-request.mdx"; +import Request from "./_eth_accounts-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_accounts-response.mdx"; +import Response from "/services/reference/_partials/_eth_accounts-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_blocknumber.mdx b/services/reference/arbitrum/json-rpc-methods/eth_blocknumber.mdx index 7896c8c46f6..076b45d83ce 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_blocknumber.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_blocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx" ### Request -import Request from "./_eth_blocknumber-request.mdx"; +import Request from "./_eth_blocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_call.mdx b/services/reference/arbitrum/json-rpc-methods/eth_call.mdx index 88b3857775d..5c6ebee7de3 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_call.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_call.mdx @@ -2,39 +2,39 @@ title: "eth_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_call-description.mdx"; +import Description from "/services/reference/_partials/_eth_call-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_call-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_call-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_call-example.mdx"; +import Example from "/services/reference/_partials/_eth_call-example.mdx" ### Request -import Request from "./_eth_call-request.mdx"; +import Request from "./_eth_call-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_call-response.mdx"; +import Response from "/services/reference/_partials/_eth_call-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_chainid.mdx b/services/reference/arbitrum/json-rpc-methods/eth_chainid.mdx index e544b1003a4..a6f446ad268 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_chainid.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_chainid.mdx @@ -2,39 +2,39 @@ title: "eth_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_chainid-description.mdx"; +import Description from "/services/reference/_partials/_eth_chainid-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_chainid-example.mdx"; +import Example from "/services/reference/_partials/_eth_chainid-example.mdx" ### Request -import Request from "./_eth_chainid-request.mdx"; +import Request from "./_eth_chainid-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_chainid-response.mdx"; +import Response from "/services/reference/_partials/_eth_chainid-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_coinbase.mdx b/services/reference/arbitrum/json-rpc-methods/eth_coinbase.mdx index e9bb3ff61cd..8957df7e522 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_coinbase.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_coinbase.mdx @@ -2,9 +2,9 @@ title: "eth_coinbase" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_coinbase-description.mdx"; +import Description from "/services/reference/_partials/_eth_coinbase-description.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_createaccesslist.mdx b/services/reference/arbitrum/json-rpc-methods/eth_createaccesslist.mdx index 4f0cc239524..cb0d52a0fd4 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_createaccesslist.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_createaccesslist.mdx @@ -2,39 +2,39 @@ title: "eth_createAccessList" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_createaccesslist-description.mdx"; +import Description from "/services/reference/_partials/_eth_createaccesslist-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_createaccesslist-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_createaccesslist-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_createaccesslist-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_createaccesslist-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_createaccesslist-example.mdx"; +import Example from "/services/reference/_partials/_eth_createaccesslist-example.mdx" ### Request -import Request from "./_eth_createaccesslist-request.mdx"; +import Request from "./_eth_createaccesslist-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_createaccesslist-response.mdx"; +import Response from "/services/reference/_partials/_eth_createaccesslist-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_estimategas.mdx b/services/reference/arbitrum/json-rpc-methods/eth_estimategas.mdx index af6c5ad77da..47c6b01804e 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_estimategas.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_estimategas.mdx @@ -2,39 +2,39 @@ title: "eth_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_estimategas-description.mdx"; +import Description from "/services/reference/_partials/_eth_estimategas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_estimategas-example.mdx"; +import Example from "/services/reference/_partials/_eth_estimategas-example.mdx" ### Request -import Request from "./_eth_estimategas-request.mdx"; +import Request from "./_eth_estimategas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_estimategas-response.mdx"; +import Response from "/services/reference/_partials/_eth_estimategas-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_feehistory.mdx b/services/reference/arbitrum/json-rpc-methods/eth_feehistory.mdx index 21e4962e114..9aafc564c46 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_feehistory.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_feehistory.mdx @@ -2,39 +2,39 @@ title: "eth_feeHistory" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_feehistory-description.mdx"; +import Description from "/services/reference/_partials/_eth_feehistory-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_feehistory-example.mdx"; +import Example from "/services/reference/_partials/_eth_feehistory-example.mdx" ### Request -import Request from "./_eth_feehistory-request.mdx"; +import Request from "./_eth_feehistory-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_feehistory-response.mdx"; +import Response from "/services/reference/_partials/_eth_feehistory-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_gasprice.mdx b/services/reference/arbitrum/json-rpc-methods/eth_gasprice.mdx index c602d61c293..8980dcc8a39 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_gasprice.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_gasprice.mdx @@ -2,39 +2,39 @@ title: "eth_gasPrice" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gasprice-description.mdx"; +import Description from "/services/reference/_partials/_eth_gasprice-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gasprice-example.mdx"; +import Example from "/services/reference/_partials/_eth_gasprice-example.mdx" ### Request -import Request from "./_eth_gasprice-request.mdx"; +import Request from "./_eth_gasprice-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gasprice-response.mdx"; +import Response from "/services/reference/_partials/_eth_gasprice-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getbalance.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getbalance.mdx index c50eba5fd61..1ff5a0d31c8 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getbalance.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getbalance.mdx @@ -2,39 +2,39 @@ title: "eth_getBalance" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getbalance-description.mdx"; +import Description from "/services/reference/_partials/_eth_getbalance-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getbalance-example.mdx"; +import Example from "/services/reference/_partials/_eth_getbalance-example.mdx" ### Request -import Request from "./_eth_getbalance-request.mdx"; +import Request from "./_eth_getbalance-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getbalance-response.mdx"; +import Response from "/services/reference/_partials/_eth_getbalance-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getblockbyhash.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getblockbyhash.mdx index ad555110b71..970e6c27704 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getblockbyhash.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getblockbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx" ### Request -import Request from "./_eth_getblockbyhash-request.mdx"; +import Request from "./_eth_getblockbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getblockbynumber.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getblockbynumber.mdx index 2faabaa3e86..f14e34f1531 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getblockbynumber.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getblockbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx" ### Request -import Request from "./_eth_getblockbynumber-request.mdx"; +import Request from "./_eth_getblockbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx index aacb2e0e3af..36944d31e1f 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbyhash-request.mdx"; +import Request from "./_eth_getblocktransactioncountbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx index 161e7fe344b..c355e33cb53 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbynumber-request.mdx"; +import Request from "./_eth_getblocktransactioncountbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getcode.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getcode.mdx index 8364a077f09..ace0da8cb26 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getcode.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getcode.mdx @@ -2,39 +2,39 @@ title: "eth_getCode" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getcode-description.mdx"; +import Description from "/services/reference/_partials/_eth_getcode-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getcode-example.mdx"; +import Example from "/services/reference/_partials/_eth_getcode-example.mdx" ### Request -import Request from "./_eth_getcode-request.mdx"; +import Request from "./_eth_getcode-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getcode-response.mdx"; +import Response from "/services/reference/_partials/_eth_getcode-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getlogs.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getlogs.mdx index 546d66f9148..4a1c1a031c4 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getlogs.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getlogs-description.mdx"; +import Description from "/services/reference/_partials/_eth_getlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getlogs-example.mdx"; +import Example from "/services/reference/_partials/_eth_getlogs-example.mdx" ### Request -import Request from "./_eth_getlogs-request.mdx"; +import Request from "./_eth_getlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getlogs-response.mdx"; +import Response from "/services/reference/_partials/_eth_getlogs-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getproof.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getproof.mdx index 7cb028bd44f..0d7b5743dc4 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getproof.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getproof.mdx @@ -2,39 +2,39 @@ title: "eth_getProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getproof-description.mdx"; +import Description from "/services/reference/_partials/_eth_getproof-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getproof-example.mdx"; +import Example from "/services/reference/_partials/_eth_getproof-example.mdx" ### Request -import Request from "./_eth_getproof-request.mdx"; +import Request from "./_eth_getproof-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getproof-response.mdx"; +import Response from "/services/reference/_partials/_eth_getproof-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getstorageat.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getstorageat.mdx index aee85d0fde8..d91e20b3979 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getstorageat.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getstorageat.mdx @@ -2,39 +2,39 @@ title: "eth_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx"; +import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx"; +import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx" ### Request -import Request from "./_eth_getstorageat-request.mdx"; +import Request from "./_eth_getstorageat-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx"; +import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx b/services/reference/arbitrum/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx index 5422dc7f552..e04f9c75a5c 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx b/services/reference/arbitrum/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx index 6861fb566a4..28ba85246a2 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_gettransactionbyhash.mdx b/services/reference/arbitrum/json-rpc-methods/eth_gettransactionbyhash.mdx index 1adc6ff1eb4..28548a1fd58 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_gettransactionbyhash.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_gettransactionbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx" ### Request -import Request from "./_eth_gettransactionbyhash-request.mdx"; +import Request from "./_eth_gettransactionbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_gettransactioncount.mdx b/services/reference/arbitrum/json-rpc-methods/eth_gettransactioncount.mdx index 73985353185..9cf5c71e500 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_gettransactioncount.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_gettransactioncount.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx" ### Request -import Request from "./_eth_gettransactioncount-request.mdx"; +import Request from "./_eth_gettransactioncount-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_gettransactionreceipt.mdx b/services/reference/arbitrum/json-rpc-methods/eth_gettransactionreceipt.mdx index 370d08c0402..1ab2ba12676 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_gettransactionreceipt.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_gettransactionreceipt.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx" ### Request -import Request from "./_eth_gettransactionreceipt-request.mdx"; +import Request from "./_eth_gettransactionreceipt-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getunclebyblockhashandindex.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getunclebyblockhashandindex.mdx index dce1f045d95..d6a9a959a37 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getunclebyblockhashandindex.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getunclebyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblockhashandindex-request.mdx"; +import Request from "./_eth_getunclebyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx index 321c22c4ce0..07c458cb7ad 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblocknumberandindex-request.mdx"; +import Request from "./_eth_getunclebyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getunclecountbyblockhash.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getunclecountbyblockhash.mdx index c21e8c283a8..298b5c520e8 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getunclecountbyblockhash.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getunclecountbyblockhash.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblockhash-request.mdx"; +import Request from "./_eth_getunclecountbyblockhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_getunclecountbyblocknumber.mdx b/services/reference/arbitrum/json-rpc-methods/eth_getunclecountbyblocknumber.mdx index 824fdf8de1b..2cc5dbbf753 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_getunclecountbyblocknumber.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_getunclecountbyblocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblocknumber-request.mdx"; +import Request from "./_eth_getunclecountbyblocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_maxpriorityfeepergas.mdx b/services/reference/arbitrum/json-rpc-methods/eth_maxpriorityfeepergas.mdx index 87e39538aaf..6f818052ae7 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_maxpriorityfeepergas.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_maxpriorityfeepergas.mdx @@ -2,39 +2,39 @@ title: "eth_maxPriorityFeePerGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx"; +import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx"; +import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx" ### Request -import Request from "./_eth_maxpriorityfeepergas-request.mdx"; +import Request from "./_eth_maxpriorityfeepergas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx"; +import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_sendrawtransaction.mdx b/services/reference/arbitrum/json-rpc-methods/eth_sendrawtransaction.mdx index 4dfc4e6f296..dd39a5bafd4 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_sendrawtransaction.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_sendrawtransaction.mdx @@ -2,39 +2,39 @@ title: "eth_sendRawTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx"; +import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx" ### Request -import Request from "./_eth_sendrawtransaction-request.mdx"; +import Request from "./_eth_sendrawtransaction-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx"; +import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_sendtransaction.mdx b/services/reference/arbitrum/json-rpc-methods/eth_sendtransaction.mdx index ac6ebfd02dd..5c13a1d5c8f 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_sendtransaction.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_sendtransaction.mdx @@ -2,10 +2,9 @@ title: "eth_sendTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx" - diff --git a/services/reference/arbitrum/json-rpc-methods/eth_sign.mdx b/services/reference/arbitrum/json-rpc-methods/eth_sign.mdx index 073b1040681..f8c6a17df92 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_sign.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_sign.mdx @@ -2,9 +2,9 @@ title: "eth_sign" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sign-description.mdx"; +import Description from "/services/reference/_partials/_eth_sign-description.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/eth_syncing.mdx b/services/reference/arbitrum/json-rpc-methods/eth_syncing.mdx index bfb89e8c209..7ffbcd44560 100644 --- a/services/reference/arbitrum/json-rpc-methods/eth_syncing.mdx +++ b/services/reference/arbitrum/json-rpc-methods/eth_syncing.mdx @@ -2,39 +2,39 @@ title: "eth_syncing" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_syncing-description.mdx"; +import Description from "/services/reference/_partials/_eth_syncing-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_syncing-example.mdx"; +import Example from "/services/reference/_partials/_eth_syncing-example.mdx" ### Request -import Request from "./_eth_syncing-request.mdx"; +import Request from "./_eth_syncing-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_syncing-response.mdx"; +import Response from "/services/reference/_partials/_eth_syncing-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/index.md b/services/reference/arbitrum/json-rpc-methods/index.md index cba5fc2eb4d..6e653fb7242 100644 --- a/services/reference/arbitrum/json-rpc-methods/index.md +++ b/services/reference/arbitrum/json-rpc-methods/index.md @@ -7,6 +7,6 @@ description: Supported standard Ethereum methods on Arbitrum network. The standard Ethereum methods documented in this section are supported by Infura on the Arbitrum network. -The Arbitrum API aims to be a superset of the Ethereum JSON-RPC specification and supports all the standard Ethereum JSON-RPC-APIs. +The Arbitrum API aims to be a superset of the Ethereum JSON-RPC specification and supports all the standard Ethereum JSON-RPC-APIs. When interacting with the API, you can expect all the usual Ethereum JSON-RPC specification fields, [and some extra ones](https://developer.offchainlabs.com/docs/differences_overview#json-rpc-api) used to display information unique to Arbitrum. diff --git a/services/reference/arbitrum/json-rpc-methods/net_peercount.mdx b/services/reference/arbitrum/json-rpc-methods/net_peercount.mdx index 9ff570e4c70..c0246b44d39 100644 --- a/services/reference/arbitrum/json-rpc-methods/net_peercount.mdx +++ b/services/reference/arbitrum/json-rpc-methods/net_peercount.mdx @@ -2,39 +2,39 @@ title: "net_peerCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_peercount-description.mdx"; +import Description from "/services/reference/_partials/_net_peercount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_peercount-parameters.mdx"; +import Params from "/services/reference/_partials/_net_peercount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_peercount-returns.mdx"; +import Returns from "/services/reference/_partials/_net_peercount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_peercount-example.mdx"; +import Example from "/services/reference/_partials/_net_peercount-example.mdx" ### Request -import Request from "./_net_peercount-request.mdx"; +import Request from "./_net_peercount-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_peercount-response.mdx"; +import Response from "/services/reference/_partials/_net_peercount-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/net_version.mdx b/services/reference/arbitrum/json-rpc-methods/net_version.mdx index d55ab80402d..1d6c0080c60 100644 --- a/services/reference/arbitrum/json-rpc-methods/net_version.mdx +++ b/services/reference/arbitrum/json-rpc-methods/net_version.mdx @@ -2,39 +2,39 @@ title: "net_version" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_version-description.mdx"; +import Description from "/services/reference/_partials/_net_version-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_version-parameters.mdx"; +import Params from "/services/reference/_partials/_net_version-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_version-returns.mdx"; +import Returns from "/services/reference/_partials/_net_version-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_version-example.mdx"; +import Example from "/services/reference/_partials/_net_version-example.mdx" ### Request -import Request from "./_net_version-request.mdx"; +import Request from "./_net_version-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_version-response.mdx"; +import Response from "/services/reference/_partials/_net_version-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx b/services/reference/arbitrum/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx index 81ac6bf4e4a..3063d6493e5 100644 --- a/services/reference/arbitrum/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx @@ -1,20 +1,19 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash -wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' ``` ```bash -wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' +wscat -c wss://arbitrum-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics": ["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' ``` - diff --git a/services/reference/arbitrum/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx b/services/reference/arbitrum/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx index ad76c17ec27..6cf58a5f02a 100644 --- a/services/reference/arbitrum/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx +++ b/services/reference/arbitrum/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx @@ -1,13 +1,12 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash -wscat -c wss://arbitrum-mainnet.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}' +wscat -c wss://arbitrum-mainnet.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}' ``` - - \ No newline at end of file + diff --git a/services/reference/arbitrum/json-rpc-methods/subscription-methods/eth_subscribe.mdx b/services/reference/arbitrum/json-rpc-methods/subscription-methods/eth_subscribe.mdx index 756de6bb212..d79d2a15bb3 100644 --- a/services/reference/arbitrum/json-rpc-methods/subscription-methods/eth_subscribe.mdx +++ b/services/reference/arbitrum/json-rpc-methods/subscription-methods/eth_subscribe.mdx @@ -2,39 +2,39 @@ title: "eth_subscribe" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/subscription-methods/_eth_subscribe-description.mdx"; +import Description from "/services/reference/_partials/subscription-methods/_eth_subscribe-description.mdx" ## Parameters -import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters-no-pending.mdx"; +import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters-no-pending.mdx" ## Returns -import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx"; +import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx" ## Example -import Example from "/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx"; +import Example from "/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx" ### Request -import Request from "./_eth_subscribe-request.mdx"; +import Request from "./_eth_subscribe-request.mdx" ### Response -import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx"; +import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx b/services/reference/arbitrum/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx index 180a40bbd87..6fe9ca4660e 100644 --- a/services/reference/arbitrum/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx +++ b/services/reference/arbitrum/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx @@ -2,39 +2,39 @@ title: "eth_unsubscribe" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-description.mdx"; +import Description from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-description.mdx" ## Parameters -import Params from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx"; +import Params from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx"; +import Returns from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx" ## Example -import Example from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx"; +import Example from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx" ### Request -import Request from "./_eth_unsubscribe-request.mdx"; +import Request from "./_eth_unsubscribe-request.mdx" ### Response -import Response from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx"; +import Response from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx" diff --git a/services/reference/arbitrum/json-rpc-methods/web3_clientversion.mdx b/services/reference/arbitrum/json-rpc-methods/web3_clientversion.mdx index 11997e5c36d..c5ee316d699 100644 --- a/services/reference/arbitrum/json-rpc-methods/web3_clientversion.mdx +++ b/services/reference/arbitrum/json-rpc-methods/web3_clientversion.mdx @@ -2,39 +2,39 @@ title: "web3_clientVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_web3_clientversion-description.mdx"; +import Description from "/services/reference/_partials/_web3_clientversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx"; +import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx"; +import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_web3_clientversion-example.mdx"; +import Example from "/services/reference/_partials/_web3_clientversion-example.mdx" ### Request -import Request from "./_web3_clientversion-request.mdx"; +import Request from "./_web3_clientversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_web3_clientversion-response.mdx"; +import Response from "/services/reference/_partials/_web3_clientversion-response.mdx" diff --git a/services/reference/arbitrum/quickstart.md b/services/reference/arbitrum/quickstart.md index b773dd49738..01951b0266a 100644 --- a/services/reference/arbitrum/quickstart.md +++ b/services/reference/arbitrum/quickstart.md @@ -25,9 +25,9 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params":[], "id": 1}' ``` ### Node (JavaScript) @@ -36,152 +36,151 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta #### Node Fetch -1. In your project folder, install the Node Fetch package using npm: +1. In your project folder, install the `node-fetch` package using npm:: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios -1. In your project folder, install the Axios package using npm: +1. In your project folder, install the `axios` package using npm: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require('axios'); - - axios.post('https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'eth_blockNumber', - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios") + + axios + .post("https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }) + .then((response) => { + console.log(response.data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Ethers 1. In your project folder, install the `ethers` package using npm: - ```bash - npm install ethers - `````` + ```bash + npm install ethers + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.js" - const ethers = require('ethers'); + ```javascript title="index.js" + const ethers = require("ethers"); - const provider = new ethers.providers.JsonRpcProvider('https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY'); + const provider = new ethers.providers.JsonRpcProvider("https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY"); - provider.getBlockNumber() - .then(blockNumber => { - console.log(blockNumber); - }) - .catch(error => { - console.error(error); - }); - ``` + provider.getBlockNumber() + .then(blockNumber => { + console.log(blockNumber)" + }) + .catch(error => { + console.error(error); + }); + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` 1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```python title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = 'https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY' + url = "https://arbitrum-mainnet.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + } - headers = {'content-type': 'application/json'} + headers = {"content-type": "application/json"} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` + ```bash + python index.py + ``` ## Next steps @@ -189,7 +188,7 @@ Now that you have successfully made a call to the Arbitrum network, you can expl by Infura. Here are some suggestions: - **Explore other Arbitrum APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Ethereum, Linea, Polygon, Optimism, and more. diff --git a/services/reference/avalanche-c-chain/index.md b/services/reference/avalanche-c-chain/index.md index 413ce92a245..6f2d23c47e8 100644 --- a/services/reference/avalanche-c-chain/index.md +++ b/services/reference/avalanche-c-chain/index.md @@ -1,13 +1,14 @@ --- description: Avalanche (C-Chain) network documentation. --- + import CardList from '@site/src/components/CardList' # Avalanche (C-Chain) :::note Failover protection -Avalanche (C-Chain) [failover support](../../concepts/failover-protection.md) is available for customers on the Growth or Custom plans. +Avalanche (C-Chain) [failover support](../../concepts/failover-protection.md) is available for customers on the Growth or Custom plans. Avalanche (C-Chain) failover support is available on Mainnet only. Calls to the network are routed to [partner infrastructure providers](#partners-and-privacy-policies). @@ -17,13 +18,13 @@ Avalanche is a Proof of Stake (PoS), layer 1 platform that features 3 built-in b The C-Chain supports the Ethereum Virtual Machine (EVM), allowing Ethereum developers to deploy Solidity smart contract dapps onto the C-Chain. Dapps can run on both Avalanche and Ethereum. Avalanche Platform's C-Chain is EVM-compatible, but -it is not identical. +it is not identical. :::info See also - View the [official Avalanche C-Chain documentation](https://docs.avax.network/build/dapp/c-chain-evm) for more information about building on - the Avalanche C-Chain. -- View the [differences between developing on Ethereum versus Avalanche C-Chain](https://docs.avax.network/build/dapp/launch-dapp#gotchas-and-things-to-look-out-for). + the Avalanche C-Chain. +- View the [differences between developing on Ethereum versus Avalanche C-Chain](https://docs.avax.network/build/dapp/launch-dapp#gotchas-and-things-to-look-out-for). ::: @@ -55,4 +56,4 @@ No personal information is sent as part of partner requests, only information ne For any parameters required in an RPC request, these could be the type that describe the method, addresses, gas, and session. -Liquify ([Privacy Policy](https://www.liquify.com/Liquify_RPC_PP.pdf)) is Infura's failover-protection partner and currently offer failover support for all Infura's Avalanche (C-Chain) methods. \ No newline at end of file +Liquify ([Privacy Policy](https://www.liquify.com/Liquify_RPC_PP.pdf)) is Infura's failover-protection partner and currently offer failover support for all Infura's Avalanche (C-Chain) methods. diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_accounts-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_accounts-request.mdx index c90bff795f2..f84e2175978 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_accounts-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_accounts-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` ```bash -wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` - - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_blocknumber-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_blocknumber-request.mdx index 1e45ea079bc..bee36f3e332 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_blocknumber-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_blocknumber-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ```bash -wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` - - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_call-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_call-request.mdx index 28b48f7eeab..7645add9b88 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_call-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_call-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0","method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_chainid-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_chainid-request.mdx index 9d9ea6d00bb..4fdef4eb012 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_chainid-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_chainid-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` ```bash -wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` - - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_estimategas-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_estimategas-request.mdx index 4d9c6f88596..5f380e554b2 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_estimategas-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_estimategas-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_feehistory-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_feehistory-request.mdx index 77ab247c8ce..dc1f0b62bec 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_feehistory-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_feehistory-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x5", "latest", []],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", []], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gasprice-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gasprice-request.mdx index d5c43352af8..149e5e9939e 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gasprice-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gasprice-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getbalance-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getbalance-request.mdx index 6bd6c5fa3bd..874d43cdd04 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getbalance-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getbalance-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblockbyhash-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblockbyhash-request.mdx index 2f8b4577360..be5de097544 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblockbyhash-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblockbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblockbynumber-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblockbynumber-request.mdx index 3de334d4574..fd3ff7d999c 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblockbynumber-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblockbynumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x5BAD55",false],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params": ["0x5BAD55",false],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx index d9157e5da05..a9798377d70 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx index f9541c8bf4b..62893f050c2 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getcode-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getcode-request.mdx index f2fe869e1c0..1a9116bcd7b 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getcode-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getcode-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id":1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getlogs-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getlogs-request.mdx index fc695347e8c..cee8dc2e34d 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getlogs-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getlogs-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getproof-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getproof-request.mdx index aae9321cb4f..43e83e14607 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getproof-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getproof-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0","method": "eth_getProof","id": 1,"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getProof", "id": 1, "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getProof","params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getstorageat-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getstorageat-request.mdx index d03862af308..b16743e7382 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getstorageat-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getstorageat-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx index 09bba910988..fc989e2d01a 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx index a008737fc3f..2c8206c5efa 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionbyhash-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionbyhash-request.mdx index 28a6b8be526..4096b3e5396 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionbyhash-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactioncount-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactioncount-request.mdx index 826a391091c..9cadfd178cc 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactioncount-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactioncount-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionreceipt-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionreceipt-request.mdx index 25b738c6cdb..ba53eb4d2b8 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionreceipt-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_gettransactionreceipt-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx index d5e13eee880..18b5a90ff27 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx index c1e70c8b85f..22c132a4608 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx index 67aaebc0d3a..8029b279d06 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx index e88e5537403..98673e94bd0 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx index 0b29754482e..48be08a9a86 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/d23391e03c6d40738530a1b4b679e66e -x '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/d23391e03c6d40738530a1b4b679e66e -x '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_sendrawtransaction-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_sendrawtransaction-request.mdx index d19bdf40f03..4322398c087 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_eth_sendrawtransaction-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_eth_sendrawtransaction-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_net_peercount-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_net_peercount-request.mdx index 01041d0c5c6..011d9a65484 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_net_peercount-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_net_peercount-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_net_version-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_net_version-request.mdx index 9874826ac9f..249deb46263 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_net_version-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_net_version-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/_web3_clientversion-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/_web3_clientversion-request.mdx index 679b9bd601a..325adbe8006 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/_web3_clientversion-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/_web3_clientversion-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_accounts.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_accounts.mdx index 0cc7304b6ec..0dafbcb7389 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_accounts.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_accounts.mdx @@ -2,39 +2,39 @@ title: "eth_accounts" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_accounts-description.mdx"; +import Description from "/services/reference/_partials/_eth_accounts-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_accounts-example.mdx"; +import Example from "/services/reference/_partials/_eth_accounts-example.mdx" ### Request -import Request from "./_eth_accounts-request.mdx"; +import Request from "./_eth_accounts-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_accounts-response.mdx"; +import Response from "/services/reference/_partials/_eth_accounts-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_blocknumber.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_blocknumber.mdx index 7896c8c46f6..076b45d83ce 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_blocknumber.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_blocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx" ### Request -import Request from "./_eth_blocknumber-request.mdx"; +import Request from "./_eth_blocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_call.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_call.mdx index 88b3857775d..5c6ebee7de3 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_call.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_call.mdx @@ -2,39 +2,39 @@ title: "eth_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_call-description.mdx"; +import Description from "/services/reference/_partials/_eth_call-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_call-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_call-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_call-example.mdx"; +import Example from "/services/reference/_partials/_eth_call-example.mdx" ### Request -import Request from "./_eth_call-request.mdx"; +import Request from "./_eth_call-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_call-response.mdx"; +import Response from "/services/reference/_partials/_eth_call-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_chainid.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_chainid.mdx index e544b1003a4..a6f446ad268 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_chainid.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_chainid.mdx @@ -2,39 +2,39 @@ title: "eth_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_chainid-description.mdx"; +import Description from "/services/reference/_partials/_eth_chainid-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_chainid-example.mdx"; +import Example from "/services/reference/_partials/_eth_chainid-example.mdx" ### Request -import Request from "./_eth_chainid-request.mdx"; +import Request from "./_eth_chainid-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_chainid-response.mdx"; +import Response from "/services/reference/_partials/_eth_chainid-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_coinbase.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_coinbase.mdx index e9bb3ff61cd..8957df7e522 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_coinbase.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_coinbase.mdx @@ -2,9 +2,9 @@ title: "eth_coinbase" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_coinbase-description.mdx"; +import Description from "/services/reference/_partials/_eth_coinbase-description.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_estimategas.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_estimategas.mdx index af6c5ad77da..47c6b01804e 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_estimategas.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_estimategas.mdx @@ -2,39 +2,39 @@ title: "eth_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_estimategas-description.mdx"; +import Description from "/services/reference/_partials/_eth_estimategas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_estimategas-example.mdx"; +import Example from "/services/reference/_partials/_eth_estimategas-example.mdx" ### Request -import Request from "./_eth_estimategas-request.mdx"; +import Request from "./_eth_estimategas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_estimategas-response.mdx"; +import Response from "/services/reference/_partials/_eth_estimategas-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_feehistory.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_feehistory.mdx index 21e4962e114..9aafc564c46 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_feehistory.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_feehistory.mdx @@ -2,39 +2,39 @@ title: "eth_feeHistory" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_feehistory-description.mdx"; +import Description from "/services/reference/_partials/_eth_feehistory-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_feehistory-example.mdx"; +import Example from "/services/reference/_partials/_eth_feehistory-example.mdx" ### Request -import Request from "./_eth_feehistory-request.mdx"; +import Request from "./_eth_feehistory-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_feehistory-response.mdx"; +import Response from "/services/reference/_partials/_eth_feehistory-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_gasprice.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_gasprice.mdx index c602d61c293..8980dcc8a39 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_gasprice.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_gasprice.mdx @@ -2,39 +2,39 @@ title: "eth_gasPrice" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gasprice-description.mdx"; +import Description from "/services/reference/_partials/_eth_gasprice-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gasprice-example.mdx"; +import Example from "/services/reference/_partials/_eth_gasprice-example.mdx" ### Request -import Request from "./_eth_gasprice-request.mdx"; +import Request from "./_eth_gasprice-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gasprice-response.mdx"; +import Response from "/services/reference/_partials/_eth_gasprice-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getbalance.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getbalance.mdx index c50eba5fd61..1ff5a0d31c8 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getbalance.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getbalance.mdx @@ -2,39 +2,39 @@ title: "eth_getBalance" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getbalance-description.mdx"; +import Description from "/services/reference/_partials/_eth_getbalance-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getbalance-example.mdx"; +import Example from "/services/reference/_partials/_eth_getbalance-example.mdx" ### Request -import Request from "./_eth_getbalance-request.mdx"; +import Request from "./_eth_getbalance-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getbalance-response.mdx"; +import Response from "/services/reference/_partials/_eth_getbalance-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblockbyhash.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblockbyhash.mdx index ad555110b71..970e6c27704 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblockbyhash.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblockbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx" ### Request -import Request from "./_eth_getblockbyhash-request.mdx"; +import Request from "./_eth_getblockbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblockbynumber.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblockbynumber.mdx index 2faabaa3e86..f14e34f1531 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblockbynumber.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblockbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx" ### Request -import Request from "./_eth_getblockbynumber-request.mdx"; +import Request from "./_eth_getblockbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx index aacb2e0e3af..36944d31e1f 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbyhash-request.mdx"; +import Request from "./_eth_getblocktransactioncountbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx index 161e7fe344b..c355e33cb53 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbynumber-request.mdx"; +import Request from "./_eth_getblocktransactioncountbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getcode.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getcode.mdx index 8364a077f09..ace0da8cb26 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getcode.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getcode.mdx @@ -2,39 +2,39 @@ title: "eth_getCode" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getcode-description.mdx"; +import Description from "/services/reference/_partials/_eth_getcode-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getcode-example.mdx"; +import Example from "/services/reference/_partials/_eth_getcode-example.mdx" ### Request -import Request from "./_eth_getcode-request.mdx"; +import Request from "./_eth_getcode-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getcode-response.mdx"; +import Response from "/services/reference/_partials/_eth_getcode-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getlogs.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getlogs.mdx index 546d66f9148..4a1c1a031c4 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getlogs.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getlogs-description.mdx"; +import Description from "/services/reference/_partials/_eth_getlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getlogs-example.mdx"; +import Example from "/services/reference/_partials/_eth_getlogs-example.mdx" ### Request -import Request from "./_eth_getlogs-request.mdx"; +import Request from "./_eth_getlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getlogs-response.mdx"; +import Response from "/services/reference/_partials/_eth_getlogs-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getproof.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getproof.mdx index 7cb028bd44f..0d7b5743dc4 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getproof.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getproof.mdx @@ -2,39 +2,39 @@ title: "eth_getProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getproof-description.mdx"; +import Description from "/services/reference/_partials/_eth_getproof-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getproof-example.mdx"; +import Example from "/services/reference/_partials/_eth_getproof-example.mdx" ### Request -import Request from "./_eth_getproof-request.mdx"; +import Request from "./_eth_getproof-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getproof-response.mdx"; +import Response from "/services/reference/_partials/_eth_getproof-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getstorageat.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getstorageat.mdx index aee85d0fde8..d91e20b3979 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getstorageat.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getstorageat.mdx @@ -2,39 +2,39 @@ title: "eth_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx"; +import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx"; +import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx" ### Request -import Request from "./_eth_getstorageat-request.mdx"; +import Request from "./_eth_getstorageat-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx"; +import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx index 5422dc7f552..e04f9c75a5c 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx index 6861fb566a4..28ba85246a2 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionbyhash.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionbyhash.mdx index 1adc6ff1eb4..28548a1fd58 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionbyhash.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx" ### Request -import Request from "./_eth_gettransactionbyhash-request.mdx"; +import Request from "./_eth_gettransactionbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactioncount.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactioncount.mdx index 73985353185..9cf5c71e500 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactioncount.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactioncount.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx" ### Request -import Request from "./_eth_gettransactioncount-request.mdx"; +import Request from "./_eth_gettransactioncount-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionreceipt.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionreceipt.mdx index 370d08c0402..1ab2ba12676 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionreceipt.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_gettransactionreceipt.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx" ### Request -import Request from "./_eth_gettransactionreceipt-request.mdx"; +import Request from "./_eth_gettransactionreceipt-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclebyblockhashandindex.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclebyblockhashandindex.mdx index dce1f045d95..d6a9a959a37 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclebyblockhashandindex.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclebyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblockhashandindex-request.mdx"; +import Request from "./_eth_getunclebyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx index 321c22c4ce0..07c458cb7ad 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblocknumberandindex-request.mdx"; +import Request from "./_eth_getunclebyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclecountbyblockhash.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclecountbyblockhash.mdx index c21e8c283a8..298b5c520e8 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclecountbyblockhash.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclecountbyblockhash.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblockhash-request.mdx"; +import Request from "./_eth_getunclecountbyblockhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclecountbyblocknumber.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclecountbyblocknumber.mdx index 824fdf8de1b..2cc5dbbf753 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclecountbyblocknumber.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_getunclecountbyblocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblocknumber-request.mdx"; +import Request from "./_eth_getunclecountbyblocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_maxpriorityfeepergas.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_maxpriorityfeepergas.mdx index 87e39538aaf..6f818052ae7 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_maxpriorityfeepergas.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_maxpriorityfeepergas.mdx @@ -2,39 +2,39 @@ title: "eth_maxPriorityFeePerGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx"; +import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx"; +import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx" ### Request -import Request from "./_eth_maxpriorityfeepergas-request.mdx"; +import Request from "./_eth_maxpriorityfeepergas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx"; +import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_sendrawtransaction.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_sendrawtransaction.mdx index 4dfc4e6f296..dd39a5bafd4 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_sendrawtransaction.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_sendrawtransaction.mdx @@ -2,39 +2,39 @@ title: "eth_sendRawTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx"; +import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx" ### Request -import Request from "./_eth_sendrawtransaction-request.mdx"; +import Request from "./_eth_sendrawtransaction-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx"; +import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_sendtransaction.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_sendtransaction.mdx index ac6ebfd02dd..5c13a1d5c8f 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_sendtransaction.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_sendtransaction.mdx @@ -2,10 +2,9 @@ title: "eth_sendTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx" - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/eth_sign.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/eth_sign.mdx index 073b1040681..f8c6a17df92 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/eth_sign.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/eth_sign.mdx @@ -2,9 +2,9 @@ title: "eth_sign" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sign-description.mdx"; +import Description from "/services/reference/_partials/_eth_sign-description.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/index.md b/services/reference/avalanche-c-chain/json-rpc-methods/index.md index 074aee61687..eafa6dcb277 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/index.md +++ b/services/reference/avalanche-c-chain/json-rpc-methods/index.md @@ -15,4 +15,4 @@ Avalanche C-Chain uses the Go Ethereum (Geth) API and supports the standard [Eth ::: Refer to the [Avalanche documentation](https://docs.avax.network/apis/avalanchego/apis/c-chain#methods) for more -information about supported methods. \ No newline at end of file +information about supported methods. diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/net_peercount.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/net_peercount.mdx index 9ff570e4c70..c0246b44d39 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/net_peercount.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/net_peercount.mdx @@ -2,39 +2,39 @@ title: "net_peerCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_peercount-description.mdx"; +import Description from "/services/reference/_partials/_net_peercount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_peercount-parameters.mdx"; +import Params from "/services/reference/_partials/_net_peercount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_peercount-returns.mdx"; +import Returns from "/services/reference/_partials/_net_peercount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_peercount-example.mdx"; +import Example from "/services/reference/_partials/_net_peercount-example.mdx" ### Request -import Request from "./_net_peercount-request.mdx"; +import Request from "./_net_peercount-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_peercount-response.mdx"; +import Response from "/services/reference/_partials/_net_peercount-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/net_version.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/net_version.mdx index d55ab80402d..1d6c0080c60 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/net_version.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/net_version.mdx @@ -2,39 +2,39 @@ title: "net_version" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_version-description.mdx"; +import Description from "/services/reference/_partials/_net_version-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_version-parameters.mdx"; +import Params from "/services/reference/_partials/_net_version-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_version-returns.mdx"; +import Returns from "/services/reference/_partials/_net_version-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_version-example.mdx"; +import Example from "/services/reference/_partials/_net_version-example.mdx" ### Request -import Request from "./_net_version-request.mdx"; +import Request from "./_net_version-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_version-response.mdx"; +import Response from "/services/reference/_partials/_net_version-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx index 1bb757817dc..4437bb1fbde 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx @@ -1,20 +1,19 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash -wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' ``` ```bash -wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' +wscat -c wss://avalanche-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics": ["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' ``` - diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx index c9663c08e3e..38c7e30101a 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx @@ -1,13 +1,12 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash -wscat -c wss://avalanche-mainnet.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}' +wscat -c wss://avalanche-mainnet.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}' ``` - - \ No newline at end of file + diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/eth_subscribe.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/eth_subscribe.mdx index 756de6bb212..d79d2a15bb3 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/eth_subscribe.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/eth_subscribe.mdx @@ -2,39 +2,39 @@ title: "eth_subscribe" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/subscription-methods/_eth_subscribe-description.mdx"; +import Description from "/services/reference/_partials/subscription-methods/_eth_subscribe-description.mdx" ## Parameters -import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters-no-pending.mdx"; +import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters-no-pending.mdx" ## Returns -import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx"; +import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx" ## Example -import Example from "/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx"; +import Example from "/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx" ### Request -import Request from "./_eth_subscribe-request.mdx"; +import Request from "./_eth_subscribe-request.mdx" ### Response -import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx"; +import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx index 180a40bbd87..6fe9ca4660e 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx @@ -2,39 +2,39 @@ title: "eth_unsubscribe" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-description.mdx"; +import Description from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-description.mdx" ## Parameters -import Params from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx"; +import Params from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx"; +import Returns from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx" ## Example -import Example from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx"; +import Example from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx" ### Request -import Request from "./_eth_unsubscribe-request.mdx"; +import Request from "./_eth_unsubscribe-request.mdx" ### Response -import Response from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx"; +import Response from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx" diff --git a/services/reference/avalanche-c-chain/json-rpc-methods/web3_clientversion.mdx b/services/reference/avalanche-c-chain/json-rpc-methods/web3_clientversion.mdx index 11997e5c36d..c5ee316d699 100644 --- a/services/reference/avalanche-c-chain/json-rpc-methods/web3_clientversion.mdx +++ b/services/reference/avalanche-c-chain/json-rpc-methods/web3_clientversion.mdx @@ -2,39 +2,39 @@ title: "web3_clientVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_web3_clientversion-description.mdx"; +import Description from "/services/reference/_partials/_web3_clientversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx"; +import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx"; +import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_web3_clientversion-example.mdx"; +import Example from "/services/reference/_partials/_web3_clientversion-example.mdx" ### Request -import Request from "./_web3_clientversion-request.mdx"; +import Request from "./_web3_clientversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_web3_clientversion-response.mdx"; +import Response from "/services/reference/_partials/_web3_clientversion-response.mdx" diff --git a/services/reference/avalanche-c-chain/quickstart.md b/services/reference/avalanche-c-chain/quickstart.md index f0f5819d6a3..d6e73b79c63 100644 --- a/services/reference/avalanche-c-chain/quickstart.md +++ b/services/reference/avalanche-c-chain/quickstart.md @@ -25,9 +25,9 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ### Node (JavaScript) @@ -36,152 +36,153 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta #### Node Fetch -1. In your project folder, install the Node Fetch package using npm: +1. In your project folder, install the `node-fetch` package using npm: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios -1. In your project folder, install the Axios package using npm: +1. In your project folder, install the `axios` package using npm: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require('axios'); - - axios.post('https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'eth_blockNumber', - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios"); + + axios.post("https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1 + }) + .then(response => { + console.log(response.data); + } + .catch(error => { + console.error(error); + }); + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Ethers 1. In your project folder, install the `ethers` package using npm: - ```bash - npm install ethers - `````` + ```bash + npm install ethers + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.js" - const ethers = require('ethers'); + ```javascript title="index.js" + const ethers = require("ethers") - const provider = new ethers.providers.JsonRpcProvider('https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY'); + const provider = new ethers.providers.JsonRpcProvider( + "https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY" + ) - provider.getBlockNumber() - .then(blockNumber => { - console.log(blockNumber); - }) - .catch(error => { - console.error(error); - }); - ``` + provider + .getBlockNumber() + .then((blockNumber) => { + console.log(blockNumber) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` 1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```python title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = 'https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY' + url = "https://avalanche-mainnet.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + } - headers = {'content-type': 'application/json'} + headers = {"content-type": "application/json"} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` + ```bash + python index.py + ``` ## Next steps @@ -189,7 +190,7 @@ Now that you have successfully made a call to Avalanche C-Chain, you can explore by Infura. Here are some suggestions: - **Explore other Avalanche C-Chain APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Ethereum, Linea, Polygon, Optimism, and more. @@ -197,4 +198,3 @@ by Infura. Here are some suggestions: Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/reference/base/index.md b/services/reference/base/index.md index 12e9c507e6f..d4d617994ee 100644 --- a/services/reference/base/index.md +++ b/services/reference/base/index.md @@ -23,7 +23,7 @@ See the [official Base documentation ](https://docs.base.org/)for more informati ::: -Select an option below to get started with the Base network. +Select an option below to get started with the Base network. ```bash curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` - - diff --git a/services/reference/base/json-rpc-methods/_eth_blocknumber-request.mdx b/services/reference/base/json-rpc-methods/_eth_blocknumber-request.mdx index b019cded7b7..7ab3fe768f2 100644 --- a/services/reference/base/json-rpc-methods/_eth_blocknumber-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_blocknumber-request.mdx @@ -1,17 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` - - diff --git a/services/reference/base/json-rpc-methods/_eth_call-request.mdx b/services/reference/base/json-rpc-methods/_eth_call-request.mdx index 6b4e0744f35..c6752dbf7a2 100644 --- a/services/reference/base/json-rpc-methods/_eth_call-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_call-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_chainid-request.mdx b/services/reference/base/json-rpc-methods/_eth_chainid-request.mdx index 4d41dfc2e95..8c53d7eaf07 100644 --- a/services/reference/base/json-rpc-methods/_eth_chainid-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_chainid-request.mdx @@ -1,17 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` - - diff --git a/services/reference/base/json-rpc-methods/_eth_estimategas-request.mdx b/services/reference/base/json-rpc-methods/_eth_estimategas-request.mdx index a58cc8dd518..9e3d4e26078 100644 --- a/services/reference/base/json-rpc-methods/_eth_estimategas-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_estimategas-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id":1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_feehistory-request.mdx b/services/reference/base/json-rpc-methods/_eth_feehistory-request.mdx index 33e98885766..ba9e73cb768 100644 --- a/services/reference/base/json-rpc-methods/_eth_feehistory-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_feehistory-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20, 30]], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_gasprice-request.mdx b/services/reference/base/json-rpc-methods/_eth_gasprice-request.mdx index dacdb280311..b281cf8bac8 100644 --- a/services/reference/base/json-rpc-methods/_eth_gasprice-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_gasprice-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getbalance-request.mdx b/services/reference/base/json-rpc-methods/_eth_getbalance-request.mdx index 43bdf1169d5..71470d8cdb3 100644 --- a/services/reference/base/json-rpc-methods/_eth_getbalance-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getbalance-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getblockbyhash-request.mdx b/services/reference/base/json-rpc-methods/_eth_getblockbyhash-request.mdx index 74a0b2f266d..6c44dbede78 100644 --- a/services/reference/base/json-rpc-methods/_eth_getblockbyhash-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getblockbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getblockbynumber-request.mdx b/services/reference/base/json-rpc-methods/_eth_getblockbynumber-request.mdx index c65445b9b94..5d4d7c67cdd 100644 --- a/services/reference/base/json-rpc-methods/_eth_getblockbynumber-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getblockbynumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x5BAD55",false],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params":["0x5BAD55", false], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx b/services/reference/base/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx index 285b05387a6..846f6264365 100644 --- a/services/reference/base/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx b/services/reference/base/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx index 6aff6dc0638..348b770fb9d 100644 --- a/services/reference/base/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getcode-request.mdx b/services/reference/base/json-rpc-methods/_eth_getcode-request.mdx index 1c396b71f14..9dfa15fe7ee 100644 --- a/services/reference/base/json-rpc-methods/_eth_getcode-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getcode-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getlogs-request.mdx b/services/reference/base/json-rpc-methods/_eth_getlogs-request.mdx index 5e12a178e88..91983685232 100644 --- a/services/reference/base/json-rpc-methods/_eth_getlogs-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getlogs-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics": ["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getproof-request.mdx b/services/reference/base/json-rpc-methods/_eth_getproof-request.mdx index 804e863bb05..7be7dede4c8 100644 --- a/services/reference/base/json-rpc-methods/_eth_getproof-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getproof-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0","method": "eth_getProof","id": 1,"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getstorageat-request.mdx b/services/reference/base/json-rpc-methods/_eth_getstorageat-request.mdx index f85912805db..fc654087bd2 100644 --- a/services/reference/base/json-rpc-methods/_eth_getstorageat-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getstorageat-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx b/services/reference/base/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx index f2775af9597..ef5d815d081 100644 --- a/services/reference/base/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx b/services/reference/base/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx index 0d9bf07f5b9..2224929ac3f 100644 --- a/services/reference/base/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_gettransactionbyhash-request.mdx b/services/reference/base/json-rpc-methods/_eth_gettransactionbyhash-request.mdx index 6d2aa56b923..3ad67060764 100644 --- a/services/reference/base/json-rpc-methods/_eth_gettransactionbyhash-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_gettransactionbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_gettransactioncount-request.mdx b/services/reference/base/json-rpc-methods/_eth_gettransactioncount-request.mdx index 9e8a5756719..df1ce1e4924 100644 --- a/services/reference/base/json-rpc-methods/_eth_gettransactioncount-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_gettransactioncount-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_gettransactionreceipt-request.mdx b/services/reference/base/json-rpc-methods/_eth_gettransactionreceipt-request.mdx index 5e958832f1d..26d5a0c3bba 100644 --- a/services/reference/base/json-rpc-methods/_eth_gettransactionreceipt-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_gettransactionreceipt-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx b/services/reference/base/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx index 1b9291e71c7..434bf16e9fc 100644 --- a/services/reference/base/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx b/services/reference/base/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx index f1f26dee727..fb674b99b57 100644 --- a/services/reference/base/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx b/services/reference/base/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx index a0118467ecd..050088ad655 100644 --- a/services/reference/base/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx b/services/reference/base/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx index 2a115a05e60..679ea8a9339 100644 --- a/services/reference/base/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_getwork-request.mdx b/services/reference/base/json-rpc-methods/_eth_getwork-request.mdx index b97c32f0242..64ba7bbe365 100644 --- a/services/reference/base/json-rpc-methods/_eth_getwork-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_getwork-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getWork","params": [],"id":1}' - ``` +```bash +curl https://base-base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getWork", "params": [], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_hashrate-request.mdx b/services/reference/base/json-rpc-methods/_eth_hashrate-request.mdx index b7f1a4f63f8..dc6434c3b9d 100644 --- a/services/reference/base/json-rpc-methods/_eth_hashrate-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_hashrate-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_hashrate","params": [],"id":1}' - ``` +```bash +curl https://base-base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_hashrate", "params": [], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx b/services/reference/base/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx index c608b41122e..ea01ada6863 100644 --- a/services/reference/base/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_mining-request.mdx b/services/reference/base/json-rpc-methods/_eth_mining-request.mdx index 70020317ee3..06768b77742 100644 --- a/services/reference/base/json-rpc-methods/_eth_mining-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_mining-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_mining","params": [],"id":1}' - ``` +```bash +curl https://base-base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_mining", "params": [], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_protocolversion-request.mdx b/services/reference/base/json-rpc-methods/_eth_protocolversion-request.mdx index 3e7e0f2bfa5..ba556a01685 100644 --- a/services/reference/base/json-rpc-methods/_eth_protocolversion-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_protocolversion-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_protocolVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_sendrawtransaction-request.mdx b/services/reference/base/json-rpc-methods/_eth_sendrawtransaction-request.mdx index 795b8635938..d4082c6f34f 100644 --- a/services/reference/base/json-rpc-methods/_eth_sendrawtransaction-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_sendrawtransaction-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_submitwork-request.mdx b/services/reference/base/json-rpc-methods/_eth_submitwork-request.mdx index 0c08bae0891..e9ae9108d88 100644 --- a/services/reference/base/json-rpc-methods/_eth_submitwork-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_submitwork-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' - ``` +```bash +curl https://base-base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_submitWork", "params": ["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_eth_syncing-request.mdx b/services/reference/base/json-rpc-methods/_eth_syncing-request.mdx index d932f0ae8ce..3a97fa4dc29 100644 --- a/services/reference/base/json-rpc-methods/_eth_syncing-request.mdx +++ b/services/reference/base/json-rpc-methods/_eth_syncing-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_net_listening-request.mdx b/services/reference/base/json-rpc-methods/_net_listening-request.mdx index 4903f2258fa..5fe973ac650 100644 --- a/services/reference/base/json-rpc-methods/_net_listening-request.mdx +++ b/services/reference/base/json-rpc-methods/_net_listening-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_net_peercount-request.mdx b/services/reference/base/json-rpc-methods/_net_peercount-request.mdx index a40a17bcc5c..4adf003bf62 100644 --- a/services/reference/base/json-rpc-methods/_net_peercount-request.mdx +++ b/services/reference/base/json-rpc-methods/_net_peercount-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_net_version-request.mdx b/services/reference/base/json-rpc-methods/_net_version-request.mdx index 90f9142f565..e3bdae4a246 100644 --- a/services/reference/base/json-rpc-methods/_net_version-request.mdx +++ b/services/reference/base/json-rpc-methods/_net_version-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/_web3_clientversion-request.mdx b/services/reference/base/json-rpc-methods/_web3_clientversion-request.mdx index feb2eda6238..fa314272c87 100644 --- a/services/reference/base/json-rpc-methods/_web3_clientversion-request.mdx +++ b/services/reference/base/json-rpc-methods/_web3_clientversion-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/base/json-rpc-methods/eth_accounts.mdx b/services/reference/base/json-rpc-methods/eth_accounts.mdx index 0cc7304b6ec..0dafbcb7389 100644 --- a/services/reference/base/json-rpc-methods/eth_accounts.mdx +++ b/services/reference/base/json-rpc-methods/eth_accounts.mdx @@ -2,39 +2,39 @@ title: "eth_accounts" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_accounts-description.mdx"; +import Description from "/services/reference/_partials/_eth_accounts-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_accounts-example.mdx"; +import Example from "/services/reference/_partials/_eth_accounts-example.mdx" ### Request -import Request from "./_eth_accounts-request.mdx"; +import Request from "./_eth_accounts-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_accounts-response.mdx"; +import Response from "/services/reference/_partials/_eth_accounts-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_blocknumber.mdx b/services/reference/base/json-rpc-methods/eth_blocknumber.mdx index 7896c8c46f6..076b45d83ce 100644 --- a/services/reference/base/json-rpc-methods/eth_blocknumber.mdx +++ b/services/reference/base/json-rpc-methods/eth_blocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx" ### Request -import Request from "./_eth_blocknumber-request.mdx"; +import Request from "./_eth_blocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_call.mdx b/services/reference/base/json-rpc-methods/eth_call.mdx index 88b3857775d..5c6ebee7de3 100644 --- a/services/reference/base/json-rpc-methods/eth_call.mdx +++ b/services/reference/base/json-rpc-methods/eth_call.mdx @@ -2,39 +2,39 @@ title: "eth_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_call-description.mdx"; +import Description from "/services/reference/_partials/_eth_call-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_call-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_call-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_call-example.mdx"; +import Example from "/services/reference/_partials/_eth_call-example.mdx" ### Request -import Request from "./_eth_call-request.mdx"; +import Request from "./_eth_call-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_call-response.mdx"; +import Response from "/services/reference/_partials/_eth_call-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_chainid.mdx b/services/reference/base/json-rpc-methods/eth_chainid.mdx index e544b1003a4..a6f446ad268 100644 --- a/services/reference/base/json-rpc-methods/eth_chainid.mdx +++ b/services/reference/base/json-rpc-methods/eth_chainid.mdx @@ -2,39 +2,39 @@ title: "eth_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_chainid-description.mdx"; +import Description from "/services/reference/_partials/_eth_chainid-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_chainid-example.mdx"; +import Example from "/services/reference/_partials/_eth_chainid-example.mdx" ### Request -import Request from "./_eth_chainid-request.mdx"; +import Request from "./_eth_chainid-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_chainid-response.mdx"; +import Response from "/services/reference/_partials/_eth_chainid-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_coinbase.mdx b/services/reference/base/json-rpc-methods/eth_coinbase.mdx index e9bb3ff61cd..8957df7e522 100644 --- a/services/reference/base/json-rpc-methods/eth_coinbase.mdx +++ b/services/reference/base/json-rpc-methods/eth_coinbase.mdx @@ -2,9 +2,9 @@ title: "eth_coinbase" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_coinbase-description.mdx"; +import Description from "/services/reference/_partials/_eth_coinbase-description.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_estimategas.mdx b/services/reference/base/json-rpc-methods/eth_estimategas.mdx index af6c5ad77da..47c6b01804e 100644 --- a/services/reference/base/json-rpc-methods/eth_estimategas.mdx +++ b/services/reference/base/json-rpc-methods/eth_estimategas.mdx @@ -2,39 +2,39 @@ title: "eth_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_estimategas-description.mdx"; +import Description from "/services/reference/_partials/_eth_estimategas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_estimategas-example.mdx"; +import Example from "/services/reference/_partials/_eth_estimategas-example.mdx" ### Request -import Request from "./_eth_estimategas-request.mdx"; +import Request from "./_eth_estimategas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_estimategas-response.mdx"; +import Response from "/services/reference/_partials/_eth_estimategas-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_feehistory.mdx b/services/reference/base/json-rpc-methods/eth_feehistory.mdx index 21e4962e114..9aafc564c46 100644 --- a/services/reference/base/json-rpc-methods/eth_feehistory.mdx +++ b/services/reference/base/json-rpc-methods/eth_feehistory.mdx @@ -2,39 +2,39 @@ title: "eth_feeHistory" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_feehistory-description.mdx"; +import Description from "/services/reference/_partials/_eth_feehistory-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_feehistory-example.mdx"; +import Example from "/services/reference/_partials/_eth_feehistory-example.mdx" ### Request -import Request from "./_eth_feehistory-request.mdx"; +import Request from "./_eth_feehistory-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_feehistory-response.mdx"; +import Response from "/services/reference/_partials/_eth_feehistory-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_gasprice.mdx b/services/reference/base/json-rpc-methods/eth_gasprice.mdx index c602d61c293..8980dcc8a39 100644 --- a/services/reference/base/json-rpc-methods/eth_gasprice.mdx +++ b/services/reference/base/json-rpc-methods/eth_gasprice.mdx @@ -2,39 +2,39 @@ title: "eth_gasPrice" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gasprice-description.mdx"; +import Description from "/services/reference/_partials/_eth_gasprice-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gasprice-example.mdx"; +import Example from "/services/reference/_partials/_eth_gasprice-example.mdx" ### Request -import Request from "./_eth_gasprice-request.mdx"; +import Request from "./_eth_gasprice-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gasprice-response.mdx"; +import Response from "/services/reference/_partials/_eth_gasprice-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getbalance.mdx b/services/reference/base/json-rpc-methods/eth_getbalance.mdx index c50eba5fd61..1ff5a0d31c8 100644 --- a/services/reference/base/json-rpc-methods/eth_getbalance.mdx +++ b/services/reference/base/json-rpc-methods/eth_getbalance.mdx @@ -2,39 +2,39 @@ title: "eth_getBalance" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getbalance-description.mdx"; +import Description from "/services/reference/_partials/_eth_getbalance-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getbalance-example.mdx"; +import Example from "/services/reference/_partials/_eth_getbalance-example.mdx" ### Request -import Request from "./_eth_getbalance-request.mdx"; +import Request from "./_eth_getbalance-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getbalance-response.mdx"; +import Response from "/services/reference/_partials/_eth_getbalance-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getblockbyhash.mdx b/services/reference/base/json-rpc-methods/eth_getblockbyhash.mdx index ad555110b71..970e6c27704 100644 --- a/services/reference/base/json-rpc-methods/eth_getblockbyhash.mdx +++ b/services/reference/base/json-rpc-methods/eth_getblockbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx" ### Request -import Request from "./_eth_getblockbyhash-request.mdx"; +import Request from "./_eth_getblockbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getblockbynumber.mdx b/services/reference/base/json-rpc-methods/eth_getblockbynumber.mdx index 2faabaa3e86..f14e34f1531 100644 --- a/services/reference/base/json-rpc-methods/eth_getblockbynumber.mdx +++ b/services/reference/base/json-rpc-methods/eth_getblockbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx" ### Request -import Request from "./_eth_getblockbynumber-request.mdx"; +import Request from "./_eth_getblockbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx b/services/reference/base/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx index aacb2e0e3af..36944d31e1f 100644 --- a/services/reference/base/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx +++ b/services/reference/base/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbyhash-request.mdx"; +import Request from "./_eth_getblocktransactioncountbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx b/services/reference/base/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx index 161e7fe344b..c355e33cb53 100644 --- a/services/reference/base/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx +++ b/services/reference/base/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbynumber-request.mdx"; +import Request from "./_eth_getblocktransactioncountbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getcode.mdx b/services/reference/base/json-rpc-methods/eth_getcode.mdx index 8364a077f09..ace0da8cb26 100644 --- a/services/reference/base/json-rpc-methods/eth_getcode.mdx +++ b/services/reference/base/json-rpc-methods/eth_getcode.mdx @@ -2,39 +2,39 @@ title: "eth_getCode" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getcode-description.mdx"; +import Description from "/services/reference/_partials/_eth_getcode-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getcode-example.mdx"; +import Example from "/services/reference/_partials/_eth_getcode-example.mdx" ### Request -import Request from "./_eth_getcode-request.mdx"; +import Request from "./_eth_getcode-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getcode-response.mdx"; +import Response from "/services/reference/_partials/_eth_getcode-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getlogs.mdx b/services/reference/base/json-rpc-methods/eth_getlogs.mdx index 546d66f9148..4a1c1a031c4 100644 --- a/services/reference/base/json-rpc-methods/eth_getlogs.mdx +++ b/services/reference/base/json-rpc-methods/eth_getlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getlogs-description.mdx"; +import Description from "/services/reference/_partials/_eth_getlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getlogs-example.mdx"; +import Example from "/services/reference/_partials/_eth_getlogs-example.mdx" ### Request -import Request from "./_eth_getlogs-request.mdx"; +import Request from "./_eth_getlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getlogs-response.mdx"; +import Response from "/services/reference/_partials/_eth_getlogs-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getproof.mdx b/services/reference/base/json-rpc-methods/eth_getproof.mdx index 7cb028bd44f..0d7b5743dc4 100644 --- a/services/reference/base/json-rpc-methods/eth_getproof.mdx +++ b/services/reference/base/json-rpc-methods/eth_getproof.mdx @@ -2,39 +2,39 @@ title: "eth_getProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getproof-description.mdx"; +import Description from "/services/reference/_partials/_eth_getproof-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getproof-example.mdx"; +import Example from "/services/reference/_partials/_eth_getproof-example.mdx" ### Request -import Request from "./_eth_getproof-request.mdx"; +import Request from "./_eth_getproof-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getproof-response.mdx"; +import Response from "/services/reference/_partials/_eth_getproof-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getstorageat.mdx b/services/reference/base/json-rpc-methods/eth_getstorageat.mdx index aee85d0fde8..d91e20b3979 100644 --- a/services/reference/base/json-rpc-methods/eth_getstorageat.mdx +++ b/services/reference/base/json-rpc-methods/eth_getstorageat.mdx @@ -2,39 +2,39 @@ title: "eth_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx"; +import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx"; +import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx" ### Request -import Request from "./_eth_getstorageat-request.mdx"; +import Request from "./_eth_getstorageat-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx"; +import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx b/services/reference/base/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx index 5422dc7f552..e04f9c75a5c 100644 --- a/services/reference/base/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx +++ b/services/reference/base/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx b/services/reference/base/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx index 6861fb566a4..28ba85246a2 100644 --- a/services/reference/base/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx +++ b/services/reference/base/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_gettransactionbyhash.mdx b/services/reference/base/json-rpc-methods/eth_gettransactionbyhash.mdx index 1adc6ff1eb4..28548a1fd58 100644 --- a/services/reference/base/json-rpc-methods/eth_gettransactionbyhash.mdx +++ b/services/reference/base/json-rpc-methods/eth_gettransactionbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx" ### Request -import Request from "./_eth_gettransactionbyhash-request.mdx"; +import Request from "./_eth_gettransactionbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_gettransactioncount.mdx b/services/reference/base/json-rpc-methods/eth_gettransactioncount.mdx index 73985353185..9cf5c71e500 100644 --- a/services/reference/base/json-rpc-methods/eth_gettransactioncount.mdx +++ b/services/reference/base/json-rpc-methods/eth_gettransactioncount.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx" ### Request -import Request from "./_eth_gettransactioncount-request.mdx"; +import Request from "./_eth_gettransactioncount-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_gettransactionreceipt.mdx b/services/reference/base/json-rpc-methods/eth_gettransactionreceipt.mdx index 370d08c0402..1ab2ba12676 100644 --- a/services/reference/base/json-rpc-methods/eth_gettransactionreceipt.mdx +++ b/services/reference/base/json-rpc-methods/eth_gettransactionreceipt.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx" ### Request -import Request from "./_eth_gettransactionreceipt-request.mdx"; +import Request from "./_eth_gettransactionreceipt-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getunclebyblockhashandindex.mdx b/services/reference/base/json-rpc-methods/eth_getunclebyblockhashandindex.mdx index dce1f045d95..d6a9a959a37 100644 --- a/services/reference/base/json-rpc-methods/eth_getunclebyblockhashandindex.mdx +++ b/services/reference/base/json-rpc-methods/eth_getunclebyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblockhashandindex-request.mdx"; +import Request from "./_eth_getunclebyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx b/services/reference/base/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx index 321c22c4ce0..07c458cb7ad 100644 --- a/services/reference/base/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx +++ b/services/reference/base/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblocknumberandindex-request.mdx"; +import Request from "./_eth_getunclebyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getunclecountbyblockhash.mdx b/services/reference/base/json-rpc-methods/eth_getunclecountbyblockhash.mdx index c21e8c283a8..298b5c520e8 100644 --- a/services/reference/base/json-rpc-methods/eth_getunclecountbyblockhash.mdx +++ b/services/reference/base/json-rpc-methods/eth_getunclecountbyblockhash.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblockhash-request.mdx"; +import Request from "./_eth_getunclecountbyblockhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_getunclecountbyblocknumber.mdx b/services/reference/base/json-rpc-methods/eth_getunclecountbyblocknumber.mdx index 824fdf8de1b..2cc5dbbf753 100644 --- a/services/reference/base/json-rpc-methods/eth_getunclecountbyblocknumber.mdx +++ b/services/reference/base/json-rpc-methods/eth_getunclecountbyblocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblocknumber-request.mdx"; +import Request from "./_eth_getunclecountbyblocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_maxpriorityfeepergas.mdx b/services/reference/base/json-rpc-methods/eth_maxpriorityfeepergas.mdx index 87e39538aaf..6f818052ae7 100644 --- a/services/reference/base/json-rpc-methods/eth_maxpriorityfeepergas.mdx +++ b/services/reference/base/json-rpc-methods/eth_maxpriorityfeepergas.mdx @@ -2,39 +2,39 @@ title: "eth_maxPriorityFeePerGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx"; +import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx"; +import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx" ### Request -import Request from "./_eth_maxpriorityfeepergas-request.mdx"; +import Request from "./_eth_maxpriorityfeepergas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx"; +import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_protocolversion.mdx b/services/reference/base/json-rpc-methods/eth_protocolversion.mdx index 38863109276..02b5da95bff 100644 --- a/services/reference/base/json-rpc-methods/eth_protocolversion.mdx +++ b/services/reference/base/json-rpc-methods/eth_protocolversion.mdx @@ -2,39 +2,39 @@ title: "eth_protocolVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx"; +import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx"; +import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx" ### Request -import Request from "./_eth_protocolversion-request.mdx"; +import Request from "./_eth_protocolversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx"; +import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_sendrawtransaction.mdx b/services/reference/base/json-rpc-methods/eth_sendrawtransaction.mdx index 4dfc4e6f296..dd39a5bafd4 100644 --- a/services/reference/base/json-rpc-methods/eth_sendrawtransaction.mdx +++ b/services/reference/base/json-rpc-methods/eth_sendrawtransaction.mdx @@ -2,39 +2,39 @@ title: "eth_sendRawTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx"; +import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx" ### Request -import Request from "./_eth_sendrawtransaction-request.mdx"; +import Request from "./_eth_sendrawtransaction-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx"; +import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_sendtransaction.mdx b/services/reference/base/json-rpc-methods/eth_sendtransaction.mdx index ac6ebfd02dd..5c13a1d5c8f 100644 --- a/services/reference/base/json-rpc-methods/eth_sendtransaction.mdx +++ b/services/reference/base/json-rpc-methods/eth_sendtransaction.mdx @@ -2,10 +2,9 @@ title: "eth_sendTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx" - diff --git a/services/reference/base/json-rpc-methods/eth_sign.mdx b/services/reference/base/json-rpc-methods/eth_sign.mdx index 073b1040681..f8c6a17df92 100644 --- a/services/reference/base/json-rpc-methods/eth_sign.mdx +++ b/services/reference/base/json-rpc-methods/eth_sign.mdx @@ -2,9 +2,9 @@ title: "eth_sign" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sign-description.mdx"; +import Description from "/services/reference/_partials/_eth_sign-description.mdx" diff --git a/services/reference/base/json-rpc-methods/eth_syncing.mdx b/services/reference/base/json-rpc-methods/eth_syncing.mdx index bfb89e8c209..7ffbcd44560 100644 --- a/services/reference/base/json-rpc-methods/eth_syncing.mdx +++ b/services/reference/base/json-rpc-methods/eth_syncing.mdx @@ -2,39 +2,39 @@ title: "eth_syncing" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_syncing-description.mdx"; +import Description from "/services/reference/_partials/_eth_syncing-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_syncing-example.mdx"; +import Example from "/services/reference/_partials/_eth_syncing-example.mdx" ### Request -import Request from "./_eth_syncing-request.mdx"; +import Request from "./_eth_syncing-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_syncing-response.mdx"; +import Response from "/services/reference/_partials/_eth_syncing-response.mdx" diff --git a/services/reference/base/json-rpc-methods/filter-methods/_eth_getfilterlogs-request.mdx b/services/reference/base/json-rpc-methods/filter-methods/_eth_getfilterlogs-request.mdx index 55980345772..eb0c8ef0d3c 100644 --- a/services/reference/base/json-rpc-methods/filter-methods/_eth_getfilterlogs-request.mdx +++ b/services/reference/base/json-rpc-methods/filter-methods/_eth_getfilterlogs-request.mdx @@ -1,18 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - - + ```bash curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getFilterLogs","params":["0x10ff0bfbedb01f0dbd4106d14eb719ec38b6eb5b821c"],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getFilterLogs", "params": ["0x10ff0bfbedb01f0dbd4106d14eb719ec38b6eb5b821c"], "id": 1}' ``` - - diff --git a/services/reference/base/json-rpc-methods/filter-methods/_eth_newblockfilter-request.mdx b/services/reference/base/json-rpc-methods/filter-methods/_eth_newblockfilter-request.mdx index f6ab38d256b..c7fdbe93bd1 100644 --- a/services/reference/base/json-rpc-methods/filter-methods/_eth_newblockfilter-request.mdx +++ b/services/reference/base/json-rpc-methods/filter-methods/_eth_newblockfilter-request.mdx @@ -1,18 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - - + ```bash curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_newBlockFilter","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_newBlockFilter", "params": [], "id": 1}' ``` - - diff --git a/services/reference/base/json-rpc-methods/filter-methods/_eth_newfilter-request.mdx b/services/reference/base/json-rpc-methods/filter-methods/_eth_newfilter-request.mdx index 41f9b199dae..fcb1625aba5 100644 --- a/services/reference/base/json-rpc-methods/filter-methods/_eth_newfilter-request.mdx +++ b/services/reference/base/json-rpc-methods/filter-methods/_eth_newfilter-request.mdx @@ -1,18 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - - + ```bash curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_newFilter", "params": [{"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}], "id": 1}' ``` - - diff --git a/services/reference/base/json-rpc-methods/filter-methods/_eth_uninstallfilter-request.mdx b/services/reference/base/json-rpc-methods/filter-methods/_eth_uninstallfilter-request.mdx index d63979c50c2..5c891d75224 100644 --- a/services/reference/base/json-rpc-methods/filter-methods/_eth_uninstallfilter-request.mdx +++ b/services/reference/base/json-rpc-methods/filter-methods/_eth_uninstallfilter-request.mdx @@ -1,18 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - - + ```bash curl https://base-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_uninstallFilter","params":["0x10ff0bfba9472c87932c56632eef8f5cc70910e8e71d"],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_uninstallFilter", "params": ["0x10ff0bfba9472c87932c56632eef8f5cc70910e8e71d"], "id": 1}' ``` - - diff --git a/services/reference/base/json-rpc-methods/filter-methods/eth_getfilterlogs.mdx b/services/reference/base/json-rpc-methods/filter-methods/eth_getfilterlogs.mdx index 0786ce19e35..217655f7f9d 100644 --- a/services/reference/base/json-rpc-methods/filter-methods/eth_getfilterlogs.mdx +++ b/services/reference/base/json-rpc-methods/filter-methods/eth_getfilterlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getFilterLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-description.mdx"; +import Description from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-parameters.mdx"; +import Params from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-returns.mdx"; +import Returns from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-example.mdx"; +import Example from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-example.mdx" ### Request -import Request from "./_eth_getfilterlogs-request.mdx"; +import Request from "./_eth_getfilterlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-response.mdx"; +import Response from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-response.mdx" diff --git a/services/reference/base/json-rpc-methods/filter-methods/eth_newblockfilter.mdx b/services/reference/base/json-rpc-methods/filter-methods/eth_newblockfilter.mdx index 53b04f083da..06376e0f306 100644 --- a/services/reference/base/json-rpc-methods/filter-methods/eth_newblockfilter.mdx +++ b/services/reference/base/json-rpc-methods/filter-methods/eth_newblockfilter.mdx @@ -2,39 +2,39 @@ title: "eth_newBlockFilter" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/filter-methods/_eth_newblockfilter-description.mdx"; +import Description from "/services/reference/_partials/filter-methods/_eth_newblockfilter-description.mdx" ## Parameters -import Params from "/services/reference/_partials/filter-methods/_eth_newblockfilter-parameters.mdx"; +import Params from "/services/reference/_partials/filter-methods/_eth_newblockfilter-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/filter-methods/_eth_newblockfilter-returns.mdx"; +import Returns from "/services/reference/_partials/filter-methods/_eth_newblockfilter-returns.mdx" ## Example -import Example from "/services/reference/_partials/filter-methods/_eth_newblockfilter-example.mdx"; +import Example from "/services/reference/_partials/filter-methods/_eth_newblockfilter-example.mdx" ### Request -import Request from "./_eth_newblockfilter-request.mdx"; +import Request from "./_eth_newblockfilter-request.mdx" ### Response -import Response from "/services/reference/_partials/filter-methods/_eth_newblockfilter-response.mdx"; +import Response from "/services/reference/_partials/filter-methods/_eth_newblockfilter-response.mdx" diff --git a/services/reference/base/json-rpc-methods/filter-methods/eth_newfilter.mdx b/services/reference/base/json-rpc-methods/filter-methods/eth_newfilter.mdx index 40a3a44dcd4..e2da4ffd5a6 100644 --- a/services/reference/base/json-rpc-methods/filter-methods/eth_newfilter.mdx +++ b/services/reference/base/json-rpc-methods/filter-methods/eth_newfilter.mdx @@ -2,39 +2,39 @@ title: "eth_newFilter" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/filter-methods/_eth_newfilter-description.mdx"; +import Description from "/services/reference/_partials/filter-methods/_eth_newfilter-description.mdx" ## Parameters -import Params from "/services/reference/_partials/filter-methods/_eth_newfilter-parameters.mdx"; +import Params from "/services/reference/_partials/filter-methods/_eth_newfilter-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/filter-methods/_eth_newfilter-returns.mdx"; +import Returns from "/services/reference/_partials/filter-methods/_eth_newfilter-returns.mdx" ## Example -import Example from "/services/reference/_partials/filter-methods/_eth_newfilter-example.mdx"; +import Example from "/services/reference/_partials/filter-methods/_eth_newfilter-example.mdx" ### Request -import Request from "./_eth_newfilter-request.mdx"; +import Request from "./_eth_newfilter-request.mdx" ### Response -import Response from "/services/reference/_partials/filter-methods/_eth_newfilter-response.mdx"; +import Response from "/services/reference/_partials/filter-methods/_eth_newfilter-response.mdx" diff --git a/services/reference/base/json-rpc-methods/filter-methods/eth_newpendingtransactionfilter.mdx b/services/reference/base/json-rpc-methods/filter-methods/eth_newpendingtransactionfilter.mdx index 6b50a30f13a..2ea55a1da1c 100644 --- a/services/reference/base/json-rpc-methods/filter-methods/eth_newpendingtransactionfilter.mdx +++ b/services/reference/base/json-rpc-methods/filter-methods/eth_newpendingtransactionfilter.mdx @@ -2,10 +2,9 @@ title: "eth_newPendingTransactionFilter" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/filter-methods/_eth_newpendingtransactionfilter-description.mdx"; +import Description from "/services/reference/_partials/filter-methods/_eth_newpendingtransactionfilter-description.mdx" - diff --git a/services/reference/base/json-rpc-methods/filter-methods/eth_uninstallfilter.mdx b/services/reference/base/json-rpc-methods/filter-methods/eth_uninstallfilter.mdx index 434edf54b83..2032bea779d 100644 --- a/services/reference/base/json-rpc-methods/filter-methods/eth_uninstallfilter.mdx +++ b/services/reference/base/json-rpc-methods/filter-methods/eth_uninstallfilter.mdx @@ -2,39 +2,39 @@ title: "eth_uninstallFilter" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-description.mdx"; +import Description from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-description.mdx" ## Parameters -import Params from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-parameters.mdx"; +import Params from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-returns.mdx"; +import Returns from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-returns.mdx" ## Example -import Example from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-example.mdx"; +import Example from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-example.mdx" ### Request -import Request from "./_eth_uninstallfilter-request.mdx"; +import Request from "./_eth_uninstallfilter-request.mdx" ### Response -import Response from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-response.mdx"; +import Response from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-response.mdx" diff --git a/services/reference/base/json-rpc-methods/index.md b/services/reference/base/json-rpc-methods/index.md index 98d6f9f45c6..3aecdf0a334 100644 --- a/services/reference/base/json-rpc-methods/index.md +++ b/services/reference/base/json-rpc-methods/index.md @@ -8,4 +8,3 @@ description: Supported standard Ethereum methods on Base network. The standard Ethereum methods documented in this section are supported by Infura on the Base network. For custom Base methods, please see the official [Optimism Ethereum JSON-RPC API documentation](https://community.optimism.io/docs/developers/build/json-rpc/) (Bedrock release). The Base optimistic layer 2 rollup chain is built by Coinbase, in collaboration with Optimism on the MIT-licensed OP Stack ([Bedrock](https://community.optimism.io/docs/developers/bedrock/)). - diff --git a/services/reference/base/json-rpc-methods/net_peercount.mdx b/services/reference/base/json-rpc-methods/net_peercount.mdx index 9ff570e4c70..c0246b44d39 100644 --- a/services/reference/base/json-rpc-methods/net_peercount.mdx +++ b/services/reference/base/json-rpc-methods/net_peercount.mdx @@ -2,39 +2,39 @@ title: "net_peerCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_peercount-description.mdx"; +import Description from "/services/reference/_partials/_net_peercount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_peercount-parameters.mdx"; +import Params from "/services/reference/_partials/_net_peercount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_peercount-returns.mdx"; +import Returns from "/services/reference/_partials/_net_peercount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_peercount-example.mdx"; +import Example from "/services/reference/_partials/_net_peercount-example.mdx" ### Request -import Request from "./_net_peercount-request.mdx"; +import Request from "./_net_peercount-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_peercount-response.mdx"; +import Response from "/services/reference/_partials/_net_peercount-response.mdx" diff --git a/services/reference/base/json-rpc-methods/net_version.mdx b/services/reference/base/json-rpc-methods/net_version.mdx index d55ab80402d..1d6c0080c60 100644 --- a/services/reference/base/json-rpc-methods/net_version.mdx +++ b/services/reference/base/json-rpc-methods/net_version.mdx @@ -2,39 +2,39 @@ title: "net_version" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_version-description.mdx"; +import Description from "/services/reference/_partials/_net_version-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_version-parameters.mdx"; +import Params from "/services/reference/_partials/_net_version-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_version-returns.mdx"; +import Returns from "/services/reference/_partials/_net_version-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_version-example.mdx"; +import Example from "/services/reference/_partials/_net_version-example.mdx" ### Request -import Request from "./_net_version-request.mdx"; +import Request from "./_net_version-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_version-response.mdx"; +import Response from "/services/reference/_partials/_net_version-response.mdx" diff --git a/services/reference/base/json-rpc-methods/web3_clientversion.mdx b/services/reference/base/json-rpc-methods/web3_clientversion.mdx index 11997e5c36d..c5ee316d699 100644 --- a/services/reference/base/json-rpc-methods/web3_clientversion.mdx +++ b/services/reference/base/json-rpc-methods/web3_clientversion.mdx @@ -2,39 +2,39 @@ title: "web3_clientVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_web3_clientversion-description.mdx"; +import Description from "/services/reference/_partials/_web3_clientversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx"; +import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx"; +import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_web3_clientversion-example.mdx"; +import Example from "/services/reference/_partials/_web3_clientversion-example.mdx" ### Request -import Request from "./_web3_clientversion-request.mdx"; +import Request from "./_web3_clientversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_web3_clientversion-response.mdx"; +import Response from "/services/reference/_partials/_web3_clientversion-response.mdx" diff --git a/services/reference/base/quickstart.md b/services/reference/base/quickstart.md index 12a089f2513..d7ca3a92a9d 100644 --- a/services/reference/base/quickstart.md +++ b/services/reference/base/quickstart.md @@ -25,163 +25,165 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://base-sepolia.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ### Node (JavaScript) -In these examples,you'll use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) as your package manager. +In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) as your package manager. #### Node Fetch 1. In your project folder, install the `node-fetch` package using npm: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://base-sepolia.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://base-sepolia.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios -1. In your project folder, install the Axios package using npm: +1. In your project folder, install the `axios` package using npm: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require('axios'); - - axios.post('https://base-sepolia.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'eth_blockNumber', - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios") + + axios + .post("https://base-sepolia.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }) + .then((response) => { + console.log(response.data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Ethers 1. In your project folder, install the `ethers` package using npm: - ```bash - npm install ethers - `````` + ```bash + npm install ethers + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.js" - const ethers = require('ethers'); + ```javascript title="index.js" + const ethers = require("ethers") - const provider = new ethers.providers.JsonRpcProvider('https://base-sepolia.infura.io/v3/YOUR-API-KEY'); + const provider = new ethers.providers.JsonRpcProvider( + "https://base-sepolia.infura.io/v3/YOUR-API-KEY" + ) - provider.getBlockNumber() - .then(blockNumber => { - console.log(blockNumber); - }) - .catch(error => { - console.error(error); - }); - ``` + provider + .getBlockNumber() + .then((blockNumber) => { + console.log(blockNumber) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` 1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```python title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = 'https://base-sepolia.infura.io/v3/YOUR-API-KEY' + url = "https://base-sepolia.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + } - headers = {'content-type': 'application/json'} + headers = {"content-type": "application/json"} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` + ```bash + python index.py + ``` ## Next steps @@ -189,7 +191,7 @@ Now that you have successfully made a call to the Base network, you can explore by Infura. Here are some suggestions: - **Explore other Base APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Ethereum, Linea, Polygon, Optimism, and more. @@ -197,4 +199,3 @@ by Infura. Here are some suggestions: Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/reference/blast/index.md b/services/reference/blast/index.md index f23653c401d..50f94d55457 100644 --- a/services/reference/blast/index.md +++ b/services/reference/blast/index.md @@ -27,7 +27,6 @@ See also the [official Blast documentation](https://docs.blast.io/about-blast) f ::: - Select one of the following options to get started with the Blast network: ```bash curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` - - diff --git a/services/reference/blast/json-rpc-methods/_eth_blocknumber-request.mdx b/services/reference/blast/json-rpc-methods/_eth_blocknumber-request.mdx index f2d2cb77f52..957c90b39ac 100644 --- a/services/reference/blast/json-rpc-methods/_eth_blocknumber-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_blocknumber-request.mdx @@ -1,17 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` - - diff --git a/services/reference/blast/json-rpc-methods/_eth_call-request.mdx b/services/reference/blast/json-rpc-methods/_eth_call-request.mdx index eb66f81769e..4474de1ef04 100644 --- a/services/reference/blast/json-rpc-methods/_eth_call-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_call-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method":"eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_chainid-request.mdx b/services/reference/blast/json-rpc-methods/_eth_chainid-request.mdx index 64171332f58..932e28d5c4f 100644 --- a/services/reference/blast/json-rpc-methods/_eth_chainid-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_chainid-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_estimategas-request.mdx b/services/reference/blast/json-rpc-methods/_eth_estimategas-request.mdx index 55103a53d3b..e23dcc7fa47 100644 --- a/services/reference/blast/json-rpc-methods/_eth_estimategas-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_estimategas-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_feehistory-request.mdx b/services/reference/blast/json-rpc-methods/_eth_feehistory-request.mdx index a2d35964c3c..08a3e875088 100644 --- a/services/reference/blast/json-rpc-methods/_eth_feehistory-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_feehistory-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]]}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20, 30]]}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_gasprice-request.mdx b/services/reference/blast/json-rpc-methods/_eth_gasprice-request.mdx index 87bf084eccb..936d002ee16 100644 --- a/services/reference/blast/json-rpc-methods/_eth_gasprice-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_gasprice-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getbalance-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getbalance-request.mdx index f8d69a410c9..c3b26725ab5 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getbalance-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getbalance-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getblockbyhash-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getblockbyhash-request.mdx index d440cbb3fc2..ae23db778bf 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getblockbyhash-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getblockbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getblockbynumber-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getblockbynumber-request.mdx index 7a746a78c7f..ea41b469466 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getblockbynumber-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getblockbynumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x5BAD55",false],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx index 838bb1f4e26..5db650efbe8 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx index 18783bda95b..aa75c0bad8f 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getcode-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getcode-request.mdx index e0a49377bcb..eea9034df34 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getcode-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getcode-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getlogs-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getlogs-request.mdx index 9f3d926fd1d..b0ac991a67a 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getlogs-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getlogs-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics": ["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getproof-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getproof-request.mdx index d3fc91caf49..49d3339e78d 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getproof-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getproof-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0","method": "eth_getProof","id": 1,"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getProof", "id": 1, "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getstorageat-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getstorageat-request.mdx index 6d96ab434ac..735ead3d050 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getstorageat-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getstorageat-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx b/services/reference/blast/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx index f3e66806b0c..c8b65da7e48 100644 --- a/services/reference/blast/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx b/services/reference/blast/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx index 035dc0b70f2..9c4efd7da7b 100644 --- a/services/reference/blast/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_gettransactionbyhash-request.mdx b/services/reference/blast/json-rpc-methods/_eth_gettransactionbyhash-request.mdx index 106fe7fa439..fc1fde124b5 100644 --- a/services/reference/blast/json-rpc-methods/_eth_gettransactionbyhash-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_gettransactionbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_gettransactioncount-request.mdx b/services/reference/blast/json-rpc-methods/_eth_gettransactioncount-request.mdx index 95c8405b4f2..c86ab3bd823 100644 --- a/services/reference/blast/json-rpc-methods/_eth_gettransactioncount-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_gettransactioncount-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_gettransactionreceipt-request.mdx b/services/reference/blast/json-rpc-methods/_eth_gettransactionreceipt-request.mdx index a940ac3a344..c6fb75347b3 100644 --- a/services/reference/blast/json-rpc-methods/_eth_gettransactionreceipt-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_gettransactionreceipt-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx index b9f8b0569b3..baf76acc3a3 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx index a77a0d32a12..23f195ba5bd 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx index 0ba836cc0ed..196794f0eae 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx b/services/reference/blast/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx index b72c387e9ef..59116a1256c 100644 --- a/services/reference/blast/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx b/services/reference/blast/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx index 73ad7b810a2..1ce7b5a73e0 100644 --- a/services/reference/blast/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_protocolversion-request.mdx b/services/reference/blast/json-rpc-methods/_eth_protocolversion-request.mdx index 1039591cd62..283efebc23d 100644 --- a/services/reference/blast/json-rpc-methods/_eth_protocolversion-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_protocolversion-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_protocolVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_sendrawtransaction-request.mdx b/services/reference/blast/json-rpc-methods/_eth_sendrawtransaction-request.mdx index 14efe1e9688..9ed6c563b62 100644 --- a/services/reference/blast/json-rpc-methods/_eth_sendrawtransaction-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_sendrawtransaction-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_submitwork-request.mdx b/services/reference/blast/json-rpc-methods/_eth_submitwork-request.mdx index 87d227d805b..b9793af10d5 100644 --- a/services/reference/blast/json-rpc-methods/_eth_submitwork-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_submitwork-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_submitWork", "params": ["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_eth_syncing-request.mdx b/services/reference/blast/json-rpc-methods/_eth_syncing-request.mdx index 82158665a31..154df717a57 100644 --- a/services/reference/blast/json-rpc-methods/_eth_syncing-request.mdx +++ b/services/reference/blast/json-rpc-methods/_eth_syncing-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_net_listening-request.mdx b/services/reference/blast/json-rpc-methods/_net_listening-request.mdx index 9f411d1946f..4c6663f9cd3 100644 --- a/services/reference/blast/json-rpc-methods/_net_listening-request.mdx +++ b/services/reference/blast/json-rpc-methods/_net_listening-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_net_peercount-request.mdx b/services/reference/blast/json-rpc-methods/_net_peercount-request.mdx index f478dbd3941..1a12082cd19 100644 --- a/services/reference/blast/json-rpc-methods/_net_peercount-request.mdx +++ b/services/reference/blast/json-rpc-methods/_net_peercount-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_net_version-request.mdx b/services/reference/blast/json-rpc-methods/_net_version-request.mdx index 94ad42e73a8..160b9b6b927 100644 --- a/services/reference/blast/json-rpc-methods/_net_version-request.mdx +++ b/services/reference/blast/json-rpc-methods/_net_version-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/_web3_clientversion-request.mdx b/services/reference/blast/json-rpc-methods/_web3_clientversion-request.mdx index 036995efae0..b6e81cd4eca 100644 --- a/services/reference/blast/json-rpc-methods/_web3_clientversion-request.mdx +++ b/services/reference/blast/json-rpc-methods/_web3_clientversion-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/blast/json-rpc-methods/eth_accounts.mdx b/services/reference/blast/json-rpc-methods/eth_accounts.mdx index 0cc7304b6ec..0dafbcb7389 100644 --- a/services/reference/blast/json-rpc-methods/eth_accounts.mdx +++ b/services/reference/blast/json-rpc-methods/eth_accounts.mdx @@ -2,39 +2,39 @@ title: "eth_accounts" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_accounts-description.mdx"; +import Description from "/services/reference/_partials/_eth_accounts-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_accounts-example.mdx"; +import Example from "/services/reference/_partials/_eth_accounts-example.mdx" ### Request -import Request from "./_eth_accounts-request.mdx"; +import Request from "./_eth_accounts-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_accounts-response.mdx"; +import Response from "/services/reference/_partials/_eth_accounts-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_blocknumber.mdx b/services/reference/blast/json-rpc-methods/eth_blocknumber.mdx index 7896c8c46f6..076b45d83ce 100644 --- a/services/reference/blast/json-rpc-methods/eth_blocknumber.mdx +++ b/services/reference/blast/json-rpc-methods/eth_blocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx" ### Request -import Request from "./_eth_blocknumber-request.mdx"; +import Request from "./_eth_blocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_call.mdx b/services/reference/blast/json-rpc-methods/eth_call.mdx index 88b3857775d..5c6ebee7de3 100644 --- a/services/reference/blast/json-rpc-methods/eth_call.mdx +++ b/services/reference/blast/json-rpc-methods/eth_call.mdx @@ -2,39 +2,39 @@ title: "eth_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_call-description.mdx"; +import Description from "/services/reference/_partials/_eth_call-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_call-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_call-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_call-example.mdx"; +import Example from "/services/reference/_partials/_eth_call-example.mdx" ### Request -import Request from "./_eth_call-request.mdx"; +import Request from "./_eth_call-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_call-response.mdx"; +import Response from "/services/reference/_partials/_eth_call-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_chainid.mdx b/services/reference/blast/json-rpc-methods/eth_chainid.mdx index e544b1003a4..a6f446ad268 100644 --- a/services/reference/blast/json-rpc-methods/eth_chainid.mdx +++ b/services/reference/blast/json-rpc-methods/eth_chainid.mdx @@ -2,39 +2,39 @@ title: "eth_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_chainid-description.mdx"; +import Description from "/services/reference/_partials/_eth_chainid-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_chainid-example.mdx"; +import Example from "/services/reference/_partials/_eth_chainid-example.mdx" ### Request -import Request from "./_eth_chainid-request.mdx"; +import Request from "./_eth_chainid-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_chainid-response.mdx"; +import Response from "/services/reference/_partials/_eth_chainid-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_coinbase.mdx b/services/reference/blast/json-rpc-methods/eth_coinbase.mdx index e9bb3ff61cd..8957df7e522 100644 --- a/services/reference/blast/json-rpc-methods/eth_coinbase.mdx +++ b/services/reference/blast/json-rpc-methods/eth_coinbase.mdx @@ -2,9 +2,9 @@ title: "eth_coinbase" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_coinbase-description.mdx"; +import Description from "/services/reference/_partials/_eth_coinbase-description.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_estimategas.mdx b/services/reference/blast/json-rpc-methods/eth_estimategas.mdx index af6c5ad77da..47c6b01804e 100644 --- a/services/reference/blast/json-rpc-methods/eth_estimategas.mdx +++ b/services/reference/blast/json-rpc-methods/eth_estimategas.mdx @@ -2,39 +2,39 @@ title: "eth_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_estimategas-description.mdx"; +import Description from "/services/reference/_partials/_eth_estimategas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_estimategas-example.mdx"; +import Example from "/services/reference/_partials/_eth_estimategas-example.mdx" ### Request -import Request from "./_eth_estimategas-request.mdx"; +import Request from "./_eth_estimategas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_estimategas-response.mdx"; +import Response from "/services/reference/_partials/_eth_estimategas-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_feehistory.mdx b/services/reference/blast/json-rpc-methods/eth_feehistory.mdx index 21e4962e114..9aafc564c46 100644 --- a/services/reference/blast/json-rpc-methods/eth_feehistory.mdx +++ b/services/reference/blast/json-rpc-methods/eth_feehistory.mdx @@ -2,39 +2,39 @@ title: "eth_feeHistory" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_feehistory-description.mdx"; +import Description from "/services/reference/_partials/_eth_feehistory-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_feehistory-example.mdx"; +import Example from "/services/reference/_partials/_eth_feehistory-example.mdx" ### Request -import Request from "./_eth_feehistory-request.mdx"; +import Request from "./_eth_feehistory-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_feehistory-response.mdx"; +import Response from "/services/reference/_partials/_eth_feehistory-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_gasprice.mdx b/services/reference/blast/json-rpc-methods/eth_gasprice.mdx index c602d61c293..8980dcc8a39 100644 --- a/services/reference/blast/json-rpc-methods/eth_gasprice.mdx +++ b/services/reference/blast/json-rpc-methods/eth_gasprice.mdx @@ -2,39 +2,39 @@ title: "eth_gasPrice" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gasprice-description.mdx"; +import Description from "/services/reference/_partials/_eth_gasprice-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gasprice-example.mdx"; +import Example from "/services/reference/_partials/_eth_gasprice-example.mdx" ### Request -import Request from "./_eth_gasprice-request.mdx"; +import Request from "./_eth_gasprice-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gasprice-response.mdx"; +import Response from "/services/reference/_partials/_eth_gasprice-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getbalance.mdx b/services/reference/blast/json-rpc-methods/eth_getbalance.mdx index c50eba5fd61..1ff5a0d31c8 100644 --- a/services/reference/blast/json-rpc-methods/eth_getbalance.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getbalance.mdx @@ -2,39 +2,39 @@ title: "eth_getBalance" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getbalance-description.mdx"; +import Description from "/services/reference/_partials/_eth_getbalance-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getbalance-example.mdx"; +import Example from "/services/reference/_partials/_eth_getbalance-example.mdx" ### Request -import Request from "./_eth_getbalance-request.mdx"; +import Request from "./_eth_getbalance-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getbalance-response.mdx"; +import Response from "/services/reference/_partials/_eth_getbalance-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getbalancevalues.mdx b/services/reference/blast/json-rpc-methods/eth_getbalancevalues.mdx index ab65ce16d95..e60eb47b6ed 100644 --- a/services/reference/blast/json-rpc-methods/eth_getbalancevalues.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getbalancevalues.mdx @@ -2,8 +2,8 @@ title: "eth_getBalanceValues" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the parameters that control an accounts rebasing ETH balance. @@ -18,8 +18,7 @@ To facilitate rebasing ETH balances, accounts on Blast store more fields than ju - `address`: [_Required_] A string representing the address (20 bytes) to check for balance. - `block parameter`: [_Required_] A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. - See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - + See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). ## Returns @@ -32,19 +31,19 @@ Object with the following fields: ## Example -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). ### Request - ```bash - curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalanceValues","params":["0xd071acb641553a2e205181a42aa3a8ace97dae6d","latest"],"id":1}' - ``` +```bash +curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getBalanceValues","params":["0xd071acb641553a2e205181a42aa3a8ace97dae6d","latest"],"id":1}' +``` @@ -68,4 +67,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ``` - \ No newline at end of file + diff --git a/services/reference/blast/json-rpc-methods/eth_getblockbyhash.mdx b/services/reference/blast/json-rpc-methods/eth_getblockbyhash.mdx index ad555110b71..970e6c27704 100644 --- a/services/reference/blast/json-rpc-methods/eth_getblockbyhash.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getblockbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx" ### Request -import Request from "./_eth_getblockbyhash-request.mdx"; +import Request from "./_eth_getblockbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getblockbynumber.mdx b/services/reference/blast/json-rpc-methods/eth_getblockbynumber.mdx index 2faabaa3e86..f14e34f1531 100644 --- a/services/reference/blast/json-rpc-methods/eth_getblockbynumber.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getblockbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx" ### Request -import Request from "./_eth_getblockbynumber-request.mdx"; +import Request from "./_eth_getblockbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx b/services/reference/blast/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx index aacb2e0e3af..36944d31e1f 100644 --- a/services/reference/blast/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbyhash-request.mdx"; +import Request from "./_eth_getblocktransactioncountbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx b/services/reference/blast/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx index 161e7fe344b..c355e33cb53 100644 --- a/services/reference/blast/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbynumber-request.mdx"; +import Request from "./_eth_getblocktransactioncountbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getcode.mdx b/services/reference/blast/json-rpc-methods/eth_getcode.mdx index 8364a077f09..ace0da8cb26 100644 --- a/services/reference/blast/json-rpc-methods/eth_getcode.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getcode.mdx @@ -2,39 +2,39 @@ title: "eth_getCode" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getcode-description.mdx"; +import Description from "/services/reference/_partials/_eth_getcode-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getcode-example.mdx"; +import Example from "/services/reference/_partials/_eth_getcode-example.mdx" ### Request -import Request from "./_eth_getcode-request.mdx"; +import Request from "./_eth_getcode-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getcode-response.mdx"; +import Response from "/services/reference/_partials/_eth_getcode-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getlogs.mdx b/services/reference/blast/json-rpc-methods/eth_getlogs.mdx index 546d66f9148..4a1c1a031c4 100644 --- a/services/reference/blast/json-rpc-methods/eth_getlogs.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getlogs-description.mdx"; +import Description from "/services/reference/_partials/_eth_getlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getlogs-example.mdx"; +import Example from "/services/reference/_partials/_eth_getlogs-example.mdx" ### Request -import Request from "./_eth_getlogs-request.mdx"; +import Request from "./_eth_getlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getlogs-response.mdx"; +import Response from "/services/reference/_partials/_eth_getlogs-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getproof.mdx b/services/reference/blast/json-rpc-methods/eth_getproof.mdx index 7cb028bd44f..0d7b5743dc4 100644 --- a/services/reference/blast/json-rpc-methods/eth_getproof.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getproof.mdx @@ -2,39 +2,39 @@ title: "eth_getProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getproof-description.mdx"; +import Description from "/services/reference/_partials/_eth_getproof-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getproof-example.mdx"; +import Example from "/services/reference/_partials/_eth_getproof-example.mdx" ### Request -import Request from "./_eth_getproof-request.mdx"; +import Request from "./_eth_getproof-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getproof-response.mdx"; +import Response from "/services/reference/_partials/_eth_getproof-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getstorageat.mdx b/services/reference/blast/json-rpc-methods/eth_getstorageat.mdx index aee85d0fde8..d91e20b3979 100644 --- a/services/reference/blast/json-rpc-methods/eth_getstorageat.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getstorageat.mdx @@ -2,39 +2,39 @@ title: "eth_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx"; +import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx"; +import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx" ### Request -import Request from "./_eth_getstorageat-request.mdx"; +import Request from "./_eth_getstorageat-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx"; +import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx b/services/reference/blast/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx index 5422dc7f552..e04f9c75a5c 100644 --- a/services/reference/blast/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx +++ b/services/reference/blast/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx b/services/reference/blast/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx index 6861fb566a4..28ba85246a2 100644 --- a/services/reference/blast/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx +++ b/services/reference/blast/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_gettransactionbyhash.mdx b/services/reference/blast/json-rpc-methods/eth_gettransactionbyhash.mdx index 1adc6ff1eb4..28548a1fd58 100644 --- a/services/reference/blast/json-rpc-methods/eth_gettransactionbyhash.mdx +++ b/services/reference/blast/json-rpc-methods/eth_gettransactionbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx" ### Request -import Request from "./_eth_gettransactionbyhash-request.mdx"; +import Request from "./_eth_gettransactionbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_gettransactioncount.mdx b/services/reference/blast/json-rpc-methods/eth_gettransactioncount.mdx index 73985353185..9cf5c71e500 100644 --- a/services/reference/blast/json-rpc-methods/eth_gettransactioncount.mdx +++ b/services/reference/blast/json-rpc-methods/eth_gettransactioncount.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx" ### Request -import Request from "./_eth_gettransactioncount-request.mdx"; +import Request from "./_eth_gettransactioncount-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_gettransactionreceipt.mdx b/services/reference/blast/json-rpc-methods/eth_gettransactionreceipt.mdx index 370d08c0402..1ab2ba12676 100644 --- a/services/reference/blast/json-rpc-methods/eth_gettransactionreceipt.mdx +++ b/services/reference/blast/json-rpc-methods/eth_gettransactionreceipt.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx" ### Request -import Request from "./_eth_gettransactionreceipt-request.mdx"; +import Request from "./_eth_gettransactionreceipt-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getunclebyblockhashandindex.mdx b/services/reference/blast/json-rpc-methods/eth_getunclebyblockhashandindex.mdx index dce1f045d95..d6a9a959a37 100644 --- a/services/reference/blast/json-rpc-methods/eth_getunclebyblockhashandindex.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getunclebyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblockhashandindex-request.mdx"; +import Request from "./_eth_getunclebyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx b/services/reference/blast/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx index 321c22c4ce0..07c458cb7ad 100644 --- a/services/reference/blast/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblocknumberandindex-request.mdx"; +import Request from "./_eth_getunclebyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getunclecountbyblockhash.mdx b/services/reference/blast/json-rpc-methods/eth_getunclecountbyblockhash.mdx index c21e8c283a8..298b5c520e8 100644 --- a/services/reference/blast/json-rpc-methods/eth_getunclecountbyblockhash.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getunclecountbyblockhash.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblockhash-request.mdx"; +import Request from "./_eth_getunclecountbyblockhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_getunclecountbyblocknumber.mdx b/services/reference/blast/json-rpc-methods/eth_getunclecountbyblocknumber.mdx index 824fdf8de1b..2cc5dbbf753 100644 --- a/services/reference/blast/json-rpc-methods/eth_getunclecountbyblocknumber.mdx +++ b/services/reference/blast/json-rpc-methods/eth_getunclecountbyblocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblocknumber-request.mdx"; +import Request from "./_eth_getunclecountbyblocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_maxpriorityfeepergas.mdx b/services/reference/blast/json-rpc-methods/eth_maxpriorityfeepergas.mdx index 87e39538aaf..6f818052ae7 100644 --- a/services/reference/blast/json-rpc-methods/eth_maxpriorityfeepergas.mdx +++ b/services/reference/blast/json-rpc-methods/eth_maxpriorityfeepergas.mdx @@ -2,39 +2,39 @@ title: "eth_maxPriorityFeePerGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx"; +import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx"; +import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx" ### Request -import Request from "./_eth_maxpriorityfeepergas-request.mdx"; +import Request from "./_eth_maxpriorityfeepergas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx"; +import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_protocolversion.mdx b/services/reference/blast/json-rpc-methods/eth_protocolversion.mdx index 38863109276..02b5da95bff 100644 --- a/services/reference/blast/json-rpc-methods/eth_protocolversion.mdx +++ b/services/reference/blast/json-rpc-methods/eth_protocolversion.mdx @@ -2,39 +2,39 @@ title: "eth_protocolVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx"; +import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx"; +import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx" ### Request -import Request from "./_eth_protocolversion-request.mdx"; +import Request from "./_eth_protocolversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx"; +import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_sendrawtransaction.mdx b/services/reference/blast/json-rpc-methods/eth_sendrawtransaction.mdx index 4dfc4e6f296..dd39a5bafd4 100644 --- a/services/reference/blast/json-rpc-methods/eth_sendrawtransaction.mdx +++ b/services/reference/blast/json-rpc-methods/eth_sendrawtransaction.mdx @@ -2,39 +2,39 @@ title: "eth_sendRawTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx"; +import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx" ### Request -import Request from "./_eth_sendrawtransaction-request.mdx"; +import Request from "./_eth_sendrawtransaction-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx"; +import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_sendtransaction.mdx b/services/reference/blast/json-rpc-methods/eth_sendtransaction.mdx index ac6ebfd02dd..5c13a1d5c8f 100644 --- a/services/reference/blast/json-rpc-methods/eth_sendtransaction.mdx +++ b/services/reference/blast/json-rpc-methods/eth_sendtransaction.mdx @@ -2,10 +2,9 @@ title: "eth_sendTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx" - diff --git a/services/reference/blast/json-rpc-methods/eth_sign.mdx b/services/reference/blast/json-rpc-methods/eth_sign.mdx index 073b1040681..f8c6a17df92 100644 --- a/services/reference/blast/json-rpc-methods/eth_sign.mdx +++ b/services/reference/blast/json-rpc-methods/eth_sign.mdx @@ -2,9 +2,9 @@ title: "eth_sign" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sign-description.mdx"; +import Description from "/services/reference/_partials/_eth_sign-description.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_submitwork.mdx b/services/reference/blast/json-rpc-methods/eth_submitwork.mdx index b286c9b49de..3e302cecfe3 100644 --- a/services/reference/blast/json-rpc-methods/eth_submitwork.mdx +++ b/services/reference/blast/json-rpc-methods/eth_submitwork.mdx @@ -2,39 +2,39 @@ title: "eth_submitWork" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_submitwork-description.mdx"; +import Description from "/services/reference/_partials/_eth_submitwork-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_submitwork-example.mdx"; +import Example from "/services/reference/_partials/_eth_submitwork-example.mdx" ### Request -import Request from "./_eth_submitwork-request.mdx"; +import Request from "./_eth_submitwork-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_submitwork-response.mdx"; +import Response from "/services/reference/_partials/_eth_submitwork-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/eth_syncing.mdx b/services/reference/blast/json-rpc-methods/eth_syncing.mdx index bfb89e8c209..7ffbcd44560 100644 --- a/services/reference/blast/json-rpc-methods/eth_syncing.mdx +++ b/services/reference/blast/json-rpc-methods/eth_syncing.mdx @@ -2,39 +2,39 @@ title: "eth_syncing" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_syncing-description.mdx"; +import Description from "/services/reference/_partials/_eth_syncing-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_syncing-example.mdx"; +import Example from "/services/reference/_partials/_eth_syncing-example.mdx" ### Request -import Request from "./_eth_syncing-request.mdx"; +import Request from "./_eth_syncing-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_syncing-response.mdx"; +import Response from "/services/reference/_partials/_eth_syncing-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/index.md b/services/reference/blast/json-rpc-methods/index.md index 5ce51ed8531..4918a070cd8 100644 --- a/services/reference/blast/json-rpc-methods/index.md +++ b/services/reference/blast/json-rpc-methods/index.md @@ -1,4 +1,4 @@ # JSON-RPC methods Blast supports a subset [Ethereum JSON-RPC methods](../../ethereum/json-rpc-methods/index.md). WebSocket calls -are not supported when using the Blast endpoints. \ No newline at end of file +are not supported when using the Blast endpoints. diff --git a/services/reference/blast/json-rpc-methods/net_peercount.mdx b/services/reference/blast/json-rpc-methods/net_peercount.mdx index 9ff570e4c70..c0246b44d39 100644 --- a/services/reference/blast/json-rpc-methods/net_peercount.mdx +++ b/services/reference/blast/json-rpc-methods/net_peercount.mdx @@ -2,39 +2,39 @@ title: "net_peerCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_peercount-description.mdx"; +import Description from "/services/reference/_partials/_net_peercount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_peercount-parameters.mdx"; +import Params from "/services/reference/_partials/_net_peercount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_peercount-returns.mdx"; +import Returns from "/services/reference/_partials/_net_peercount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_peercount-example.mdx"; +import Example from "/services/reference/_partials/_net_peercount-example.mdx" ### Request -import Request from "./_net_peercount-request.mdx"; +import Request from "./_net_peercount-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_peercount-response.mdx"; +import Response from "/services/reference/_partials/_net_peercount-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/net_version.mdx b/services/reference/blast/json-rpc-methods/net_version.mdx index d55ab80402d..1d6c0080c60 100644 --- a/services/reference/blast/json-rpc-methods/net_version.mdx +++ b/services/reference/blast/json-rpc-methods/net_version.mdx @@ -2,39 +2,39 @@ title: "net_version" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_version-description.mdx"; +import Description from "/services/reference/_partials/_net_version-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_version-parameters.mdx"; +import Params from "/services/reference/_partials/_net_version-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_version-returns.mdx"; +import Returns from "/services/reference/_partials/_net_version-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_version-example.mdx"; +import Example from "/services/reference/_partials/_net_version-example.mdx" ### Request -import Request from "./_net_version-request.mdx"; +import Request from "./_net_version-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_version-response.mdx"; +import Response from "/services/reference/_partials/_net_version-response.mdx" diff --git a/services/reference/blast/json-rpc-methods/web3_clientversion.mdx b/services/reference/blast/json-rpc-methods/web3_clientversion.mdx index 11997e5c36d..c5ee316d699 100644 --- a/services/reference/blast/json-rpc-methods/web3_clientversion.mdx +++ b/services/reference/blast/json-rpc-methods/web3_clientversion.mdx @@ -2,39 +2,39 @@ title: "web3_clientVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_web3_clientversion-description.mdx"; +import Description from "/services/reference/_partials/_web3_clientversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx"; +import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx"; +import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_web3_clientversion-example.mdx"; +import Example from "/services/reference/_partials/_web3_clientversion-example.mdx" ### Request -import Request from "./_web3_clientversion-request.mdx"; +import Request from "./_web3_clientversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_web3_clientversion-response.mdx"; +import Response from "/services/reference/_partials/_web3_clientversion-response.mdx" diff --git a/services/reference/blast/quickstart.md b/services/reference/blast/quickstart.md index 3fb653abfb1..7859f43bb96 100644 --- a/services/reference/blast/quickstart.md +++ b/services/reference/blast/quickstart.md @@ -25,9 +25,9 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://blast-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ### Node (JavaScript) @@ -38,150 +38,152 @@ In these examples, you'll use [NPM](https://docs.npmjs.com/downloading-and-insta 1. In your project folder, install the `node-fetch` package using `npm`: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://blast-mainnet.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://blast-mainnet.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios 1. In your project folder, install the Axios package using `npm`: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require('axios'); - - axios.post('https://blast-mainnet.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'eth_blockNumber', - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios") + + axios + .post("https://blast-mainnet.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }) + .then((response) => { + console.log(response.data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Ethers 1. In your project folder, install the ethers package using `npm`: - ```bash - npm install ethers - `````` + ```bash + npm install ethers + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.js" - const ethers = require('ethers'); + ```javascript title="index.js" + const ethers = require("ethers") - const provider = new ethers.providers.JsonRpcProvider('https://blast-mainnet.infura.io/v3/YOUR-API-KEY'); + const provider = new ethers.providers.JsonRpcProvider( + "https://blast-mainnet.infura.io/v3/YOUR-API-KEY" + ) - provider.getBlockNumber() - .then(blockNumber => { - console.log(blockNumber); - }) - .catch(error => { - console.error(error); - }); - ``` + provider + .getBlockNumber() + .then((blockNumber) => { + console.log(blockNumber) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` 1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```python title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = 'https://blast-mainnet.infura.io/v3/YOUR-API-KEY' + url = "https://blast-mainnet.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + } - headers = {'content-type': 'application/json'} + headers = {"content-type": "application/json"} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` + ```bash + python index.py + ``` ## Next steps @@ -189,13 +191,12 @@ Now that you have successfully made a call to the Blast network, you can explore by Infura. Here are some suggestions: - **Explore other Blast APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Ethereum, Linea, Polygon, Optimism, and more. - **Monitor your usage**: Keep an eye on your usage on the [Infura dashboard](../../../../developer-tools/dashboard/how-to/dashboard-stats/) to - ensure you're not hitting your rate limits. + ensure you're not hitting your rate limits. Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/reference/celo/index.md b/services/reference/celo/index.md index 83b93113926..ce38944c883 100644 --- a/services/reference/celo/index.md +++ b/services/reference/celo/index.md @@ -19,7 +19,7 @@ native, ERC20-like stable tokens like [cUSD, cEUR, and cREAL](https://celoreserv ::: -Select an option below to get started with the Celo network. +Select an option below to get started with the Celo network. ```bash curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` - - diff --git a/services/reference/celo/json-rpc-methods/_eth_blocknumber-request.mdx b/services/reference/celo/json-rpc-methods/_eth_blocknumber-request.mdx index 3cf05173e0b..7ccd8e846d6 100644 --- a/services/reference/celo/json-rpc-methods/_eth_blocknumber-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_blocknumber-request.mdx @@ -1,17 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` - - diff --git a/services/reference/celo/json-rpc-methods/_eth_call-request.mdx b/services/reference/celo/json-rpc-methods/_eth_call-request.mdx index 4ae412147ef..6f7005ea2db 100644 --- a/services/reference/celo/json-rpc-methods/_eth_call-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_call-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_chainid-request.mdx b/services/reference/celo/json-rpc-methods/_eth_chainid-request.mdx index 33e7c40bad0..7d9a79a4d57 100644 --- a/services/reference/celo/json-rpc-methods/_eth_chainid-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_chainid-request.mdx @@ -1,17 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` - - diff --git a/services/reference/celo/json-rpc-methods/_eth_estimategas-request.mdx b/services/reference/celo/json-rpc-methods/_eth_estimategas-request.mdx index 3a5653e4fa1..30f108b3694 100644 --- a/services/reference/celo/json-rpc-methods/_eth_estimategas-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_estimategas-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_gasprice-request.mdx b/services/reference/celo/json-rpc-methods/_eth_gasprice-request.mdx index 057e82244a4..141bc416f2a 100644 --- a/services/reference/celo/json-rpc-methods/_eth_gasprice-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_gasprice-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_getbalance-request.mdx b/services/reference/celo/json-rpc-methods/_eth_getbalance-request.mdx index 6e44fd23a46..8048e1e1381 100644 --- a/services/reference/celo/json-rpc-methods/_eth_getbalance-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_getbalance-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_getblockbyhash-request.mdx b/services/reference/celo/json-rpc-methods/_eth_getblockbyhash-request.mdx index 409cd08277d..3886ac6f745 100644 --- a/services/reference/celo/json-rpc-methods/_eth_getblockbyhash-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_getblockbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_getblockbynumber-request.mdx b/services/reference/celo/json-rpc-methods/_eth_getblockbynumber-request.mdx index 8bf8edd507b..4c511600af5 100644 --- a/services/reference/celo/json-rpc-methods/_eth_getblockbynumber-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_getblockbynumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x5BAD55",false],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx b/services/reference/celo/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx index 70fbc1f6569..f9a114f7a7e 100644 --- a/services/reference/celo/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx b/services/reference/celo/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx index 13e2aaa8134..624d36f47f5 100644 --- a/services/reference/celo/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id":1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_getcode-request.mdx b/services/reference/celo/json-rpc-methods/_eth_getcode-request.mdx index 935e38ad443..93e35eb248c 100644 --- a/services/reference/celo/json-rpc-methods/_eth_getcode-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_getcode-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_getlogs-request.mdx b/services/reference/celo/json-rpc-methods/_eth_getlogs-request.mdx index f075fb50168..afbf5645b2f 100644 --- a/services/reference/celo/json-rpc-methods/_eth_getlogs-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_getlogs-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics": ["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_getproof-request.mdx b/services/reference/celo/json-rpc-methods/_eth_getproof-request.mdx index b47179ab5b4..88d983d7135 100644 --- a/services/reference/celo/json-rpc-methods/_eth_getproof-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_getproof-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0","method": "eth_getProof","id": 1,"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getProof", "id": 1, "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_getstorageat-request.mdx b/services/reference/celo/json-rpc-methods/_eth_getstorageat-request.mdx index 8e1aeb7dabe..7f115bdfda0 100644 --- a/services/reference/celo/json-rpc-methods/_eth_getstorageat-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_getstorageat-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx b/services/reference/celo/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx index 527cd41c5de..eb00afdeb4b 100644 --- a/services/reference/celo/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx b/services/reference/celo/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx index 699ff80f50a..a0a812641bd 100644 --- a/services/reference/celo/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id":1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_gettransactionbyhash-request.mdx b/services/reference/celo/json-rpc-methods/_eth_gettransactionbyhash-request.mdx index 09c6c06ed9d..44690c59604 100644 --- a/services/reference/celo/json-rpc-methods/_eth_gettransactionbyhash-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_gettransactionbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_gettransactioncount-request.mdx b/services/reference/celo/json-rpc-methods/_eth_gettransactioncount-request.mdx index babf362bfe8..7d41daf7b1c 100644 --- a/services/reference/celo/json-rpc-methods/_eth_gettransactioncount-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_gettransactioncount-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_gettransactionreceipt-request.mdx b/services/reference/celo/json-rpc-methods/_eth_gettransactionreceipt-request.mdx index 756f05dcabe..caa7ae6b38d 100644 --- a/services/reference/celo/json-rpc-methods/_eth_gettransactionreceipt-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_gettransactionreceipt-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx b/services/reference/celo/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx index a9f747ee6e0..bdb79551de2 100644 --- a/services/reference/celo/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_sendrawtransaction-request.mdx b/services/reference/celo/json-rpc-methods/_eth_sendrawtransaction-request.mdx index 365301fc3d9..3bf9825a44a 100644 --- a/services/reference/celo/json-rpc-methods/_eth_sendrawtransaction-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_sendrawtransaction-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_eth_syncing-request.mdx b/services/reference/celo/json-rpc-methods/_eth_syncing-request.mdx index 3dfae4d932d..9e3afbe0ae4 100644 --- a/services/reference/celo/json-rpc-methods/_eth_syncing-request.mdx +++ b/services/reference/celo/json-rpc-methods/_eth_syncing-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_net_listening-request.mdx b/services/reference/celo/json-rpc-methods/_net_listening-request.mdx index a27229bc24d..de7074bd522 100644 --- a/services/reference/celo/json-rpc-methods/_net_listening-request.mdx +++ b/services/reference/celo/json-rpc-methods/_net_listening-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_net_peercount-request.mdx b/services/reference/celo/json-rpc-methods/_net_peercount-request.mdx index 7b6fff6777e..22c3638a48e 100644 --- a/services/reference/celo/json-rpc-methods/_net_peercount-request.mdx +++ b/services/reference/celo/json-rpc-methods/_net_peercount-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_net_version-request.mdx b/services/reference/celo/json-rpc-methods/_net_version-request.mdx index c1152770efd..62436ffbc47 100644 --- a/services/reference/celo/json-rpc-methods/_net_version-request.mdx +++ b/services/reference/celo/json-rpc-methods/_net_version-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/_web3_clientversion-request.mdx b/services/reference/celo/json-rpc-methods/_web3_clientversion-request.mdx index 0015293e801..59ff2a931b6 100644 --- a/services/reference/celo/json-rpc-methods/_web3_clientversion-request.mdx +++ b/services/reference/celo/json-rpc-methods/_web3_clientversion-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +curl https://celo-alfajores.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/celo/json-rpc-methods/eth_accounts.mdx b/services/reference/celo/json-rpc-methods/eth_accounts.mdx index 0cc7304b6ec..0dafbcb7389 100644 --- a/services/reference/celo/json-rpc-methods/eth_accounts.mdx +++ b/services/reference/celo/json-rpc-methods/eth_accounts.mdx @@ -2,39 +2,39 @@ title: "eth_accounts" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_accounts-description.mdx"; +import Description from "/services/reference/_partials/_eth_accounts-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_accounts-example.mdx"; +import Example from "/services/reference/_partials/_eth_accounts-example.mdx" ### Request -import Request from "./_eth_accounts-request.mdx"; +import Request from "./_eth_accounts-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_accounts-response.mdx"; +import Response from "/services/reference/_partials/_eth_accounts-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_blocknumber.mdx b/services/reference/celo/json-rpc-methods/eth_blocknumber.mdx index 7896c8c46f6..076b45d83ce 100644 --- a/services/reference/celo/json-rpc-methods/eth_blocknumber.mdx +++ b/services/reference/celo/json-rpc-methods/eth_blocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx" ### Request -import Request from "./_eth_blocknumber-request.mdx"; +import Request from "./_eth_blocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_call.mdx b/services/reference/celo/json-rpc-methods/eth_call.mdx index 88b3857775d..5c6ebee7de3 100644 --- a/services/reference/celo/json-rpc-methods/eth_call.mdx +++ b/services/reference/celo/json-rpc-methods/eth_call.mdx @@ -2,39 +2,39 @@ title: "eth_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_call-description.mdx"; +import Description from "/services/reference/_partials/_eth_call-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_call-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_call-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_call-example.mdx"; +import Example from "/services/reference/_partials/_eth_call-example.mdx" ### Request -import Request from "./_eth_call-request.mdx"; +import Request from "./_eth_call-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_call-response.mdx"; +import Response from "/services/reference/_partials/_eth_call-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_chainid.mdx b/services/reference/celo/json-rpc-methods/eth_chainid.mdx index e544b1003a4..a6f446ad268 100644 --- a/services/reference/celo/json-rpc-methods/eth_chainid.mdx +++ b/services/reference/celo/json-rpc-methods/eth_chainid.mdx @@ -2,39 +2,39 @@ title: "eth_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_chainid-description.mdx"; +import Description from "/services/reference/_partials/_eth_chainid-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_chainid-example.mdx"; +import Example from "/services/reference/_partials/_eth_chainid-example.mdx" ### Request -import Request from "./_eth_chainid-request.mdx"; +import Request from "./_eth_chainid-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_chainid-response.mdx"; +import Response from "/services/reference/_partials/_eth_chainid-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_coinbase.mdx b/services/reference/celo/json-rpc-methods/eth_coinbase.mdx index e9bb3ff61cd..8957df7e522 100644 --- a/services/reference/celo/json-rpc-methods/eth_coinbase.mdx +++ b/services/reference/celo/json-rpc-methods/eth_coinbase.mdx @@ -2,9 +2,9 @@ title: "eth_coinbase" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_coinbase-description.mdx"; +import Description from "/services/reference/_partials/_eth_coinbase-description.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_estimategas.mdx b/services/reference/celo/json-rpc-methods/eth_estimategas.mdx index af6c5ad77da..47c6b01804e 100644 --- a/services/reference/celo/json-rpc-methods/eth_estimategas.mdx +++ b/services/reference/celo/json-rpc-methods/eth_estimategas.mdx @@ -2,39 +2,39 @@ title: "eth_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_estimategas-description.mdx"; +import Description from "/services/reference/_partials/_eth_estimategas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_estimategas-example.mdx"; +import Example from "/services/reference/_partials/_eth_estimategas-example.mdx" ### Request -import Request from "./_eth_estimategas-request.mdx"; +import Request from "./_eth_estimategas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_estimategas-response.mdx"; +import Response from "/services/reference/_partials/_eth_estimategas-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_gasprice.mdx b/services/reference/celo/json-rpc-methods/eth_gasprice.mdx index c602d61c293..8980dcc8a39 100644 --- a/services/reference/celo/json-rpc-methods/eth_gasprice.mdx +++ b/services/reference/celo/json-rpc-methods/eth_gasprice.mdx @@ -2,39 +2,39 @@ title: "eth_gasPrice" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gasprice-description.mdx"; +import Description from "/services/reference/_partials/_eth_gasprice-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gasprice-example.mdx"; +import Example from "/services/reference/_partials/_eth_gasprice-example.mdx" ### Request -import Request from "./_eth_gasprice-request.mdx"; +import Request from "./_eth_gasprice-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gasprice-response.mdx"; +import Response from "/services/reference/_partials/_eth_gasprice-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_getbalance.mdx b/services/reference/celo/json-rpc-methods/eth_getbalance.mdx index c50eba5fd61..1ff5a0d31c8 100644 --- a/services/reference/celo/json-rpc-methods/eth_getbalance.mdx +++ b/services/reference/celo/json-rpc-methods/eth_getbalance.mdx @@ -2,39 +2,39 @@ title: "eth_getBalance" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getbalance-description.mdx"; +import Description from "/services/reference/_partials/_eth_getbalance-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getbalance-example.mdx"; +import Example from "/services/reference/_partials/_eth_getbalance-example.mdx" ### Request -import Request from "./_eth_getbalance-request.mdx"; +import Request from "./_eth_getbalance-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getbalance-response.mdx"; +import Response from "/services/reference/_partials/_eth_getbalance-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_getblockbyhash.mdx b/services/reference/celo/json-rpc-methods/eth_getblockbyhash.mdx index ad555110b71..970e6c27704 100644 --- a/services/reference/celo/json-rpc-methods/eth_getblockbyhash.mdx +++ b/services/reference/celo/json-rpc-methods/eth_getblockbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx" ### Request -import Request from "./_eth_getblockbyhash-request.mdx"; +import Request from "./_eth_getblockbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_getblockbynumber.mdx b/services/reference/celo/json-rpc-methods/eth_getblockbynumber.mdx index 2faabaa3e86..f14e34f1531 100644 --- a/services/reference/celo/json-rpc-methods/eth_getblockbynumber.mdx +++ b/services/reference/celo/json-rpc-methods/eth_getblockbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx" ### Request -import Request from "./_eth_getblockbynumber-request.mdx"; +import Request from "./_eth_getblockbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx b/services/reference/celo/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx index aacb2e0e3af..36944d31e1f 100644 --- a/services/reference/celo/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx +++ b/services/reference/celo/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbyhash-request.mdx"; +import Request from "./_eth_getblocktransactioncountbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx b/services/reference/celo/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx index 161e7fe344b..c355e33cb53 100644 --- a/services/reference/celo/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx +++ b/services/reference/celo/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbynumber-request.mdx"; +import Request from "./_eth_getblocktransactioncountbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_getcode.mdx b/services/reference/celo/json-rpc-methods/eth_getcode.mdx index 8364a077f09..ace0da8cb26 100644 --- a/services/reference/celo/json-rpc-methods/eth_getcode.mdx +++ b/services/reference/celo/json-rpc-methods/eth_getcode.mdx @@ -2,39 +2,39 @@ title: "eth_getCode" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getcode-description.mdx"; +import Description from "/services/reference/_partials/_eth_getcode-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getcode-example.mdx"; +import Example from "/services/reference/_partials/_eth_getcode-example.mdx" ### Request -import Request from "./_eth_getcode-request.mdx"; +import Request from "./_eth_getcode-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getcode-response.mdx"; +import Response from "/services/reference/_partials/_eth_getcode-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_getlogs.mdx b/services/reference/celo/json-rpc-methods/eth_getlogs.mdx index 546d66f9148..4a1c1a031c4 100644 --- a/services/reference/celo/json-rpc-methods/eth_getlogs.mdx +++ b/services/reference/celo/json-rpc-methods/eth_getlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getlogs-description.mdx"; +import Description from "/services/reference/_partials/_eth_getlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getlogs-example.mdx"; +import Example from "/services/reference/_partials/_eth_getlogs-example.mdx" ### Request -import Request from "./_eth_getlogs-request.mdx"; +import Request from "./_eth_getlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getlogs-response.mdx"; +import Response from "/services/reference/_partials/_eth_getlogs-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_getproof.mdx b/services/reference/celo/json-rpc-methods/eth_getproof.mdx index 7cb028bd44f..0d7b5743dc4 100644 --- a/services/reference/celo/json-rpc-methods/eth_getproof.mdx +++ b/services/reference/celo/json-rpc-methods/eth_getproof.mdx @@ -2,39 +2,39 @@ title: "eth_getProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getproof-description.mdx"; +import Description from "/services/reference/_partials/_eth_getproof-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getproof-example.mdx"; +import Example from "/services/reference/_partials/_eth_getproof-example.mdx" ### Request -import Request from "./_eth_getproof-request.mdx"; +import Request from "./_eth_getproof-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getproof-response.mdx"; +import Response from "/services/reference/_partials/_eth_getproof-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_getstorageat.mdx b/services/reference/celo/json-rpc-methods/eth_getstorageat.mdx index aee85d0fde8..d91e20b3979 100644 --- a/services/reference/celo/json-rpc-methods/eth_getstorageat.mdx +++ b/services/reference/celo/json-rpc-methods/eth_getstorageat.mdx @@ -2,39 +2,39 @@ title: "eth_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx"; +import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx"; +import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx" ### Request -import Request from "./_eth_getstorageat-request.mdx"; +import Request from "./_eth_getstorageat-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx"; +import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx b/services/reference/celo/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx index 5422dc7f552..e04f9c75a5c 100644 --- a/services/reference/celo/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx +++ b/services/reference/celo/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx b/services/reference/celo/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx index 6861fb566a4..28ba85246a2 100644 --- a/services/reference/celo/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx +++ b/services/reference/celo/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_gettransactionbyhash.mdx b/services/reference/celo/json-rpc-methods/eth_gettransactionbyhash.mdx index 1adc6ff1eb4..28548a1fd58 100644 --- a/services/reference/celo/json-rpc-methods/eth_gettransactionbyhash.mdx +++ b/services/reference/celo/json-rpc-methods/eth_gettransactionbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx" ### Request -import Request from "./_eth_gettransactionbyhash-request.mdx"; +import Request from "./_eth_gettransactionbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_gettransactioncount.mdx b/services/reference/celo/json-rpc-methods/eth_gettransactioncount.mdx index 73985353185..9cf5c71e500 100644 --- a/services/reference/celo/json-rpc-methods/eth_gettransactioncount.mdx +++ b/services/reference/celo/json-rpc-methods/eth_gettransactioncount.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx" ### Request -import Request from "./_eth_gettransactioncount-request.mdx"; +import Request from "./_eth_gettransactioncount-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_gettransactionreceipt.mdx b/services/reference/celo/json-rpc-methods/eth_gettransactionreceipt.mdx index 370d08c0402..1ab2ba12676 100644 --- a/services/reference/celo/json-rpc-methods/eth_gettransactionreceipt.mdx +++ b/services/reference/celo/json-rpc-methods/eth_gettransactionreceipt.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx" ### Request -import Request from "./_eth_gettransactionreceipt-request.mdx"; +import Request from "./_eth_gettransactionreceipt-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_maxpriorityfeepergas.mdx b/services/reference/celo/json-rpc-methods/eth_maxpriorityfeepergas.mdx index 87e39538aaf..6f818052ae7 100644 --- a/services/reference/celo/json-rpc-methods/eth_maxpriorityfeepergas.mdx +++ b/services/reference/celo/json-rpc-methods/eth_maxpriorityfeepergas.mdx @@ -2,39 +2,39 @@ title: "eth_maxPriorityFeePerGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx"; +import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx"; +import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx" ### Request -import Request from "./_eth_maxpriorityfeepergas-request.mdx"; +import Request from "./_eth_maxpriorityfeepergas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx"; +import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_sendrawtransaction.mdx b/services/reference/celo/json-rpc-methods/eth_sendrawtransaction.mdx index 4dfc4e6f296..dd39a5bafd4 100644 --- a/services/reference/celo/json-rpc-methods/eth_sendrawtransaction.mdx +++ b/services/reference/celo/json-rpc-methods/eth_sendrawtransaction.mdx @@ -2,39 +2,39 @@ title: "eth_sendRawTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx"; +import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx" ### Request -import Request from "./_eth_sendrawtransaction-request.mdx"; +import Request from "./_eth_sendrawtransaction-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx"; +import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_sendtransaction.mdx b/services/reference/celo/json-rpc-methods/eth_sendtransaction.mdx index ac6ebfd02dd..5c13a1d5c8f 100644 --- a/services/reference/celo/json-rpc-methods/eth_sendtransaction.mdx +++ b/services/reference/celo/json-rpc-methods/eth_sendtransaction.mdx @@ -2,10 +2,9 @@ title: "eth_sendTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx" - diff --git a/services/reference/celo/json-rpc-methods/eth_sign.mdx b/services/reference/celo/json-rpc-methods/eth_sign.mdx index 073b1040681..f8c6a17df92 100644 --- a/services/reference/celo/json-rpc-methods/eth_sign.mdx +++ b/services/reference/celo/json-rpc-methods/eth_sign.mdx @@ -2,9 +2,9 @@ title: "eth_sign" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sign-description.mdx"; +import Description from "/services/reference/_partials/_eth_sign-description.mdx" diff --git a/services/reference/celo/json-rpc-methods/eth_syncing.mdx b/services/reference/celo/json-rpc-methods/eth_syncing.mdx index bfb89e8c209..7ffbcd44560 100644 --- a/services/reference/celo/json-rpc-methods/eth_syncing.mdx +++ b/services/reference/celo/json-rpc-methods/eth_syncing.mdx @@ -2,39 +2,39 @@ title: "eth_syncing" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_syncing-description.mdx"; +import Description from "/services/reference/_partials/_eth_syncing-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_syncing-example.mdx"; +import Example from "/services/reference/_partials/_eth_syncing-example.mdx" ### Request -import Request from "./_eth_syncing-request.mdx"; +import Request from "./_eth_syncing-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_syncing-response.mdx"; +import Response from "/services/reference/_partials/_eth_syncing-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/net_peercount.mdx b/services/reference/celo/json-rpc-methods/net_peercount.mdx index 9ff570e4c70..c0246b44d39 100644 --- a/services/reference/celo/json-rpc-methods/net_peercount.mdx +++ b/services/reference/celo/json-rpc-methods/net_peercount.mdx @@ -2,39 +2,39 @@ title: "net_peerCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_peercount-description.mdx"; +import Description from "/services/reference/_partials/_net_peercount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_peercount-parameters.mdx"; +import Params from "/services/reference/_partials/_net_peercount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_peercount-returns.mdx"; +import Returns from "/services/reference/_partials/_net_peercount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_peercount-example.mdx"; +import Example from "/services/reference/_partials/_net_peercount-example.mdx" ### Request -import Request from "./_net_peercount-request.mdx"; +import Request from "./_net_peercount-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_peercount-response.mdx"; +import Response from "/services/reference/_partials/_net_peercount-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/net_version.mdx b/services/reference/celo/json-rpc-methods/net_version.mdx index d55ab80402d..1d6c0080c60 100644 --- a/services/reference/celo/json-rpc-methods/net_version.mdx +++ b/services/reference/celo/json-rpc-methods/net_version.mdx @@ -2,39 +2,39 @@ title: "net_version" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_version-description.mdx"; +import Description from "/services/reference/_partials/_net_version-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_version-parameters.mdx"; +import Params from "/services/reference/_partials/_net_version-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_version-returns.mdx"; +import Returns from "/services/reference/_partials/_net_version-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_version-example.mdx"; +import Example from "/services/reference/_partials/_net_version-example.mdx" ### Request -import Request from "./_net_version-request.mdx"; +import Request from "./_net_version-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_version-response.mdx"; +import Response from "/services/reference/_partials/_net_version-response.mdx" diff --git a/services/reference/celo/json-rpc-methods/web3_clientversion.mdx b/services/reference/celo/json-rpc-methods/web3_clientversion.mdx index 11997e5c36d..c5ee316d699 100644 --- a/services/reference/celo/json-rpc-methods/web3_clientversion.mdx +++ b/services/reference/celo/json-rpc-methods/web3_clientversion.mdx @@ -2,39 +2,39 @@ title: "web3_clientVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_web3_clientversion-description.mdx"; +import Description from "/services/reference/_partials/_web3_clientversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx"; +import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx"; +import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_web3_clientversion-example.mdx"; +import Example from "/services/reference/_partials/_web3_clientversion-example.mdx" ### Request -import Request from "./_web3_clientversion-request.mdx"; +import Request from "./_web3_clientversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_web3_clientversion-response.mdx"; +import Response from "/services/reference/_partials/_web3_clientversion-response.mdx" diff --git a/services/reference/celo/quickstart.md b/services/reference/celo/quickstart.md index 4abb412b5bb..b08617070dd 100644 --- a/services/reference/celo/quickstart.md +++ b/services/reference/celo/quickstart.md @@ -25,163 +25,165 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://celo-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ### Node (JavaScript) -In these examples,you'll use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) as your package manager. +In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) as your package manager. #### Node Fetch 1. In your project folder, install the `node-fetch` package using npm: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://celo-mainnet.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://celo-mainnet.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios -1. In your project folder, install the Axios package using npm: +1. In your project folder, install the `axios` package using npm: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require('axios'); - - axios.post('https://celo-mainnet.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'eth_blockNumber', - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios") + + axios + .post("https://celo-mainnet.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }) + .then((response) => { + console.log(response.data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Ethers 1. In your project folder, install the `ethers` package using npm: - ```bash - npm install ethers - `````` + ```bash + npm install ethers + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.js" - const ethers = require('ethers'); + ```javascript title="index.js" + const ethers = require("ethers") - const provider = new ethers.providers.JsonRpcProvider('https://celo-mainnet.infura.io/v3/YOUR-API-KEY'); + const provider = new ethers.providers.JsonRpcProvider( + "https://celo-mainnet.infura.io/v3/YOUR-API-KEY" + ) - provider.getBlockNumber() - .then(blockNumber => { - console.log(blockNumber); - }) - .catch(error => { - console.error(error); - }); - ``` + provider + .getBlockNumber() + .then((blockNumber) => { + console.log(blockNumber) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` 1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```python title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = 'https://celo-mainnet.infura.io/v3/YOUR-API-KEY' + url = "https://celo-mainnet.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + } - headers = {'content-type': 'application/json'} + headers = {"content-type": "application/json"} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` + ```bash + python index.py + ``` ## Next steps @@ -189,7 +191,7 @@ Now that you have successfully made a call to the Celo network, you can explore by Infura. Here are some suggestions: - **Explore other Celo APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Ethereum, Linea, Polygon, Optimism, and more. @@ -197,4 +199,3 @@ by Infura. Here are some suggestions: Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/reference/ethereum/index.md b/services/reference/ethereum/index.md index 36773e22341..f60ee8a3366 100644 --- a/services/reference/ethereum/index.md +++ b/services/reference/ethereum/index.md @@ -39,4 +39,4 @@ The [official Ethereum documentation](https://ethereum.org/en/) for more informa description: "Learn how to create an API key and secure and share it with your team." } ]} -/> \ No newline at end of file +/> diff --git a/services/reference/ethereum/json-rpc-methods/eth_accounts.mdx b/services/reference/ethereum/json-rpc-methods/eth_accounts.mdx index bd5aa1bef1c..c91b72a6e28 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_accounts.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_accounts.mdx @@ -2,36 +2,36 @@ title: "eth_accounts" --- -import Description from "/services/reference/_partials/_eth_accounts-description.mdx"; +import Description from "/services/reference/_partials/_eth_accounts-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_accounts-example.mdx"; +import Example from "/services/reference/_partials/_eth_accounts-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_accounts-request.mdx"; +import Request from "/services/reference/_partials/_eth_accounts-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_accounts-response.mdx"; +import Response from "/services/reference/_partials/_eth_accounts-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_blobbasefee.mdx b/services/reference/ethereum/json-rpc-methods/eth_blobbasefee.mdx index 9c5deee159a..cc35f0137ad 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_blobbasefee.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_blobbasefee.mdx @@ -2,39 +2,39 @@ title: "eth_blobBaseFee" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blobbasefee-description.mdx"; +import Description from "/services/reference/_partials/_eth_blobbasefee-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_blobbasefee-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blobbasefee-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blobbasefee-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blobbasefee-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blobbasefee-example.mdx"; +import Example from "/services/reference/_partials/_eth_blobbasefee-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_blobbasefee-request.mdx"; +import Request from "/services/reference/_partials/_eth_blobbasefee-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blobbasefee-response.mdx"; +import Response from "/services/reference/_partials/_eth_blobbasefee-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_blocknumber.mdx b/services/reference/ethereum/json-rpc-methods/eth_blocknumber.mdx index 2f713e50671..70710017c27 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_blocknumber.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_blocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_blocknumber-request.mdx"; +import Request from "/services/reference/_partials/_eth_blocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_call.mdx b/services/reference/ethereum/json-rpc-methods/eth_call.mdx index dfe0af0dc1c..3d6dd6ead59 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_call.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_call.mdx @@ -2,39 +2,39 @@ title: "eth_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_call-description.mdx"; +import Description from "/services/reference/_partials/_eth_call-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_call-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_call-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_call-example.mdx"; +import Example from "/services/reference/_partials/_eth_call-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_call-request.mdx"; +import Request from "/services/reference/_partials/_eth_call-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_call-response.mdx"; +import Response from "/services/reference/_partials/_eth_call-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_chainid.mdx b/services/reference/ethereum/json-rpc-methods/eth_chainid.mdx index a7dc49d758e..5df54cf3fec 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_chainid.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_chainid.mdx @@ -2,39 +2,39 @@ title: "eth_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_chainid-description.mdx"; +import Description from "/services/reference/_partials/_eth_chainid-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_chainid-example.mdx"; +import Example from "/services/reference/_partials/_eth_chainid-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_chainid-request.mdx"; +import Request from "/services/reference/_partials/_eth_chainid-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_chainid-response.mdx"; +import Response from "/services/reference/_partials/_eth_chainid-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_coinbase.mdx b/services/reference/ethereum/json-rpc-methods/eth_coinbase.mdx index e9bb3ff61cd..8957df7e522 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_coinbase.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_coinbase.mdx @@ -2,9 +2,9 @@ title: "eth_coinbase" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_coinbase-description.mdx"; +import Description from "/services/reference/_partials/_eth_coinbase-description.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_createaccesslist.mdx b/services/reference/ethereum/json-rpc-methods/eth_createaccesslist.mdx index 4ea446a0f9b..ab6fd57500b 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_createaccesslist.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_createaccesslist.mdx @@ -2,39 +2,39 @@ title: "eth_createAccessList" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_createaccesslist-description.mdx"; +import Description from "/services/reference/_partials/_eth_createaccesslist-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_createaccesslist-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_createaccesslist-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_createaccesslist-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_createaccesslist-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_createaccesslist-example.mdx"; +import Example from "/services/reference/_partials/_eth_createaccesslist-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_createaccesslist-request.mdx"; +import Request from "/services/reference/_partials/_eth_createaccesslist-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_createaccesslist-response.mdx"; +import Response from "/services/reference/_partials/_eth_createaccesslist-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_estimategas.mdx b/services/reference/ethereum/json-rpc-methods/eth_estimategas.mdx index a45b4f4fad3..5dbb1ebb29c 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_estimategas.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_estimategas.mdx @@ -2,39 +2,39 @@ title: "eth_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_estimategas-description.mdx"; +import Description from "/services/reference/_partials/_eth_estimategas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_estimategas-example.mdx"; +import Example from "/services/reference/_partials/_eth_estimategas-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_estimategas-request.mdx"; +import Request from "/services/reference/_partials/_eth_estimategas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_estimategas-response.mdx"; +import Response from "/services/reference/_partials/_eth_estimategas-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_feehistory.mdx b/services/reference/ethereum/json-rpc-methods/eth_feehistory.mdx index c4d1799b723..8ceda53743a 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_feehistory.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_feehistory.mdx @@ -2,39 +2,39 @@ title: "eth_feeHistory" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_feehistory-description.mdx"; +import Description from "/services/reference/_partials/_eth_feehistory-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_feehistory-example.mdx"; +import Example from "/services/reference/_partials/_eth_feehistory-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_feehistory-request.mdx"; +import Request from "/services/reference/_partials/_eth_feehistory-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_feehistory-response.mdx"; +import Response from "/services/reference/_partials/_eth_feehistory-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_gasprice.mdx b/services/reference/ethereum/json-rpc-methods/eth_gasprice.mdx index 5c7aedc7eea..d917710eb5b 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_gasprice.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_gasprice.mdx @@ -2,39 +2,39 @@ title: "eth_gasPrice" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gasprice-description.mdx"; +import Description from "/services/reference/_partials/_eth_gasprice-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gasprice-example.mdx"; +import Example from "/services/reference/_partials/_eth_gasprice-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_gasprice-request.mdx"; +import Request from "/services/reference/_partials/_eth_gasprice-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gasprice-response.mdx"; +import Response from "/services/reference/_partials/_eth_gasprice-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getbalance.mdx b/services/reference/ethereum/json-rpc-methods/eth_getbalance.mdx index 90054634a9b..fb7e8ca54b7 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getbalance.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getbalance.mdx @@ -2,39 +2,39 @@ title: "eth_getBalance" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getbalance-description.mdx"; +import Description from "/services/reference/_partials/_eth_getbalance-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getbalance-example.mdx"; +import Example from "/services/reference/_partials/_eth_getbalance-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getbalance-request.mdx"; +import Request from "/services/reference/_partials/_eth_getbalance-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getbalance-response.mdx"; +import Response from "/services/reference/_partials/_eth_getbalance-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getblockbyhash.mdx b/services/reference/ethereum/json-rpc-methods/eth_getblockbyhash.mdx index 6e52e436191..8d0bade5ab7 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getblockbyhash.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getblockbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getblockbyhash-request.mdx"; +import Request from "/services/reference/_partials/_eth_getblockbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getblockbynumber.mdx b/services/reference/ethereum/json-rpc-methods/eth_getblockbynumber.mdx index e0014de5139..8778e0ad8c7 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getblockbynumber.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getblockbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getblockbynumber-request.mdx"; +import Request from "/services/reference/_partials/_eth_getblockbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx b/services/reference/ethereum/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx index 016d220e4ab..115c8b200c0 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-request.mdx"; +import Request from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx b/services/reference/ethereum/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx index d241c8fb2a7..a3c1a366bb7 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-request.mdx"; +import Request from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getcode.mdx b/services/reference/ethereum/json-rpc-methods/eth_getcode.mdx index 3dd6c01e961..7d49aa8dae1 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getcode.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getcode.mdx @@ -2,39 +2,39 @@ title: "eth_getCode" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getcode-description.mdx"; +import Description from "/services/reference/_partials/_eth_getcode-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getcode-example.mdx"; +import Example from "/services/reference/_partials/_eth_getcode-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getcode-request.mdx"; +import Request from "/services/reference/_partials/_eth_getcode-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getcode-response.mdx"; +import Response from "/services/reference/_partials/_eth_getcode-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getlogs.mdx b/services/reference/ethereum/json-rpc-methods/eth_getlogs.mdx index 3b6a0891f9c..5e4b09641fc 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getlogs.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getlogs-description.mdx"; +import Description from "/services/reference/_partials/_eth_getlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getlogs-example.mdx"; +import Example from "/services/reference/_partials/_eth_getlogs-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getlogs-request.mdx"; +import Request from "/services/reference/_partials/_eth_getlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getlogs-response.mdx"; +import Response from "/services/reference/_partials/_eth_getlogs-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getproof.mdx b/services/reference/ethereum/json-rpc-methods/eth_getproof.mdx index b8538e542a9..81923ad7075 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getproof.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getproof.mdx @@ -2,39 +2,39 @@ title: "eth_getProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getproof-description.mdx"; +import Description from "/services/reference/_partials/_eth_getproof-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getproof-example.mdx"; +import Example from "/services/reference/_partials/_eth_getproof-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getproof-request.mdx"; +import Request from "/services/reference/_partials/_eth_getproof-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getproof-response.mdx"; +import Response from "/services/reference/_partials/_eth_getproof-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getstorageat.mdx b/services/reference/ethereum/json-rpc-methods/eth_getstorageat.mdx index e99d616343b..91db9a31bb3 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getstorageat.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getstorageat.mdx @@ -2,39 +2,39 @@ title: "eth_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx"; +import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx"; +import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getstorageat-request.mdx"; +import Request from "/services/reference/_partials/_eth_getstorageat-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx"; +import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx b/services/reference/ethereum/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx index 6a6f802af3e..0c6f047cf53 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns-yparity.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns-yparity.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-request.mdx"; +import Request from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response-yparity.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response-yparity.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx b/services/reference/ethereum/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx index f70e3ae51d3..180277be33e 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns-yparity.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns-yparity.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-request.mdx"; +import Request from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response-yparity.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response-yparity.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_gettransactionbyhash.mdx b/services/reference/ethereum/json-rpc-methods/eth_gettransactionbyhash.mdx index 8dc88fd83e8..4287b3b3355 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_gettransactionbyhash.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_gettransactionbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns-yparity.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns-yparity.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_gettransactionbyhash-request.mdx"; +import Request from "/services/reference/_partials/_eth_gettransactionbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response-yparity.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response-yparity.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_gettransactioncount.mdx b/services/reference/ethereum/json-rpc-methods/eth_gettransactioncount.mdx index 935013a112a..e97dd246a3b 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_gettransactioncount.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_gettransactioncount.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_gettransactioncount-request.mdx"; +import Request from "/services/reference/_partials/_eth_gettransactioncount-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_gettransactionreceipt.mdx b/services/reference/ethereum/json-rpc-methods/eth_gettransactionreceipt.mdx index 208e44a244a..66256857019 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_gettransactionreceipt.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_gettransactionreceipt.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_gettransactionreceipt-request.mdx"; +import Request from "/services/reference/_partials/_eth_gettransactionreceipt-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getunclebyblockhashandindex.mdx b/services/reference/ethereum/json-rpc-methods/eth_getunclebyblockhashandindex.mdx index 388801b4de4..a04530030b1 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getunclebyblockhashandindex.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getunclebyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getunclebyblockhashandindex-request.mdx"; +import Request from "/services/reference/_partials/_eth_getunclebyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx b/services/reference/ethereum/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx index 5be1206518f..4b1372d7b31 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-request.mdx"; +import Request from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getunclecountbyblockhash.mdx b/services/reference/ethereum/json-rpc-methods/eth_getunclecountbyblockhash.mdx index fbf212fa833..c4fc2f93969 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getunclecountbyblockhash.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getunclecountbyblockhash.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getunclecountbyblockhash-request.mdx"; +import Request from "/services/reference/_partials/_eth_getunclecountbyblockhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getunclecountbyblocknumber.mdx b/services/reference/ethereum/json-rpc-methods/eth_getunclecountbyblocknumber.mdx index cc8d7257ded..a1f61ab91bd 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getunclecountbyblocknumber.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getunclecountbyblocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getunclecountbyblocknumber-request.mdx"; +import Request from "/services/reference/_partials/_eth_getunclecountbyblocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_getwork.mdx b/services/reference/ethereum/json-rpc-methods/eth_getwork.mdx index 675c85f9752..f0549d24dd5 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_getwork.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_getwork.mdx @@ -2,39 +2,39 @@ title: "eth_getWork" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getwork-description.mdx"; +import Description from "/services/reference/_partials/_eth_getwork-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getwork-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getwork-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getwork-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getwork-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getwork-example.mdx"; +import Example from "/services/reference/_partials/_eth_getwork-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_getwork-request.mdx"; +import Request from "/services/reference/_partials/_eth_getwork-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getwork-response.mdx"; +import Response from "/services/reference/_partials/_eth_getwork-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_hashrate.mdx b/services/reference/ethereum/json-rpc-methods/eth_hashrate.mdx index caeb9356455..989660d632f 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_hashrate.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_hashrate.mdx @@ -2,39 +2,39 @@ title: "eth_hashrate" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_hashrate-description.mdx"; +import Description from "/services/reference/_partials/_eth_hashrate-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_hashrate-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_hashrate-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_hashrate-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_hashrate-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_hashrate-example.mdx"; +import Example from "/services/reference/_partials/_eth_hashrate-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_hashrate-request.mdx"; +import Request from "/services/reference/_partials/_eth_hashrate-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_hashrate-response.mdx"; +import Response from "/services/reference/_partials/_eth_hashrate-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_maxpriorityfeepergas.mdx b/services/reference/ethereum/json-rpc-methods/eth_maxpriorityfeepergas.mdx index 8198267106d..68c00281be6 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_maxpriorityfeepergas.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_maxpriorityfeepergas.mdx @@ -2,39 +2,39 @@ title: "eth_maxPriorityFeePerGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx"; +import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx"; +import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_maxpriorityfeepergas-request.mdx"; +import Request from "/services/reference/_partials/_eth_maxpriorityfeepergas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx"; +import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_mining.mdx b/services/reference/ethereum/json-rpc-methods/eth_mining.mdx index 87afc8604cb..87d49f9dca8 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_mining.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_mining.mdx @@ -2,39 +2,39 @@ title: "eth_mining" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_mining-description.mdx"; +import Description from "/services/reference/_partials/_eth_mining-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_mining-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_mining-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_mining-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_mining-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_mining-example.mdx"; +import Example from "/services/reference/_partials/_eth_mining-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_mining-request.mdx"; +import Request from "/services/reference/_partials/_eth_mining-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_mining-response.mdx"; +import Response from "/services/reference/_partials/_eth_mining-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_protocolversion.mdx b/services/reference/ethereum/json-rpc-methods/eth_protocolversion.mdx index 13fbb9213c4..0e30330792f 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_protocolversion.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_protocolversion.mdx @@ -2,39 +2,39 @@ title: "eth_protocolVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx"; +import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx"; +import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_protocolversion-request.mdx"; +import Request from "/services/reference/_partials/_eth_protocolversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx"; +import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_sendrawtransaction.mdx b/services/reference/ethereum/json-rpc-methods/eth_sendrawtransaction.mdx index 42ad5bd1b5e..6dde8798901 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_sendrawtransaction.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_sendrawtransaction.mdx @@ -2,39 +2,39 @@ title: "eth_sendRawTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx"; +import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_sendrawtransaction-request.mdx"; +import Request from "/services/reference/_partials/_eth_sendrawtransaction-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx"; +import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_sendtransaction.mdx b/services/reference/ethereum/json-rpc-methods/eth_sendtransaction.mdx index ac6ebfd02dd..5c13a1d5c8f 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_sendtransaction.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_sendtransaction.mdx @@ -2,10 +2,9 @@ title: "eth_sendTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx" - diff --git a/services/reference/ethereum/json-rpc-methods/eth_sign.mdx b/services/reference/ethereum/json-rpc-methods/eth_sign.mdx index 073b1040681..f8c6a17df92 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_sign.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_sign.mdx @@ -2,9 +2,9 @@ title: "eth_sign" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sign-description.mdx"; +import Description from "/services/reference/_partials/_eth_sign-description.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_submitwork.mdx b/services/reference/ethereum/json-rpc-methods/eth_submitwork.mdx index 98dfe30580d..eb77a8d490b 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_submitwork.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_submitwork.mdx @@ -2,39 +2,39 @@ title: "eth_submitWork" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_submitwork-description.mdx"; +import Description from "/services/reference/_partials/_eth_submitwork-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_submitwork-example.mdx"; +import Example from "/services/reference/_partials/_eth_submitwork-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_submitwork-request.mdx"; +import Request from "/services/reference/_partials/_eth_submitwork-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_submitwork-response.mdx"; +import Response from "/services/reference/_partials/_eth_submitwork-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/eth_syncing.mdx b/services/reference/ethereum/json-rpc-methods/eth_syncing.mdx index c4d28bad512..860ce985ef2 100644 --- a/services/reference/ethereum/json-rpc-methods/eth_syncing.mdx +++ b/services/reference/ethereum/json-rpc-methods/eth_syncing.mdx @@ -2,39 +2,39 @@ title: "eth_syncing" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_syncing-description.mdx"; +import Description from "/services/reference/_partials/_eth_syncing-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_syncing-example.mdx"; +import Example from "/services/reference/_partials/_eth_syncing-example.mdx" ### Request -import Request from "/services/reference/_partials/_eth_syncing-request.mdx"; +import Request from "/services/reference/_partials/_eth_syncing-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_syncing-response.mdx"; +import Response from "/services/reference/_partials/_eth_syncing-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/filter-methods/eth_getfilterchanges.mdx b/services/reference/ethereum/json-rpc-methods/filter-methods/eth_getfilterchanges.mdx index 359da4feb2b..967dd1fb39b 100644 --- a/services/reference/ethereum/json-rpc-methods/filter-methods/eth_getfilterchanges.mdx +++ b/services/reference/ethereum/json-rpc-methods/filter-methods/eth_getfilterchanges.mdx @@ -2,39 +2,39 @@ title: "eth_getFilterChanges" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/filter-methods/_eth_getfilterchanges-description.mdx"; +import Description from "/services/reference/_partials/filter-methods/_eth_getfilterchanges-description.mdx" ## Parameters -import Params from "/services/reference/_partials/filter-methods/_eth_getfilterchanges-parameters.mdx"; +import Params from "/services/reference/_partials/filter-methods/_eth_getfilterchanges-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/filter-methods/_eth_getfilterchanges-returns.mdx"; +import Returns from "/services/reference/_partials/filter-methods/_eth_getfilterchanges-returns.mdx" ## Example -import Example from "/services/reference/_partials/filter-methods/_eth_getfilterchanges-example.mdx"; +import Example from "/services/reference/_partials/filter-methods/_eth_getfilterchanges-example.mdx" ### Request -import Request from "/services/reference/_partials/filter-methods/_eth_getfilterchanges-request.mdx"; +import Request from "/services/reference/_partials/filter-methods/_eth_getfilterchanges-request.mdx" ### Response -import Response from "/services/reference/_partials/filter-methods/_eth_getfilterchanges-response.mdx"; +import Response from "/services/reference/_partials/filter-methods/_eth_getfilterchanges-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/filter-methods/eth_getfilterlogs.mdx b/services/reference/ethereum/json-rpc-methods/filter-methods/eth_getfilterlogs.mdx index 00d2ffe92cf..5614086feab 100644 --- a/services/reference/ethereum/json-rpc-methods/filter-methods/eth_getfilterlogs.mdx +++ b/services/reference/ethereum/json-rpc-methods/filter-methods/eth_getfilterlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getFilterLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-description.mdx"; +import Description from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-parameters.mdx"; +import Params from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-returns.mdx"; +import Returns from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-example.mdx"; +import Example from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-example.mdx" ### Request -import Request from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-request.mdx"; +import Request from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-response.mdx"; +import Response from "/services/reference/_partials/filter-methods/_eth_getfilterlogs-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/filter-methods/eth_newblockfilter.mdx b/services/reference/ethereum/json-rpc-methods/filter-methods/eth_newblockfilter.mdx index dd4987c0d31..b741d3c3bde 100644 --- a/services/reference/ethereum/json-rpc-methods/filter-methods/eth_newblockfilter.mdx +++ b/services/reference/ethereum/json-rpc-methods/filter-methods/eth_newblockfilter.mdx @@ -2,39 +2,39 @@ title: "eth_newBlockFilter" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/filter-methods/_eth_newblockfilter-description.mdx"; +import Description from "/services/reference/_partials/filter-methods/_eth_newblockfilter-description.mdx" ## Parameters -import Params from "/services/reference/_partials/filter-methods/_eth_newblockfilter-parameters.mdx"; +import Params from "/services/reference/_partials/filter-methods/_eth_newblockfilter-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/filter-methods/_eth_newblockfilter-returns.mdx"; +import Returns from "/services/reference/_partials/filter-methods/_eth_newblockfilter-returns.mdx" ## Example -import Example from "/services/reference/_partials/filter-methods/_eth_newblockfilter-example.mdx"; +import Example from "/services/reference/_partials/filter-methods/_eth_newblockfilter-example.mdx" ### Request -import Request from "/services/reference/_partials/filter-methods/_eth_newblockfilter-request.mdx"; +import Request from "/services/reference/_partials/filter-methods/_eth_newblockfilter-request.mdx" ### Response -import Response from "/services/reference/_partials/filter-methods/_eth_newblockfilter-response.mdx"; +import Response from "/services/reference/_partials/filter-methods/_eth_newblockfilter-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/filter-methods/eth_newfilter.mdx b/services/reference/ethereum/json-rpc-methods/filter-methods/eth_newfilter.mdx index a01fed46593..b9d2cbc9223 100644 --- a/services/reference/ethereum/json-rpc-methods/filter-methods/eth_newfilter.mdx +++ b/services/reference/ethereum/json-rpc-methods/filter-methods/eth_newfilter.mdx @@ -2,39 +2,39 @@ title: "eth_newFilter" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/filter-methods/_eth_newfilter-description.mdx"; +import Description from "/services/reference/_partials/filter-methods/_eth_newfilter-description.mdx" ## Parameters -import Params from "/services/reference/_partials/filter-methods/_eth_newfilter-parameters.mdx"; +import Params from "/services/reference/_partials/filter-methods/_eth_newfilter-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/filter-methods/_eth_newfilter-returns.mdx"; +import Returns from "/services/reference/_partials/filter-methods/_eth_newfilter-returns.mdx" ## Example -import Example from "/services/reference/_partials/filter-methods/_eth_newfilter-example.mdx"; +import Example from "/services/reference/_partials/filter-methods/_eth_newfilter-example.mdx" ### Request -import Request from "/services/reference/_partials/filter-methods/_eth_newfilter-request.mdx"; +import Request from "/services/reference/_partials/filter-methods/_eth_newfilter-request.mdx" ### Response -import Response from "/services/reference/_partials/filter-methods/_eth_newfilter-response.mdx"; +import Response from "/services/reference/_partials/filter-methods/_eth_newfilter-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/filter-methods/eth_newpendingtransactionfilter.mdx b/services/reference/ethereum/json-rpc-methods/filter-methods/eth_newpendingtransactionfilter.mdx index 6b50a30f13a..2ea55a1da1c 100644 --- a/services/reference/ethereum/json-rpc-methods/filter-methods/eth_newpendingtransactionfilter.mdx +++ b/services/reference/ethereum/json-rpc-methods/filter-methods/eth_newpendingtransactionfilter.mdx @@ -2,10 +2,9 @@ title: "eth_newPendingTransactionFilter" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/filter-methods/_eth_newpendingtransactionfilter-description.mdx"; +import Description from "/services/reference/_partials/filter-methods/_eth_newpendingtransactionfilter-description.mdx" - diff --git a/services/reference/ethereum/json-rpc-methods/filter-methods/eth_uninstallfilter.mdx b/services/reference/ethereum/json-rpc-methods/filter-methods/eth_uninstallfilter.mdx index fc6b7443862..14222097cd8 100644 --- a/services/reference/ethereum/json-rpc-methods/filter-methods/eth_uninstallfilter.mdx +++ b/services/reference/ethereum/json-rpc-methods/filter-methods/eth_uninstallfilter.mdx @@ -2,39 +2,39 @@ title: "eth_uninstallFilter" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-description.mdx"; +import Description from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-description.mdx" ## Parameters -import Params from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-parameters.mdx"; +import Params from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-returns.mdx"; +import Returns from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-returns.mdx" ## Example -import Example from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-example.mdx"; +import Example from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-example.mdx" ### Request -import Request from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-request.mdx"; +import Request from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-request.mdx" ### Response -import Response from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-response.mdx"; +import Response from "/services/reference/_partials/filter-methods/_eth_uninstallfilter-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/index.md b/services/reference/ethereum/json-rpc-methods/index.md index edb15051122..fd84efd7a61 100644 --- a/services/reference/ethereum/json-rpc-methods/index.md +++ b/services/reference/ethereum/json-rpc-methods/index.md @@ -7,16 +7,16 @@ Here you can find the JSON-RPC API endpoints. You [can call these APIs using a v You may encounter various errors when interacting with a network: - [**JSON-RPC errors**](#json-rpc-errors) - operations on the blockchain network. It means the server has successfully received the JSON-RPC - request but encountered an issue processing it. Causes might include invalid parameters, a method not - found, or execution errors related to the requested operation. + operations on the blockchain network. It means the server has successfully received the JSON-RPC + request but encountered an issue processing it. Causes might include invalid parameters, a method not + found, or execution errors related to the requested operation. - [**HTTP errors**](#http-errors): These happen at the transport layer during data transmission to the blockchain - network. They could stem from Infura-related issues like rate limits, API key problems, or - service availability issues. + network. They could stem from Infura-related issues like rate limits, API key problems, or + service availability issues. - [**Smart contract errors**](#smart-contract-errors): These arise during attempts to execute transactions in the EVM - involving smart contracts. + involving smart contracts. ### JSON-RPC errors @@ -28,32 +28,31 @@ Below is a table listing the error codes, their messages, and meanings. The "Sta common JSON-RPC errors, while the "Non-standard" category encompasses server errors defined by the implementation. -| Code | Message | Meaning | Category | -|--------|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| -| -32700 | Parse error | The JSON request is invalid, this can be due to syntax errors. | Standard | -| -32600 | Invalid request | The JSON request is possibly malformed. | Standard | -| -32601 | Method not found | The method does not exist, often due to a typo in the method name or the method not being supported. | Standard | -| -32602 | Invalid argument | Invalid method parameters. For example, `"error":{"code":-32602,"message":"invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go value of type common.Hash"}` indicates the `0x` prefix is missing from the hexadecimal address. | Standard | -| -32603 | Internal error | An internal JSON-RPC error, often caused by a bad or invalid payload. | Standard | -| -32000 | Invalid input | Missing or invalid parameters, possibly due to server issues or a block not being processed yet. | Non-standard | -| -32001 | Resource not found | The requested resource cannot be found, possibly when calling an unsupported method. | Non-standard | -| -32002 | Resource unavailable | The requested resource is not available. | Non-standard | -| -32003 | Transaction rejected | The transaction could not be created. | Non-standard | -| -32004 | Method not supported | The requested method is not implemented. | Non-standard | -| -32005 | Limit exceeded | The request exceeds your request limit. For more information, refer to [Avoid rate limiting](../../../how-to/avoid-rate-limiting). | Non-standard | -| -32006 | JSON-RPC version not supported | The version of the JSON-RPC protocol is not supported. | Non-standard | - +| Code | Message | Meaning | Category | +|---------|--------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| +| -32700 | Parse error | The JSON request is invalid, this can be due to syntax errors. | Standard | +| -32600 | Invalid request | The JSON request is possibly malformed. | Standard | +| -32601 | Method not found | The method does not exist, often due to a typo in the method name or the method not being supported. | Standard | +| -32602 | Invalid argument | Invalid method parameters. For example, `"error":{"code":-32602,"message":"invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go value of type common.Hash"}` indicates the `0x` prefix is missing from the hexadecimal address. | Standard | +| -32603 | Internal error | An internal JSON-RPC error, often caused by a bad or invalid payload. | Standard | +| -32000 | Invalid input | Missing or invalid parameters, possibly due to server issues or a block not being processed yet. | Non-standard | +| -32001 | Resource not found | The requested resource cannot be found, possibly when calling an unsupported method. | Non-standard | +| -32002 | Resource unavailable | The requested resource is not available. | Non-standard | +| -32003 | Transaction rejected | The transaction could not be created. | Non-standard | +| -32004 | Method not supported | The requested method is not implemented. | Non-standard | +| -32005 | Limit exceeded | The request exceeds your request limit. For more information, refer to [Avoid rate limiting](../../../how-to/avoid-rate-limiting). | Non-standard | +| -32006 | JSON-RPC version not supported | The version of the JSON-RPC protocol is not supported. | Non-standard | Example error response: ```json { - "id": 1337 - "jsonrpc": "2.0", - "error": { - "code": -32003, - "message": "Transaction rejected" - } + "id": 1337 + "jsonrpc": "2.0", + "error": { + "code": -32003, + "message": "Transaction rejected" + } } ``` @@ -62,18 +61,16 @@ Example error response: Infura-specific error codes or messages could include errors for rate limits, API key issues, or service availability problems. -| Code | Message | Meaning | -|------|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| 400 | Bad request | Incorrect HTTP Request type or invalid characters, ensure that your request body and format is correct. | -| 401 | Unauthorized | This can happen when one or multiple security requirements are not met. Example responses: `project id required in the url`, `invalid project id`, `invalid project id or project secret`, `invalid JWT`. | -| 403 | Forbidden | The request was intentionally refused due to specific settings mismatch, check your key settings. Example response: `"error":{"code":-32002,"message":"rejected due to project ID settings"}`. | +| Code | Message | Meaning | +| ---- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 400 | Bad request | Incorrect HTTP Request type or invalid characters, ensure that your request body and format is correct. | +| 401 | Unauthorized | This can happen when one or multiple security requirements are not met. Example responses: `project id required in the url`, `invalid project id`, `invalid project id or project secret`, `invalid JWT`. | +| 403 | Forbidden | The request was intentionally refused due to specific settings mismatch, check your key settings. Example response: `"error":{"code":-32002,"message":"rejected due to project ID settings"}`. | | 429 | Too Many Requests | The daily request total or request per second are higher than your plan allows. Refer to the [Avoid rate limiting](https://docs.infura.io/api/networks/ethereum/how-to/avoid-rate-limiting) topic for more information. Example responses: `"error": {"code": -32005, "message": "daily request count exceeded, request rate limited"}`, `"error": {"code": -32005, "message": "project ID request rate exceeded"}`. | -| 500 | Internal Server Error | Error while processing the request on the server side. | -| 502 | Bad Gateway | Indicates a communication error which can have various causes, from networking issues to invalid response received from the server. | -| 503 | Service Unavailable | Indicates that the server is not ready to handle the request. | -| 504 | Gateway Timeout | The request ended with a timeout, it can indicate a networking issue or a delayed or missing response from the server. | - - +| 500 | Internal Server Error | Error while processing the request on the server side. | +| 502 | Bad Gateway | Indicates a communication error which can have various causes, from networking issues to invalid response received from the server. | +| 503 | Service Unavailable | Indicates that the server is not ready to handle the request. | +| 504 | Gateway Timeout | The request ended with a timeout, it can indicate a networking issue or a delayed or missing response from the server. | ### Smart contract errors @@ -123,11 +120,11 @@ The RPC methods below take a default block identifier as a parameter. Since there is no way to clearly distinguish between a `Data` parameter and a `Quantity` parameter, [EIP-1898](https://eips.ethereum.org/EIPS/eip-1898) provides a format to specify a block either using the block hash or block number. The block identifier is a JSON `object` with the following fields: -| Property | Type | Description | -| ------------------ | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Property | Type | Description | +| ------------------ | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `[blockNumber]` | \{[`Quantity`](eth_blocknumber.mdx)\} | The block in the canonical chain with this number | -| OR `[blockHash]` | \{[`Data`](eth_getblockbyhash.mdx)\} | The block uniquely identified by this hash. The `blockNumber` and `blockHash` properties are mutually exclusive; exactly one of them must be set. | -| `requireCanonical` | \{`boolean`}\ | (optional) Whether or not to throw an error if the block is not in the canonical chain as described below. Only allowed in conjunction with the `blockHash` tag. Defaults to `false`. | +| OR `[blockHash]` | \{[`Data`](eth_getblockbyhash.mdx)\} | The block uniquely identified by this hash. The `blockNumber` and `blockHash` properties are mutually exclusive; exactly one of them must be set. | +| `requireCanonical` | \{`boolean`}\ | (optional) Whether or not to throw an error if the block is not in the canonical chain as described below. Only allowed in conjunction with the `blockHash` tag. Defaults to `false`. | ### Data diff --git a/services/reference/ethereum/json-rpc-methods/net_listening.mdx b/services/reference/ethereum/json-rpc-methods/net_listening.mdx index ee6416dce6d..11339481a73 100644 --- a/services/reference/ethereum/json-rpc-methods/net_listening.mdx +++ b/services/reference/ethereum/json-rpc-methods/net_listening.mdx @@ -2,39 +2,39 @@ title: "net_listening" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_listening-description.mdx"; +import Description from "/services/reference/_partials/_net_listening-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_listening-parameters.mdx"; +import Params from "/services/reference/_partials/_net_listening-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_listening-returns.mdx"; +import Returns from "/services/reference/_partials/_net_listening-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_listening-example.mdx"; +import Example from "/services/reference/_partials/_net_listening-example.mdx" ### Request -import Request from "/services/reference/_partials/_net_listening-request.mdx"; +import Request from "/services/reference/_partials/_net_listening-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_listening-response.mdx"; +import Response from "/services/reference/_partials/_net_listening-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/net_peercount.mdx b/services/reference/ethereum/json-rpc-methods/net_peercount.mdx index 50b1b2b098d..6de822b594e 100644 --- a/services/reference/ethereum/json-rpc-methods/net_peercount.mdx +++ b/services/reference/ethereum/json-rpc-methods/net_peercount.mdx @@ -2,39 +2,39 @@ title: "net_peerCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_peercount-description.mdx"; +import Description from "/services/reference/_partials/_net_peercount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_peercount-parameters.mdx"; +import Params from "/services/reference/_partials/_net_peercount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_peercount-returns.mdx"; +import Returns from "/services/reference/_partials/_net_peercount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_peercount-example.mdx"; +import Example from "/services/reference/_partials/_net_peercount-example.mdx" ### Request -import Request from "/services/reference/_partials/_net_peercount-request.mdx"; +import Request from "/services/reference/_partials/_net_peercount-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_peercount-response.mdx"; +import Response from "/services/reference/_partials/_net_peercount-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/net_version.mdx b/services/reference/ethereum/json-rpc-methods/net_version.mdx index 8aa91e61aae..224baca1a6c 100644 --- a/services/reference/ethereum/json-rpc-methods/net_version.mdx +++ b/services/reference/ethereum/json-rpc-methods/net_version.mdx @@ -2,39 +2,39 @@ title: "net_version" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_version-description.mdx"; +import Description from "/services/reference/_partials/_net_version-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_version-parameters.mdx"; +import Params from "/services/reference/_partials/_net_version-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_version-returns.mdx"; +import Returns from "/services/reference/_partials/_net_version-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_version-example.mdx"; +import Example from "/services/reference/_partials/_net_version-example.mdx" ### Request -import Request from "/services/reference/_partials/_net_version-request.mdx"; +import Request from "/services/reference/_partials/_net_version-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_version-response.mdx"; +import Response from "/services/reference/_partials/_net_version-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/subscription-methods/eth_subscribe.mdx b/services/reference/ethereum/json-rpc-methods/subscription-methods/eth_subscribe.mdx index 6f33f9a202d..8af1c927dfa 100644 --- a/services/reference/ethereum/json-rpc-methods/subscription-methods/eth_subscribe.mdx +++ b/services/reference/ethereum/json-rpc-methods/subscription-methods/eth_subscribe.mdx @@ -2,39 +2,39 @@ title: "eth_subscribe" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/subscription-methods/_eth_subscribe-description.mdx"; +import Description from "/services/reference/_partials/subscription-methods/_eth_subscribe-description.mdx" ## Parameters -import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters.mdx"; +import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx"; +import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx" ## Example -import Example from "/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx"; +import Example from "/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx" ### Request -import Request from "/services/reference/_partials/subscription-methods/_eth_subscribe-request.mdx"; +import Request from "/services/reference/_partials/subscription-methods/_eth_subscribe-request.mdx" ### Response -import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx"; +import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx b/services/reference/ethereum/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx index cf554decc40..9410e8902e6 100644 --- a/services/reference/ethereum/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx +++ b/services/reference/ethereum/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx @@ -2,39 +2,39 @@ title: "eth_unsubscribe" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-description.mdx"; +import Description from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-description.mdx" ## Parameters -import Params from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx"; +import Params from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx"; +import Returns from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx" ## Example -import Example from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx"; +import Example from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx" ### Request -import Request from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-request.mdx"; +import Request from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-request.mdx" ### Response -import Response from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx"; +import Response from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/trace-methods/index.md b/services/reference/ethereum/json-rpc-methods/trace-methods/index.md index 8e0d0f852ec..9f22369477c 100644 --- a/services/reference/ethereum/json-rpc-methods/trace-methods/index.md +++ b/services/reference/ethereum/json-rpc-methods/trace-methods/index.md @@ -55,7 +55,24 @@ smart contract transaction. Excludes precompiled contracts. ] ``` -
KeyValue
action Transaction details.
callType Whether the transaction is call or create.
fromAddress of the transaction sender.
gasGas provided by sender.
inputTransaction data.
toTarget of the transaction.
valueValue transferred in the transaction.
resultTransaction result.
gasUsedGas used by the transaction. Includes any refunds of unused gas.
outputReturn value of the contract call. Contains only the actual value sent by a RETURN operation. If a RETURN was not executed, the output is empty bytes.
subTracesTraces of contract calls made by the transaction.
traceAddressTree list address of where the call occurred, address of the parents, and order of the current sub call.
transactionHashHash of the transaction.
transactionPositionTransaction position.
typeWhether the transaction is a CALL or CREATE series operation.
+| Key | Value | +|-----------------------|-----------------------------------------------------------------------------------------------------------------| +| `action` | Transaction details. | +| `callType` | Whether the transaction is `call` or `create`. | +| `from` | Address of the transaction sender. | +| `gas` | Gas provided by sender. | +| `input` | Transaction data. | +| `to` | Target of the transaction. | +| `value` | Value transferred in the transaction. | +| `result` | Transaction result. | +| `gasUsed` | Gas used by the transaction. Includes any refunds of unused gas. | +| `output` | Return value of the contract call. Contains only the actual value sent by a `RETURN` operation. If a `RETURN` was not executed, the output is empty bytes. | +| `subTraces` | Traces of contract calls made by the transaction. | +| `traceAddress` | Tree list address of where the call occurred, address of the parents, and order of the current sub call. | +| `transactionHash` | Hash of the transaction. | +| `transactionPosition` | Transaction position. | +| `type` | Whether the transaction is a `CALL` or `CREATE` series operation. | + ## `stateDiff` @@ -90,4 +107,13 @@ An absent value is distinct from zero when creating accounts or clearing storage } ``` -
KeyValue
balanceChange of balance event
balance.fromBalance before the transaction
balance.toBalance after the transaction
codeChanges to code. None in this example
nonceChange of nonce.
nonce.fromNonce before the transaction.
nonce.toNonce after the transaction.
storageChanges to storage. None in this example.
+| Key | Value | +|-------------------------|------------------------------------------| +| `balance` | Change of balance event. | +| `balance.from` | Balance before the transaction. | +| `balance.to` | Balance after the transaction. | +| `code` | Changes to code. None in this example. | +| `nonce` | Change of nonce. | +| `nonce.from` | Nonce before the transaction. | +| `nonce.to` | Nonce after the transaction. | +| `storage` | Changes to storage. None in this example.| diff --git a/services/reference/ethereum/json-rpc-methods/trace-methods/trace_block.mdx b/services/reference/ethereum/json-rpc-methods/trace-methods/trace_block.mdx index 6158469942a..ae99ef2bbe0 100644 --- a/services/reference/ethereum/json-rpc-methods/trace-methods/trace_block.mdx +++ b/services/reference/ethereum/json-rpc-methods/trace-methods/trace_block.mdx @@ -2,39 +2,39 @@ title: "trace_block" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/trace-methods/_trace_block-description.mdx"; +import Description from "/services/reference/_partials/trace-methods/_trace_block-description.mdx" ## Parameters -import Params from "/services/reference/_partials/trace-methods/_trace_block-parameters.mdx"; +import Params from "/services/reference/_partials/trace-methods/_trace_block-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/trace-methods/_trace_block-returns.mdx"; +import Returns from "/services/reference/_partials/trace-methods/_trace_block-returns.mdx" ## Example -import Example from "/services/reference/_partials/trace-methods/_trace_block-example.mdx"; +import Example from "/services/reference/_partials/trace-methods/_trace_block-example.mdx" ### Request -import Request from "/services/reference/_partials/trace-methods/_trace_block-request.mdx"; +import Request from "/services/reference/_partials/trace-methods/_trace_block-request.mdx" ### Response -import Response from "/services/reference/_partials/trace-methods/_trace_block-response.mdx"; +import Response from "/services/reference/_partials/trace-methods/_trace_block-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/trace-methods/trace_call.mdx b/services/reference/ethereum/json-rpc-methods/trace-methods/trace_call.mdx index 408b64b731a..9a66bc81b1f 100644 --- a/services/reference/ethereum/json-rpc-methods/trace-methods/trace_call.mdx +++ b/services/reference/ethereum/json-rpc-methods/trace-methods/trace_call.mdx @@ -2,39 +2,39 @@ title: "trace_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/trace-methods/_trace_call-description.mdx"; +import Description from "/services/reference/_partials/trace-methods/_trace_call-description.mdx" ## Parameters -import Params from "/services/reference/_partials/trace-methods/_trace_call-parameters.mdx"; +import Params from "/services/reference/_partials/trace-methods/_trace_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/trace-methods/_trace_call-returns.mdx"; +import Returns from "/services/reference/_partials/trace-methods/_trace_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/trace-methods/_trace_call-example.mdx"; +import Example from "/services/reference/_partials/trace-methods/_trace_call-example.mdx" ### Request -import Request from "/services/reference/_partials/trace-methods/_trace_call-request.mdx"; +import Request from "/services/reference/_partials/trace-methods/_trace_call-request.mdx" ### Response -import Response from "/services/reference/_partials/trace-methods/_trace_call-response.mdx"; +import Response from "/services/reference/_partials/trace-methods/_trace_call-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/trace-methods/trace_callmany.mdx b/services/reference/ethereum/json-rpc-methods/trace-methods/trace_callmany.mdx index 71b9d5faecb..ec746ed540d 100644 --- a/services/reference/ethereum/json-rpc-methods/trace-methods/trace_callmany.mdx +++ b/services/reference/ethereum/json-rpc-methods/trace-methods/trace_callmany.mdx @@ -2,39 +2,39 @@ title: "trace_callMany" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/trace-methods/_trace_callmany-description.mdx"; +import Description from "/services/reference/_partials/trace-methods/_trace_callmany-description.mdx" ## Parameters -import Params from "/services/reference/_partials/trace-methods/_trace_callmany-parameters.mdx"; +import Params from "/services/reference/_partials/trace-methods/_trace_callmany-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/trace-methods/_trace_callmany-returns.mdx"; +import Returns from "/services/reference/_partials/trace-methods/_trace_callmany-returns.mdx" ## Example -import Example from "/services/reference/_partials/trace-methods/_trace_callmany-example.mdx"; +import Example from "/services/reference/_partials/trace-methods/_trace_callmany-example.mdx" ### Request -import Request from "/services/reference/_partials/trace-methods/_trace_callmany-request.mdx"; +import Request from "/services/reference/_partials/trace-methods/_trace_callmany-request.mdx" ### Response -import Response from "/services/reference/_partials/trace-methods/_trace_callmany-response.mdx"; +import Response from "/services/reference/_partials/trace-methods/_trace_callmany-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/trace-methods/trace_filter.mdx b/services/reference/ethereum/json-rpc-methods/trace-methods/trace_filter.mdx index bb82fce42db..6861b9a3e8f 100644 --- a/services/reference/ethereum/json-rpc-methods/trace-methods/trace_filter.mdx +++ b/services/reference/ethereum/json-rpc-methods/trace-methods/trace_filter.mdx @@ -2,39 +2,39 @@ title: "trace_filter" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/trace-methods/_trace_filter-description.mdx"; +import Description from "/services/reference/_partials/trace-methods/_trace_filter-description.mdx" ## Parameters -import Params from "/services/reference/_partials/trace-methods/_trace_filter-parameters.mdx"; +import Params from "/services/reference/_partials/trace-methods/_trace_filter-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/trace-methods/_trace_filter-returns.mdx"; +import Returns from "/services/reference/_partials/trace-methods/_trace_filter-returns.mdx" ## Example -import Example from "/services/reference/_partials/trace-methods/_trace_filter-example.mdx"; +import Example from "/services/reference/_partials/trace-methods/_trace_filter-example.mdx" ### Request -import Request from "/services/reference/_partials/trace-methods/_trace_filter-request.mdx"; +import Request from "/services/reference/_partials/trace-methods/_trace_filter-request.mdx" ### Response -import Response from "/services/reference/_partials/trace-methods/_trace_filter-response.mdx"; +import Response from "/services/reference/_partials/trace-methods/_trace_filter-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/trace-methods/trace_transaction.mdx b/services/reference/ethereum/json-rpc-methods/trace-methods/trace_transaction.mdx index a38ffddcc3b..f7c8a254ad9 100644 --- a/services/reference/ethereum/json-rpc-methods/trace-methods/trace_transaction.mdx +++ b/services/reference/ethereum/json-rpc-methods/trace-methods/trace_transaction.mdx @@ -2,39 +2,39 @@ title: "trace_transaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/trace-methods/_trace_transaction-description.mdx"; +import Description from "/services/reference/_partials/trace-methods/_trace_transaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/trace-methods/_trace_transaction-parameters.mdx"; +import Params from "/services/reference/_partials/trace-methods/_trace_transaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/trace-methods/_trace_transaction-returns.mdx"; +import Returns from "/services/reference/_partials/trace-methods/_trace_transaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/trace-methods/_trace_transaction-example.mdx"; +import Example from "/services/reference/_partials/trace-methods/_trace_transaction-example.mdx" ### Request -import Request from "/services/reference/_partials/trace-methods/_trace_transaction-request.mdx"; +import Request from "/services/reference/_partials/trace-methods/_trace_transaction-request.mdx" ### Response -import Response from "/services/reference/_partials/trace-methods/_trace_transaction-response.mdx"; +import Response from "/services/reference/_partials/trace-methods/_trace_transaction-response.mdx" diff --git a/services/reference/ethereum/json-rpc-methods/web3_clientversion.mdx b/services/reference/ethereum/json-rpc-methods/web3_clientversion.mdx index 3a3a3962876..dfb0270603d 100644 --- a/services/reference/ethereum/json-rpc-methods/web3_clientversion.mdx +++ b/services/reference/ethereum/json-rpc-methods/web3_clientversion.mdx @@ -2,39 +2,39 @@ title: "web3_clientVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_web3_clientversion-description.mdx"; +import Description from "/services/reference/_partials/_web3_clientversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx"; +import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx"; +import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_web3_clientversion-example.mdx"; +import Example from "/services/reference/_partials/_web3_clientversion-example.mdx" ### Request -import Request from "/services/reference/_partials/_web3_clientversion-request.mdx"; +import Request from "/services/reference/_partials/_web3_clientversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_web3_clientversion-response.mdx"; +import Response from "/services/reference/_partials/_web3_clientversion-response.mdx" diff --git a/services/reference/ethereum/quickstart.md b/services/reference/ethereum/quickstart.md index ff845b5b571..0796315a157 100644 --- a/services/reference/ethereum/quickstart.md +++ b/services/reference/ethereum/quickstart.md @@ -25,9 +25,9 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` :::note @@ -50,121 +50,122 @@ Set the correct [variables](https://learning.postman.com/docs/sending-requests/v ::: - ### Node (JavaScript) In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) as your package manager. #### Node Fetch -1. In your project folder, install the Node Fetch package using npm: +1. In your project folder, install the `node-fetch` package using npm:: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://mainnet.infura.io.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://mainnet.infura.io.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios -1. In your project folder, install the Axios package using npm: +1. In your project folder, install the `axios` package using npm: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require('axios'); - - axios.post('https://mainnet.infura.io.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'eth_blockNumber', - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios") + + axios + .post("https://mainnet.infura.io.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }) + .then((response) => { + console.log(response.data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Ethers 1. In your project folder, install the `ethers` package using npm: - ```bash - npm install ethers - `````` + ```bash + npm install ethers + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.js" - const ethers = require('ethers'); + ```javascript title="index.js" + const ethers = require("ethers") - const provider = new ethers.providers.JsonRpcProvider('https://mainnet.infura.io.infura.io/v3/YOUR-API-KEY'); + const provider = new ethers.providers.JsonRpcProvider( + "https://mainnet.infura.io.infura.io/v3/YOUR-API-KEY" + ) - provider.getBlockNumber() - .then(blockNumber => { - console.log(blockNumber); - }) - .catch(error => { - console.error(error); - }); - ``` + provider + .getBlockNumber() + .then((blockNumber) => { + console.log(blockNumber) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Web3.js @@ -172,62 +173,62 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + var { Web3 } = require("web3") + var provider = "https://mainnet.infura.io/v3/YOUR-API-KEY" + var web3Provider = new Web3.providers.HttpProvider(provider) + var web3 = new Web3(web3Provider) - ```javascript title="index.js" - var { Web3 } = require("web3"); - var provider = "https://mainnet.infura.io/v3/YOUR-API-KEY"; - var web3Provider = new Web3.providers.HttpProvider(provider); - var web3 = new Web3(web3Provider); - - web3.eth.getBlockNumber().then((result) => { - console.log("Latest Ethereum Block is ", result); - }); - ``` + web3.eth.getBlockNumber().then((result) => { + console.log("Latest Ethereum Block is ", result) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` 1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```python title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = 'https://mainnet.infura.io/v3/YOUR-API-KEY' + url = "https://mainnet.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + } - headers = {'content-type': 'application/json'} + headers = {'content-type': 'application/json'} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` + ```bash + python index.py + ``` ## Next steps @@ -235,7 +236,7 @@ Now that you have successfully made a call to the Ethereum network, you can expl by Infura. Here are some suggestions: - **Explore other Ethereum APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Arbitrum, Linea, Polygon, Optimism, and more. @@ -243,4 +244,3 @@ by Infura. Here are some suggestions: Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/reference/gas-api/api-reference/basefeehistory.md b/services/reference/gas-api/api-reference/basefeehistory.md index 82e714aa3e6..011818026cb 100644 --- a/services/reference/gas-api/api-reference/basefeehistory.md +++ b/services/reference/gas-api/api-reference/basefeehistory.md @@ -2,8 +2,8 @@ description: Get the base fee history. --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Get the base fee history @@ -44,7 +44,7 @@ instead of using the cURL authentication option (`-u`). ```bash -curl -X 'GET' \ +curl -X "GET" \ -u : \ "https://gas.api.infura.io/networks/1/baseFeeHistory" ``` @@ -53,14 +53,12 @@ curl -X 'GET' \ ```javascript -const axios = require("axios"); +const axios = require("axios") -const apiKey = ""; // Replace with your API key. -const apiKeySecret = ""; // Replace with your API key secret. +const apiKey = "" // Replace with your API key. +const apiKeySecret = "" // Replace with your API key secret. -const Auth = Buffer.from( - apiKey + ":" + apiKeySecret, -).toString("base64"); +const Auth = Buffer.from(apiKey + ":" + apiKeySecret).toString("base64") // The chain ID of the supported network. const chainId = 1; diff --git a/services/reference/gas-api/api-reference/basefeepercentile.md b/services/reference/gas-api/api-reference/basefeepercentile.md index be899d46221..5366302488a 100644 --- a/services/reference/gas-api/api-reference/basefeepercentile.md +++ b/services/reference/gas-api/api-reference/basefeepercentile.md @@ -2,8 +2,8 @@ description: Get the base fee percentile for a chain. --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Get the base fee percentile @@ -44,7 +44,7 @@ instead of using the cURL authentication option (`-u`). ```bash -curl -X 'GET' \ +curl -X "GET" \ -u : \ "https://gas.api.infura.io/networks/1/baseFeeHistory" ``` @@ -58,9 +58,7 @@ const axios = require("axios"); const apiKey = ""; // Replace with your API key. const apiKeySecret = ""; // Replace with your API key secret. -const Auth = Buffer.from( - apiKey + ":" + apiKeySecret, -).toString("base64"); +const Auth = Buffer.from(apiKey + ":" + apiKeySecret).toString("base64"); // The chain ID of the supported network. const chainId = 1; diff --git a/services/reference/gas-api/api-reference/busythreshold.md b/services/reference/gas-api/api-reference/busythreshold.md index ce3a8e79ca2..49895de7c50 100644 --- a/services/reference/gas-api/api-reference/busythreshold.md +++ b/services/reference/gas-api/api-reference/busythreshold.md @@ -2,8 +2,8 @@ description: Get the busy threshold. --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Get the busy threshold @@ -44,7 +44,7 @@ instead of using the cURL authentication option (`-u`). ```bash -curl -X 'GET' \ +curl -X "GET" \ -u : \ "https://gas.api.infura.io/networks/1/busyThreshold" ``` @@ -58,9 +58,7 @@ const axios = require("axios"); const apiKey = ""; // Replace with your API key. const apiKeySecret = ""; // Replace with your API key secret. -const Auth = Buffer.from( - apiKey + ":" + apiKeySecret, -).toString("base64"); +const Auth = Buffer.from(apiKey + ":" + apiKeySecret).toString("base64"); // The chain ID of the supported network. const chainId = 1; @@ -91,4 +89,4 @@ const chainId = 1; { "busyThreshold": "37.378956101" } -``` \ No newline at end of file +``` diff --git a/services/reference/gas-api/api-reference/gasprices-type2.md b/services/reference/gas-api/api-reference/gasprices-type2.md index d9324285089..9ba96a9950d 100644 --- a/services/reference/gas-api/api-reference/gasprices-type2.md +++ b/services/reference/gas-api/api-reference/gasprices-type2.md @@ -2,8 +2,8 @@ description: Get the estimated gas prices for a chain. --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Get EIP-1559 gas prices @@ -64,7 +64,7 @@ instead of using the cURL authentication option (`-u`). ```bash -curl -X 'GET' \ +curl -X "GET" \ -u : \ "https://gas.api.infura.io/networks/1/suggestedGasFees" ``` @@ -78,9 +78,7 @@ const axios = require("axios"); const apiKey = ""; // Replace with your API key. const apiKeySecret = ""; // Replace with your API key secret. -const Auth = Buffer.from( - apiKey + ":" + apiKeySecret, -).toString("base64"); +const Auth = Buffer.from(apiKey + ":" + apiKeySecret).toString("base64"); // The chain ID of the supported network. const chainId = 1; @@ -135,4 +133,4 @@ const chainId = 1; "priorityFeeTrend": "down", "baseFeeTrend": "up" } -``` \ No newline at end of file +``` diff --git a/services/reference/gas-api/api-reference/index.md b/services/reference/gas-api/api-reference/index.md index 1a78a28900e..d8a0737791e 100644 --- a/services/reference/gas-api/api-reference/index.md +++ b/services/reference/gas-api/api-reference/index.md @@ -2,8 +2,8 @@ description: Reference content for the Gas API. --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # API reference @@ -20,23 +20,23 @@ Use the APIs to: You can call the Gas APIs in two ways: - **Using the API key only** - Add your [API key](../../../../developer-tools/dashboard/get-started/create-api) - as a path option. + as a path option. - **Using the API key and API key secret** - Use basic authentication and specify the API key - and [API key secret](../../../../developer-tools/dashboard/how-to/secure-an-api/api-key-secret/). + and [API key secret](../../../../developer-tools/dashboard/how-to/secure-an-api/api-key-secret/). ```bash -curl -X 'GET' "https://gas.api.infura.io/v3//networks/1/suggestedGasFees" +curl -X "GET" "https://gas.api.infura.io/v3//networks/1/suggestedGasFees" ``` - ```bash -curl -X 'GET' -u : "https://gas.api.infura.io/networks/1/suggestedGasFees" +```bash +curl -X "GET" -u : "https://gas.api.infura.io/networks/1/suggestedGasFees" ``` - + diff --git a/services/reference/gas-api/index.md b/services/reference/gas-api/index.md index 29968e1584a..fb5dab6bcb8 100644 --- a/services/reference/gas-api/index.md +++ b/services/reference/gas-api/index.md @@ -26,4 +26,4 @@ The Gas API is a tool that delivers real-time [gas prices](../../concepts/gas.md description: "Learn how to create an API key and secure and share it with your team." } ]} -/> \ No newline at end of file +/> diff --git a/services/reference/gas-api/quickstart.md b/services/reference/gas-api/quickstart.md index 0b958b94872..ee5632c64b6 100644 --- a/services/reference/gas-api/quickstart.md +++ b/services/reference/gas-api/quickstart.md @@ -3,8 +3,8 @@ description: Get started with the Gas APIs. sidebar_position: 1 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Quickstart @@ -13,7 +13,7 @@ You can also use a tool such as [curl](https://curl.se/) or [Postman](https://ww call the REST APIs. :::tip -View the [API reference content](api-reference/index.md) to view the `curl` command for each API. +View the [API reference content](api-reference/index.md) to view the `curl` command for each API. ::: ## Prerequisites @@ -115,7 +115,7 @@ const axios = require("axios"); require("dotenv").config(); const Auth = Buffer.from( - process.env.INFURA_API_KEY + ":" + process.env.INFURA_API_KEY_SECRET, + process.env.INFURA_API_KEY + ":" + process.env.INFURA_API_KEY_SECRET ).toString("base64"); // The chain ID of the supported network @@ -129,7 +129,7 @@ const chainId = 1; headers: { Authorization: `Basic ${Auth}`, }, - }, + } ); console.log("Suggested gas fees:", data); } catch (error) { @@ -137,6 +137,7 @@ const chainId = 1; } })(); ``` + @@ -176,4 +177,4 @@ Suggested gas fees: { priorityFeeTrend: "down", baseFeeTrend: "down" } -``` \ No newline at end of file +``` diff --git a/services/reference/ipfs/http-api-methods/add.md b/services/reference/ipfs/http-api-methods/add.md index e4b3cee8f0d..98b9456aeb0 100644 --- a/services/reference/ipfs/http-api-methods/add.md +++ b/services/reference/ipfs/http-api-methods/add.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # add @@ -14,10 +14,10 @@ Add a file or directory to IPFS. ```bash curl "https://ipfs.infura.io:5001/api/v0/add?recursive=false&quiet=&quieter=&silent=&progress=&trickle=&only-hash=&wrap-with-directory=&hidden=&chunker=&pin=true&raw-leaves=&nocopy=&fscache=&cid-version=0&hash=sha2-256" \ - -X POST \ - -u ":" \ - -H "Content-Type: multipart/form-data" \ - -F file=@"" + -X POST \ + -u ":" \ + -H "Content-Type: multipart/form-data" \ + -F file=@"" ``` @@ -25,10 +25,10 @@ curl "https://ipfs.infura.io:5001/api/v0/add?recursive=false&quiet=&quiet ```bash curl "https://ipfs.infura.io:5001/api/v0/add?pin=false" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" \ - -H "Content-Type: multipart/form-data" \ - -F file=@"/sample-result.json" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" \ + -H "Content-Type: multipart/form-data" \ + -F file=@"/sample-result.json" ``` diff --git a/services/reference/ipfs/http-api-methods/block_get.md b/services/reference/ipfs/http-api-methods/block_get.md index 7ad6bee91ac..15ad7639bbe 100644 --- a/services/reference/ipfs/http-api-methods/block_get.md +++ b/services/reference/ipfs/http-api-methods/block_get.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # block_get @@ -14,8 +14,8 @@ Get a raw IPFS block. ```bash curl "https://ipfs.infura.io:5001/api/v0/block/get?arg=" \ - -X POST \ - -u ":" + -X POST \ + -u ":" ```
@@ -23,14 +23,13 @@ curl "https://ipfs.infura.io:5001/api/v0/block/get?arg=" \ ```bash curl "https://ipfs.infura.io:5001/api/v0/block/get?arg=QmaYL7E4gDTPNfLxrCEEEcNJgcHBJ55NxxTnxpDKWqMtJ3" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" ```
- #### REQUEST PARAMS - `arg` _\[Required]_ - The base58 multihash of an existing block to get. diff --git a/services/reference/ipfs/http-api-methods/block_put.md b/services/reference/ipfs/http-api-methods/block_put.md index 7ed1e726716..065f40aff35 100644 --- a/services/reference/ipfs/http-api-methods/block_put.md +++ b/services/reference/ipfs/http-api-methods/block_put.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # block_put @@ -14,10 +14,10 @@ Store input as an IPFS block. ```bash curl "https://ipfs.infura.io:5001/api/v0/block/put?format=v0&mhtype=sha2-256&mhlen=-1" \ - -X POST \ - -u ":" \ - -H "Content-Type: multipart/form-data" \ - -F file=@"" + -X POST \ + -u ":" \ + -H "Content-Type: multipart/form-data" \ + -F file=@"" ```
@@ -25,10 +25,10 @@ curl "https://ipfs.infura.io:5001/api/v0/block/put?format=v0&mhtype=sha2-256&mhl ```bash curl "https://ipfs.infura.io:5001/api/v0/block/put" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" \ - -H "Content-Type: multipart/form-data" \ - -F file=@"/purpink.jpeg" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" \ + -H "Content-Type: multipart/form-data" \ + -F file=@"/purpink.jpeg" ```
diff --git a/services/reference/ipfs/http-api-methods/block_stat.md b/services/reference/ipfs/http-api-methods/block_stat.md index 56df71c941e..560b78d6827 100644 --- a/services/reference/ipfs/http-api-methods/block_stat.md +++ b/services/reference/ipfs/http-api-methods/block_stat.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # block_stat @@ -14,8 +14,8 @@ Print information of a raw IPFS block. ```bash curl "https://ipfs.infura.io:5001/api/v0/block/stat?arg=" \ - -X POST \ - -u ":" + -X POST \ + -u ":" ```
@@ -23,14 +23,13 @@ curl "https://ipfs.infura.io:5001/api/v0/block/stat?arg=" \ ```bash curl "https://ipfs.infura.io:5001/api/v0/block/stat?arg=QmfQ5QAjvg4GtA3wg3adpnDJug8ktA1BxurVqBD8rtgVjM" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" ```
- #### REQUEST PARAMS - `arg` _\[Required]_ - The base58 multihash of an existing block to stat. @@ -43,8 +42,8 @@ On success, the call to this endpoint will return with 200 and the following bod ```js { - Key: "QmfQ5QAjvg4GtA3wg3adpnDJug8ktA1BxurVqBD8rtgVjM", - Size: 18 + Key: "QmfQ5QAjvg4GtA3wg3adpnDJug8ktA1BxurVqBD8rtgVjM", + Size: 18 } ``` diff --git a/services/reference/ipfs/http-api-methods/cat.md b/services/reference/ipfs/http-api-methods/cat.md index dc14623917b..6745aa21025 100644 --- a/services/reference/ipfs/http-api-methods/cat.md +++ b/services/reference/ipfs/http-api-methods/cat.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # cat @@ -14,8 +14,8 @@ Show IPFS object data. ```bash curl "https://ipfs.infura.io:5001/api/v0/cat?arg=" \ - -X POST \ - -u ":" + -X POST \ + -u ":" ```
@@ -23,8 +23,8 @@ curl "https://ipfs.infura.io:5001/api/v0/cat?arg=" \ ```bash curl "https://ipfs.infura.io:5001/api/v0/cat?arg=QmZtmD2qt6fJot32nabSP3CUjicnypEBz7bHVDhPQt9aAy" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" ```
diff --git a/services/reference/ipfs/http-api-methods/dag_get.md b/services/reference/ipfs/http-api-methods/dag_get.md index 16913b7d0b5..f9d36c6a847 100644 --- a/services/reference/ipfs/http-api-methods/dag_get.md +++ b/services/reference/ipfs/http-api-methods/dag_get.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # dag_get @@ -14,8 +14,8 @@ Get a DAG node from IPFS. ```bash curl "https://ipfs.infura.io:5001/api/v0/dag/get?arg=&output-codec=dag-json" \ - -X POST \ - -u ":" + -X POST \ + -u ":" ```
@@ -23,8 +23,8 @@ curl "https://ipfs.infura.io:5001/api/v0/dag/get?arg=&output-codec=dag-json ```bash curl "https://ipfs.infura.io:5001/api/v0/dag/get?arg=QmZtmD2qt6fJot32nabSP3CUjicnypEBz7bHVDhPQt9aAy" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" ```
diff --git a/services/reference/ipfs/http-api-methods/dag_import.md b/services/reference/ipfs/http-api-methods/dag_import.md index a15844e7bc9..369d75003b3 100644 --- a/services/reference/ipfs/http-api-methods/dag_import.md +++ b/services/reference/ipfs/http-api-methods/dag_import.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # dag_import @@ -20,10 +20,10 @@ You can't pin multiple DAG roots using this endpoint. For example, if supplying ```bash curl "https://ipfs.infura.io:5001/api/v0/dag/import?pin-roots=false&allow-big-block=false" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" \ - -H "Content-Type: multipart/form-data" \ - -F file=@"" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" \ + -H "Content-Type: multipart/form-data" \ + -F file=@"" ```
@@ -31,10 +31,10 @@ curl "https://ipfs.infura.io:5001/api/v0/dag/import?pin-roots=false&allow-b ```bash curl "https://ipfs.infura.io:5001/api/v0/dag/import?pin-roots=true&silent=&stats=&allow-big-block=false" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" \ - -H "Content-Type: multipart/form-data" \ - -F file=@"/sample.car" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" \ + -H "Content-Type: multipart/form-data" \ + -F file=@"/sample.car" ```
diff --git a/services/reference/ipfs/http-api-methods/dag_put.md b/services/reference/ipfs/http-api-methods/dag_put.md index d540f8f6ed3..eb5fc7f6438 100644 --- a/services/reference/ipfs/http-api-methods/dag_put.md +++ b/services/reference/ipfs/http-api-methods/dag_put.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # dag_put @@ -14,10 +14,10 @@ Add a DAG node to IPFS. ```bash curl "https://ipfs.infura.io:5001/api/v0/dag/put?store-codec=dag-cbor&input-codec=dag-json&pin=<value>&hash=sha2-256" \ - -X POST \ - -u "<API_KEY>:<API_KEY_SECRET>" \ - -H "Content-Type: multipart/form-data" \ - -F file=@"<file>" + -X POST \ + -u "<API_KEY>:<API_KEY_SECRET>" \ + -H "Content-Type: multipart/form-data" \ + -F file=@"<file>" ```
@@ -25,10 +25,10 @@ curl "https://ipfs.infura.io:5001/api/v0/dag/put?store-codec=dag-cbor&input ```bash curl "https://ipfs.infura.io:5001/api/v0/dag/put" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" \ - -H "Content-Type: multipart/form-data" \ - -F file=@"/sample-result.json" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" \ + -H "Content-Type: multipart/form-data" \ + -F file=@"/sample-result.json" ```
diff --git a/services/reference/ipfs/http-api-methods/dag_resolve.md b/services/reference/ipfs/http-api-methods/dag_resolve.md index ae91d6f57c1..2554c626a0c 100644 --- a/services/reference/ipfs/http-api-methods/dag_resolve.md +++ b/services/reference/ipfs/http-api-methods/dag_resolve.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # dag_resolve @@ -14,8 +14,8 @@ Resolve IPLD block. ```bash curl "https://ipfs.infura.io:5001/api/v0/dag/resolve?arg=" \ - -X POST \ - -u ":" + -X POST \ + -u ":" ```
@@ -23,8 +23,8 @@ curl "https://ipfs.infura.io:5001/api/v0/dag/resolve?arg=" \ ```bash curl "https://ipfs.infura.io:5001/api/v0/dag/resolve?arg=QmZtmD2qt6fJot32nabSP3CUjicnypEBz7bHVDhPQt9aAy" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" ```
@@ -32,7 +32,7 @@ curl "https://ipfs.infura.io:5001/api/v0/dag/resolve?arg=QmZtmD2qt6fJot32nabSP3C #### REQUEST PARAMS -- `arg` _\[Required]_ - The IPFS object hash; the path to resolve. +- `arg` _[Required]_ - The IPFS object hash; the path to resolve. ### RESPONSE @@ -42,10 +42,10 @@ On success, the call to this endpoint will return with 200 and the following bod ```js { - Cid: { - /: "QmZtmD2qt6fJot32nabSP3CUjicnypEBz7bHVDhPQt9aAy" - }, - RemPath: "" + "Cid": { + "/": "QmZtmD2qt6fJot32nabSP3CUjicnypEBz7bHVDhPQt9aAy" + }, + "RemPath": "" } ``` diff --git a/services/reference/ipfs/http-api-methods/get.md b/services/reference/ipfs/http-api-methods/get.md index 9c07cd4a351..6865f32475a 100644 --- a/services/reference/ipfs/http-api-methods/get.md +++ b/services/reference/ipfs/http-api-methods/get.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # get @@ -14,8 +14,8 @@ Download IPFS objects. ```bash curl "https://ipfs.infura.io:5001/api/v0/get?arg=&output=&archive=false&compress=false&compression-level=-1" \ - -X POST \ - -u ":" + -X POST \ + -u ":" ```
@@ -23,8 +23,8 @@ curl "https://ipfs.infura.io:5001/api/v0/get?arg=&output=&arch ```bash curl "https://ipfs.infura.io:5001/api/v0/get?arg=QmZtmD2qt6fJot32nabSP3CUjicnypEBz7bHVDhPQt9aAy&archive=true" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" ```
diff --git a/services/reference/ipfs/http-api-methods/index.md b/services/reference/ipfs/http-api-methods/index.md index e313f26dc7c..70f463ad58e 100644 --- a/services/reference/ipfs/http-api-methods/index.md +++ b/services/reference/ipfs/http-api-methods/index.md @@ -70,8 +70,11 @@ A `405`error may mean that you are using the wrong HTTP method (i.e. GET instead ## NDJSON responses + When a bunch of objects are requested, IPFS returns them in the Newline Delimited JSON, [NDJSON](http://ndjson.org/), format. + + This is because the calls are asynchronous and the responses are processed one object at a time. :::warning diff --git a/services/reference/ipfs/http-api-methods/pin_add.md b/services/reference/ipfs/http-api-methods/pin_add.md index 5c267891c46..9a1cd3391d7 100644 --- a/services/reference/ipfs/http-api-methods/pin_add.md +++ b/services/reference/ipfs/http-api-methods/pin_add.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # pin_add @@ -14,16 +14,16 @@ Pin objects to local storage. ```bash curl "https://ipfs.infura.io:5001/api/v0/pin/add?arg=&recursive=true&progress=" \ - -X POST \ - -u ":" + -X POST \ + -u ":" ```
```bash curl "https://ipfs.infura.io:5001/api/v0/pin/add?arg=QmfQ5QAjvg4GtA3wg3adpnDJug8ktA1BxurVqBD8rtgVjM" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" ```
diff --git a/services/reference/ipfs/http-api-methods/pin_ls.md b/services/reference/ipfs/http-api-methods/pin_ls.md index 6dc4a6ac71b..a730c787005 100644 --- a/services/reference/ipfs/http-api-methods/pin_ls.md +++ b/services/reference/ipfs/http-api-methods/pin_ls.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # pin_ls @@ -14,8 +14,8 @@ Lists objects pinned to local storage. ```bash curl "https://ipfs.infura.io:5001/api/v0/pin/ls?arg=&type=all&quiet=&stream=" \ - -X POST \ - -u ":" + -X POST \ + -u ":" ```
@@ -23,8 +23,8 @@ curl "https://ipfs.infura.io:5001/api/v0/pin/ls?arg=&type=all&quiet=< ```bash curl "https://ipfs.infura.io:5001/api/v0/pin/ls?arg=QmfQ5QAjvg4GtA3wg3adpnDJug8ktA1BxurVqBD8rtgVjM" \ - -X POST \ - -u ":" + -X POST \ + -u ":" ```
diff --git a/services/reference/ipfs/http-api-methods/pin_rm.md b/services/reference/ipfs/http-api-methods/pin_rm.md index bec66ae9bba..95a5ea6b8e1 100644 --- a/services/reference/ipfs/http-api-methods/pin_rm.md +++ b/services/reference/ipfs/http-api-methods/pin_rm.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # pin_rm @@ -14,8 +14,8 @@ Remove pinned objects from local storage. ```bash curl "https://ipfs.infura.io:5001/api/v0/pin/rm?arg=" \ - -X POST \ - -u ":" + -X POST \ + -u ":" ```
@@ -23,9 +23,10 @@ curl "https://ipfs.infura.io:5001/api/v0/pin/rm?arg=" \ ```bash curl "https://ipfs.infura.io:5001/api/v0/pin/rm?arg=QmfQ5QAjvg4GtA3wg3adpnDJug8ktA1BxurVqBD8rtgVjM" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" ``` +
diff --git a/services/reference/ipfs/http-api-methods/pin_update.md b/services/reference/ipfs/http-api-methods/pin_update.md index e5ec3194bf4..b356c4966b4 100644 --- a/services/reference/ipfs/http-api-methods/pin_update.md +++ b/services/reference/ipfs/http-api-methods/pin_update.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # pin_update @@ -14,8 +14,8 @@ Update a recursive pin. ```bash curl "https://ipfs.infura.io:5001/api/v0/pin/update?arg=&arg=&unpin=true" \ - -X POST \ - -u ":" + -X POST \ + -u ":" ``` @@ -23,8 +23,8 @@ curl "https://ipfs.infura.io:5001/api/v0/pin/update?arg=&arg= diff --git a/services/reference/ipfs/http-api-methods/version.md b/services/reference/ipfs/http-api-methods/version.md index dda4baa4ae1..7cfa61825ed 100644 --- a/services/reference/ipfs/http-api-methods/version.md +++ b/services/reference/ipfs/http-api-methods/version.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # version @@ -14,8 +14,8 @@ Show IPFS version information. ```bash curl "https://ipfs.infura.io:5001/api/v0/version?number=&commit=&repo=&all=" \ - -X POST \ - -u ":" + -X POST \ + -u ":" ``` @@ -23,8 +23,8 @@ curl "https://ipfs.infura.io:5001/api/v0/version?number=&commit=&r ```bash curl "https://ipfs.infura.io:5001/api/v0/version" \ - -X POST \ - -u "PROJECT_ID:PROJECT_SECRET" + -X POST \ + -u "PROJECT_ID:PROJECT_SECRET" ``` @@ -32,10 +32,10 @@ curl "https://ipfs.infura.io:5001/api/v0/version" \ #### REQUEST PARAMS -- `number` _\[Optional]_ - Only show the version number. -- `commit` _\[Optional]_ - Show the commit hash. -- `repo` _\[Optional] -_ Show repo version. -- `all` _\[Optional]_ - Show all version information. +- `number` _[Optional]_ - Only show the version number. +- `commit` _[Optional]_ - Show the commit hash. +- `repo` _[Optional]_ - Show repo version. +- `all` _[Optional]_ - Show all version information. ### RESPONSE diff --git a/services/reference/ipfs/index.md b/services/reference/ipfs/index.md index 3a3729326eb..d202f2a241f 100644 --- a/services/reference/ipfs/index.md +++ b/services/reference/ipfs/index.md @@ -43,4 +43,4 @@ See the [official IPFS documentation](https://docs.ipfs.io) for more information description: "Learn how to create an API key and secure and share it with your team." } ]} -/> \ No newline at end of file +/> diff --git a/services/reference/ipfs/quickstart.md b/services/reference/ipfs/quickstart.md index d612535a600..730c7f580f4 100644 --- a/services/reference/ipfs/quickstart.md +++ b/services/reference/ipfs/quickstart.md @@ -12,14 +12,14 @@ This quickstart guide will help you set up and make calls on the IPFS network us :::info To access the IPFS network through Infura, you'll need to add a billing card to your account, even if you're using a free account. Refer -to the [billing details](../../how-to/use-ipfs/access-ipfs-content/dedicated-gateways.md#stats-and-billing) for more information. +to the [billing details](../../how-to/use-ipfs/access-ipfs-content/dedicated-gateways.md#stats-and-billing) for more information. ::: ## Prerequisites Before you begin, ensure you have a valid [API key](../../../../developer-tools/dashboard/get-started/create-api) and - [API key secret](../../../../developer-tools/dashboard/how-to/secure-an-api/api-key-secret/). +[API key secret](../../../../developer-tools/dashboard/how-to/secure-an-api/api-key-secret/). ## Make calls @@ -48,10 +48,10 @@ Change the `` and `` in the NodeJS example code below. Save the following script to a file, e.g. `index.js`. ```javascript -const https = require("https"); +const https = require("https") -const projectId = ""; -const projectSecret = ""; +const projectId = "" +const projectSecret = "" const options = { host: "ipfs.infura.io", @@ -59,18 +59,18 @@ const options = { path: "/api/v0/pin/add?arg=QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn", method: "POST", auth: projectId + ":" + projectSecret, -}; +} let req = https.request(options, (res) => { - let body = ""; + let body = "" res.on("data", function (chunk) { - body += chunk; - }); + body += chunk + }) res.on("end", function () { - console.log(body); - }); -}); -req.end(); + console.log(body) + }) +}) +req.end() ``` In a terminal window, run the script with `node index.js` @@ -96,25 +96,25 @@ endpoint = "https://ipfs.infura.io:5001" ### CREATE AN ARRAY OF TEST FILES ### files = { - 'file': 'myNFT.png' + "file": "myNFT.png" } ### ADD FILE TO IPFS AND SAVE THE HASH ### -response1 = requests.post(endpoint + '/api/v0/add', files=files, auth=(projectId, projectSecret)) +response1 = requests.post(endpoint + "/api/v0/add", files=files, auth=(projectId, projectSecret)) print(response1) hash = response1.text.split(",")[1].split(":")[1].replace('"','') -print(hash) +print(hash ### READ FILE WITH HASH ### params = { - 'arg': hash + "arg": hash } -response2 = requests.post(endpoint + '/api/v0/cat', params=params, auth=(projectId, projectSecret)) +response2 = requests.post(endpoint + "/api/v0/cat", params=params, auth=(projectId, projectSecret)) print(response2) print(response2.text) ### REMOVE OBJECT WITH PIN/RM ### -response3 = requests.post(endpoint + '/api/v0/pin/rm', params=params, auth=(projectId, projectSecret)) +response3 = requests.post(endpoint + "api/v0/pin/rm", params=params, auth=(projectId, projectSecret)) print(response3.json()) ``` @@ -127,7 +127,7 @@ Output something like: QmWtBbpKST49AQFLx8HAdwwjUu7HBP2wrtAH1x8df5qrVm myNFT.png -{'Pins': ['QmWtBbpKST49AQFLx8HAdwwjUu7HBP2wrtAH1x8df5qrVm']} +{"Pins": ["QmWtBbpKST49AQFLx8HAdwwjUu7HBP2wrtAH1x8df5qrVm"]} ``` ### `kubo-rpc-client` @@ -139,11 +139,11 @@ Install the library with `npm install --save kubo-rpc-client`. Save the following script to a file, e.g. `index.mjs`. ```javascript -import { create } from 'kubo-rpc-client' +import { create } from "kubo-rpc-client" const projectId = ""; const projectSecret = ""; -const auth = +const auth "Basic " + Buffer.from(projectId + ":" + projectSecret).toString("base64"); const client = create({ @@ -179,49 +179,49 @@ CID(QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn) package main import ( - "fmt" - "net/http" - "os" - "strings" + "fmt" + "net/http" + "os" + "strings" - ipfsApi "github.com/ipfs/go-ipfs-api" // v0.2.0 + ipfsApi "github.com/ipfs/go-ipfs-api" // v0.2.0 ) func main() { - projectId := "" - projectSecret := "" + projectId := "" + projectSecret := "" - shell := ipfsApi.NewShellWithClient("https://ipfs.infura.io:5001", NewClient(projectId, projectSecret)) - cid, err := shell.Add(strings.NewReader("Infura IPFS - Getting started demo.")) - if err != nil { - fmt.Println(err) - os.Exit(1) - } + shell := ipfsApi.NewShellWithClient("https://ipfs.infura.io:5001", NewClient(projectId, projectSecret)) + cid, err := shell.Add(strings.NewReader("Infura IPFS - Getting started demo.")) + if err != nil { + fmt.Println(err) + os.Exit(1) + } - fmt.Printf("Data successfully stored in IPFS: %v\n", cid) + fmt.Printf("Data successfully stored in IPFS: %v\n", cid) } -// NewClient creates an http.Client that automatically perform basic auth on each request. +// NewClient creates an http.Client that automatically performs basic auth on each request. func NewClient(projectId, projectSecret string) *http.Client { - return &http.Client{ - Transport: authTransport{ - RoundTripper: http.DefaultTransport, - ProjectId: projectId, - ProjectSecret: projectSecret, - }, - } + return &http.Client{ + Transport: authTransport{ + RoundTripper: http.DefaultTransport, + ProjectId: projectId, + ProjectSecret: projectSecret, + }, + } } // authTransport decorates each request with a basic auth header. type authTransport struct { - http.RoundTripper - ProjectId string - ProjectSecret string + http.RoundTripper + ProjectId string + ProjectSecret string } func (t authTransport) RoundTrip(r *http.Request) (*http.Response, error) { - r.SetBasicAuth(t.ProjectId, t.ProjectSecret) - return t.RoundTripper.RoundTrip(r) + r.SetBasicAuth(t.ProjectId, t.ProjectSecret) + return t.RoundTripper.RoundTrip(r) } ``` @@ -244,42 +244,42 @@ CID(QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn) package main import ( - "context" - "encoding/base64" - "fmt" - "net/http" - "os" - "strings" - - ipfsFiles "github.com/ipfs/go-ipfs-files" // v0.0.8 - ipfsApi "github.com/ipfs/go-ipfs-http-client" // v0.1.0 + "context" + "encoding/base64" + "fmt" + "net/http" + "os" + "strings" + + ipfsFiles "github.com/ipfs/go-ipfs-files" // v0.0.8 + ipfsApi "github.com/ipfs/go-ipfs-http-client" // v0.1.0 ) func main() { - projectId := "" - projectSecret := "" - - httpClient := &http.Client{} - httpApi, err := ipfsApi.NewURLApiWithClient("https://ipfs.infura.io:5001", httpClient) - if err != nil { - fmt.Println(err) - os.Exit(1) - } - httpApi.Headers.Add("Authorization", "Basic " + basicAuth(projectId, projectSecret)) - - content := strings.NewReader("Infura IPFS - Getting started demo.") - p, err := httpApi.Unixfs().Add(context.Background(), ipfsFiles.NewReaderFile(content)) - if err != nil { - fmt.Println(err) - os.Exit(1) - } - - fmt.Printf("Data successfully stored in IPFS: %v\n", p.Cid().String()) + projectId := "" + projectSecret := "" + + httpClient := &http.Client{} + httpApi, err := ipfsApi.NewURLApiWithClient("https://ipfs.infura.io:5001", httpClient) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + httpApi.Headers.Add("Authorization", "Basic " + basicAuth(projectId, projectSecret)) + + content := strings.NewReader("Infura IPFS - Getting started demo.") + p, err := httpApi.Unixfs().Add(context.Background(), ipfsFiles.NewReaderFile(content)) + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + fmt.Printf("Data successfully stored in IPFS: %v\n", p.Cid().String()) } func basicAuth(projectId, projectSecret string) string { - auth := projectId + ":" + projectSecret - return base64.StdEncoding.EncodeToString([]byte(auth)) + auth := projectId + ":" + projectSecret + return base64.StdEncoding.EncodeToString([]byte(auth)) } ``` @@ -290,13 +290,14 @@ Example output: ```bash Data successfully stored in IPFS: QmTHr95iiwSTA2USxx4g5kKnhqsNRixqohhwxjvdXmSrWn ``` + ## Next steps Now that you have successfully made a call to the IPFS network, you can explore more functionalities and APIs provided by Infura. Here are some suggestions: - **Explore other IPFS APIs**: Infura supports a wide range of APIs. You can find more information in the -[HTTP API methods documentation](../http-api-methods/). + [HTTP API methods documentation](../http-api-methods/). - **Try out different networks**: Infura supports multiple networks including Arbitrum, Linea, Polygon, Optimism, and more. @@ -304,4 +305,3 @@ by Infura. Here are some suggestions: Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/reference/linea/index.md b/services/reference/linea/index.md index 3c8e3b9159d..1cd59d11dfc 100644 --- a/services/reference/linea/index.md +++ b/services/reference/linea/index.md @@ -13,7 +13,7 @@ on Ethereum. For users, this enables the experience and security guarantees of E :::info see also - See the [official Linea documentation](https://docs.linea.build/) for more information. +See the [official Linea documentation](https://docs.linea.build/) for more information. ::: @@ -35,4 +35,4 @@ on Ethereum. For users, this enables the experience and security guarantees of E description: "Learn how to create an API key and secure and share it with your team." } ]} -/> \ No newline at end of file +/> diff --git a/services/reference/linea/json-rpc-methods/_eth_accounts-request.mdx b/services/reference/linea/json-rpc-methods/_eth_accounts-request.mdx index 6e7797ea76c..ad06979cbfe 100644 --- a/services/reference/linea/json-rpc-methods/_eth_accounts-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_accounts-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` ```bash -wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [],"id": 1}' ``` - - diff --git a/services/reference/linea/json-rpc-methods/_eth_blocknumber-request.mdx b/services/reference/linea/json-rpc-methods/_eth_blocknumber-request.mdx index 4df5864033e..283e8e90cd9 100644 --- a/services/reference/linea/json-rpc-methods/_eth_blocknumber-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_blocknumber-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ```bash -wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` - - diff --git a/services/reference/linea/json-rpc-methods/_eth_call-request.mdx b/services/reference/linea/json-rpc-methods/_eth_call-request.mdx index 1892b18a7a1..9dcf1a07f4e 100644 --- a/services/reference/linea/json-rpc-methods/_eth_call-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_call-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_chainid-request.mdx b/services/reference/linea/json-rpc-methods/_eth_chainid-request.mdx index 2aafdc3d83b..2db99ba6fad 100644 --- a/services/reference/linea/json-rpc-methods/_eth_chainid-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_chainid-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` ```bash -wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` - - diff --git a/services/reference/linea/json-rpc-methods/_eth_estimategas-request.mdx b/services/reference/linea/json-rpc-methods/_eth_estimategas-request.mdx index 1f93daae9ca..458e0e04688 100644 --- a/services/reference/linea/json-rpc-methods/_eth_estimategas-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_estimategas-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_feehistory-request.mdx b/services/reference/linea/json-rpc-methods/_eth_feehistory-request.mdx index 3c89a917079..45744bfa706 100644 --- a/services/reference/linea/json-rpc-methods/_eth_feehistory-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_feehistory-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x5", "latest", []],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x5", "latest", []],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_gasprice-request.mdx b/services/reference/linea/json-rpc-methods/_eth_gasprice-request.mdx index 92d11ff4492..25614af1673 100644 --- a/services/reference/linea/json-rpc-methods/_eth_gasprice-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_gasprice-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getbalance-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getbalance-request.mdx index 0d8b63fe28b..1e7664d2cc2 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getbalance-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getbalance-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getblockbyhash-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getblockbyhash-request.mdx index fba00227117..ebe1eccd27e 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getblockbyhash-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getblockbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getblockbynumber-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getblockbynumber-request.mdx index b398e59abfd..d96a0c9140c 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getblockbynumber-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getblockbynumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x5BAD55",false],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params": ["0x5BAD55",false],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx index 4067e673553..a63e918c999 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx index 990ad68465b..9369d15bc30 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getcode-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getcode-request.mdx index f3ff1a910a7..05f12b0c525 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getcode-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getcode-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getlogs-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getlogs-request.mdx index 914795049ed..6cc2061fb94 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getlogs-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getlogs-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getproof-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getproof-request.mdx index ec74e5a9633..8ae34f8f444 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getproof-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getproof-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0","method": "eth_getProof","id": 1,"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0","method": "eth_getProof","id": 1,"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getProof","params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getProof","params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getstorageat-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getstorageat-request.mdx index 77436cc0375..abe041fa6bd 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getstorageat-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getstorageat-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx b/services/reference/linea/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx index adaf9a01d1a..3158b0a2fe0 100644 --- a/services/reference/linea/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx b/services/reference/linea/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx index b9407a18528..7696fe68a20 100644 --- a/services/reference/linea/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_gettransactionbyhash-request.mdx b/services/reference/linea/json-rpc-methods/_eth_gettransactionbyhash-request.mdx index acaf50b29c7..6652ff9ba4b 100644 --- a/services/reference/linea/json-rpc-methods/_eth_gettransactionbyhash-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_gettransactionbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_gettransactioncount-request.mdx b/services/reference/linea/json-rpc-methods/_eth_gettransactioncount-request.mdx index 659c49c290d..175dd91d829 100644 --- a/services/reference/linea/json-rpc-methods/_eth_gettransactioncount-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_gettransactioncount-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_gettransactionreceipt-request.mdx b/services/reference/linea/json-rpc-methods/_eth_gettransactionreceipt-request.mdx index 033a9439340..293a4893eb5 100644 --- a/services/reference/linea/json-rpc-methods/_eth_gettransactionreceipt-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_gettransactionreceipt-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx index 121ccbbb66d..edbda5a2887 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx index c7994dd5ae3..7930f97c5e8 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx index 9c66227cfe9..4c1112efe3c 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx index 20fbc6f0428..09e8db3b8e1 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_getwork-request.mdx b/services/reference/linea/json-rpc-methods/_eth_getwork-request.mdx index 4f8a1f5811a..1e82e2b4298 100644 --- a/services/reference/linea/json-rpc-methods/_eth_getwork-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_getwork-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getWork","params": [],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getWork","params": [],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getWork","params": [],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getWork","params": [],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_hashrate-request.mdx b/services/reference/linea/json-rpc-methods/_eth_hashrate-request.mdx index 1bec83f13b9..d4458258b22 100644 --- a/services/reference/linea/json-rpc-methods/_eth_hashrate-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_hashrate-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_hashrate","params": [],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_hashrate","params": [],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_hashrate","params": [],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_hashrate","params": [],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx b/services/reference/linea/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx index 85c01decd9e..c4ae38407ee 100644 --- a/services/reference/linea/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/d23391e03c6d40738530a1b4b679e66e -x '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/d23391e03c6d40738530a1b4b679e66e -x '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_mining-request.mdx b/services/reference/linea/json-rpc-methods/_eth_mining-request.mdx index 23fd6116701..c8c5a0e3751 100644 --- a/services/reference/linea/json-rpc-methods/_eth_mining-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_mining-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_mining","params": [],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_mining","params": [],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_mining","params": [],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_mining","params": [],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_protocolversion-request.mdx b/services/reference/linea/json-rpc-methods/_eth_protocolversion-request.mdx index ee5fe44ab86..980042bf909 100644 --- a/services/reference/linea/json-rpc-methods/_eth_protocolversion-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_protocolversion-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_sendrawtransaction-request.mdx b/services/reference/linea/json-rpc-methods/_eth_sendrawtransaction-request.mdx index 4411dd35b94..1f7bcfc4bc0 100644 --- a/services/reference/linea/json-rpc-methods/_eth_sendrawtransaction-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_sendrawtransaction-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_submitwork-request.mdx b/services/reference/linea/json-rpc-methods/_eth_submitwork-request.mdx index 15eaef86f15..9259fa5fb51 100644 --- a/services/reference/linea/json-rpc-methods/_eth_submitwork-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_submitwork-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_eth_syncing-request.mdx b/services/reference/linea/json-rpc-methods/_eth_syncing-request.mdx index cd6d9d7cfc2..07a6a8ca3ca 100644 --- a/services/reference/linea/json-rpc-methods/_eth_syncing-request.mdx +++ b/services/reference/linea/json-rpc-methods/_eth_syncing-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_net_listening-request.mdx b/services/reference/linea/json-rpc-methods/_net_listening-request.mdx index 33d0e0f412d..8a40af989c5 100644 --- a/services/reference/linea/json-rpc-methods/_net_listening-request.mdx +++ b/services/reference/linea/json-rpc-methods/_net_listening-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_net_peercount-request.mdx b/services/reference/linea/json-rpc-methods/_net_peercount-request.mdx index e287090e918..a716d68b8ee 100644 --- a/services/reference/linea/json-rpc-methods/_net_peercount-request.mdx +++ b/services/reference/linea/json-rpc-methods/_net_peercount-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_net_version-request.mdx b/services/reference/linea/json-rpc-methods/_net_version-request.mdx index 77e07172bb3..85203c3e03a 100644 --- a/services/reference/linea/json-rpc-methods/_net_version-request.mdx +++ b/services/reference/linea/json-rpc-methods/_net_version-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/_web3_clientversion-request.mdx b/services/reference/linea/json-rpc-methods/_web3_clientversion-request.mdx index a6c1145260e..f32d70fab41 100644 --- a/services/reference/linea/json-rpc-methods/_web3_clientversion-request.mdx +++ b/services/reference/linea/json-rpc-methods/_web3_clientversion-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/debug/debug_traceblockbyhash.md b/services/reference/linea/json-rpc-methods/debug/debug_traceblockbyhash.md index 929a43f2a9b..d97184d981a 100644 --- a/services/reference/linea/json-rpc-methods/debug/debug_traceblockbyhash.md +++ b/services/reference/linea/json-rpc-methods/debug/debug_traceblockbyhash.md @@ -1,8 +1,9 @@ --- description: debug_traceBlockByHash API method --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # debug_traceBlockByHash @@ -12,11 +13,11 @@ Returns tracing results by executing all transactions in the block specified by - `blockHash`: (string) _[required]_ hash of the block to trace. - Optional tracing options object with the following fields: - - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](../debug/index.md#calltracer) or - [`prestateTracer`](../debug/index.md#prestatetracer). - - `tracerConfig`: (object) _[optional]_ tracer configuration options: - - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any - sub-calls. It eliminates the additional processing for each call frame. + - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](../debug/index.md#calltracer) or + [`prestateTracer`](../debug/index.md#prestatetracer). + - `tracerConfig`: (object) _[optional]_ tracer configuration options: + - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any + sub-calls. It eliminates the additional processing for each call frame. ## Returns @@ -32,17 +33,16 @@ Depending on the specified tracer type, returns a [`callTracer`](../debug/index. ```bash curl https://linea-goerli.infura.io/v3/ \ --X POST \ --H "Content-Type: application/json" \ --d '{"method":"debug_traceBlockByHash","params":["0xcc4e47e5f5e82c12ccd511e97f6994b4c4f95808778323ed5cf0a56640b0a815", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "debug_traceBlockByHash", "params": ["0xcc4e47e5f5e82c12ccd511e97f6994b4c4f95808778323ed5cf0a56640b0a815", {"tracer": "callTracer"}], "id": 1}' ``` ```bash -wscat -c wss://linea-goerli.infura.io/ws/v3/ \ --x '{"method":"debug_traceBlockByHash","params":["0xcc4e47e5f5e82c12ccd511e97f6994b4c4f95808778323ed5cf0a56640b0a815", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}' +wscat -c wss://linea-goerli.infura.io/ws/v3/ -x '{"jsonrpc": "2.0", "method": "debug_traceBlockByHash","params": ["0xcc4e47e5f5e82c12ccd511e97f6994b4c4f95808778323ed5cf0a56640b0a815", {"tracer": "callTracer"}], "id": 1}' ``` @@ -52,56 +52,55 @@ wscat -c wss://linea-goerli.infura.io/ws/v3/ \ ```json { - "jsonrpc": "2.0", - "id": 1, - "result": [ - { - "result": { - "calls": [ - { - "from": "0xa0013f511c70f01c077a8f809e36b905a0d16c95", - "gas": "0x1feac", - "gasUsed": "0x9d5", - "input": "0x0902f1ac", - "output": "0x0000000000000000000000000000000000000000000000025aa314728293841e00000000000000000000000000000000000000000000000000000007a5cc7a260000000000000000000000000000000000000000000000000000000064b8c380", - "to": "0x75a97d88ff19e07da99023ef0e35e35f51869de0", - "type": "STATICCALL" - }, - { - "calls": [ - { - "from": "0xf56dc6695cf1f5c364edebc7dc7077ac9b586068", - "gas": "0x1bc78", - "gasUsed": "0x6c8f", - "input": "0x23b872dd000000000000000000000000c2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f00000000000000000000000075a97d88ff19e07da99023ef0e35e35f51869de00000000000000000000000000000000000000000000000000000000002faf080", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001", - "to": "0x1c92ff898f7c34fc6ed884aec3859fd6c655c1f0", - "type": "DELEGATECALL", - "value": "0x0" - } - ], - "from": "0xa0013f511c70f01c077a8f809e36b905a0d16c95", - "gas": "0x1dfd5", - "gasUsed": "0x8907", - "input": "0x23b872dd000000000000000000000000c2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f00000000000000000000000075a97d88ff19e07da99023ef0e35e35f51869de00000000000000000000000000000000000000000000000000000000002faf080", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001", - "to": "0xf56dc6695cf1f5c364edebc7dc7077ac9b586068", - "type": "CALL", - "value": "0x0" - }, - ... - ], - "from": "0xc2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f", - "gas": "0x273bd", - "gasUsed": "0x22499", - "input": "0x38ed17390000000000000000000000000000000000000000000000000000000002faf08000000000000000000000000000000000000000000000000000e8291f2bdfeff000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000c2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f0000000000000000000000000000000000000000000000000000000064b8cdb80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f56dc6695cf1f5c364edebc7dc7077ac9b586068000000000000000000000000ed4ccdd10b8b97ba9555a6767613bfb98aaf72c4", - "output": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000002faf08000000000000000000000000000000000000000000000000000e9c8a628b94ade", - "to": "0xa0013f511c70f01c077a8f809e36b905a0d16c95", - "type": "CALL", + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "result": { + "calls": [ + { + "from": "0xa0013f511c70f01c077a8f809e36b905a0d16c95", + "gas": "0x1feac", + "gasUsed": "0x9d5", + "input": "0x0902f1ac", + "output": "0x0000000000000000000000000000000000000000000000025aa314728293841e00000000000000000000000000000000000000000000000000000007a5cc7a260000000000000000000000000000000000000000000000000000000064b8c380", + "to": "0x75a97d88ff19e07da99023ef0e35e35f51869de0", + "type": "STATICCALL" + }, + { + "calls": [ + { + "from": "0xf56dc6695cf1f5c364edebc7dc7077ac9b586068", + "gas": "0x1bc78", + "gasUsed": "0x6c8f", + "input": "0x23b872dd000000000000000000000000c2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f00000000000000000000000075a97d88ff19e07da99023ef0e35e35f51869de00000000000000000000000000000000000000000000000000000000002faf080", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "to": "0x1c92ff898f7c34fc6ed884aec3859fd6c655c1f0", + "type": "DELEGATECALL", "value": "0x0" - } - }, - ... - ] + } + ], + "from": "0xa0013f511c70f01c077a8f809e36b905a0d16c95", + "gas": "0x1dfd5", + "gasUsed": "0x8907", + "input": "0x23b872dd000000000000000000000000c2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f00000000000000000000000075a97d88ff19e07da99023ef0e35e35f51869de00000000000000000000000000000000000000000000000000000000002faf080", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "to": "0xf56dc6695cf1f5c364edebc7dc7077ac9b586068", + "type": "CALL", + "value": "0x0" + } + ], + "from": "0xc2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f", + "gas": "0x273bd", + "gasUsed": "0x22499", + "input": "0x38ed17390000000000000000000000000000000000000000000000000000000002faf08000000000000000000000000000000000000000000000000000e8291f2bdfeff000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000c2aa3359b78bd4223f3434bcf6b0f3b5f5d71c8f0000000000000000000000000000000000000000000000000000000064b8cdb80000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f56dc6695cf1f5c364edebc7dc7077ac9b586068000000000000000000000000ed4ccdd10b8b97ba9555a6767613bfb98aaf72c4", + "output": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000002faf08000000000000000000000000000000000000000000000000000e9c8a628b94ade", + "to": "0xa0013f511c70f01c077a8f809e36b905a0d16c95", + "type": "CALL", + "value": "0x0" + } + } + ... + ] } ``` diff --git a/services/reference/linea/json-rpc-methods/debug/debug_traceblockbynumber.md b/services/reference/linea/json-rpc-methods/debug/debug_traceblockbynumber.md index d51cd9921ca..a4dc9c00824 100644 --- a/services/reference/linea/json-rpc-methods/debug/debug_traceblockbynumber.md +++ b/services/reference/linea/json-rpc-methods/debug/debug_traceblockbynumber.md @@ -1,8 +1,9 @@ --- description: debug_traceBlockByNumber API method --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # debug_traceBlockByNumber @@ -11,13 +12,13 @@ Returns tracing results by executing all transactions in the specified block num ## Parameters - `blockNumber`: (string) _[required]_ block number as a hexidecimal string, or one of the string tags `latest`, `earliest` - , or `pending`, as [described in the default block parameters](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). + , or `pending`, as [described in the default block parameters](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - Optional tracing options object with the following fields: - - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or - [`prestateTracer`](index.md##prestatetracer). - - `tracerConfig`: (object) _[optional]_ tracer configuration options: - - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any - sub-calls. It eliminates the additional processing for each call frame. + - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or + [`prestateTracer`](index.md##prestatetracer). + - `tracerConfig`: (object) _[optional]_ tracer configuration options: + - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any + sub-calls. It eliminates the additional processing for each call frame. ## Returns @@ -33,17 +34,16 @@ Depending on the specified tracer type, returns a [`callTracer`](index.md##callt ```bash curl https://linea-mainnet.infura.io/v3/ \ --X POST \ --H "Content-Type: application/json" \ --d '{"method":"debug_traceBlockByNumber","params":["0x4d0c", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}' - + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "debug_traceBlockByNumber", "params": ["0x4d0c", {"tracer": "callTracer"}], "id": 1}' ``` + ```bash -wscat -c wss://linea-goerli.infura.io/ws/v3/ \ --x '{"method":"debug_traceBlockByNumber","params":["0x4d0c", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}' +wscat -c wss://linea-goerli.infura.io/ws/v3/ -x '{"jsonrpc": "2.0", "method": "debug_traceBlockByNumber", "params": ["0x4d0c", {"tracer": "callTracer"}], "id": 1}' ``` @@ -53,32 +53,32 @@ wscat -c wss://linea-goerli.infura.io/ws/v3/ \ ```json { - "jsonrpc": "2.0", - "id": 1, - "result": [ - { - "result": { - "from": "0xa5ba45f484bc67fe293cf01f7d92d5ba3514dd42", - "gas": "0x5208", - "gasUsed": "0x5208", - "input": "0x", - "to": "0x45a318273749d6eb00f5f6ca3bc7cd3de26d642a", - "type": "CALL", - "value": "0x2ca186f5fda8004" - } - }, - { - "result": { - "from": "0x25f2650cc9e8ad863bf5da6a7598e24271574e29", - "gas": "0xfe0e", - "gasUsed": "0xafee", - "input": "0xd0e30db0", - "to": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f", - "type": "CALL", - "value": "0x2386f26fc10000" - } - }, - ... - ] + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "result": { + "from": "0xa5ba45f484bc67fe293cf01f7d92d5ba3514dd42", + "gas": "0x5208", + "gasUsed": "0x5208", + "input": "0x", + "to": "0x45a318273749d6eb00f5f6ca3bc7cd3de26d642a", + "type": "CALL", + "value": "0x2ca186f5fda8004" + } + }, + { + "result": { + "from": "0x25f2650cc9e8ad863bf5da6a7598e24271574e29", + "gas": "0xfe0e", + "gasUsed": "0xafee", + "input": "0xd0e30db0", + "to": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f", + "type": "CALL", + "value": "0x2386f26fc10000" + } + } + ... + ] } ``` diff --git a/services/reference/linea/json-rpc-methods/debug/debug_tracetransaction.md b/services/reference/linea/json-rpc-methods/debug/debug_tracetransaction.md index 6c42a992856..4a9dbaa87d3 100644 --- a/services/reference/linea/json-rpc-methods/debug/debug_tracetransaction.md +++ b/services/reference/linea/json-rpc-methods/debug/debug_tracetransaction.md @@ -1,8 +1,9 @@ --- description: debug_traceTransaction API method --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # debug_traceTransaction @@ -12,13 +13,13 @@ Returns tracing results for the specified transaction. - `transactionHash`: (string) _[required]_ hash of the block to trace. - Optional tracing options object with the following fields: - - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or - [`prestateTracer`](index.md##prestatetracer). - - `tracerConfig`: (object) _[optional]_ tracer configuration options: - - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any - sub-calls. It eliminates the additional processing for each call frame. - - `timeout`: (string) _[optional]_ string of decimals numbers to set the timeout. The default is 5 seconds. The maximum - timeout is 10 seconds. Valid units are `ns`, `us`, `ms`, `s`. For example, `3s30ms`. + - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or + [`prestateTracer`](index.md##prestatetracer). + - `tracerConfig`: (object) _[optional]_ tracer configuration options: + - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any + sub-calls. It eliminates the additional processing for each call frame. + - `timeout`: (string) _[optional]_ string of decimals numbers to set the timeout. The default is 5 seconds. The maximum + timeout is 10 seconds. Valid units are `ns`, `us`, `ms`, `s`. For example, `3s30ms`. # Returns @@ -34,17 +35,16 @@ Depending on the specified tracer type, returns a [`callTracer`](index.md##callt ```bash curl https://linea-mainnet.infura.io/v3/ \ --X POST \ --H "Content-Type: application/json" \ --d '{"method":"debug_traceTransaction","params":["0x5d3faa9b9605a8fb04d989a79bfe6d3b708bdcfc66048d2fe18ed2dda4a8297c", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "debug_traceTransaction", "params": ["0x5d3faa9b9605a8fb04d989a79bfe6d3b708bdcfc66048d2fe18ed2dda4a8297c", {"tracer": "callTracer"}], "id": 1}' ``` ```bash -wscat -c wss://linea-goerli.infura.io/ws/v3/ \ --x '{"method":"debug_traceTransaction","params":["0x5d3faa9b9605a8fb04d989a79bfe6d3b708bdcfc66048d2fe18ed2dda4a8297c", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}' +wscat -c wss://linea-goerli.infura.io/ws/v3/ -x '{"jsonrpc": "2.0", "method": "debug_traceTransaction", "params": ["0x5d3faa9b9605a8fb04d989a79bfe6d3b708bdcfc66048d2fe18ed2dda4a8297c", {"tracer": "callTracer"}], "id": 1}' ``` @@ -54,16 +54,16 @@ wscat -c wss://linea-goerli.infura.io/ws/v3/ \ ```json { - "jsonrpc": "2.0", - "id": 1, - "result": { - "from": "0xa5ba45f484bc67fe293cf01f7d92d5ba3514dd42", - "gas": "0x5208", - "gasUsed": "0x5208", - "input": "0x", - "to": "0x45a318273749d6eb00f5f6ca3bc7cd3de26d642a", - "type": "CALL", - "value": "0x2ca186f5fda8004" - } + "jsonrpc": "2.0", + "id": 1, + "result": { + "from": "0xa5ba45f484bc67fe293cf01f7d92d5ba3514dd42", + "gas": "0x5208", + "gasUsed": "0x5208", + "input": "0x", + "to": "0x45a318273749d6eb00f5f6ca3bc7cd3de26d642a", + "type": "CALL", + "value": "0x2ca186f5fda8004" + } } ``` diff --git a/services/reference/linea/json-rpc-methods/debug/index.md b/services/reference/linea/json-rpc-methods/debug/index.md index a56d093c5a6..7b70ce1c01e 100644 --- a/services/reference/linea/json-rpc-methods/debug/index.md +++ b/services/reference/linea/json-rpc-methods/debug/index.md @@ -7,9 +7,9 @@ description: Linea debug methods. The debug API methods allow you to inspect and debug the network. Infura supports the following debug methods on the Linea network: - - [`debug_traceBlockByHash`](debug_traceblockbyhash.md) - - [`debug_traceBlockByNumber`](debug_traceblockbynumber.md) - - [`debug_traceTransaction`](debug_tracetransaction.md) +- [`debug_traceBlockByHash`](debug_traceblockbyhash.md) +- [`debug_traceBlockByNumber`](debug_traceblockbynumber.md) +- [`debug_traceTransaction`](debug_tracetransaction.md) ## Debug tracing types @@ -24,7 +24,7 @@ and sub-calls as children of the higher levels. The `callTracer` type returns an object with the following results: | Field | Type | Description | -|----------------|--------|----------------------------------------------------------------------------------------------------------------------| +| -------------- | ------ | -------------------------------------------------------------------------------------------------------------------- | | `type` | string | The type of call. | | `from` | string | The address the transaction is sent from. | | `to` | string | The address the transaction is directed to. | @@ -37,15 +37,15 @@ The `callTracer` type returns an object with the following results: | `revertReason` | string | If the contract execution was reverted, this field will contain the reason for the revert (if provided by Solidity). | | `calls` | array | Sub-calls made by the contract during the execution of the transaction. | - ### `prestateTracer` +### `prestateTracer` The `prestateTracer` tracing type records and tracks every change made to the state during the execution of transactions. It generates an object that contains keys representing the addresses of the accounts involved in the transactions. The corresponding values are objects that include specific fields related to the state changes made during the transaction: | Field | Type | Description | -|-----------|--------|--------------------------------------| +| --------- | ------ | ------------------------------------ | | `balance` | string | The account balance. | | `nonce` | uint64 | The nonce value for the transaction. | | `code` | string | The hex-encoded bytecode. | -| `storage` | map | The storage slots of the contract. | \ No newline at end of file +| `storage` | map | The storage slots of the contract. | diff --git a/services/reference/linea/json-rpc-methods/eth_accounts.mdx b/services/reference/linea/json-rpc-methods/eth_accounts.mdx index 0cc7304b6ec..0dafbcb7389 100644 --- a/services/reference/linea/json-rpc-methods/eth_accounts.mdx +++ b/services/reference/linea/json-rpc-methods/eth_accounts.mdx @@ -2,39 +2,39 @@ title: "eth_accounts" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_accounts-description.mdx"; +import Description from "/services/reference/_partials/_eth_accounts-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_accounts-example.mdx"; +import Example from "/services/reference/_partials/_eth_accounts-example.mdx" ### Request -import Request from "./_eth_accounts-request.mdx"; +import Request from "./_eth_accounts-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_accounts-response.mdx"; +import Response from "/services/reference/_partials/_eth_accounts-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_blocknumber.mdx b/services/reference/linea/json-rpc-methods/eth_blocknumber.mdx index 7896c8c46f6..076b45d83ce 100644 --- a/services/reference/linea/json-rpc-methods/eth_blocknumber.mdx +++ b/services/reference/linea/json-rpc-methods/eth_blocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx" ### Request -import Request from "./_eth_blocknumber-request.mdx"; +import Request from "./_eth_blocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_call.mdx b/services/reference/linea/json-rpc-methods/eth_call.mdx index 88b3857775d..5c6ebee7de3 100644 --- a/services/reference/linea/json-rpc-methods/eth_call.mdx +++ b/services/reference/linea/json-rpc-methods/eth_call.mdx @@ -2,39 +2,39 @@ title: "eth_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_call-description.mdx"; +import Description from "/services/reference/_partials/_eth_call-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_call-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_call-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_call-example.mdx"; +import Example from "/services/reference/_partials/_eth_call-example.mdx" ### Request -import Request from "./_eth_call-request.mdx"; +import Request from "./_eth_call-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_call-response.mdx"; +import Response from "/services/reference/_partials/_eth_call-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_chainid.mdx b/services/reference/linea/json-rpc-methods/eth_chainid.mdx index e544b1003a4..a6f446ad268 100644 --- a/services/reference/linea/json-rpc-methods/eth_chainid.mdx +++ b/services/reference/linea/json-rpc-methods/eth_chainid.mdx @@ -2,39 +2,39 @@ title: "eth_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_chainid-description.mdx"; +import Description from "/services/reference/_partials/_eth_chainid-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_chainid-example.mdx"; +import Example from "/services/reference/_partials/_eth_chainid-example.mdx" ### Request -import Request from "./_eth_chainid-request.mdx"; +import Request from "./_eth_chainid-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_chainid-response.mdx"; +import Response from "/services/reference/_partials/_eth_chainid-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_coinbase.mdx b/services/reference/linea/json-rpc-methods/eth_coinbase.mdx index e9bb3ff61cd..8957df7e522 100644 --- a/services/reference/linea/json-rpc-methods/eth_coinbase.mdx +++ b/services/reference/linea/json-rpc-methods/eth_coinbase.mdx @@ -2,9 +2,9 @@ title: "eth_coinbase" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_coinbase-description.mdx"; +import Description from "/services/reference/_partials/_eth_coinbase-description.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_estimategas.mdx b/services/reference/linea/json-rpc-methods/eth_estimategas.mdx index af6c5ad77da..47c6b01804e 100644 --- a/services/reference/linea/json-rpc-methods/eth_estimategas.mdx +++ b/services/reference/linea/json-rpc-methods/eth_estimategas.mdx @@ -2,39 +2,39 @@ title: "eth_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_estimategas-description.mdx"; +import Description from "/services/reference/_partials/_eth_estimategas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_estimategas-example.mdx"; +import Example from "/services/reference/_partials/_eth_estimategas-example.mdx" ### Request -import Request from "./_eth_estimategas-request.mdx"; +import Request from "./_eth_estimategas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_estimategas-response.mdx"; +import Response from "/services/reference/_partials/_eth_estimategas-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_feehistory.mdx b/services/reference/linea/json-rpc-methods/eth_feehistory.mdx index 21e4962e114..9aafc564c46 100644 --- a/services/reference/linea/json-rpc-methods/eth_feehistory.mdx +++ b/services/reference/linea/json-rpc-methods/eth_feehistory.mdx @@ -2,39 +2,39 @@ title: "eth_feeHistory" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_feehistory-description.mdx"; +import Description from "/services/reference/_partials/_eth_feehistory-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_feehistory-example.mdx"; +import Example from "/services/reference/_partials/_eth_feehistory-example.mdx" ### Request -import Request from "./_eth_feehistory-request.mdx"; +import Request from "./_eth_feehistory-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_feehistory-response.mdx"; +import Response from "/services/reference/_partials/_eth_feehistory-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_gasprice.mdx b/services/reference/linea/json-rpc-methods/eth_gasprice.mdx index c602d61c293..8980dcc8a39 100644 --- a/services/reference/linea/json-rpc-methods/eth_gasprice.mdx +++ b/services/reference/linea/json-rpc-methods/eth_gasprice.mdx @@ -2,39 +2,39 @@ title: "eth_gasPrice" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gasprice-description.mdx"; +import Description from "/services/reference/_partials/_eth_gasprice-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gasprice-example.mdx"; +import Example from "/services/reference/_partials/_eth_gasprice-example.mdx" ### Request -import Request from "./_eth_gasprice-request.mdx"; +import Request from "./_eth_gasprice-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gasprice-response.mdx"; +import Response from "/services/reference/_partials/_eth_gasprice-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getbalance.mdx b/services/reference/linea/json-rpc-methods/eth_getbalance.mdx index c50eba5fd61..1ff5a0d31c8 100644 --- a/services/reference/linea/json-rpc-methods/eth_getbalance.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getbalance.mdx @@ -2,39 +2,39 @@ title: "eth_getBalance" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getbalance-description.mdx"; +import Description from "/services/reference/_partials/_eth_getbalance-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getbalance-example.mdx"; +import Example from "/services/reference/_partials/_eth_getbalance-example.mdx" ### Request -import Request from "./_eth_getbalance-request.mdx"; +import Request from "./_eth_getbalance-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getbalance-response.mdx"; +import Response from "/services/reference/_partials/_eth_getbalance-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getblockbyhash.mdx b/services/reference/linea/json-rpc-methods/eth_getblockbyhash.mdx index ad555110b71..970e6c27704 100644 --- a/services/reference/linea/json-rpc-methods/eth_getblockbyhash.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getblockbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx" ### Request -import Request from "./_eth_getblockbyhash-request.mdx"; +import Request from "./_eth_getblockbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getblockbynumber.mdx b/services/reference/linea/json-rpc-methods/eth_getblockbynumber.mdx index 2faabaa3e86..f14e34f1531 100644 --- a/services/reference/linea/json-rpc-methods/eth_getblockbynumber.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getblockbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx" ### Request -import Request from "./_eth_getblockbynumber-request.mdx"; +import Request from "./_eth_getblockbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx b/services/reference/linea/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx index aacb2e0e3af..36944d31e1f 100644 --- a/services/reference/linea/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbyhash-request.mdx"; +import Request from "./_eth_getblocktransactioncountbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx b/services/reference/linea/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx index 161e7fe344b..c355e33cb53 100644 --- a/services/reference/linea/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbynumber-request.mdx"; +import Request from "./_eth_getblocktransactioncountbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getcode.mdx b/services/reference/linea/json-rpc-methods/eth_getcode.mdx index 8364a077f09..ace0da8cb26 100644 --- a/services/reference/linea/json-rpc-methods/eth_getcode.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getcode.mdx @@ -2,39 +2,39 @@ title: "eth_getCode" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getcode-description.mdx"; +import Description from "/services/reference/_partials/_eth_getcode-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getcode-example.mdx"; +import Example from "/services/reference/_partials/_eth_getcode-example.mdx" ### Request -import Request from "./_eth_getcode-request.mdx"; +import Request from "./_eth_getcode-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getcode-response.mdx"; +import Response from "/services/reference/_partials/_eth_getcode-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getlogs.mdx b/services/reference/linea/json-rpc-methods/eth_getlogs.mdx index 546d66f9148..4a1c1a031c4 100644 --- a/services/reference/linea/json-rpc-methods/eth_getlogs.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getlogs-description.mdx"; +import Description from "/services/reference/_partials/_eth_getlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getlogs-example.mdx"; +import Example from "/services/reference/_partials/_eth_getlogs-example.mdx" ### Request -import Request from "./_eth_getlogs-request.mdx"; +import Request from "./_eth_getlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getlogs-response.mdx"; +import Response from "/services/reference/_partials/_eth_getlogs-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getproof.mdx b/services/reference/linea/json-rpc-methods/eth_getproof.mdx index 7cb028bd44f..0d7b5743dc4 100644 --- a/services/reference/linea/json-rpc-methods/eth_getproof.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getproof.mdx @@ -2,39 +2,39 @@ title: "eth_getProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getproof-description.mdx"; +import Description from "/services/reference/_partials/_eth_getproof-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getproof-example.mdx"; +import Example from "/services/reference/_partials/_eth_getproof-example.mdx" ### Request -import Request from "./_eth_getproof-request.mdx"; +import Request from "./_eth_getproof-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getproof-response.mdx"; +import Response from "/services/reference/_partials/_eth_getproof-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getstorageat.mdx b/services/reference/linea/json-rpc-methods/eth_getstorageat.mdx index aee85d0fde8..d91e20b3979 100644 --- a/services/reference/linea/json-rpc-methods/eth_getstorageat.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getstorageat.mdx @@ -2,39 +2,39 @@ title: "eth_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx"; +import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx"; +import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx" ### Request -import Request from "./_eth_getstorageat-request.mdx"; +import Request from "./_eth_getstorageat-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx"; +import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx b/services/reference/linea/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx index 5422dc7f552..e04f9c75a5c 100644 --- a/services/reference/linea/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx +++ b/services/reference/linea/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx b/services/reference/linea/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx index 6861fb566a4..28ba85246a2 100644 --- a/services/reference/linea/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx +++ b/services/reference/linea/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_gettransactionbyhash.mdx b/services/reference/linea/json-rpc-methods/eth_gettransactionbyhash.mdx index 1adc6ff1eb4..28548a1fd58 100644 --- a/services/reference/linea/json-rpc-methods/eth_gettransactionbyhash.mdx +++ b/services/reference/linea/json-rpc-methods/eth_gettransactionbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx" ### Request -import Request from "./_eth_gettransactionbyhash-request.mdx"; +import Request from "./_eth_gettransactionbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_gettransactioncount.mdx b/services/reference/linea/json-rpc-methods/eth_gettransactioncount.mdx index 73985353185..9cf5c71e500 100644 --- a/services/reference/linea/json-rpc-methods/eth_gettransactioncount.mdx +++ b/services/reference/linea/json-rpc-methods/eth_gettransactioncount.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx" ### Request -import Request from "./_eth_gettransactioncount-request.mdx"; +import Request from "./_eth_gettransactioncount-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_gettransactionreceipt.mdx b/services/reference/linea/json-rpc-methods/eth_gettransactionreceipt.mdx index 370d08c0402..1ab2ba12676 100644 --- a/services/reference/linea/json-rpc-methods/eth_gettransactionreceipt.mdx +++ b/services/reference/linea/json-rpc-methods/eth_gettransactionreceipt.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx" ### Request -import Request from "./_eth_gettransactionreceipt-request.mdx"; +import Request from "./_eth_gettransactionreceipt-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getunclebyblockhashandindex.mdx b/services/reference/linea/json-rpc-methods/eth_getunclebyblockhashandindex.mdx index dce1f045d95..d6a9a959a37 100644 --- a/services/reference/linea/json-rpc-methods/eth_getunclebyblockhashandindex.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getunclebyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblockhashandindex-request.mdx"; +import Request from "./_eth_getunclebyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx b/services/reference/linea/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx index 321c22c4ce0..07c458cb7ad 100644 --- a/services/reference/linea/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblocknumberandindex-request.mdx"; +import Request from "./_eth_getunclebyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getunclecountbyblockhash.mdx b/services/reference/linea/json-rpc-methods/eth_getunclecountbyblockhash.mdx index c21e8c283a8..298b5c520e8 100644 --- a/services/reference/linea/json-rpc-methods/eth_getunclecountbyblockhash.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getunclecountbyblockhash.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblockhash-request.mdx"; +import Request from "./_eth_getunclecountbyblockhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getunclecountbyblocknumber.mdx b/services/reference/linea/json-rpc-methods/eth_getunclecountbyblocknumber.mdx index 824fdf8de1b..2cc5dbbf753 100644 --- a/services/reference/linea/json-rpc-methods/eth_getunclecountbyblocknumber.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getunclecountbyblocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblocknumber-request.mdx"; +import Request from "./_eth_getunclecountbyblocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_getwork.mdx b/services/reference/linea/json-rpc-methods/eth_getwork.mdx index ff9964e4737..31dd81816b7 100644 --- a/services/reference/linea/json-rpc-methods/eth_getwork.mdx +++ b/services/reference/linea/json-rpc-methods/eth_getwork.mdx @@ -2,39 +2,39 @@ title: "eth_getWork" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getwork-description.mdx"; +import Description from "/services/reference/_partials/_eth_getwork-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getwork-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getwork-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getwork-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getwork-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getwork-example.mdx"; +import Example from "/services/reference/_partials/_eth_getwork-example.mdx" ### Request -import Request from "./_eth_getwork-request.mdx"; +import Request from "./_eth_getwork-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getwork-response.mdx"; +import Response from "/services/reference/_partials/_eth_getwork-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_hashrate.mdx b/services/reference/linea/json-rpc-methods/eth_hashrate.mdx index 8ea8d622b56..21ba47abdef 100644 --- a/services/reference/linea/json-rpc-methods/eth_hashrate.mdx +++ b/services/reference/linea/json-rpc-methods/eth_hashrate.mdx @@ -2,39 +2,39 @@ title: "eth_hashrate" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_hashrate-description.mdx"; +import Description from "/services/reference/_partials/_eth_hashrate-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_hashrate-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_hashrate-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_hashrate-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_hashrate-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_hashrate-example.mdx"; +import Example from "/services/reference/_partials/_eth_hashrate-example.mdx" ### Request -import Request from "./_eth_hashrate-request.mdx"; +import Request from "./_eth_hashrate-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_hashrate-response.mdx"; +import Response from "/services/reference/_partials/_eth_hashrate-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_maxpriorityfeepergas.mdx b/services/reference/linea/json-rpc-methods/eth_maxpriorityfeepergas.mdx index 87e39538aaf..6f818052ae7 100644 --- a/services/reference/linea/json-rpc-methods/eth_maxpriorityfeepergas.mdx +++ b/services/reference/linea/json-rpc-methods/eth_maxpriorityfeepergas.mdx @@ -2,39 +2,39 @@ title: "eth_maxPriorityFeePerGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx"; +import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx"; +import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx" ### Request -import Request from "./_eth_maxpriorityfeepergas-request.mdx"; +import Request from "./_eth_maxpriorityfeepergas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx"; +import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_mining.mdx b/services/reference/linea/json-rpc-methods/eth_mining.mdx index 8b17ae80655..3e755d68509 100644 --- a/services/reference/linea/json-rpc-methods/eth_mining.mdx +++ b/services/reference/linea/json-rpc-methods/eth_mining.mdx @@ -2,39 +2,39 @@ title: "eth_mining" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_mining-description.mdx"; +import Description from "/services/reference/_partials/_eth_mining-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_mining-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_mining-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_mining-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_mining-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_mining-example.mdx"; +import Example from "/services/reference/_partials/_eth_mining-example.mdx" ### Request -import Request from "./_eth_mining-request.mdx"; +import Request from "./_eth_mining-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_mining-response.mdx"; +import Response from "/services/reference/_partials/_eth_mining-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_protocolversion.mdx b/services/reference/linea/json-rpc-methods/eth_protocolversion.mdx index 38863109276..02b5da95bff 100644 --- a/services/reference/linea/json-rpc-methods/eth_protocolversion.mdx +++ b/services/reference/linea/json-rpc-methods/eth_protocolversion.mdx @@ -2,39 +2,39 @@ title: "eth_protocolVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx"; +import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx"; +import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx" ### Request -import Request from "./_eth_protocolversion-request.mdx"; +import Request from "./_eth_protocolversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx"; +import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_sendrawtransaction.mdx b/services/reference/linea/json-rpc-methods/eth_sendrawtransaction.mdx index 4dfc4e6f296..dd39a5bafd4 100644 --- a/services/reference/linea/json-rpc-methods/eth_sendrawtransaction.mdx +++ b/services/reference/linea/json-rpc-methods/eth_sendrawtransaction.mdx @@ -2,39 +2,39 @@ title: "eth_sendRawTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx"; +import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx" ### Request -import Request from "./_eth_sendrawtransaction-request.mdx"; +import Request from "./_eth_sendrawtransaction-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx"; +import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_sendtransaction.mdx b/services/reference/linea/json-rpc-methods/eth_sendtransaction.mdx index ac6ebfd02dd..5c13a1d5c8f 100644 --- a/services/reference/linea/json-rpc-methods/eth_sendtransaction.mdx +++ b/services/reference/linea/json-rpc-methods/eth_sendtransaction.mdx @@ -2,10 +2,9 @@ title: "eth_sendTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx" - diff --git a/services/reference/linea/json-rpc-methods/eth_sign.mdx b/services/reference/linea/json-rpc-methods/eth_sign.mdx index 073b1040681..f8c6a17df92 100644 --- a/services/reference/linea/json-rpc-methods/eth_sign.mdx +++ b/services/reference/linea/json-rpc-methods/eth_sign.mdx @@ -2,9 +2,9 @@ title: "eth_sign" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sign-description.mdx"; +import Description from "/services/reference/_partials/_eth_sign-description.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_submitwork.mdx b/services/reference/linea/json-rpc-methods/eth_submitwork.mdx index b286c9b49de..3e302cecfe3 100644 --- a/services/reference/linea/json-rpc-methods/eth_submitwork.mdx +++ b/services/reference/linea/json-rpc-methods/eth_submitwork.mdx @@ -2,39 +2,39 @@ title: "eth_submitWork" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_submitwork-description.mdx"; +import Description from "/services/reference/_partials/_eth_submitwork-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_submitwork-example.mdx"; +import Example from "/services/reference/_partials/_eth_submitwork-example.mdx" ### Request -import Request from "./_eth_submitwork-request.mdx"; +import Request from "./_eth_submitwork-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_submitwork-response.mdx"; +import Response from "/services/reference/_partials/_eth_submitwork-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/eth_syncing.mdx b/services/reference/linea/json-rpc-methods/eth_syncing.mdx index bfb89e8c209..7ffbcd44560 100644 --- a/services/reference/linea/json-rpc-methods/eth_syncing.mdx +++ b/services/reference/linea/json-rpc-methods/eth_syncing.mdx @@ -2,39 +2,39 @@ title: "eth_syncing" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_syncing-description.mdx"; +import Description from "/services/reference/_partials/_eth_syncing-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_syncing-example.mdx"; +import Example from "/services/reference/_partials/_eth_syncing-example.mdx" ### Request -import Request from "./_eth_syncing-request.mdx"; +import Request from "./_eth_syncing-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_syncing-response.mdx"; +import Response from "/services/reference/_partials/_eth_syncing-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/linea_estimategas.mdx b/services/reference/linea/json-rpc-methods/linea_estimategas.mdx index 5b0732a717d..9ca76f53f4a 100644 --- a/services/reference/linea/json-rpc-methods/linea_estimategas.mdx +++ b/services/reference/linea/json-rpc-methods/linea_estimategas.mdx @@ -2,8 +2,8 @@ title: "linea_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" # `linea_estimateGas` @@ -34,44 +34,43 @@ We recommend using `linea_estimateGas` for more accurate results. - `from`: _\[optional]_ 20 bytes - The address the transaction is sent from. - `to`: _\[optional]_ 20 bytes - The address the transaction is directed to. - `gas`: _\[optional]_ Hexadecimal value of the gas provided for the transaction execution. `linea_estimateGas` consumes - zero gas, but this parameter may be needed by some executions. + zero gas, but this parameter may be needed by some executions. - `gasPrice`: _\[optional]_ Hexadecimal value of the gas price used for each paid gas. - `maxPriorityFeePerGas`: _\[optional]_ Maximum fee, in wei, the sender is willing to pay per gas above the base fee. - `maxFeePerGas`: _\[optional]_ Maximum total fee (base fee + priority fee), in wei, the sender is willing to pay per gas. - `value`: _\[optional]_ Hexadecimal value of the value sent with this transaction. - `data`: _\[optional]_ Hash of the method signature and encoded parameters. See the - [Ethereum contract ABI specification](https://docs.soliditylang.org/en/latest/abi-spec.html). + [Ethereum contract ABI specification](https://docs.soliditylang.org/en/latest/abi-spec.html). - `block number`: _\[optional]_ A string representing a block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - ## Returns Hexidecimal values representing the recommended gas limit, the base fee per gas, and the priority fee per gas. ## Example -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). ### Request - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"linea_estimateGas","params":[{"from":"0x42c27251C710864Cf76f1b9918Ace3E585e6E21b","value":"0x1","gasPrice":"0x100000000","gas":"0x21000"}],"id":53}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "linea_estimateGas", "params": [{"from": "0x42c27251C710864Cf76f1b9918Ace3E585e6E21b", "value": "0x1", "gasPrice": "0x100000000", "gas": "0x21000"}], "id": 53}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"linea_estimateGas","params":[{"from":"0x42c27251C710864Cf76f1b9918Ace3E585e6E21b","value":"0x1","gasPrice":"0x100000000","gas":"0x21000"}],"id":53}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "linea_estimateGas", "params": [{"from": "0x42c27251C710864Cf76f1b9918Ace3E585e6E21b", "value": "0x1", "gasPrice": "0x100000000", "gas": "0x21000"}], "id": 53}' +``` @@ -92,5 +91,6 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu } } ``` + diff --git a/services/reference/linea/json-rpc-methods/net_listening.mdx b/services/reference/linea/json-rpc-methods/net_listening.mdx index 10de017b29a..b10ffc556cf 100644 --- a/services/reference/linea/json-rpc-methods/net_listening.mdx +++ b/services/reference/linea/json-rpc-methods/net_listening.mdx @@ -2,39 +2,39 @@ title: "net_listening" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_listening-description.mdx"; +import Description from "/services/reference/_partials/_net_listening-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_listening-parameters.mdx"; +import Params from "/services/reference/_partials/_net_listening-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_listening-returns.mdx"; +import Returns from "/services/reference/_partials/_net_listening-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_listening-example.mdx"; +import Example from "/services/reference/_partials/_net_listening-example.mdx" ### Request -import Request from "./_net_listening-request.mdx"; +import Request from "./_net_listening-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_listening-response.mdx"; +import Response from "/services/reference/_partials/_net_listening-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/net_peercount.mdx b/services/reference/linea/json-rpc-methods/net_peercount.mdx index 9ff570e4c70..c0246b44d39 100644 --- a/services/reference/linea/json-rpc-methods/net_peercount.mdx +++ b/services/reference/linea/json-rpc-methods/net_peercount.mdx @@ -2,39 +2,39 @@ title: "net_peerCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_peercount-description.mdx"; +import Description from "/services/reference/_partials/_net_peercount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_peercount-parameters.mdx"; +import Params from "/services/reference/_partials/_net_peercount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_peercount-returns.mdx"; +import Returns from "/services/reference/_partials/_net_peercount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_peercount-example.mdx"; +import Example from "/services/reference/_partials/_net_peercount-example.mdx" ### Request -import Request from "./_net_peercount-request.mdx"; +import Request from "./_net_peercount-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_peercount-response.mdx"; +import Response from "/services/reference/_partials/_net_peercount-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/net_version.mdx b/services/reference/linea/json-rpc-methods/net_version.mdx index d55ab80402d..1d6c0080c60 100644 --- a/services/reference/linea/json-rpc-methods/net_version.mdx +++ b/services/reference/linea/json-rpc-methods/net_version.mdx @@ -2,39 +2,39 @@ title: "net_version" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_version-description.mdx"; +import Description from "/services/reference/_partials/_net_version-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_version-parameters.mdx"; +import Params from "/services/reference/_partials/_net_version-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_version-returns.mdx"; +import Returns from "/services/reference/_partials/_net_version-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_version-example.mdx"; +import Example from "/services/reference/_partials/_net_version-example.mdx" ### Request -import Request from "./_net_version-request.mdx"; +import Request from "./_net_version-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_version-response.mdx"; +import Response from "/services/reference/_partials/_net_version-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx b/services/reference/linea/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx index 7ae44481938..8403124c5f1 100644 --- a/services/reference/linea/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx +++ b/services/reference/linea/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx @@ -1,18 +1,18 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash -wscat -c wss://linea-sepolia.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' +wscat -c wss://linea-sepolia.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' ``` ```bash -wscat -c wss://linea-sepolia.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' +wscat -c wss://linea-sepolia.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' ``` @@ -20,9 +20,8 @@ wscat -c wss://linea-sepolia.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", ```bash -wscat -c wss://linea-sepolia.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}' +wscat -c wss://linea-sepolia.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}' ``` - diff --git a/services/reference/linea/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx b/services/reference/linea/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx index 816a8c02386..8a9af1c613e 100644 --- a/services/reference/linea/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx +++ b/services/reference/linea/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx @@ -1,14 +1,13 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash -wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}' +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}' ``` - diff --git a/services/reference/linea/json-rpc-methods/subscription-methods/eth_subscribe.mdx b/services/reference/linea/json-rpc-methods/subscription-methods/eth_subscribe.mdx index bfcc7c2c5f5..cf6545937b8 100644 --- a/services/reference/linea/json-rpc-methods/subscription-methods/eth_subscribe.mdx +++ b/services/reference/linea/json-rpc-methods/subscription-methods/eth_subscribe.mdx @@ -2,16 +2,16 @@ title: "eth_subscribe" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/subscription-methods/_eth_subscribe-description.mdx"; +import Description from "/services/reference/_partials/subscription-methods/_eth_subscribe-description.mdx" ## Parameters -import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters.mdx"; +import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters.mdx" @@ -21,24 +21,24 @@ The `newPendingTransactions` event is only available on Linea Sepolia. ## Returns -import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx"; +import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx" ## Example -import Example from "/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx"; +import Example from "/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx" ### Request -import Request from "./_eth_subscribe-request.mdx"; +import Request from "./_eth_subscribe-request.mdx" ### Response -import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx"; +import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx b/services/reference/linea/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx index 180a40bbd87..6fe9ca4660e 100644 --- a/services/reference/linea/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx +++ b/services/reference/linea/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx @@ -2,39 +2,39 @@ title: "eth_unsubscribe" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-description.mdx"; +import Description from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-description.mdx" ## Parameters -import Params from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx"; +import Params from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx"; +import Returns from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx" ## Example -import Example from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx"; +import Example from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx" ### Request -import Request from "./_eth_unsubscribe-request.mdx"; +import Request from "./_eth_unsubscribe-request.mdx" ### Response -import Response from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx"; +import Response from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/trace-methods/_trace_block-request.mdx b/services/reference/linea/json-rpc-methods/trace-methods/_trace_block-request.mdx index 5233ba7ab30..b9cd8a46649 100644 --- a/services/reference/linea/json-rpc-methods/trace-methods/_trace_block-request.mdx +++ b/services/reference/linea/json-rpc-methods/trace-methods/_trace_block-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"trace_block","params":["0x6"],"id":1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"trace_block","params":["0x6"],"id":1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"trace_block","params":["0x6"],"id":1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"trace_block","params":["0x6"],"id":1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/trace-methods/_trace_transaction-request.mdx b/services/reference/linea/json-rpc-methods/trace-methods/_trace_transaction-request.mdx index 0a6a2508438..8df85c3c0d4 100644 --- a/services/reference/linea/json-rpc-methods/trace-methods/_trace_transaction-request.mdx +++ b/services/reference/linea/json-rpc-methods/trace-methods/_trace_transaction-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "method": "trace_transaction","params": ["0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7"],"id": 1}' - ``` +```bash +curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "trace_transaction","params": ["0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7"],"id": 1}' +``` - ```bash - wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "trace_transaction","params": ["0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7"],"id": 1}' - ``` +```bash +wscat -c wss://linea-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "trace_transaction","params": ["0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7"],"id": 1}' +``` - diff --git a/services/reference/linea/json-rpc-methods/trace-methods/index.md b/services/reference/linea/json-rpc-methods/trace-methods/index.md index 777daccc66d..2c93b9a5953 100644 --- a/services/reference/linea/json-rpc-methods/trace-methods/index.md +++ b/services/reference/linea/json-rpc-methods/trace-methods/index.md @@ -44,4 +44,20 @@ smart contract transaction. Excludes precompiled contracts. ] ``` -
KeyValue
action Transaction details.
callType Whether the transaction is call or create.
fromAddress of the transaction sender.
gasGas provided by sender.
inputTransaction data.
toTarget of the transaction.
valueValue transferred in the transaction.
resultTransaction result.
gasUsedGas used by the transaction. Includes any refunds of unused gas.
outputReturn value of the contract call. Contains only the actual value sent by a RETURN operation. If a RETURN was not executed, the output is empty bytes.
subTracesTraces of contract calls made by the transaction.
traceAddressTree list address of where the call occurred, address of the parents, and order of the current sub call.
transactionHashHash of the transaction.
transactionPositionTransaction position.
typeWhether the transaction is a CALL or CREATE series operation.
\ No newline at end of file +| Key |Value | +|---------------------|-----------------------------------------------------------------------------------------------------------| +| `action` | Transaction details. | +| `callType` | Whether the transaction is `call` or `create`. | +| `from` | Address of the transaction sender. | +| `gas` | Gas provided by sender. | +| `input` | Transaction data. | +| `to` | Target of the transaction. | +| `value` | Value transferred in the transaction. | +| `result` | Transaction result. | +| `gasUsed` | Gas used by the transaction. Includes any refunds of unused gas. | +| `output` | Return value of the contract call. Contains only the actual value sent by a `RETURN` operation. If a `RETURN` was not executed, the output is empty bytes. | +| `subTraces` | Traces of contract calls made by the transaction. | +| `traceAddress` | Tree list address of where the call occurred, address of the parents, and order of the current sub call. | +| `transactionHash` | Hash of the transaction. | +| `transactionPosition`| Transaction position. | +| `type` | Whether the transaction is a `CALL` or `CREATE` series operation. | diff --git a/services/reference/linea/json-rpc-methods/trace-methods/trace_block.mdx b/services/reference/linea/json-rpc-methods/trace-methods/trace_block.mdx index 418cf40c93f..0eb2040e845 100644 --- a/services/reference/linea/json-rpc-methods/trace-methods/trace_block.mdx +++ b/services/reference/linea/json-rpc-methods/trace-methods/trace_block.mdx @@ -2,39 +2,39 @@ title: "trace_block" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/trace-methods/_trace_block-description.mdx"; +import Description from "/services/reference/_partials/trace-methods/_trace_block-description.mdx" ## Parameters -import Params from "/services/reference/_partials/trace-methods/_trace_block-parameters.mdx"; +import Params from "/services/reference/_partials/trace-methods/_trace_block-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/trace-methods/_trace_block-returns.mdx"; +import Returns from "/services/reference/_partials/trace-methods/_trace_block-returns.mdx" ## Example -import Example from "/services/reference/_partials/trace-methods/_trace_block-example.mdx"; +import Example from "/services/reference/_partials/trace-methods/_trace_block-example.mdx" ### Request -import Request from "./_trace_block-request.mdx"; +import Request from "./_trace_block-request.mdx" ### Response -import Response from "/services/reference/_partials/trace-methods/_trace_block-response.mdx"; +import Response from "/services/reference/_partials/trace-methods/_trace_block-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/trace-methods/trace_transaction.mdx b/services/reference/linea/json-rpc-methods/trace-methods/trace_transaction.mdx index 64119fab70c..f043c2b194f 100644 --- a/services/reference/linea/json-rpc-methods/trace-methods/trace_transaction.mdx +++ b/services/reference/linea/json-rpc-methods/trace-methods/trace_transaction.mdx @@ -2,39 +2,39 @@ title: "trace_transaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/trace-methods/_trace_transaction-description.mdx"; +import Description from "/services/reference/_partials/trace-methods/_trace_transaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/trace-methods/_trace_transaction-parameters.mdx"; +import Params from "/services/reference/_partials/trace-methods/_trace_transaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/trace-methods/_trace_transaction-returns.mdx"; +import Returns from "/services/reference/_partials/trace-methods/_trace_transaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/trace-methods/_trace_transaction-example.mdx"; +import Example from "/services/reference/_partials/trace-methods/_trace_transaction-example.mdx" ### Request -import Request from "./_trace_transaction-request.mdx"; +import Request from "./_trace_transaction-request.mdx" ### Response -import Response from "/services/reference/_partials/trace-methods/_trace_transaction-response.mdx"; +import Response from "/services/reference/_partials/trace-methods/_trace_transaction-response.mdx" diff --git a/services/reference/linea/json-rpc-methods/web3_clientversion.mdx b/services/reference/linea/json-rpc-methods/web3_clientversion.mdx index 11997e5c36d..c5ee316d699 100644 --- a/services/reference/linea/json-rpc-methods/web3_clientversion.mdx +++ b/services/reference/linea/json-rpc-methods/web3_clientversion.mdx @@ -2,39 +2,39 @@ title: "web3_clientVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_web3_clientversion-description.mdx"; +import Description from "/services/reference/_partials/_web3_clientversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx"; +import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx"; +import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_web3_clientversion-example.mdx"; +import Example from "/services/reference/_partials/_web3_clientversion-example.mdx" ### Request -import Request from "./_web3_clientversion-request.mdx"; +import Request from "./_web3_clientversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_web3_clientversion-response.mdx"; +import Response from "/services/reference/_partials/_web3_clientversion-response.mdx" diff --git a/services/reference/linea/quickstart.md b/services/reference/linea/quickstart.md index 23cabdf5291..593fb912538 100644 --- a/services/reference/linea/quickstart.md +++ b/services/reference/linea/quickstart.md @@ -25,9 +25,9 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://linea-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ### Node (JavaScript) @@ -36,152 +36,154 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta #### Node Fetch -1. In your project folder, install the Node Fetch package using npm: +1. In your project folder, install the `node-fetch` package using npm:: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://linea-mainnet.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://linea-mainnet.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios -1. In your project folder, install the Axios package using npm: +1. In your project folder, install the `axios` package using npm: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require('axios'); - - axios.post('https://linea-mainnet.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'eth_blockNumber', - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios") + + axios + .post("https://linea-mainnet.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }) + .then((response) => { + console.log(response.data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Ethers 1. In your project folder, install the `ethers` package using npm: - ```bash - npm install ethers - `````` + ```bash + npm install ethers + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.js" - const ethers = require('ethers'); + ```javascript title="index.js" + const ethers = require("ethers") - const provider = new ethers.providers.JsonRpcProvider('https://linea-mainnet.infura.io/v3/YOUR-API-KEY'); + const provider = new ethers.providers.JsonRpcProvider( + "https://linea-mainnet.infura.io/v3/YOUR-API-KEY" + ) - provider.getBlockNumber() - .then(blockNumber => { - console.log(blockNumber); - }) - .catch(error => { - console.error(error); - }); - ``` + provider + .getBlockNumber() + .then((blockNumber) => { + console.log(blockNumber) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` 1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```python title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = 'https://linea-mainnet.infura.io/v3/YOUR-API-KEY' + url = "https://linea-mainnet.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + } - headers = {'content-type': 'application/json'} + headers = {"content-type": "application/json"} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` + ```bash + python index.py + ``` ## Next steps @@ -189,7 +191,7 @@ Now that you have successfully made a call to the Linea network, you can explore by Infura. Here are some suggestions: - **Explore other Linea APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Arbitrum, Polygon, Optimism, IPFS, and more. @@ -197,4 +199,3 @@ by Infura. Here are some suggestions: Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/reference/mantle/index.md b/services/reference/mantle/index.md index b442ac8f581..a8c150a8c15 100644 --- a/services/reference/mantle/index.md +++ b/services/reference/mantle/index.md @@ -23,14 +23,12 @@ availability solutions. This approach not only ensures cheaper and more accessible data but also maintains the robust security inherent to Ethereum, making it an efficient and secure choice for scaling Ethereum applications. - :::info See also See also the [official Mantle documentation](https://docs-v2.mantle.xyz/) for more information. ::: - Select one of the following options to get started with the Mantle network: ```bash curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` - diff --git a/services/reference/mantle/json-rpc-methods/_eth_blocknumber-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_blocknumber-request.mdx index d94ed14be9c..ac458cd7a5c 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_blocknumber-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_blocknumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` - diff --git a/services/reference/mantle/json-rpc-methods/_eth_call-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_call-request.mdx index 393b39c74ae..45cb1d05454 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_call-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_call-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - diff --git a/services/reference/mantle/json-rpc-methods/_eth_chainid-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_chainid-request.mdx index e4a11b96406..bfc8e49ab9e 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_chainid-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_chainid-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` - diff --git a/services/reference/mantle/json-rpc-methods/_eth_estimategas-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_estimategas-request.mdx index cd152a4cb76..9f4cd35fa7a 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_estimategas-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_estimategas-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - diff --git a/services/reference/mantle/json-rpc-methods/_eth_feehistory-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_feehistory-request.mdx index f9a9d5aa1d4..46f816ad981 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_feehistory-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_feehistory-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]]}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20, 30]]}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_gasprice-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_gasprice-request.mdx index 3d5c9af74ee..9724947d181 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_gasprice-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_gasprice-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getbalance-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getbalance-request.mdx index 58ca334c311..417ab32afd1 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getbalance-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getbalance-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getblockbyhash-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getblockbyhash-request.mdx index b1e43c78aa2..088a7e357fb 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getblockbyhash-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getblockbyhash-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getblockbynumber-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getblockbynumber-request.mdx index a5c9cb63c98..2ef51fd0523 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getblockbynumber-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getblockbynumber-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x5BAD55",false],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx index 10819a98394..4e877c13991 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx index 440361b73c2..9593e88efe0 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getcode-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getcode-request.mdx index 0f1686ad158..5dc260e96b2 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getcode-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getcode-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getlogs-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getlogs-request.mdx index 96ad1e01972..9cd6b0cdedc 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getlogs-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getlogs-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics": ["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getproof-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getproof-request.mdx index dd32477243f..79686cc9582 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getproof-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getproof-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0","method": "eth_getProof","id": 1,"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getProof", "id": 1, "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getstorageat-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getstorageat-request.mdx index c4d387ee0e4..959791505d8 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getstorageat-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getstorageat-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx index 787e5353c02..59d9f765877 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx index 96a5856d36e..789f29d6cec 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55","0x0"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_gettransactionbyhash-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_gettransactionbyhash-request.mdx index 3f396f31c38..fc8b10ffefa 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_gettransactionbyhash-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_gettransactionbyhash-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_gettransactioncount-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_gettransactioncount-request.mdx index 8ffba81fb91..f904ef17b43 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_gettransactioncount-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_gettransactioncount-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_gettransactionreceipt-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_gettransactionreceipt-request.mdx index 9474a3bbab4..90f1741ef9f 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_gettransactionreceipt-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_gettransactionreceipt-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx index 28782fed315..afea4944941 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx index 76abdeea543..92f5332b4a8 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c","0x0"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx index dab5253f0eb..7bdc9cb3104 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx index 5be5712351a..0f48f2e5a7f 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx index 921225fd7c0..ad95ca78b05 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_protocolversion-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_protocolversion-request.mdx index 1868774e9cf..6926f735673 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_protocolversion-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_protocolversion-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_protocolVersion", "params": [], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_sendrawtransaction-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_sendrawtransaction-request.mdx index d6950caf83b..5caf4b4097b 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_sendrawtransaction-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_sendrawtransaction-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_submitwork-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_submitwork-request.mdx index d423e88d609..fe1b33e41f0 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_submitwork-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_submitwork-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_submitWork", "params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_eth_syncing-request.mdx b/services/reference/mantle/json-rpc-methods/_eth_syncing-request.mdx index f5622e71f0d..ab336681448 100644 --- a/services/reference/mantle/json-rpc-methods/_eth_syncing-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_eth_syncing-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_net_listening-request.mdx b/services/reference/mantle/json-rpc-methods/_net_listening-request.mdx index 59466ad2309..46ee2fcddfe 100644 --- a/services/reference/mantle/json-rpc-methods/_net_listening-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_net_listening-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_net_peercount-request.mdx b/services/reference/mantle/json-rpc-methods/_net_peercount-request.mdx index 38de44d10bb..df96dab3c78 100644 --- a/services/reference/mantle/json-rpc-methods/_net_peercount-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_net_peercount-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_net_version-request.mdx b/services/reference/mantle/json-rpc-methods/_net_version-request.mdx index da9cc298544..4d973d087e6 100644 --- a/services/reference/mantle/json-rpc-methods/_net_version-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_net_version-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/_web3_clientversion-request.mdx b/services/reference/mantle/json-rpc-methods/_web3_clientversion-request.mdx index 7f59af134c3..6cda18788ef 100644 --- a/services/reference/mantle/json-rpc-methods/_web3_clientversion-request.mdx +++ b/services/reference/mantle/json-rpc-methods/_web3_clientversion-request.mdx @@ -1,15 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` + - diff --git a/services/reference/mantle/json-rpc-methods/debug/debug_storagerangeat.md b/services/reference/mantle/json-rpc-methods/debug/debug_storagerangeat.md index 79c70c053ba..3b1b51c2801 100644 --- a/services/reference/mantle/json-rpc-methods/debug/debug_storagerangeat.md +++ b/services/reference/mantle/json-rpc-methods/debug/debug_storagerangeat.md @@ -1,8 +1,9 @@ --- description: debug_storageRangeAt API method --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # debug_storageRangeAt @@ -31,9 +32,9 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ```bash curl https://mantle-mainnet.infura.io/v3/ \ --X POST \ --H "Content-Type: application/json" \ --d '{"jsonrpc":"2.0","method":"debug_storageRangeAt","params":["0x7aaff18735842066baee6a2eb53961a69e67f5e012072c81c05a0fd793069a6c",0,"0x371c7ec6D8039ff7933a2AA28EB827Ffe1F52f07","0x0000000000000000000000000000000000000000000000000000000000000000",1], "id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "debug_storageRangeAt", "params": ["0x7aaff18735842066baee6a2eb53961a69e67f5e012072c81c05a0fd793069a6c", 0, "0x371c7ec6D8039ff7933a2AA28EB827Ffe1F52f07", "0x0000000000000000000000000000000000000000000000000000000000000000", 1], "id": 1}' ``` diff --git a/services/reference/mantle/json-rpc-methods/debug/debug_traceblock.md b/services/reference/mantle/json-rpc-methods/debug/debug_traceblock.md index 42242084573..de9c3860f3c 100644 --- a/services/reference/mantle/json-rpc-methods/debug/debug_traceblock.md +++ b/services/reference/mantle/json-rpc-methods/debug/debug_traceblock.md @@ -1,8 +1,9 @@ --- description: debug_traceBlock API method --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # debug_traceBlock @@ -12,11 +13,11 @@ Returns full trace of all invoked opcodes of all transactions included in the bl - `block`: (string) RLP of the block - Optional tracing options object with the following fields: - - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or - [`prestateTracer`](index.md##prestatetracer). - - `tracerConfig`: (object) _[optional]_ tracer configuration options: - - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any - sub-calls. It eliminates the additional processing for each call frame. + - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or + [`prestateTracer`](index.md##prestatetracer). + - `tracerConfig`: (object) _[optional]_ tracer configuration options: + - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any + sub-calls. It eliminates the additional processing for each call frame. ## Returns @@ -34,9 +35,9 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ```bash curl https://mantle-mainnet.infura.io/v3/ \ --X POST \ --H "Content-Type: application/json" \ --d '{"jsonrpc":"2.0","method":"debug_traceBlock","params":["0xf90277f90208a05a41d0e66b4120775176c09fcf39e7c0520517a13d2b57b18d33d342df038bfca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794e6a7a1d47ff21b6321162aea7c6cb457d5476bcaa00e0df2706b0a4fb8bd08c9246d472abbe850af446405d9eba1db41db18b4a169a04513310fcb9f6f616972a3b948dc5d547f280849a87ebb5af0191f98b87be598a0fe2bf2a941abf41d72637e5b91750332a30283efd40c424dc522b77e6f0ed8c4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000860153886c1bbd82b44382520b8252088455c426598b657468706f6f6c2e6f7267a0b48c515a9dde8d346c3337ea520aa995a4738bb595495506125449c1149d6cf488ba4f8ecd18aab215f869f86780862d79883d2000825208945df9b87991262f6ba471f09758cde1c0fc1de734827a69801ca088ff6cf0fefd94db46111149ae4bfc179e9b94721fffd821d38d16464b3f71d0a045e0aff800961cfce805daef7016b9b675c137a6a41a548f7b60a3484c06a33ac0", {"tracer": "callTracer"}],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "debug_traceBlock", "params": ["0xf90277f90208a05a41d0e66b4120775176c09fcf39e7c0520517a13d2b57b18d33d342df038bfca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794e6a7a1d47ff21b6321162aea7c6cb457d5476bcaa00e0df2706b0a4fb8bd08c9246d472abbe850af446405d9eba1db41db18b4a169a04513310fcb9f6f616972a3b948dc5d547f280849a87ebb5af0191f98b87be598a0fe2bf2a941abf41d72637e5b91750332a30283efd40c424dc522b77e6f0ed8c4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000860153886c1bbd82b44382520b8252088455c426598b657468706f6f6c2e6f7267a0b48c515a9dde8d346c3337ea520aa995a4738bb595495506125449c1149d6cf488ba4f8ecd18aab215f869f86780862d79883d2000825208945df9b87991262f6ba471f09758cde1c0fc1de734827a69801ca088ff6cf0fefd94db46111149ae4bfc179e9b94721fffd821d38d16464b3f71d0a045e0aff800961cfce805daef7016b9b675c137a6a41a548f7b60a3484c06a33ac0", {"tracer": "callTracer"}], "id": 1}' ``` @@ -49,18 +50,18 @@ curl https://mantle-mainnet.infura.io/v3/ \ "id": 1, "jsonrpc": "2.0", "result": [ - { - "result": { - "from": "0x8894e0a0c962cb723c1976a4421c95949be2d4e3", - "gas": "0x2d48c", - "gasUsed": "0xc7ab", - "to": "0x55d398326f99059ff775485246999027b3197955", - "input": "0xa9059cbb0000000000000000000000003b9f33b3a9d382fa60283c555bde8f78855957be00000000000000000000000000000000000000000000000d4e7f4f79da7c0000", - "output": "0x0000000000000000000000000000000000000000000000000000000000000001", - "value": "0x0", - "type": "CALL" - } - } - ] + { + "result": { + "from": "0x8894e0a0c962cb723c1976a4421c95949be2d4e3", + "gas": "0x2d48c", + "gasUsed": "0xc7ab", + "to": "0x55d398326f99059ff775485246999027b3197955", + "input": "0xa9059cbb0000000000000000000000003b9f33b3a9d382fa60283c555bde8f78855957be00000000000000000000000000000000000000000000000d4e7f4f79da7c0000", + "output": "0x0000000000000000000000000000000000000000000000000000000000000001", + "value": "0x0", + "type": "CALL" + } + } + ] } ``` diff --git a/services/reference/mantle/json-rpc-methods/debug/debug_traceblockbyhash.md b/services/reference/mantle/json-rpc-methods/debug/debug_traceblockbyhash.md index e8d56dcaf39..a388552e957 100644 --- a/services/reference/mantle/json-rpc-methods/debug/debug_traceblockbyhash.md +++ b/services/reference/mantle/json-rpc-methods/debug/debug_traceblockbyhash.md @@ -1,8 +1,9 @@ --- description: debug_traceBlockByHash API method --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # debug_traceBlockByHash @@ -12,11 +13,11 @@ Returns tracing results by executing all transactions in the block specified by - `blockHash`: (string) _[required]_ hash of the block to trace. - Optional tracing options object with the following fields: - - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or - [`prestateTracer`](index.md##prestatetracer). - - `tracerConfig`: (object) _[optional]_ tracer configuration options: - - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any - sub-calls. It eliminates the additional processing for each call frame. + - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or + [`prestateTracer`](index.md##prestatetracer). + - `tracerConfig`: (object) _[optional]_ tracer configuration options: + - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any + sub-calls. It eliminates the additional processing for each call frame. ## Returns @@ -34,10 +35,11 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ```bash curl https://mantle-mainnet.infura.io/v3/ \ --X POST \ --H "Content-Type: application/json" \ --d '{"method":"debug_traceBlockByHash","params":["0xec8cb29209d9170b31008738ec9e80acc22257249cfd0f4bce19590cd09834c8", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "debug_traceBlockByHash", "params": ["0xec8cb29209d9170b31008738ec9e80acc22257249cfd0f4bce19590cd09834c8", {"tracer": "callTracer"}], "id": 1}' ``` + diff --git a/services/reference/mantle/json-rpc-methods/debug/debug_traceblockbynumber.md b/services/reference/mantle/json-rpc-methods/debug/debug_traceblockbynumber.md index c293929f744..f80ec1aaa07 100644 --- a/services/reference/mantle/json-rpc-methods/debug/debug_traceblockbynumber.md +++ b/services/reference/mantle/json-rpc-methods/debug/debug_traceblockbynumber.md @@ -1,8 +1,9 @@ --- description: debug_traceBlockByNumber API method --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # debug_traceBlockByNumber @@ -11,13 +12,13 @@ Returns tracing results by executing all transactions in the specified block num ## Parameters - `blockNumber`: (string) _[required]_ block number as a hexidecimal string, or one of the string tags `latest`, `earliest` - , or `pending`, as [described in the default block parameters](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). + , or `pending`, as [described in the default block parameters](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - Optional tracing options object with the following fields: - - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or - [`prestateTracer`](index.md##prestatetracer). - - `tracerConfig`: (object) _[optional]_ tracer configuration options: - - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any - sub-calls. It eliminates the additional processing for each call frame. + - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or + [`prestateTracer`](index.md##prestatetracer). + - `tracerConfig`: (object) _[optional]_ tracer configuration options: + - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any + sub-calls. It eliminates the additional processing for each call frame. ## Returns @@ -35,11 +36,11 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ```bash curl https://mantle-mainnet.infura.io/v3/ \ --X POST \ --H "Content-Type: application/json" \ --d '{"method":"debug_traceBlockByNumber","params":["0x4d0c", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}' - + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "debug_traceBlockByNumber", "params": ["0x4d0c", {"tracer": "callTracer"}], "id": 1}' ``` + @@ -47,32 +48,32 @@ curl https://mantle-mainnet.infura.io/v3/ \ ```json { - "jsonrpc": "2.0", - "id": 1, - "result": [ - { - "result": { - "from": "0xa5ba45f484bc67fe293cf01f7d92d5ba3514dd42", - "gas": "0x5208", - "gasUsed": "0x5208", - "input": "0x", - "to": "0x45a318273749d6eb00f5f6ca3bc7cd3de26d642a", - "type": "CALL", - "value": "0x2ca186f5fda8004" - } - }, - { - "result": { - "from": "0x25f2650cc9e8ad863bf5da6a7598e24271574e29", - "gas": "0xfe0e", - "gasUsed": "0xafee", - "input": "0xd0e30db0", - "to": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f", - "type": "CALL", - "value": "0x2386f26fc10000" - } - }, - ... - ] + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "result": { + "from": "0xa5ba45f484bc67fe293cf01f7d92d5ba3514dd42", + "gas": "0x5208", + "gasUsed": "0x5208", + "input": "0x", + "to": "0x45a318273749d6eb00f5f6ca3bc7cd3de26d642a", + "type": "CALL", + "value": "0x2ca186f5fda8004" + } + }, + { + "result": { + "from": "0x25f2650cc9e8ad863bf5da6a7598e24271574e29", + "gas": "0xfe0e", + "gasUsed": "0xafee", + "input": "0xd0e30db0", + "to": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f", + "type": "CALL", + "value": "0x2386f26fc10000" + } + } + ... + ] } ``` diff --git a/services/reference/mantle/json-rpc-methods/debug/debug_tracecall.md b/services/reference/mantle/json-rpc-methods/debug/debug_tracecall.md index ea56cfec840..b9a07e88178 100644 --- a/services/reference/mantle/json-rpc-methods/debug/debug_tracecall.md +++ b/services/reference/mantle/json-rpc-methods/debug/debug_tracecall.md @@ -1,8 +1,9 @@ --- description: debug_traceCall API method --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # debug_traceCall @@ -12,27 +13,27 @@ given block execution. ## Parameters - Transaction object with the foloowing fields: - - `from`: (string) address (20 bytes) the transaction is sent from. - - `to`: (string) _[required]_ address (20 bytes) the transaction is directed to. - - `gas`: (string) hexadecimal value of the gas provided for the transaction execution. `eth_call` consumes zero - gas, but this parameter may be needed by some executions. - - `gasPrice`: (string) hexadecimal value of the `gasPrice` used for each paid gas. - - `maxPriorityFeePerGas`: (string) maximum fee, in Wei, the sender is willing to pay per gas above the base fee. - See [EIP-1559 transactions](../../../../concepts/transaction-types.md#eip-1559-transactions). - - `maxFeePerGas`: (string) maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. - See [EIP-1559 transactions](../../../../concepts/transaction-types.md#eip-1559-transactions). - - `value`: (string) hexadecimal of the value sent with this transaction. - - `data`: (string) hash of the method signature and encoded parameters. - See [Ethereum contract ABI specification](https://docs.soliditylang.org/en/latest/abi-spec.html). + - `from`: (string) address (20 bytes) the transaction is sent from. + - `to`: (string) _[required]_ address (20 bytes) the transaction is directed to. + - `gas`: (string) hexadecimal value of the gas provided for the transaction execution. `eth_call` consumes zero + gas, but this parameter may be needed by some executions. + - `gasPrice`: (string) hexadecimal value of the `gasPrice` used for each paid gas. + - `maxPriorityFeePerGas`: (string) maximum fee, in Wei, the sender is willing to pay per gas above the base fee. + See [EIP-1559 transactions](../../../../concepts/transaction-types.md#eip-1559-transactions). + - `maxFeePerGas`: (string) maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. + See [EIP-1559 transactions](../../../../concepts/transaction-types.md#eip-1559-transactions). + - `value`: (string) hexadecimal of the value sent with this transaction. + - `data`: (string) hash of the method signature and encoded parameters. + See [Ethereum contract ABI specification](https://docs.soliditylang.org/en/latest/abi-spec.html). - `block parameter`: [_Required_] hexadecimal block number, or one of the string tags - `latest`, `earliest`, `pending`, `safe`, or `finalized`. - See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). + `latest`, `earliest`, `pending`, `safe`, or `finalized`. + See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - Optional tracing options object with the following fields: - - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or - [`prestateTracer`](index.md##prestatetracer). - - `tracerConfig`: (object) _[optional]_ tracer configuration options: - - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any - sub-calls. It eliminates the additional processing for each call frame. + - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or + [`prestateTracer`](index.md##prestatetracer). + - `tracerConfig`: (object) _[optional]_ tracer configuration options: + - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any + sub-calls. It eliminates the additional processing for each call frame. ## Returns @@ -50,9 +51,9 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ```bash curl https://mantle-mainnet.infura.io/v3/ \ --X POST \ --H "Content-Type: application/json" \ --d '{"method":"debug_traceCall","params":[{"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "debug_traceCall", "params": [{"to": "0x6b175474e89094c44da98b954eedeac495271d0f", "data": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest", {"tracer": "callTracer"}], "id": 1}' ``` diff --git a/services/reference/mantle/json-rpc-methods/debug/debug_tracetransaction.md b/services/reference/mantle/json-rpc-methods/debug/debug_tracetransaction.md index d1151702f92..1bf05a2b141 100644 --- a/services/reference/mantle/json-rpc-methods/debug/debug_tracetransaction.md +++ b/services/reference/mantle/json-rpc-methods/debug/debug_tracetransaction.md @@ -1,8 +1,9 @@ --- description: debug_traceTransaction API method --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # debug_traceTransaction @@ -12,13 +13,13 @@ Returns tracing results for the specified transaction. - `transactionHash`: (string) _[required]_ hash of the block to trace. - Optional tracing options object with the following fields: - - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or - [`prestateTracer`](index.md##prestatetracer). - - `tracerConfig`: (object) _[optional]_ tracer configuration options: - - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any - sub-calls. It eliminates the additional processing for each call frame. - - `timeout`: (string) _[optional]_ string of decimals numbers to set the timeout. The default is 5 seconds. The maximum - timeout is 10 seconds. Valid units are `ns`, `us`, `ms`, `s`. For example, `3s30ms`. + - `tracer`: (string) _[optional]_ type of tracer. Supports [`callTracer`](index.md#calltracer) or + [`prestateTracer`](index.md##prestatetracer). + - `tracerConfig`: (object) _[optional]_ tracer configuration options: + - `onlyTopCall`: (boolean) _[optional]_ when `true`, will only trace the primary (top-level) call and not any + sub-calls. It eliminates the additional processing for each call frame. + - `timeout`: (string) _[optional]_ string of decimals numbers to set the timeout. The default is 5 seconds. The maximum + timeout is 10 seconds. Valid units are `ns`, `us`, `ms`, `s`. For example, `3s30ms`. # Returns @@ -36,9 +37,9 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ```bash curl https://mantle-mainnet.infura.io/v3/ \ --X POST \ --H "Content-Type: application/json" \ --d '{"method":"debug_traceTransaction","params":["0xdcecf3f9fc68c92276d6c4b40c17b185f8a3fcb9d1a959a495d38d480782404b", {"tracer": "callTracer"}],"id":1,"jsonrpc":"2.0"}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "debug_traceTransaction", "params": ["0xdcecf3f9fc68c92276d6c4b40c17b185f8a3fcb9d1a959a495d38d480782404b", {"tracer": "callTracer"}], "id": 1}' ``` diff --git a/services/reference/mantle/json-rpc-methods/debug/index.md b/services/reference/mantle/json-rpc-methods/debug/index.md index 7f90d8080e3..8c79683031c 100644 --- a/services/reference/mantle/json-rpc-methods/debug/index.md +++ b/services/reference/mantle/json-rpc-methods/debug/index.md @@ -15,7 +15,6 @@ methods on the Mantle network: - [`debug_traceCall`](debug_tracecall.md) - [`debug_traceTransaction`](debug_tracetransaction.md) - ## Debug tracing types The debug methods support the `callTracer` and `prestateTracer` tracing types, which return different @@ -30,7 +29,7 @@ with the top-level call at root and sub-calls as children of the higher levels. The `callTracer` type returns an object with the following results: | Field | Type | Description | -|----------------|--------|----------------------------------------------------------------------------------------------------------------------| +| -------------- | ------ | -------------------------------------------------------------------------------------------------------------------- | | `type` | string | The type of call. | | `from` | string | The address the transaction is sent from. | | `to` | string | The address the transaction is directed to. | @@ -43,7 +42,7 @@ The `callTracer` type returns an object with the following results: | `revertReason` | string | If the contract execution was reverted, this field will contain the reason for the revert (if provided by Solidity). | | `calls` | array | Sub-calls made by the contract during the execution of the transaction. | - ### `prestateTracer` +### `prestateTracer` The `prestateTracer` tracing type records and tracks every change made to the state during the execution of transactions. It generates an object that contains keys representing the addresses of the accounts @@ -51,8 +50,8 @@ involved in the transactions. The corresponding values are objects that include to the state changes made during the transaction: | Field | Type | Description | -|-----------|--------|--------------------------------------| +| --------- | ------ | ------------------------------------ | | `balance` | string | The account balance. | | `nonce` | uint64 | The nonce value for the transaction. | | `code` | string | The hex-encoded bytecode. | -| `storage` | map | The storage slots of the contract. | \ No newline at end of file +| `storage` | map | The storage slots of the contract. | diff --git a/services/reference/mantle/json-rpc-methods/eth_accounts.mdx b/services/reference/mantle/json-rpc-methods/eth_accounts.mdx index 0cc7304b6ec..0dafbcb7389 100644 --- a/services/reference/mantle/json-rpc-methods/eth_accounts.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_accounts.mdx @@ -2,39 +2,39 @@ title: "eth_accounts" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_accounts-description.mdx"; +import Description from "/services/reference/_partials/_eth_accounts-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_accounts-example.mdx"; +import Example from "/services/reference/_partials/_eth_accounts-example.mdx" ### Request -import Request from "./_eth_accounts-request.mdx"; +import Request from "./_eth_accounts-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_accounts-response.mdx"; +import Response from "/services/reference/_partials/_eth_accounts-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_blocknumber.mdx b/services/reference/mantle/json-rpc-methods/eth_blocknumber.mdx index 7896c8c46f6..076b45d83ce 100644 --- a/services/reference/mantle/json-rpc-methods/eth_blocknumber.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_blocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx" ### Request -import Request from "./_eth_blocknumber-request.mdx"; +import Request from "./_eth_blocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_call.mdx b/services/reference/mantle/json-rpc-methods/eth_call.mdx index 88b3857775d..5c6ebee7de3 100644 --- a/services/reference/mantle/json-rpc-methods/eth_call.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_call.mdx @@ -2,39 +2,39 @@ title: "eth_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_call-description.mdx"; +import Description from "/services/reference/_partials/_eth_call-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_call-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_call-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_call-example.mdx"; +import Example from "/services/reference/_partials/_eth_call-example.mdx" ### Request -import Request from "./_eth_call-request.mdx"; +import Request from "./_eth_call-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_call-response.mdx"; +import Response from "/services/reference/_partials/_eth_call-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_chainid.mdx b/services/reference/mantle/json-rpc-methods/eth_chainid.mdx index e544b1003a4..a6f446ad268 100644 --- a/services/reference/mantle/json-rpc-methods/eth_chainid.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_chainid.mdx @@ -2,39 +2,39 @@ title: "eth_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_chainid-description.mdx"; +import Description from "/services/reference/_partials/_eth_chainid-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_chainid-example.mdx"; +import Example from "/services/reference/_partials/_eth_chainid-example.mdx" ### Request -import Request from "./_eth_chainid-request.mdx"; +import Request from "./_eth_chainid-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_chainid-response.mdx"; +import Response from "/services/reference/_partials/_eth_chainid-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_coinbase.mdx b/services/reference/mantle/json-rpc-methods/eth_coinbase.mdx index e9bb3ff61cd..8957df7e522 100644 --- a/services/reference/mantle/json-rpc-methods/eth_coinbase.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_coinbase.mdx @@ -2,9 +2,9 @@ title: "eth_coinbase" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_coinbase-description.mdx"; +import Description from "/services/reference/_partials/_eth_coinbase-description.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_estimategas.mdx b/services/reference/mantle/json-rpc-methods/eth_estimategas.mdx index af6c5ad77da..47c6b01804e 100644 --- a/services/reference/mantle/json-rpc-methods/eth_estimategas.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_estimategas.mdx @@ -2,39 +2,39 @@ title: "eth_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_estimategas-description.mdx"; +import Description from "/services/reference/_partials/_eth_estimategas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_estimategas-example.mdx"; +import Example from "/services/reference/_partials/_eth_estimategas-example.mdx" ### Request -import Request from "./_eth_estimategas-request.mdx"; +import Request from "./_eth_estimategas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_estimategas-response.mdx"; +import Response from "/services/reference/_partials/_eth_estimategas-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_feehistory.mdx b/services/reference/mantle/json-rpc-methods/eth_feehistory.mdx index 21e4962e114..9aafc564c46 100644 --- a/services/reference/mantle/json-rpc-methods/eth_feehistory.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_feehistory.mdx @@ -2,39 +2,39 @@ title: "eth_feeHistory" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_feehistory-description.mdx"; +import Description from "/services/reference/_partials/_eth_feehistory-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_feehistory-example.mdx"; +import Example from "/services/reference/_partials/_eth_feehistory-example.mdx" ### Request -import Request from "./_eth_feehistory-request.mdx"; +import Request from "./_eth_feehistory-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_feehistory-response.mdx"; +import Response from "/services/reference/_partials/_eth_feehistory-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_gasprice.mdx b/services/reference/mantle/json-rpc-methods/eth_gasprice.mdx index c602d61c293..8980dcc8a39 100644 --- a/services/reference/mantle/json-rpc-methods/eth_gasprice.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_gasprice.mdx @@ -2,39 +2,39 @@ title: "eth_gasPrice" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gasprice-description.mdx"; +import Description from "/services/reference/_partials/_eth_gasprice-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gasprice-example.mdx"; +import Example from "/services/reference/_partials/_eth_gasprice-example.mdx" ### Request -import Request from "./_eth_gasprice-request.mdx"; +import Request from "./_eth_gasprice-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gasprice-response.mdx"; +import Response from "/services/reference/_partials/_eth_gasprice-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getbalance.mdx b/services/reference/mantle/json-rpc-methods/eth_getbalance.mdx index c50eba5fd61..1ff5a0d31c8 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getbalance.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getbalance.mdx @@ -2,39 +2,39 @@ title: "eth_getBalance" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getbalance-description.mdx"; +import Description from "/services/reference/_partials/_eth_getbalance-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getbalance-example.mdx"; +import Example from "/services/reference/_partials/_eth_getbalance-example.mdx" ### Request -import Request from "./_eth_getbalance-request.mdx"; +import Request from "./_eth_getbalance-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getbalance-response.mdx"; +import Response from "/services/reference/_partials/_eth_getbalance-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getbalancevalues.mdx b/services/reference/mantle/json-rpc-methods/eth_getbalancevalues.mdx index 9805040dd0d..5229dd03bbe 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getbalancevalues.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getbalancevalues.mdx @@ -2,8 +2,8 @@ title: "eth_getBalanceValues" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the parameters that control an accounts rebasing ETH balance. @@ -18,8 +18,7 @@ To facilitate rebasing ETH balances, accounts on Mantle store more fields than j - `address`: [_Required_] A string representing the address (20 bytes) to check for balance. - `block parameter`: [_Required_] A hexadecimal block number, or one of the string tags `latest`, `earliest`, `pending`, `safe`, or `finalized`. - See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - + See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). ## Returns @@ -32,19 +31,19 @@ Object with the following fields: ## Example -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). ### Request - ```bash - curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalanceValues","params":["0xd071acb641553a2e205181a42aa3a8ace97dae6d","latest"],"id":1}' - ``` +```bash +curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getBalanceValues","params":["0xd071acb641553a2e205181a42aa3a8ace97dae6d","latest"],"id":1}' +``` @@ -68,4 +67,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ``` - \ No newline at end of file + diff --git a/services/reference/mantle/json-rpc-methods/eth_getblockbyhash.mdx b/services/reference/mantle/json-rpc-methods/eth_getblockbyhash.mdx index ad555110b71..970e6c27704 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getblockbyhash.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getblockbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx" ### Request -import Request from "./_eth_getblockbyhash-request.mdx"; +import Request from "./_eth_getblockbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getblockbynumber.mdx b/services/reference/mantle/json-rpc-methods/eth_getblockbynumber.mdx index 2faabaa3e86..f14e34f1531 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getblockbynumber.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getblockbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx" ### Request -import Request from "./_eth_getblockbynumber-request.mdx"; +import Request from "./_eth_getblockbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getblockrange.md b/services/reference/mantle/json-rpc-methods/eth_getblockrange.md index f59394b5262..4a2225a378d 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getblockrange.md +++ b/services/reference/mantle/json-rpc-methods/eth_getblockrange.md @@ -1,8 +1,9 @@ --- description: eth_getBlockRange API method --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # eth_getBlockRange @@ -11,13 +12,13 @@ Returns the block information for blocks within a specified range. ## Parameters - `start block hash`: (string) _[required]_ Hexadecimal block number, or one of the string tags - `latest`, `earliest`, `pending`, `safe`, or `finalized`. - See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). + `latest`, `earliest`, `pending`, `safe`, or `finalized`. + See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - `end block hash`: (string) _[required]_ Hexadecimal block number, or one of the string tags - `latest`, `earliest`, `pending`, `safe`, or `finalized`. - See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). + `latest`, `earliest`, `pending`, `safe`, or `finalized`. + See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block). - `transaction details flag`: (boolean) _[required]_ `true` returns full transaction objects, `false` - returns only the hashes of the transactions. + returns only the hashes of the transactions. ## Returns @@ -56,14 +57,14 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu curl https://mantle-mainnet.infura.io/v3/ \ -X POST \ -H "Content-Type: application/json" \ --d '{"jsonrpc":"2.0","method":"eth_getBlockRange","params":["0x1", "0x2", false],"id":1}' +-d '{"jsonrpc": "2.0", "method": "eth_getBlockRange", "params": ["0x1", "0x2", false], "id": 1}' ``` ```bash -wscat -c wss://mantle-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockRange","params":["0x1", "0x2", false],"id":1}' +wscat -c wss://mantle-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockRange", "params": ["0x1", "0x2", false], "id": 1}' ``` @@ -73,52 +74,56 @@ wscat -c wss://mantle-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", ```json { - "jsonrpc":"2.0", - "id":1, - "result":[ + "jsonrpc": "2.0", + "id": 1, + "result": [ { - "difficulty":"0x2", - "extraData":"0xd97735082a846765746889676f312e31352e3133856c696e75780000000000009c3827892825f0825a7e329b6913b84c9e4f89168350aff0939e0e6609629f2e7f07f2aeb62acbf4b16a739cab68866f4880ea406583a4b28a59d4f55dc2314e00", - "gasLimit":"0xe4e1c0", - "gasUsed":"0x3183d", - "hash":"0xbee7192e575af30420cae0c7776304ac196077ee72b048970549e4f08e875453", - "logsBloom":"0x00000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000400000000000100000000000000200000000002000000000000001000000000000000000004000000000000000000000000000040000400000100400000000000000100000000000000000000000000000020000000000000000000000000000000000000000000000001000000000000000000000100000000000000000000000000000000000000000000000000000000000000088000000080000000000010000000000000000000000000000800008000120000000000000000000000000000000002000", - "miner":"0x0000000000000000000000000000000000000000", - "mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce":"0x0000000000000000", - "number":"0x1", - "parentHash":"0x7ca38a1916c42007829c55e69d3e9a73265554b586a499015373241b8a3fa48b", - "receiptsRoot":"0xf4c97b1186b690ad3318f907c0cdaf46f4598f27f711a5609064b2690a767287", - "sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "size":"0x30c", - "stateRoot":"0xd3ac40854cd2ac17d8effeae6065cea990b04be714f7061544973feeb2f1c95f", - "timestamp":"0x618d4769", - "totalDifficulty":"0x3", - "transactions":["0x5e77a04531c7c107af1882d76cbff9486d0a9aa53701c30888509d4f5f2b003a"], - "transactionsRoot":"0x19f5efd0d94386e72fcb3f296f1cb2936d017c37487982f76f09c591129f561f", - "uncles":[] + "difficulty": "0x2", + "extraData": "0xd97735082a846765746889676f312e31352e3133856c696e75780000000000009c3827892825f0825a7e329b6913b84c9e4f89168350aff0939e0e6609629f2e7f07f2aeb62acbf4b16a739cab68866f4880ea406583a4b28a59d4f55dc2314e00", + "gasLimit": "0xe4e1c0", + "gasUsed": "0x3183d", + "hash": "0xbee7192e575af30420cae0c7776304ac196077ee72b048970549e4f08e875453", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000400000000000100000000000000200000000002000000000000001000000000000000000004000000000000000000000000000040000400000100400000000000000100000000000000000000000000000020000000000000000000000000000000000000000000000001000000000000000000000100000000000000000000000000000000000000000000000000000000000000088000000080000000000010000000000000000000000000000800008000120000000000000000000000000000000002000", + "miner": "0x0000000000000000000000000000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "number": "0x1", + "parentHash": "0x7ca38a1916c42007829c55e69d3e9a73265554b586a499015373241b8a3fa48b", + "receiptsRoot": "0xf4c97b1186b690ad3318f907c0cdaf46f4598f27f711a5609064b2690a767287", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x30c", + "stateRoot": "0xd3ac40854cd2ac17d8effeae6065cea990b04be714f7061544973feeb2f1c95f", + "timestamp": "0x618d4769", + "totalDifficulty": "0x3", + "transactions": [ + "0x5e77a04531c7c107af1882d76cbff9486d0a9aa53701c30888509d4f5f2b003a" + ], + "transactionsRoot": "0x19f5efd0d94386e72fcb3f296f1cb2936d017c37487982f76f09c591129f561f", + "uncles": [] }, { - "difficulty":"0x2", - "extraData":"0xd98301090a848932606889676f312e61742e3133856c696e757800000000000064a82cb66c7810b9619e7f14ab65c769a828b1616974987c530684eb3870b65e5b2400c1b61c6d340beef8c8e99127ac0de50e479d21f0833a5e2910fe64b41801", - "gasLimit":"0xe4e1c0", - "gasUsed":"0x1c60d", - "hash":"0x45fd6ce41bb8ebb2bccdaa92dd1619e367404cb07722039901a7eba63dea1d13", - "logsBloom":"0x00080000000200000000000000000008000000000000000000000100008000000000000000000000000000000000000000000000000000000000400000000000100000000000000000000000020000000000000000000000000000000000004000000000000000000000000000000000400000000400000000000000100000000000000000000000000000020000000000000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000008400000000000000000010000000000000000020000000020000000000000000000000000000000000000000000002000", - "miner":"0x0000000000000000000000000000000000000000", - "mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce":"0x0000000000000000", - "number":"0x2", - "parentHash":"0xbee7192e575af30420cae0c7776304ac196077ee72b048970549e4f08e875453", - "receiptsRoot":"0x2057c8fb79c0f294062c1436aa56741134dc46d228a4f874929f8b791a7007a4", - "sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "size":"0x30c", - "stateRoot":"0x87026f3a614318ae24bcef6bc8f7564479afbbbe2b1fb189bc133a5de5a2b0f8", - "timestamp":"0x618d8837", - "totalDifficulty":"0x5", - "transactions":["0xaf6ed8a6864d44989adc47c84f6fe0aeb1819817505c42cde6cbbcd5e14dd317"], - "transactionsRoot":"0xa39c4d0d2397f8fcb1683ba833d4ab935cd2f4c5ca6f56a7d9a45b9904ea1c69", - "uncles":[] + "difficulty": "0x2", + "extraData": "0xd98301090a848932606889676f312e61742e3133856c696e757800000000000064a82cb66c7810b9619e7f14ab65c769a828b1616974987c530684eb3870b65e5b2400c1b61c6d340beef8c8e99127ac0de50e479d21f0833a5e2910fe64b41801", + "gasLimit": "0xe4e1c0", + "gasUsed": "0x1c60d", + "hash": "0x45fd6ce41bb8ebb2bccdaa92dd1619e367404cb07722039901a7eba63dea1d13", + "logsBloom": "0x00080000000200000000000000000008000000000000000000000100008000000000000000000000000000000000000000000000000000000000400000000000100000000000000000000000020000000000000000000000000000000000004000000000000000000000000000000000400000000400000000000000100000000000000000000000000000020000000000000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000008400000000000000000010000000000000000020000000020000000000000000000000000000000000000000000002000", + "miner": "0x0000000000000000000000000000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "number": "0x2", + "parentHash": "0xbee7192e575af30420cae0c7776304ac196077ee72b048970549e4f08e875453", + "receiptsRoot": "0x2057c8fb79c0f294062c1436aa56741134dc46d228a4f874929f8b791a7007a4", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x30c", + "stateRoot": "0x87026f3a614318ae24bcef6bc8f7564479afbbbe2b1fb189bc133a5de5a2b0f8", + "timestamp": "0x618d8837", + "totalDifficulty": "0x5", + "transactions": [ + "0xaf6ed8a6864d44989adc47c84f6fe0aeb1819817505c42cde6cbbcd5e14dd317" + ], + "transactionsRoot": "0xa39c4d0d2397f8fcb1683ba833d4ab935cd2f4c5ca6f56a7d9a45b9904ea1c69", + "uncles": [] } ] } diff --git a/services/reference/mantle/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx b/services/reference/mantle/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx index aacb2e0e3af..36944d31e1f 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbyhash-request.mdx"; +import Request from "./_eth_getblocktransactioncountbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx b/services/reference/mantle/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx index 161e7fe344b..c355e33cb53 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbynumber-request.mdx"; +import Request from "./_eth_getblocktransactioncountbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getcode.mdx b/services/reference/mantle/json-rpc-methods/eth_getcode.mdx index 8364a077f09..ace0da8cb26 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getcode.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getcode.mdx @@ -2,39 +2,39 @@ title: "eth_getCode" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getcode-description.mdx"; +import Description from "/services/reference/_partials/_eth_getcode-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getcode-example.mdx"; +import Example from "/services/reference/_partials/_eth_getcode-example.mdx" ### Request -import Request from "./_eth_getcode-request.mdx"; +import Request from "./_eth_getcode-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getcode-response.mdx"; +import Response from "/services/reference/_partials/_eth_getcode-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getlogs.mdx b/services/reference/mantle/json-rpc-methods/eth_getlogs.mdx index 546d66f9148..4a1c1a031c4 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getlogs.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getlogs-description.mdx"; +import Description from "/services/reference/_partials/_eth_getlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getlogs-example.mdx"; +import Example from "/services/reference/_partials/_eth_getlogs-example.mdx" ### Request -import Request from "./_eth_getlogs-request.mdx"; +import Request from "./_eth_getlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getlogs-response.mdx"; +import Response from "/services/reference/_partials/_eth_getlogs-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getproof.mdx b/services/reference/mantle/json-rpc-methods/eth_getproof.mdx index 7cb028bd44f..0d7b5743dc4 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getproof.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getproof.mdx @@ -2,39 +2,39 @@ title: "eth_getProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getproof-description.mdx"; +import Description from "/services/reference/_partials/_eth_getproof-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getproof-example.mdx"; +import Example from "/services/reference/_partials/_eth_getproof-example.mdx" ### Request -import Request from "./_eth_getproof-request.mdx"; +import Request from "./_eth_getproof-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getproof-response.mdx"; +import Response from "/services/reference/_partials/_eth_getproof-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getstorageat.mdx b/services/reference/mantle/json-rpc-methods/eth_getstorageat.mdx index aee85d0fde8..d91e20b3979 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getstorageat.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getstorageat.mdx @@ -2,39 +2,39 @@ title: "eth_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx"; +import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx"; +import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx" ### Request -import Request from "./_eth_getstorageat-request.mdx"; +import Request from "./_eth_getstorageat-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx"; +import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx b/services/reference/mantle/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx index 5422dc7f552..e04f9c75a5c 100644 --- a/services/reference/mantle/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx b/services/reference/mantle/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx index 6861fb566a4..28ba85246a2 100644 --- a/services/reference/mantle/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_gettransactionbyhash.mdx b/services/reference/mantle/json-rpc-methods/eth_gettransactionbyhash.mdx index 1adc6ff1eb4..28548a1fd58 100644 --- a/services/reference/mantle/json-rpc-methods/eth_gettransactionbyhash.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_gettransactionbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx" ### Request -import Request from "./_eth_gettransactionbyhash-request.mdx"; +import Request from "./_eth_gettransactionbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_gettransactioncount.mdx b/services/reference/mantle/json-rpc-methods/eth_gettransactioncount.mdx index 73985353185..9cf5c71e500 100644 --- a/services/reference/mantle/json-rpc-methods/eth_gettransactioncount.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_gettransactioncount.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx" ### Request -import Request from "./_eth_gettransactioncount-request.mdx"; +import Request from "./_eth_gettransactioncount-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_gettransactionreceipt.mdx b/services/reference/mantle/json-rpc-methods/eth_gettransactionreceipt.mdx index 370d08c0402..1ab2ba12676 100644 --- a/services/reference/mantle/json-rpc-methods/eth_gettransactionreceipt.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_gettransactionreceipt.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx" ### Request -import Request from "./_eth_gettransactionreceipt-request.mdx"; +import Request from "./_eth_gettransactionreceipt-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getunclebyblockhashandindex.mdx b/services/reference/mantle/json-rpc-methods/eth_getunclebyblockhashandindex.mdx index dce1f045d95..d6a9a959a37 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getunclebyblockhashandindex.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getunclebyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblockhashandindex-request.mdx"; +import Request from "./_eth_getunclebyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx b/services/reference/mantle/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx index 321c22c4ce0..07c458cb7ad 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblocknumberandindex-request.mdx"; +import Request from "./_eth_getunclebyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getunclecountbyblockhash.mdx b/services/reference/mantle/json-rpc-methods/eth_getunclecountbyblockhash.mdx index c21e8c283a8..298b5c520e8 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getunclecountbyblockhash.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getunclecountbyblockhash.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblockhash-request.mdx"; +import Request from "./_eth_getunclecountbyblockhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_getunclecountbyblocknumber.mdx b/services/reference/mantle/json-rpc-methods/eth_getunclecountbyblocknumber.mdx index 824fdf8de1b..2cc5dbbf753 100644 --- a/services/reference/mantle/json-rpc-methods/eth_getunclecountbyblocknumber.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_getunclecountbyblocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblocknumber-request.mdx"; +import Request from "./_eth_getunclecountbyblocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_maxpriorityfeepergas.mdx b/services/reference/mantle/json-rpc-methods/eth_maxpriorityfeepergas.mdx index 87e39538aaf..6f818052ae7 100644 --- a/services/reference/mantle/json-rpc-methods/eth_maxpriorityfeepergas.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_maxpriorityfeepergas.mdx @@ -2,39 +2,39 @@ title: "eth_maxPriorityFeePerGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx"; +import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx"; +import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx" ### Request -import Request from "./_eth_maxpriorityfeepergas-request.mdx"; +import Request from "./_eth_maxpriorityfeepergas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx"; +import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_protocolversion.mdx b/services/reference/mantle/json-rpc-methods/eth_protocolversion.mdx index 38863109276..02b5da95bff 100644 --- a/services/reference/mantle/json-rpc-methods/eth_protocolversion.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_protocolversion.mdx @@ -2,39 +2,39 @@ title: "eth_protocolVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx"; +import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx"; +import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx" ### Request -import Request from "./_eth_protocolversion-request.mdx"; +import Request from "./_eth_protocolversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx"; +import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_sendrawtransaction.mdx b/services/reference/mantle/json-rpc-methods/eth_sendrawtransaction.mdx index 4dfc4e6f296..dd39a5bafd4 100644 --- a/services/reference/mantle/json-rpc-methods/eth_sendrawtransaction.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_sendrawtransaction.mdx @@ -2,39 +2,39 @@ title: "eth_sendRawTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx"; +import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx" ### Request -import Request from "./_eth_sendrawtransaction-request.mdx"; +import Request from "./_eth_sendrawtransaction-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx"; +import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_sendtransaction.mdx b/services/reference/mantle/json-rpc-methods/eth_sendtransaction.mdx index ac6ebfd02dd..5c13a1d5c8f 100644 --- a/services/reference/mantle/json-rpc-methods/eth_sendtransaction.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_sendtransaction.mdx @@ -2,10 +2,9 @@ title: "eth_sendTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx" - diff --git a/services/reference/mantle/json-rpc-methods/eth_sign.mdx b/services/reference/mantle/json-rpc-methods/eth_sign.mdx index 073b1040681..f8c6a17df92 100644 --- a/services/reference/mantle/json-rpc-methods/eth_sign.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_sign.mdx @@ -2,9 +2,9 @@ title: "eth_sign" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sign-description.mdx"; +import Description from "/services/reference/_partials/_eth_sign-description.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_submitwork.mdx b/services/reference/mantle/json-rpc-methods/eth_submitwork.mdx index b286c9b49de..3e302cecfe3 100644 --- a/services/reference/mantle/json-rpc-methods/eth_submitwork.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_submitwork.mdx @@ -2,39 +2,39 @@ title: "eth_submitWork" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_submitwork-description.mdx"; +import Description from "/services/reference/_partials/_eth_submitwork-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_submitwork-example.mdx"; +import Example from "/services/reference/_partials/_eth_submitwork-example.mdx" ### Request -import Request from "./_eth_submitwork-request.mdx"; +import Request from "./_eth_submitwork-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_submitwork-response.mdx"; +import Response from "/services/reference/_partials/_eth_submitwork-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/eth_syncing.mdx b/services/reference/mantle/json-rpc-methods/eth_syncing.mdx index bfb89e8c209..7ffbcd44560 100644 --- a/services/reference/mantle/json-rpc-methods/eth_syncing.mdx +++ b/services/reference/mantle/json-rpc-methods/eth_syncing.mdx @@ -2,39 +2,39 @@ title: "eth_syncing" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_syncing-description.mdx"; +import Description from "/services/reference/_partials/_eth_syncing-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_syncing-example.mdx"; +import Example from "/services/reference/_partials/_eth_syncing-example.mdx" ### Request -import Request from "./_eth_syncing-request.mdx"; +import Request from "./_eth_syncing-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_syncing-response.mdx"; +import Response from "/services/reference/_partials/_eth_syncing-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/index.md b/services/reference/mantle/json-rpc-methods/index.md index c36f68c4192..548f086c03d 100644 --- a/services/reference/mantle/json-rpc-methods/index.md +++ b/services/reference/mantle/json-rpc-methods/index.md @@ -1,3 +1,3 @@ # JSON-RPC methods -Mantle supports a subset [Ethereum JSON-RPC methods](../../ethereum/json-rpc-methods/index.md). \ No newline at end of file +Mantle supports a subset [Ethereum JSON-RPC methods](../../ethereum/json-rpc-methods/index.md). diff --git a/services/reference/mantle/json-rpc-methods/net_peercount.mdx b/services/reference/mantle/json-rpc-methods/net_peercount.mdx index 9ff570e4c70..c0246b44d39 100644 --- a/services/reference/mantle/json-rpc-methods/net_peercount.mdx +++ b/services/reference/mantle/json-rpc-methods/net_peercount.mdx @@ -2,39 +2,39 @@ title: "net_peerCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_peercount-description.mdx"; +import Description from "/services/reference/_partials/_net_peercount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_peercount-parameters.mdx"; +import Params from "/services/reference/_partials/_net_peercount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_peercount-returns.mdx"; +import Returns from "/services/reference/_partials/_net_peercount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_peercount-example.mdx"; +import Example from "/services/reference/_partials/_net_peercount-example.mdx" ### Request -import Request from "./_net_peercount-request.mdx"; +import Request from "./_net_peercount-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_peercount-response.mdx"; +import Response from "/services/reference/_partials/_net_peercount-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/net_version.mdx b/services/reference/mantle/json-rpc-methods/net_version.mdx index d55ab80402d..1d6c0080c60 100644 --- a/services/reference/mantle/json-rpc-methods/net_version.mdx +++ b/services/reference/mantle/json-rpc-methods/net_version.mdx @@ -2,39 +2,39 @@ title: "net_version" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_version-description.mdx"; +import Description from "/services/reference/_partials/_net_version-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_version-parameters.mdx"; +import Params from "/services/reference/_partials/_net_version-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_version-returns.mdx"; +import Returns from "/services/reference/_partials/_net_version-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_version-example.mdx"; +import Example from "/services/reference/_partials/_net_version-example.mdx" ### Request -import Request from "./_net_version-request.mdx"; +import Request from "./_net_version-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_version-response.mdx"; +import Response from "/services/reference/_partials/_net_version-response.mdx" diff --git a/services/reference/mantle/json-rpc-methods/rollup_gasprices.md b/services/reference/mantle/json-rpc-methods/rollup_gasprices.md index f41d6bd26e5..76d9b2eaded 100644 --- a/services/reference/mantle/json-rpc-methods/rollup_gasprices.md +++ b/services/reference/mantle/json-rpc-methods/rollup_gasprices.md @@ -1,8 +1,9 @@ --- description: rollup_gasPrices API method --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # rollup_gasPrices @@ -30,9 +31,9 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ```bash curl https://mantle-mainnet.infura.io/v3/ \ --X POST \ --H "Content-Type: application/json" \ --d '{"jsonrpc":"2.0","method":"rollup_gasPrices","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "rollup_gasPrices", "params": [], "id": 1}' ``` @@ -42,11 +43,11 @@ curl https://mantle-mainnet.infura.io/v3/ \ ```json { - "jsonrpc":"2.0", - "id":1, - "result":{ - "l1GasPrice":"0x254aa66732", - "l2GasPrice":"0xf3792" + "jsonrpc": "2.0", + "id": 1, + "result": { + "l1GasPrice": "0x254aa66732", + "l2GasPrice": "0xf3792" } } ``` diff --git a/services/reference/mantle/json-rpc-methods/rollup_getinfo.md b/services/reference/mantle/json-rpc-methods/rollup_getinfo.md index f218eb69fcd..d1669d6e4d0 100644 --- a/services/reference/mantle/json-rpc-methods/rollup_getinfo.md +++ b/services/reference/mantle/json-rpc-methods/rollup_getinfo.md @@ -1,8 +1,9 @@ --- description: rollup_getInfo API method --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # rollup_getInfo @@ -20,10 +21,10 @@ Node information object: - `syncing`: `true` if the node is currently syncing, otherwise `false`. - `ethContext`: Object containing the `blockNumber` and `timestamp` of the latest L1 block. - `rollupContext`: Object containing: - - `queueIndex`: Index in the canonical transaction chain of the last L1 to L2 message ingested. - - `index`: Index of the last L2 transaction processed. - - `verifiedIndex`: Index of the last transaction that was ingested from a batch that was posted - the to L1. + - `queueIndex`: Index in the canonical transaction chain of the last L1 to L2 message ingested. + - `index`: Index of the last L2 transaction processed. + - `verifiedIndex`: Index of the last transaction that was ingested from a batch that was posted + the to L1. ## Example @@ -36,9 +37,9 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ```bash curl https://mantle-mainnet.infura.io/v3/ \ --X POST \ --H "Content-Type: application/json" \ --d '{"jsonrpc":"2.0","method":"rollup_getInfo","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "rollup_getInfo", "params": [], "id": 1}' ``` @@ -48,52 +49,56 @@ curl https://mantle-mainnet.infura.io/v3/ \ ```json { - "jsonrpc":"2.0", - "id":1, - "result":[ + "jsonrpc": "2.0", + "id": 1, + "result": [ { - "difficulty":"0x2", - "extraData":"0xd97735082a846765746889676f312e31352e3133856c696e75780000000000009c3827892825f0825a7e329b6913b84c9e4f89168350aff0939e0e6609629f2e7f07f2aeb62acbf4b16a739cab68866f4880ea406583a4b28a59d4f55dc2314e00", - "gasLimit":"0xe4e1c0", - "gasUsed":"0x3183d", - "hash":"0xbee7192e575af30420cae0c7776304ac196077ee72b048970549e4f08e875453", - "logsBloom":"0x00000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000400000000000100000000000000200000000002000000000000001000000000000000000004000000000000000000000000000040000400000100400000000000000100000000000000000000000000000020000000000000000000000000000000000000000000000001000000000000000000000100000000000000000000000000000000000000000000000000000000000000088000000080000000000010000000000000000000000000000800008000120000000000000000000000000000000002000", - "miner":"0x0000000000000000000000000000000000000000", - "mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce":"0x0000000000000000", - "number":"0x1", - "parentHash":"0x7ca38a1916c42007829c55e69d3e9a73265554b586a499015373241b8a3fa48b", - "receiptsRoot":"0xf4c97b1186b690ad3318f907c0cdaf46f4598f27f711a5609064b2690a767287", - "sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "size":"0x30c", - "stateRoot":"0xd3ac40854cd2ac17d8effeae6065cea990b04be714f7061544973feeb2f1c95f", - "timestamp":"0x618d4769", - "totalDifficulty":"0x3", - "transactions":["0x5e77a04531c7c107af1882d76cbff9486d0a9aa53701c30888509d4f5f2b003a"], - "transactionsRoot":"0x19f5efd0d94386e72fcb3f296f1cb2936d017c37487982f76f09c591129f561f", - "uncles":[] + "difficulty": "0x2", + "extraData": "0xd97735082a846765746889676f312e31352e3133856c696e75780000000000009c3827892825f0825a7e329b6913b84c9e4f89168350aff0939e0e6609629f2e7f07f2aeb62acbf4b16a739cab68866f4880ea406583a4b28a59d4f55dc2314e00", + "gasLimit": "0xe4e1c0", + "gasUsed": "0x3183d", + "hash": "0xbee7192e575af30420cae0c7776304ac196077ee72b048970549e4f08e875453", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000400000000000100000000000000200000000002000000000000001000000000000000000004000000000000000000000000000040000400000100400000000000000100000000000000000000000000000020000000000000000000000000000000000000000000000001000000000000000000000100000000000000000000000000000000000000000000000000000000000000088000000080000000000010000000000000000000000000000800008000120000000000000000000000000000000002000", + "miner": "0x0000000000000000000000000000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "number": "0x1", + "parentHash": "0x7ca38a1916c42007829c55e69d3e9a73265554b586a499015373241b8a3fa48b", + "receiptsRoot": "0xf4c97b1186b690ad3318f907c0cdaf46f4598f27f711a5609064b2690a767287", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x30c", + "stateRoot": "0xd3ac40854cd2ac17d8effeae6065cea990b04be714f7061544973feeb2f1c95f", + "timestamp": "0x618d4769", + "totalDifficulty": "0x3", + "transactions": [ + "0x5e77a04531c7c107af1882d76cbff9486d0a9aa53701c30888509d4f5f2b003a" + ], + "transactionsRoot": "0x19f5efd0d94386e72fcb3f296f1cb2936d017c37487982f76f09c591129f561f", + "uncles": [] }, { - "difficulty":"0x2", - "extraData":"0xd98301090a848932606889676f312e61742e3133856c696e757800000000000064a82cb66c7810b9619e7f14ab65c769a828b1616974987c530684eb3870b65e5b2400c1b61c6d340beef8c8e99127ac0de50e479d21f0833a5e2910fe64b41801", - "gasLimit":"0xe4e1c0", - "gasUsed":"0x1c60d", - "hash":"0x45fd6ce41bb8ebb2bccdaa92dd1619e367404cb07722039901a7eba63dea1d13", - "logsBloom":"0x00080000000200000000000000000008000000000000000000000100008000000000000000000000000000000000000000000000000000000000400000000000100000000000000000000000020000000000000000000000000000000000004000000000000000000000000000000000400000000400000000000000100000000000000000000000000000020000000000000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000008400000000000000000010000000000000000020000000020000000000000000000000000000000000000000000002000", - "miner":"0x0000000000000000000000000000000000000000", - "mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000", - "nonce":"0x0000000000000000", - "number":"0x2", - "parentHash":"0xbee7192e575af30420cae0c7776304ac196077ee72b048970549e4f08e875453", - "receiptsRoot":"0x2057c8fb79c0f294062c1436aa56741134dc46d228a4f874929f8b791a7007a4", - "sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "size":"0x30c", - "stateRoot":"0x87026f3a614318ae24bcef6bc8f7564479afbbbe2b1fb189bc133a5de5a2b0f8", - "timestamp":"0x618d8837", - "totalDifficulty":"0x5", - "transactions":["0xaf6ed8a6864d44989adc47c84f6fe0aeb1819817505c42cde6cbbcd5e14dd317"], - "transactionsRoot":"0xa39c4d0d2397f8fcb1683ba833d4ab935cd2f4c5ca6f56a7d9a45b9904ea1c69", - "uncles":[] + "difficulty": "0x2", + "extraData": "0xd98301090a848932606889676f312e61742e3133856c696e757800000000000064a82cb66c7810b9619e7f14ab65c769a828b1616974987c530684eb3870b65e5b2400c1b61c6d340beef8c8e99127ac0de50e479d21f0833a5e2910fe64b41801", + "gasLimit": "0xe4e1c0", + "gasUsed": "0x1c60d", + "hash": "0x45fd6ce41bb8ebb2bccdaa92dd1619e367404cb07722039901a7eba63dea1d13", + "logsBloom": "0x00080000000200000000000000000008000000000000000000000100008000000000000000000000000000000000000000000000000000000000400000000000100000000000000000000000020000000000000000000000000000000000004000000000000000000000000000000000400000000400000000000000100000000000000000000000000000020000000000000000000000000000000000000000100000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000008400000000000000000010000000000000000020000000020000000000000000000000000000000000000000000002000", + "miner": "0x0000000000000000000000000000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "number": "0x2", + "parentHash": "0xbee7192e575af30420cae0c7776304ac196077ee72b048970549e4f08e875453", + "receiptsRoot": "0x2057c8fb79c0f294062c1436aa56741134dc46d228a4f874929f8b791a7007a4", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": "0x30c", + "stateRoot": "0x87026f3a614318ae24bcef6bc8f7564479afbbbe2b1fb189bc133a5de5a2b0f8", + "timestamp": "0x618d8837", + "totalDifficulty": "0x5", + "transactions": [ + "0xaf6ed8a6864d44989adc47c84f6fe0aeb1819817505c42cde6cbbcd5e14dd317" + ], + "transactionsRoot": "0xa39c4d0d2397f8fcb1683ba833d4ab935cd2f4c5ca6f56a7d9a45b9904ea1c69", + "uncles": [] } ] } diff --git a/services/reference/mantle/json-rpc-methods/web3_clientversion.mdx b/services/reference/mantle/json-rpc-methods/web3_clientversion.mdx index 11997e5c36d..c5ee316d699 100644 --- a/services/reference/mantle/json-rpc-methods/web3_clientversion.mdx +++ b/services/reference/mantle/json-rpc-methods/web3_clientversion.mdx @@ -2,39 +2,39 @@ title: "web3_clientVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_web3_clientversion-description.mdx"; +import Description from "/services/reference/_partials/_web3_clientversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx"; +import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx"; +import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_web3_clientversion-example.mdx"; +import Example from "/services/reference/_partials/_web3_clientversion-example.mdx" ### Request -import Request from "./_web3_clientversion-request.mdx"; +import Request from "./_web3_clientversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_web3_clientversion-response.mdx"; +import Response from "/services/reference/_partials/_web3_clientversion-response.mdx" diff --git a/services/reference/mantle/quickstart.md b/services/reference/mantle/quickstart.md index f7cabe81179..9ee868809ff 100644 --- a/services/reference/mantle/quickstart.md +++ b/services/reference/mantle/quickstart.md @@ -25,9 +25,9 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://mantle-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ### Node (JavaScript) @@ -38,150 +38,152 @@ In these examples, you'll use [NPM](https://docs.npmjs.com/downloading-and-insta 1. In your project folder, install the Node Fetch package using `npm`: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://mantle-mainnet.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://mantle-mainnet.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios 1. In your project folder, install the Axios package using `npm`: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require('axios'); - - axios.post('https://mantle-mainnet.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'eth_blockNumber', - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios") + + axios + .post("https://mantle-mainnet.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }) + .then((response) => { + console.log(response.data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Ethers 1. In your project folder, install the ethers package using `npm`: - ```bash - npm install ethers - `````` + ```bash + npm install ethers + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.js" - const ethers = require('ethers'); + ```javascript title="index.js" + const ethers = require("ethers") - const provider = new ethers.providers.JsonRpcProvider('https://mantle-mainnet.infura.io/v3/YOUR-API-KEY'); + const provider = new ethers.providers.JsonRpcProvider( + "https://mantle-mainnet.infura.io/v3/YOUR-API-KEY" + ) - provider.getBlockNumber() - .then(blockNumber => { - console.log(blockNumber); - }) - .catch(error => { - console.error(error); - }); - ``` + provider + .getBlockNumber() + .then((blockNumber) => { + console.log(blockNumber) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` 1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```python title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = 'https://mantle-mainnet.infura.io/v3/YOUR-API-KEY' + url = "https://mantle-mainnet.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + } - headers = {'content-type': 'application/json'} + headers = {"content-type": "application/json"} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` + ```bash + python index.py + ``` ## Next steps @@ -189,13 +191,12 @@ Now that you have successfully made a call to the Mantle network, you can explor by Infura. Here are some suggestions: - **Explore other Mantle APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Ethereum, Linea, Polygon, Optimism, and more. - **Monitor your usage**: Keep an eye on your usage on the [Infura dashboard](../../../../developer-tools/dashboard/how-to/dashboard-stats/) to - ensure you're not hitting your rate limits. + ensure you're not hitting your rate limits. Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/reference/optimism/index.md b/services/reference/optimism/index.md index 7eb0cec2e7e..1d1545df0db 100644 --- a/services/reference/optimism/index.md +++ b/services/reference/optimism/index.md @@ -1,5 +1,5 @@ --- -description: Optimism network documentation. +description: Optimism network documentation. --- import CardList from '@site/src/components/CardList' @@ -8,7 +8,7 @@ import CardList from '@site/src/components/CardList' :::note Failover protection -Optimism [failover support](../../concepts/failover-protection.md) is available for customers on the Growth or Custom plans. +Optimism [failover support](../../concepts/failover-protection.md) is available for customers on the Growth or Custom plans. Optimism failover support is available on Mainnet only. Calls to the network are routed to [partner infrastructure providers](#partners-and-privacy-policies). @@ -20,9 +20,9 @@ occur on Optimism are posted and validated on Ethereum mainnet using Optimistic :::info see also - For more information on the Optimism network, please see the - [official Optimism developer documentation](https://community.optimism.io/docs/developers/). + [official Optimism developer documentation](https://community.optimism.io/docs/developers/). - Developers should be aware of some - [important differences between the behavior of Ethereum and Optimism](https://community.optimism.io/docs/developers/build/differences/). + [important differences between the behavior of Ethereum and Optimism](https://community.optimism.io/docs/developers/build/differences/). ::: @@ -62,4 +62,4 @@ Bware Labs ([Terms of Service](https://bwarelabs.com/terms), [Privacy Policy](ht - `eth_sendTransaction` - `eth_sign` - `eth_syncing` -- `eth_submitWork` \ No newline at end of file +- `eth_submitWork` diff --git a/services/reference/optimism/json-rpc-methods/_eth_accounts-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_accounts-request.mdx index fb972a5904d..ba32584a8c9 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_accounts-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_accounts-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` ```bash -wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` - - diff --git a/services/reference/optimism/json-rpc-methods/_eth_blocknumber-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_blocknumber-request.mdx index 5543ab3746d..ca60a62e52e 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_blocknumber-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_blocknumber-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ```bash -wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` - - diff --git a/services/reference/optimism/json-rpc-methods/_eth_call-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_call-request.mdx index b2aeb049ce3..1da13f23c9c 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_call-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_call-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_chainid-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_chainid-request.mdx index 301972e0163..0199d122958 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_chainid-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_chainid-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` ```bash -wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` - - diff --git a/services/reference/optimism/json-rpc-methods/_eth_estimategas-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_estimategas-request.mdx index 1e4aaa550d1..9c3157e614a 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_estimategas-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_estimategas-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_feehistory-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_feehistory-request.mdx index 8aae3eb4991..30289f27c9a 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_feehistory-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_feehistory-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x5", "latest", []],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", []], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_gasprice-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_gasprice-request.mdx index 53fab751b16..e61c262e751 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_gasprice-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_gasprice-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getbalance-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getbalance-request.mdx index b331ec1c2e0..75635837f44 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getbalance-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getbalance-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getblockbyhash-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getblockbyhash-request.mdx index 14836ac832b..6e546c2c67c 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getblockbyhash-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getblockbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getblockbynumber-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getblockbynumber-request.mdx index 8d312bc2e0d..2c2d760bbe9 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getblockbynumber-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getblockbynumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x5BAD55",false],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber","params": ["0x5BAD55", false], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params": ["0x5BAD55",false],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx index e3fb88502d9..95cce104a48 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx index d86c70f05ca..63d5f52bff7 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id":1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getcode-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getcode-request.mdx index cb6b6b4f832..9db6563d213 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getcode-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getcode-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getlogs-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getlogs-request.mdx index 6a6a4d4d193..77a701af381 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getlogs-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getlogs-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getproof-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getproof-request.mdx index 2fd905c83e1..e9a04e8c1c4 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getproof-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getproof-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0","method": "eth_getProof","id": 1,"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getProof", "id": 1, "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getProof","params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getstorageat-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getstorageat-request.mdx index 0f80f3ae264..e8b74feb9af 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getstorageat-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getstorageat-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx index bdaf00c10dd..8a45a93525a 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx index 1368932b70d..e52149bf794 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55","0x0"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_gettransactionbyhash-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_gettransactionbyhash-request.mdx index ad2cfce90d3..994d52f747a 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_gettransactionbyhash-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_gettransactionbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_gettransactioncount-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_gettransactioncount-request.mdx index 80043daeecb..f625661d70c 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_gettransactioncount-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_gettransactioncount-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_gettransactionreceipt-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_gettransactionreceipt-request.mdx index 2a8a5fa00ce..90315972f35 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_gettransactionreceipt-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_gettransactionreceipt-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx index 63b943ef9af..3e525d97deb 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx index f94ddddad16..e4c09e0e5cb 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c","0x0"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx index 2ec7737e15d..961789fe3ea 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx index c502b8181dd..08a6e93571b 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx index 270262f5ac6..7f676a9e2c0 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/d23391e03c6d40738530a1b4b679e66e -x '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/d23391e03c6d40738530a1b4b679e66e -x '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_protocolversion-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_protocolversion-request.mdx index cbc15739310..1b9291426c8 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_protocolversion-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_protocolversion-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_protocolVersion", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_protocolVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_sendrawtransaction-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_sendrawtransaction-request.mdx index d5973b5b331..cbbec9f0d32 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_sendrawtransaction-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_sendrawtransaction-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_submitwork-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_submitwork-request.mdx index e54ad7067fe..6b845929664 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_submitwork-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_submitwork-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_submitWork", "params": ["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_submitWork", "params": ["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_eth_syncing-request.mdx b/services/reference/optimism/json-rpc-methods/_eth_syncing-request.mdx index 534c61549dc..d8e7c53d619 100644 --- a/services/reference/optimism/json-rpc-methods/_eth_syncing-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_eth_syncing-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method":"eth_syncing", "params": [], "id":1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_net_listening-request.mdx b/services/reference/optimism/json-rpc-methods/_net_listening-request.mdx index f47e9a937ec..c0d58b81cbc 100644 --- a/services/reference/optimism/json-rpc-methods/_net_listening-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_net_listening-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-sepolia.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +curl https://optimism-sepolia.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_net_peercount-request.mdx b/services/reference/optimism/json-rpc-methods/_net_peercount-request.mdx index 5f24a370f6a..1759a752158 100644 --- a/services/reference/optimism/json-rpc-methods/_net_peercount-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_net_peercount-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id":1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id":1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_net_version-request.mdx b/services/reference/optimism/json-rpc-methods/_net_version-request.mdx index 30cee4cd850..31d2ae88584 100644 --- a/services/reference/optimism/json-rpc-methods/_net_version-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_net_version-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/_web3_clientversion-request.mdx b/services/reference/optimism/json-rpc-methods/_web3_clientversion-request.mdx index 84e1ecbbc09..f9f468eda19 100644 --- a/services/reference/optimism/json-rpc-methods/_web3_clientversion-request.mdx +++ b/services/reference/optimism/json-rpc-methods/_web3_clientversion-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/optimism/json-rpc-methods/eth_accounts.mdx b/services/reference/optimism/json-rpc-methods/eth_accounts.mdx index 0cc7304b6ec..0dafbcb7389 100644 --- a/services/reference/optimism/json-rpc-methods/eth_accounts.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_accounts.mdx @@ -2,39 +2,39 @@ title: "eth_accounts" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_accounts-description.mdx"; +import Description from "/services/reference/_partials/_eth_accounts-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_accounts-example.mdx"; +import Example from "/services/reference/_partials/_eth_accounts-example.mdx" ### Request -import Request from "./_eth_accounts-request.mdx"; +import Request from "./_eth_accounts-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_accounts-response.mdx"; +import Response from "/services/reference/_partials/_eth_accounts-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_blocknumber.mdx b/services/reference/optimism/json-rpc-methods/eth_blocknumber.mdx index 7896c8c46f6..076b45d83ce 100644 --- a/services/reference/optimism/json-rpc-methods/eth_blocknumber.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_blocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx" ### Request -import Request from "./_eth_blocknumber-request.mdx"; +import Request from "./_eth_blocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_call.mdx b/services/reference/optimism/json-rpc-methods/eth_call.mdx index 88b3857775d..5c6ebee7de3 100644 --- a/services/reference/optimism/json-rpc-methods/eth_call.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_call.mdx @@ -2,39 +2,39 @@ title: "eth_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_call-description.mdx"; +import Description from "/services/reference/_partials/_eth_call-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_call-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_call-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_call-example.mdx"; +import Example from "/services/reference/_partials/_eth_call-example.mdx" ### Request -import Request from "./_eth_call-request.mdx"; +import Request from "./_eth_call-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_call-response.mdx"; +import Response from "/services/reference/_partials/_eth_call-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_chainid.mdx b/services/reference/optimism/json-rpc-methods/eth_chainid.mdx index e544b1003a4..a6f446ad268 100644 --- a/services/reference/optimism/json-rpc-methods/eth_chainid.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_chainid.mdx @@ -2,39 +2,39 @@ title: "eth_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_chainid-description.mdx"; +import Description from "/services/reference/_partials/_eth_chainid-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_chainid-example.mdx"; +import Example from "/services/reference/_partials/_eth_chainid-example.mdx" ### Request -import Request from "./_eth_chainid-request.mdx"; +import Request from "./_eth_chainid-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_chainid-response.mdx"; +import Response from "/services/reference/_partials/_eth_chainid-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_coinbase.mdx b/services/reference/optimism/json-rpc-methods/eth_coinbase.mdx index e9bb3ff61cd..8957df7e522 100644 --- a/services/reference/optimism/json-rpc-methods/eth_coinbase.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_coinbase.mdx @@ -2,9 +2,9 @@ title: "eth_coinbase" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_coinbase-description.mdx"; +import Description from "/services/reference/_partials/_eth_coinbase-description.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_estimategas.mdx b/services/reference/optimism/json-rpc-methods/eth_estimategas.mdx index af6c5ad77da..47c6b01804e 100644 --- a/services/reference/optimism/json-rpc-methods/eth_estimategas.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_estimategas.mdx @@ -2,39 +2,39 @@ title: "eth_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_estimategas-description.mdx"; +import Description from "/services/reference/_partials/_eth_estimategas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_estimategas-example.mdx"; +import Example from "/services/reference/_partials/_eth_estimategas-example.mdx" ### Request -import Request from "./_eth_estimategas-request.mdx"; +import Request from "./_eth_estimategas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_estimategas-response.mdx"; +import Response from "/services/reference/_partials/_eth_estimategas-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_feehistory.mdx b/services/reference/optimism/json-rpc-methods/eth_feehistory.mdx index 21e4962e114..9aafc564c46 100644 --- a/services/reference/optimism/json-rpc-methods/eth_feehistory.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_feehistory.mdx @@ -2,39 +2,39 @@ title: "eth_feeHistory" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_feehistory-description.mdx"; +import Description from "/services/reference/_partials/_eth_feehistory-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_feehistory-example.mdx"; +import Example from "/services/reference/_partials/_eth_feehistory-example.mdx" ### Request -import Request from "./_eth_feehistory-request.mdx"; +import Request from "./_eth_feehistory-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_feehistory-response.mdx"; +import Response from "/services/reference/_partials/_eth_feehistory-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_gasprice.mdx b/services/reference/optimism/json-rpc-methods/eth_gasprice.mdx index c602d61c293..8980dcc8a39 100644 --- a/services/reference/optimism/json-rpc-methods/eth_gasprice.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_gasprice.mdx @@ -2,39 +2,39 @@ title: "eth_gasPrice" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gasprice-description.mdx"; +import Description from "/services/reference/_partials/_eth_gasprice-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gasprice-example.mdx"; +import Example from "/services/reference/_partials/_eth_gasprice-example.mdx" ### Request -import Request from "./_eth_gasprice-request.mdx"; +import Request from "./_eth_gasprice-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gasprice-response.mdx"; +import Response from "/services/reference/_partials/_eth_gasprice-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getbalance.mdx b/services/reference/optimism/json-rpc-methods/eth_getbalance.mdx index c50eba5fd61..1ff5a0d31c8 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getbalance.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getbalance.mdx @@ -2,39 +2,39 @@ title: "eth_getBalance" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getbalance-description.mdx"; +import Description from "/services/reference/_partials/_eth_getbalance-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getbalance-example.mdx"; +import Example from "/services/reference/_partials/_eth_getbalance-example.mdx" ### Request -import Request from "./_eth_getbalance-request.mdx"; +import Request from "./_eth_getbalance-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getbalance-response.mdx"; +import Response from "/services/reference/_partials/_eth_getbalance-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getblockbyhash.mdx b/services/reference/optimism/json-rpc-methods/eth_getblockbyhash.mdx index ad555110b71..970e6c27704 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getblockbyhash.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getblockbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx" ### Request -import Request from "./_eth_getblockbyhash-request.mdx"; +import Request from "./_eth_getblockbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getblockbynumber.mdx b/services/reference/optimism/json-rpc-methods/eth_getblockbynumber.mdx index 2faabaa3e86..f14e34f1531 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getblockbynumber.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getblockbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx" ### Request -import Request from "./_eth_getblockbynumber-request.mdx"; +import Request from "./_eth_getblockbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx b/services/reference/optimism/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx index aacb2e0e3af..36944d31e1f 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbyhash-request.mdx"; +import Request from "./_eth_getblocktransactioncountbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx b/services/reference/optimism/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx index 161e7fe344b..c355e33cb53 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbynumber-request.mdx"; +import Request from "./_eth_getblocktransactioncountbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getcode.mdx b/services/reference/optimism/json-rpc-methods/eth_getcode.mdx index 8364a077f09..ace0da8cb26 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getcode.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getcode.mdx @@ -2,39 +2,39 @@ title: "eth_getCode" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getcode-description.mdx"; +import Description from "/services/reference/_partials/_eth_getcode-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getcode-example.mdx"; +import Example from "/services/reference/_partials/_eth_getcode-example.mdx" ### Request -import Request from "./_eth_getcode-request.mdx"; +import Request from "./_eth_getcode-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getcode-response.mdx"; +import Response from "/services/reference/_partials/_eth_getcode-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getlogs.mdx b/services/reference/optimism/json-rpc-methods/eth_getlogs.mdx index 546d66f9148..4a1c1a031c4 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getlogs.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getlogs-description.mdx"; +import Description from "/services/reference/_partials/_eth_getlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getlogs-example.mdx"; +import Example from "/services/reference/_partials/_eth_getlogs-example.mdx" ### Request -import Request from "./_eth_getlogs-request.mdx"; +import Request from "./_eth_getlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getlogs-response.mdx"; +import Response from "/services/reference/_partials/_eth_getlogs-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getproof.mdx b/services/reference/optimism/json-rpc-methods/eth_getproof.mdx index 7cb028bd44f..0d7b5743dc4 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getproof.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getproof.mdx @@ -2,39 +2,39 @@ title: "eth_getProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getproof-description.mdx"; +import Description from "/services/reference/_partials/_eth_getproof-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getproof-example.mdx"; +import Example from "/services/reference/_partials/_eth_getproof-example.mdx" ### Request -import Request from "./_eth_getproof-request.mdx"; +import Request from "./_eth_getproof-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getproof-response.mdx"; +import Response from "/services/reference/_partials/_eth_getproof-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getstorageat.mdx b/services/reference/optimism/json-rpc-methods/eth_getstorageat.mdx index aee85d0fde8..d91e20b3979 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getstorageat.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getstorageat.mdx @@ -2,39 +2,39 @@ title: "eth_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx"; +import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx"; +import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx" ### Request -import Request from "./_eth_getstorageat-request.mdx"; +import Request from "./_eth_getstorageat-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx"; +import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx b/services/reference/optimism/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx index 5422dc7f552..e04f9c75a5c 100644 --- a/services/reference/optimism/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx b/services/reference/optimism/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx index 6861fb566a4..28ba85246a2 100644 --- a/services/reference/optimism/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_gettransactionbyhash.mdx b/services/reference/optimism/json-rpc-methods/eth_gettransactionbyhash.mdx index 1adc6ff1eb4..28548a1fd58 100644 --- a/services/reference/optimism/json-rpc-methods/eth_gettransactionbyhash.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_gettransactionbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx" ### Request -import Request from "./_eth_gettransactionbyhash-request.mdx"; +import Request from "./_eth_gettransactionbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_gettransactioncount.mdx b/services/reference/optimism/json-rpc-methods/eth_gettransactioncount.mdx index 73985353185..9cf5c71e500 100644 --- a/services/reference/optimism/json-rpc-methods/eth_gettransactioncount.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_gettransactioncount.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx" ### Request -import Request from "./_eth_gettransactioncount-request.mdx"; +import Request from "./_eth_gettransactioncount-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_gettransactionreceipt.mdx b/services/reference/optimism/json-rpc-methods/eth_gettransactionreceipt.mdx index 370d08c0402..1ab2ba12676 100644 --- a/services/reference/optimism/json-rpc-methods/eth_gettransactionreceipt.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_gettransactionreceipt.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx" ### Request -import Request from "./_eth_gettransactionreceipt-request.mdx"; +import Request from "./_eth_gettransactionreceipt-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getunclebyblockhashandindex.mdx b/services/reference/optimism/json-rpc-methods/eth_getunclebyblockhashandindex.mdx index dce1f045d95..d6a9a959a37 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getunclebyblockhashandindex.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getunclebyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblockhashandindex-request.mdx"; +import Request from "./_eth_getunclebyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx b/services/reference/optimism/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx index 321c22c4ce0..07c458cb7ad 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblocknumberandindex-request.mdx"; +import Request from "./_eth_getunclebyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getunclecountbyblockhash.mdx b/services/reference/optimism/json-rpc-methods/eth_getunclecountbyblockhash.mdx index c21e8c283a8..298b5c520e8 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getunclecountbyblockhash.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getunclecountbyblockhash.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblockhash-request.mdx"; +import Request from "./_eth_getunclecountbyblockhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_getunclecountbyblocknumber.mdx b/services/reference/optimism/json-rpc-methods/eth_getunclecountbyblocknumber.mdx index 824fdf8de1b..2cc5dbbf753 100644 --- a/services/reference/optimism/json-rpc-methods/eth_getunclecountbyblocknumber.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_getunclecountbyblocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblocknumber-request.mdx"; +import Request from "./_eth_getunclecountbyblocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_maxpriorityfeepergas.mdx b/services/reference/optimism/json-rpc-methods/eth_maxpriorityfeepergas.mdx index 87e39538aaf..6f818052ae7 100644 --- a/services/reference/optimism/json-rpc-methods/eth_maxpriorityfeepergas.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_maxpriorityfeepergas.mdx @@ -2,39 +2,39 @@ title: "eth_maxPriorityFeePerGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx"; +import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx"; +import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx" ### Request -import Request from "./_eth_maxpriorityfeepergas-request.mdx"; +import Request from "./_eth_maxpriorityfeepergas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx"; +import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_protocolversion.mdx b/services/reference/optimism/json-rpc-methods/eth_protocolversion.mdx index 38863109276..02b5da95bff 100644 --- a/services/reference/optimism/json-rpc-methods/eth_protocolversion.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_protocolversion.mdx @@ -2,39 +2,39 @@ title: "eth_protocolVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx"; +import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx"; +import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx" ### Request -import Request from "./_eth_protocolversion-request.mdx"; +import Request from "./_eth_protocolversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx"; +import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_sendrawtransaction.mdx b/services/reference/optimism/json-rpc-methods/eth_sendrawtransaction.mdx index 4dfc4e6f296..dd39a5bafd4 100644 --- a/services/reference/optimism/json-rpc-methods/eth_sendrawtransaction.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_sendrawtransaction.mdx @@ -2,39 +2,39 @@ title: "eth_sendRawTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx"; +import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx" ### Request -import Request from "./_eth_sendrawtransaction-request.mdx"; +import Request from "./_eth_sendrawtransaction-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx"; +import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_sendtransaction.mdx b/services/reference/optimism/json-rpc-methods/eth_sendtransaction.mdx index ac6ebfd02dd..5c13a1d5c8f 100644 --- a/services/reference/optimism/json-rpc-methods/eth_sendtransaction.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_sendtransaction.mdx @@ -2,10 +2,9 @@ title: "eth_sendTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx" - diff --git a/services/reference/optimism/json-rpc-methods/eth_sign.mdx b/services/reference/optimism/json-rpc-methods/eth_sign.mdx index 073b1040681..f8c6a17df92 100644 --- a/services/reference/optimism/json-rpc-methods/eth_sign.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_sign.mdx @@ -2,9 +2,9 @@ title: "eth_sign" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sign-description.mdx"; +import Description from "/services/reference/_partials/_eth_sign-description.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_submitwork.mdx b/services/reference/optimism/json-rpc-methods/eth_submitwork.mdx index b286c9b49de..3e302cecfe3 100644 --- a/services/reference/optimism/json-rpc-methods/eth_submitwork.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_submitwork.mdx @@ -2,39 +2,39 @@ title: "eth_submitWork" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_submitwork-description.mdx"; +import Description from "/services/reference/_partials/_eth_submitwork-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_submitwork-example.mdx"; +import Example from "/services/reference/_partials/_eth_submitwork-example.mdx" ### Request -import Request from "./_eth_submitwork-request.mdx"; +import Request from "./_eth_submitwork-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_submitwork-response.mdx"; +import Response from "/services/reference/_partials/_eth_submitwork-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/eth_syncing.mdx b/services/reference/optimism/json-rpc-methods/eth_syncing.mdx index bfb89e8c209..7ffbcd44560 100644 --- a/services/reference/optimism/json-rpc-methods/eth_syncing.mdx +++ b/services/reference/optimism/json-rpc-methods/eth_syncing.mdx @@ -2,39 +2,39 @@ title: "eth_syncing" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_syncing-description.mdx"; +import Description from "/services/reference/_partials/_eth_syncing-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_syncing-example.mdx"; +import Example from "/services/reference/_partials/_eth_syncing-example.mdx" ### Request -import Request from "./_eth_syncing-request.mdx"; +import Request from "./_eth_syncing-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_syncing-response.mdx"; +import Response from "/services/reference/_partials/_eth_syncing-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/net_peercount.mdx b/services/reference/optimism/json-rpc-methods/net_peercount.mdx index 9ff570e4c70..c0246b44d39 100644 --- a/services/reference/optimism/json-rpc-methods/net_peercount.mdx +++ b/services/reference/optimism/json-rpc-methods/net_peercount.mdx @@ -2,39 +2,39 @@ title: "net_peerCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_peercount-description.mdx"; +import Description from "/services/reference/_partials/_net_peercount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_peercount-parameters.mdx"; +import Params from "/services/reference/_partials/_net_peercount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_peercount-returns.mdx"; +import Returns from "/services/reference/_partials/_net_peercount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_peercount-example.mdx"; +import Example from "/services/reference/_partials/_net_peercount-example.mdx" ### Request -import Request from "./_net_peercount-request.mdx"; +import Request from "./_net_peercount-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_peercount-response.mdx"; +import Response from "/services/reference/_partials/_net_peercount-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/net_version.mdx b/services/reference/optimism/json-rpc-methods/net_version.mdx index d55ab80402d..1d6c0080c60 100644 --- a/services/reference/optimism/json-rpc-methods/net_version.mdx +++ b/services/reference/optimism/json-rpc-methods/net_version.mdx @@ -2,39 +2,39 @@ title: "net_version" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_version-description.mdx"; +import Description from "/services/reference/_partials/_net_version-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_version-parameters.mdx"; +import Params from "/services/reference/_partials/_net_version-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_version-returns.mdx"; +import Returns from "/services/reference/_partials/_net_version-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_version-example.mdx"; +import Example from "/services/reference/_partials/_net_version-example.mdx" ### Request -import Request from "./_net_version-request.mdx"; +import Request from "./_net_version-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_version-response.mdx"; +import Response from "/services/reference/_partials/_net_version-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx b/services/reference/optimism/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx index c1a8bb0a7ba..7ef89fd809a 100644 --- a/services/reference/optimism/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx +++ b/services/reference/optimism/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx @@ -1,20 +1,19 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash -wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' ``` ```bash -wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics": ["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' ``` - diff --git a/services/reference/optimism/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx b/services/reference/optimism/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx index 11784246c0e..5370c2e66b0 100644 --- a/services/reference/optimism/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx +++ b/services/reference/optimism/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx @@ -1,14 +1,12 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash -wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}' +wscat -c wss://optimism-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}' ``` - - diff --git a/services/reference/optimism/json-rpc-methods/subscription-methods/eth_subscribe.mdx b/services/reference/optimism/json-rpc-methods/subscription-methods/eth_subscribe.mdx index 756de6bb212..d79d2a15bb3 100644 --- a/services/reference/optimism/json-rpc-methods/subscription-methods/eth_subscribe.mdx +++ b/services/reference/optimism/json-rpc-methods/subscription-methods/eth_subscribe.mdx @@ -2,39 +2,39 @@ title: "eth_subscribe" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/subscription-methods/_eth_subscribe-description.mdx"; +import Description from "/services/reference/_partials/subscription-methods/_eth_subscribe-description.mdx" ## Parameters -import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters-no-pending.mdx"; +import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters-no-pending.mdx" ## Returns -import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx"; +import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx" ## Example -import Example from "/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx"; +import Example from "/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx" ### Request -import Request from "./_eth_subscribe-request.mdx"; +import Request from "./_eth_subscribe-request.mdx" ### Response -import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx"; +import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response-no-pending.mdx" diff --git a/services/reference/optimism/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx b/services/reference/optimism/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx index 180a40bbd87..6fe9ca4660e 100644 --- a/services/reference/optimism/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx +++ b/services/reference/optimism/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx @@ -2,39 +2,39 @@ title: "eth_unsubscribe" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-description.mdx"; +import Description from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-description.mdx" ## Parameters -import Params from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx"; +import Params from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx"; +import Returns from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx" ## Example -import Example from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx"; +import Example from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx" ### Request -import Request from "./_eth_unsubscribe-request.mdx"; +import Request from "./_eth_unsubscribe-request.mdx" ### Response -import Response from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx"; +import Response from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx" diff --git a/services/reference/optimism/json-rpc-methods/web3_clientversion.mdx b/services/reference/optimism/json-rpc-methods/web3_clientversion.mdx index 11997e5c36d..c5ee316d699 100644 --- a/services/reference/optimism/json-rpc-methods/web3_clientversion.mdx +++ b/services/reference/optimism/json-rpc-methods/web3_clientversion.mdx @@ -2,39 +2,39 @@ title: "web3_clientVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_web3_clientversion-description.mdx"; +import Description from "/services/reference/_partials/_web3_clientversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx"; +import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx"; +import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_web3_clientversion-example.mdx"; +import Example from "/services/reference/_partials/_web3_clientversion-example.mdx" ### Request -import Request from "./_web3_clientversion-request.mdx"; +import Request from "./_web3_clientversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_web3_clientversion-response.mdx"; +import Response from "/services/reference/_partials/_web3_clientversion-response.mdx" diff --git a/services/reference/optimism/quickstart.md b/services/reference/optimism/quickstart.md index c62502c9004..5b85383cbbe 100644 --- a/services/reference/optimism/quickstart.md +++ b/services/reference/optimism/quickstart.md @@ -25,163 +25,165 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://optimism-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ### Node (JavaScript) -In these examples,you'll use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) as your package manager. +In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) as your package manager. #### Node Fetch -1. In your project folder, install the Node Fetch package using npm: +1. In your project folder, install the `node-fetch` package using npm:: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://optimism-mainnet.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://optimism-mainnet.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios -1. In your project folder, install the Axios package using npm: +1. In your project folder, install the `axios` package using npm: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require('axios'); - - axios.post('https://optimism-mainnet.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'eth_blockNumber', - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios") + + axios + .post("https://optimism-mainnet.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }) + .then((response) => { + console.log(response.data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Ethers 1. In your project folder, install the `ethers` package using npm: - ```bash - npm install ethers - `````` + ```bash + npm install ethers + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.js" - const ethers = require('ethers'); + ```javascript title="index.js" + const ethers = require("ethers") - const provider = new ethers.providers.JsonRpcProvider('https://optimism-mainnet.infura.io/v3/YOUR-API-KEY'); + const provider = new ethers.providers.JsonRpcProvider( + "https://optimism-mainnet.infura.io/v3/YOUR-API-KEY" + ) - provider.getBlockNumber() - .then(blockNumber => { - console.log(blockNumber); - }) - .catch(error => { - console.error(error); - }); - ``` + provider + .getBlockNumber() + .then((blockNumber) => { + console.log(blockNumber) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` -1. Create your JavaScript file and copy the following code: +1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = 'https://optimism-mainnet.infura.io/v3/YOUR-API-KEY' + url = "https://optimism-mainnet.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + } - headers = {'content-type': 'application/json'} + headers = {"content-type": "application/json"} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` + ```bash + python index.py + ``` ## Next steps @@ -189,7 +191,7 @@ Now that you have successfully made a call to the Optimism network, you can expl by Infura. Here are some suggestions: - **Explore other Optimism APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Ethereum, Linea, Polygon, and more. @@ -197,4 +199,3 @@ by Infura. Here are some suggestions: Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/reference/palm/json-rpc-methods/_eth_blocknumber-request.mdx b/services/reference/palm/json-rpc-methods/_eth_blocknumber-request.mdx index 0f3bdc54dbb..5cd41d778d2 100644 --- a/services/reference/palm/json-rpc-methods/_eth_blocknumber-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_blocknumber-request.mdx @@ -1,17 +1,16 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_call-request.mdx b/services/reference/palm/json-rpc-methods/_eth_call-request.mdx index 84acdef109d..d50e055c9df 100644 --- a/services/reference/palm/json-rpc-methods/_eth_call-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_call-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_chainid-request.mdx b/services/reference/palm/json-rpc-methods/_eth_chainid-request.mdx index d69da0c6354..b823df1015b 100644 --- a/services/reference/palm/json-rpc-methods/_eth_chainid-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_chainid-request.mdx @@ -1,17 +1,16 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_estimategas-request.mdx b/services/reference/palm/json-rpc-methods/_eth_estimategas-request.mdx index d908437d849..bf104d3aa62 100644 --- a/services/reference/palm/json-rpc-methods/_eth_estimategas-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_estimategas-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_feehistory-request.mdx b/services/reference/palm/json-rpc-methods/_eth_feehistory-request.mdx index 9579f5b241a..2e819443034 100644 --- a/services/reference/palm/json-rpc-methods/_eth_feehistory-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_feehistory-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_gasprice-request.mdx b/services/reference/palm/json-rpc-methods/_eth_gasprice-request.mdx index 04f2b23de29..61fb01440d2 100644 --- a/services/reference/palm/json-rpc-methods/_eth_gasprice-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_gasprice-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_getbalance-request.mdx b/services/reference/palm/json-rpc-methods/_eth_getbalance-request.mdx index 914c336fa54..c5ede3f19b6 100644 --- a/services/reference/palm/json-rpc-methods/_eth_getbalance-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_getbalance-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_getblockbyhash-request.mdx b/services/reference/palm/json-rpc-methods/_eth_getblockbyhash-request.mdx index 46df6b34f1b..0d35fa2605c 100644 --- a/services/reference/palm/json-rpc-methods/_eth_getblockbyhash-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_getblockbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_getblockbynumber-request.mdx b/services/reference/palm/json-rpc-methods/_eth_getblockbynumber-request.mdx index d7e942aee45..fd8695684b1 100644 --- a/services/reference/palm/json-rpc-methods/_eth_getblockbynumber-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_getblockbynumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x5BAD55",false],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx b/services/reference/palm/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx index 2eaae854344..aea822c3262 100644 --- a/services/reference/palm/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_getcode-request.mdx b/services/reference/palm/json-rpc-methods/_eth_getcode-request.mdx index fd244ea70e0..adf5a72c485 100644 --- a/services/reference/palm/json-rpc-methods/_eth_getcode-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_getcode-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_getlogs-request.mdx b/services/reference/palm/json-rpc-methods/_eth_getlogs-request.mdx index 15ae159c18b..71c0c89502e 100644 --- a/services/reference/palm/json-rpc-methods/_eth_getlogs-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_getlogs-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics": ["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_getstorageat-request.mdx b/services/reference/palm/json-rpc-methods/_eth_getstorageat-request.mdx index 58ef0d9b8c9..6674d3c49fc 100644 --- a/services/reference/palm/json-rpc-methods/_eth_getstorageat-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_getstorageat-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_gettransactionbyhash-request.mdx b/services/reference/palm/json-rpc-methods/_eth_gettransactionbyhash-request.mdx index 36ac94ae256..5609a943ecf 100644 --- a/services/reference/palm/json-rpc-methods/_eth_gettransactionbyhash-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_gettransactionbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_gettransactioncount-request.mdx b/services/reference/palm/json-rpc-methods/_eth_gettransactioncount-request.mdx index 44990c6a050..da4c6e70768 100644 --- a/services/reference/palm/json-rpc-methods/_eth_gettransactioncount-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_gettransactioncount-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_gettransactionreceipt-request.mdx b/services/reference/palm/json-rpc-methods/_eth_gettransactionreceipt-request.mdx index 99a25840039..74288a49184 100644 --- a/services/reference/palm/json-rpc-methods/_eth_gettransactionreceipt-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_gettransactionreceipt-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx b/services/reference/palm/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx index 8d1a3466c25..40797067b3c 100644 --- a/services/reference/palm/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_protocolversion-request.mdx b/services/reference/palm/json-rpc-methods/_eth_protocolversion-request.mdx index e0fe6823a61..d98e8a91443 100644 --- a/services/reference/palm/json-rpc-methods/_eth_protocolversion-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_protocolversion-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_protocolVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_sendrawtransaction-request.mdx b/services/reference/palm/json-rpc-methods/_eth_sendrawtransaction-request.mdx index 65dd11f3f61..c396eb4300f 100644 --- a/services/reference/palm/json-rpc-methods/_eth_sendrawtransaction-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_sendrawtransaction-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_submitwork-request.mdx b/services/reference/palm/json-rpc-methods/_eth_submitwork-request.mdx index 6ea785bea80..58852fefc84 100644 --- a/services/reference/palm/json-rpc-methods/_eth_submitwork-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_submitwork-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_submitWork", "params": ["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_eth_syncing-request.mdx b/services/reference/palm/json-rpc-methods/_eth_syncing-request.mdx index 3a954351d63..a26a44b0915 100644 --- a/services/reference/palm/json-rpc-methods/_eth_syncing-request.mdx +++ b/services/reference/palm/json-rpc-methods/_eth_syncing-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_net_listening-request.mdx b/services/reference/palm/json-rpc-methods/_net_listening-request.mdx index 22836a2797c..ee3cfebf46d 100644 --- a/services/reference/palm/json-rpc-methods/_net_listening-request.mdx +++ b/services/reference/palm/json-rpc-methods/_net_listening-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_net_peercount-request.mdx b/services/reference/palm/json-rpc-methods/_net_peercount-request.mdx index f21ccc4b8a9..1c546fedaed 100644 --- a/services/reference/palm/json-rpc-methods/_net_peercount-request.mdx +++ b/services/reference/palm/json-rpc-methods/_net_peercount-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_net_version-request.mdx b/services/reference/palm/json-rpc-methods/_net_version-request.mdx index 9a969b45fda..e5a0d26d384 100644 --- a/services/reference/palm/json-rpc-methods/_net_version-request.mdx +++ b/services/reference/palm/json-rpc-methods/_net_version-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/_web3_clientversion-request.mdx b/services/reference/palm/json-rpc-methods/_web3_clientversion-request.mdx index 4f0fe4ef0e8..677389dd4a4 100644 --- a/services/reference/palm/json-rpc-methods/_web3_clientversion-request.mdx +++ b/services/reference/palm/json-rpc-methods/_web3_clientversion-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/palm/json-rpc-methods/eth_blocknumber.mdx b/services/reference/palm/json-rpc-methods/eth_blocknumber.mdx index 7896c8c46f6..076b45d83ce 100644 --- a/services/reference/palm/json-rpc-methods/eth_blocknumber.mdx +++ b/services/reference/palm/json-rpc-methods/eth_blocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx" ### Request -import Request from "./_eth_blocknumber-request.mdx"; +import Request from "./_eth_blocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_call.mdx b/services/reference/palm/json-rpc-methods/eth_call.mdx index 88b3857775d..5c6ebee7de3 100644 --- a/services/reference/palm/json-rpc-methods/eth_call.mdx +++ b/services/reference/palm/json-rpc-methods/eth_call.mdx @@ -2,39 +2,39 @@ title: "eth_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_call-description.mdx"; +import Description from "/services/reference/_partials/_eth_call-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_call-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_call-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_call-example.mdx"; +import Example from "/services/reference/_partials/_eth_call-example.mdx" ### Request -import Request from "./_eth_call-request.mdx"; +import Request from "./_eth_call-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_call-response.mdx"; +import Response from "/services/reference/_partials/_eth_call-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_chainid.mdx b/services/reference/palm/json-rpc-methods/eth_chainid.mdx index e544b1003a4..a6f446ad268 100644 --- a/services/reference/palm/json-rpc-methods/eth_chainid.mdx +++ b/services/reference/palm/json-rpc-methods/eth_chainid.mdx @@ -2,39 +2,39 @@ title: "eth_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_chainid-description.mdx"; +import Description from "/services/reference/_partials/_eth_chainid-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_chainid-example.mdx"; +import Example from "/services/reference/_partials/_eth_chainid-example.mdx" ### Request -import Request from "./_eth_chainid-request.mdx"; +import Request from "./_eth_chainid-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_chainid-response.mdx"; +import Response from "/services/reference/_partials/_eth_chainid-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_estimategas.mdx b/services/reference/palm/json-rpc-methods/eth_estimategas.mdx index af6c5ad77da..47c6b01804e 100644 --- a/services/reference/palm/json-rpc-methods/eth_estimategas.mdx +++ b/services/reference/palm/json-rpc-methods/eth_estimategas.mdx @@ -2,39 +2,39 @@ title: "eth_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_estimategas-description.mdx"; +import Description from "/services/reference/_partials/_eth_estimategas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_estimategas-example.mdx"; +import Example from "/services/reference/_partials/_eth_estimategas-example.mdx" ### Request -import Request from "./_eth_estimategas-request.mdx"; +import Request from "./_eth_estimategas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_estimategas-response.mdx"; +import Response from "/services/reference/_partials/_eth_estimategas-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_feehistory.mdx b/services/reference/palm/json-rpc-methods/eth_feehistory.mdx index 21e4962e114..9aafc564c46 100644 --- a/services/reference/palm/json-rpc-methods/eth_feehistory.mdx +++ b/services/reference/palm/json-rpc-methods/eth_feehistory.mdx @@ -2,39 +2,39 @@ title: "eth_feeHistory" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_feehistory-description.mdx"; +import Description from "/services/reference/_partials/_eth_feehistory-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_feehistory-example.mdx"; +import Example from "/services/reference/_partials/_eth_feehistory-example.mdx" ### Request -import Request from "./_eth_feehistory-request.mdx"; +import Request from "./_eth_feehistory-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_feehistory-response.mdx"; +import Response from "/services/reference/_partials/_eth_feehistory-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_gasprice.mdx b/services/reference/palm/json-rpc-methods/eth_gasprice.mdx index c602d61c293..8980dcc8a39 100644 --- a/services/reference/palm/json-rpc-methods/eth_gasprice.mdx +++ b/services/reference/palm/json-rpc-methods/eth_gasprice.mdx @@ -2,39 +2,39 @@ title: "eth_gasPrice" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gasprice-description.mdx"; +import Description from "/services/reference/_partials/_eth_gasprice-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gasprice-example.mdx"; +import Example from "/services/reference/_partials/_eth_gasprice-example.mdx" ### Request -import Request from "./_eth_gasprice-request.mdx"; +import Request from "./_eth_gasprice-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gasprice-response.mdx"; +import Response from "/services/reference/_partials/_eth_gasprice-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_getbalance.mdx b/services/reference/palm/json-rpc-methods/eth_getbalance.mdx index c50eba5fd61..1ff5a0d31c8 100644 --- a/services/reference/palm/json-rpc-methods/eth_getbalance.mdx +++ b/services/reference/palm/json-rpc-methods/eth_getbalance.mdx @@ -2,39 +2,39 @@ title: "eth_getBalance" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getbalance-description.mdx"; +import Description from "/services/reference/_partials/_eth_getbalance-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getbalance-example.mdx"; +import Example from "/services/reference/_partials/_eth_getbalance-example.mdx" ### Request -import Request from "./_eth_getbalance-request.mdx"; +import Request from "./_eth_getbalance-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getbalance-response.mdx"; +import Response from "/services/reference/_partials/_eth_getbalance-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_getblockbyhash.mdx b/services/reference/palm/json-rpc-methods/eth_getblockbyhash.mdx index ad555110b71..970e6c27704 100644 --- a/services/reference/palm/json-rpc-methods/eth_getblockbyhash.mdx +++ b/services/reference/palm/json-rpc-methods/eth_getblockbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx" ### Request -import Request from "./_eth_getblockbyhash-request.mdx"; +import Request from "./_eth_getblockbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_getblockbynumber.mdx b/services/reference/palm/json-rpc-methods/eth_getblockbynumber.mdx index 2faabaa3e86..f14e34f1531 100644 --- a/services/reference/palm/json-rpc-methods/eth_getblockbynumber.mdx +++ b/services/reference/palm/json-rpc-methods/eth_getblockbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx" ### Request -import Request from "./_eth_getblockbynumber-request.mdx"; +import Request from "./_eth_getblockbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx b/services/reference/palm/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx index 161e7fe344b..c355e33cb53 100644 --- a/services/reference/palm/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx +++ b/services/reference/palm/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbynumber-request.mdx"; +import Request from "./_eth_getblocktransactioncountbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_getcode.mdx b/services/reference/palm/json-rpc-methods/eth_getcode.mdx index 8364a077f09..ace0da8cb26 100644 --- a/services/reference/palm/json-rpc-methods/eth_getcode.mdx +++ b/services/reference/palm/json-rpc-methods/eth_getcode.mdx @@ -2,39 +2,39 @@ title: "eth_getCode" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getcode-description.mdx"; +import Description from "/services/reference/_partials/_eth_getcode-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getcode-example.mdx"; +import Example from "/services/reference/_partials/_eth_getcode-example.mdx" ### Request -import Request from "./_eth_getcode-request.mdx"; +import Request from "./_eth_getcode-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getcode-response.mdx"; +import Response from "/services/reference/_partials/_eth_getcode-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_getlogs.mdx b/services/reference/palm/json-rpc-methods/eth_getlogs.mdx index 546d66f9148..4a1c1a031c4 100644 --- a/services/reference/palm/json-rpc-methods/eth_getlogs.mdx +++ b/services/reference/palm/json-rpc-methods/eth_getlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getlogs-description.mdx"; +import Description from "/services/reference/_partials/_eth_getlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getlogs-example.mdx"; +import Example from "/services/reference/_partials/_eth_getlogs-example.mdx" ### Request -import Request from "./_eth_getlogs-request.mdx"; +import Request from "./_eth_getlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getlogs-response.mdx"; +import Response from "/services/reference/_partials/_eth_getlogs-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_getstorageat.mdx b/services/reference/palm/json-rpc-methods/eth_getstorageat.mdx index aee85d0fde8..d91e20b3979 100644 --- a/services/reference/palm/json-rpc-methods/eth_getstorageat.mdx +++ b/services/reference/palm/json-rpc-methods/eth_getstorageat.mdx @@ -2,39 +2,39 @@ title: "eth_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx"; +import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx"; +import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx" ### Request -import Request from "./_eth_getstorageat-request.mdx"; +import Request from "./_eth_getstorageat-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx"; +import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_gettransactionbyhash.mdx b/services/reference/palm/json-rpc-methods/eth_gettransactionbyhash.mdx index 1adc6ff1eb4..28548a1fd58 100644 --- a/services/reference/palm/json-rpc-methods/eth_gettransactionbyhash.mdx +++ b/services/reference/palm/json-rpc-methods/eth_gettransactionbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx" ### Request -import Request from "./_eth_gettransactionbyhash-request.mdx"; +import Request from "./_eth_gettransactionbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_gettransactioncount.mdx b/services/reference/palm/json-rpc-methods/eth_gettransactioncount.mdx index 73985353185..9cf5c71e500 100644 --- a/services/reference/palm/json-rpc-methods/eth_gettransactioncount.mdx +++ b/services/reference/palm/json-rpc-methods/eth_gettransactioncount.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx" ### Request -import Request from "./_eth_gettransactioncount-request.mdx"; +import Request from "./_eth_gettransactioncount-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_gettransactionreceipt.mdx b/services/reference/palm/json-rpc-methods/eth_gettransactionreceipt.mdx index 370d08c0402..1ab2ba12676 100644 --- a/services/reference/palm/json-rpc-methods/eth_gettransactionreceipt.mdx +++ b/services/reference/palm/json-rpc-methods/eth_gettransactionreceipt.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx" ### Request -import Request from "./_eth_gettransactionreceipt-request.mdx"; +import Request from "./_eth_gettransactionreceipt-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_maxpriorityfeepergas.mdx b/services/reference/palm/json-rpc-methods/eth_maxpriorityfeepergas.mdx index 87e39538aaf..6f818052ae7 100644 --- a/services/reference/palm/json-rpc-methods/eth_maxpriorityfeepergas.mdx +++ b/services/reference/palm/json-rpc-methods/eth_maxpriorityfeepergas.mdx @@ -2,39 +2,39 @@ title: "eth_maxPriorityFeePerGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx"; +import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx"; +import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx" ### Request -import Request from "./_eth_maxpriorityfeepergas-request.mdx"; +import Request from "./_eth_maxpriorityfeepergas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx"; +import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_protocolversion.mdx b/services/reference/palm/json-rpc-methods/eth_protocolversion.mdx index 38863109276..02b5da95bff 100644 --- a/services/reference/palm/json-rpc-methods/eth_protocolversion.mdx +++ b/services/reference/palm/json-rpc-methods/eth_protocolversion.mdx @@ -2,39 +2,39 @@ title: "eth_protocolVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx"; +import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx"; +import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx" ### Request -import Request from "./_eth_protocolversion-request.mdx"; +import Request from "./_eth_protocolversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx"; +import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_sendrawtransaction.mdx b/services/reference/palm/json-rpc-methods/eth_sendrawtransaction.mdx index 4dfc4e6f296..dd39a5bafd4 100644 --- a/services/reference/palm/json-rpc-methods/eth_sendrawtransaction.mdx +++ b/services/reference/palm/json-rpc-methods/eth_sendrawtransaction.mdx @@ -2,39 +2,39 @@ title: "eth_sendRawTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx"; +import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx" ### Request -import Request from "./_eth_sendrawtransaction-request.mdx"; +import Request from "./_eth_sendrawtransaction-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx"; +import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_sendtransaction.mdx b/services/reference/palm/json-rpc-methods/eth_sendtransaction.mdx index ac6ebfd02dd..5c13a1d5c8f 100644 --- a/services/reference/palm/json-rpc-methods/eth_sendtransaction.mdx +++ b/services/reference/palm/json-rpc-methods/eth_sendtransaction.mdx @@ -2,10 +2,9 @@ title: "eth_sendTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx" - diff --git a/services/reference/palm/json-rpc-methods/eth_sign.mdx b/services/reference/palm/json-rpc-methods/eth_sign.mdx index 073b1040681..f8c6a17df92 100644 --- a/services/reference/palm/json-rpc-methods/eth_sign.mdx +++ b/services/reference/palm/json-rpc-methods/eth_sign.mdx @@ -2,9 +2,9 @@ title: "eth_sign" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sign-description.mdx"; +import Description from "/services/reference/_partials/_eth_sign-description.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_submitwork.mdx b/services/reference/palm/json-rpc-methods/eth_submitwork.mdx index b286c9b49de..3e302cecfe3 100644 --- a/services/reference/palm/json-rpc-methods/eth_submitwork.mdx +++ b/services/reference/palm/json-rpc-methods/eth_submitwork.mdx @@ -2,39 +2,39 @@ title: "eth_submitWork" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_submitwork-description.mdx"; +import Description from "/services/reference/_partials/_eth_submitwork-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_submitwork-example.mdx"; +import Example from "/services/reference/_partials/_eth_submitwork-example.mdx" ### Request -import Request from "./_eth_submitwork-request.mdx"; +import Request from "./_eth_submitwork-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_submitwork-response.mdx"; +import Response from "/services/reference/_partials/_eth_submitwork-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/eth_syncing.mdx b/services/reference/palm/json-rpc-methods/eth_syncing.mdx index bfb89e8c209..7ffbcd44560 100644 --- a/services/reference/palm/json-rpc-methods/eth_syncing.mdx +++ b/services/reference/palm/json-rpc-methods/eth_syncing.mdx @@ -2,39 +2,39 @@ title: "eth_syncing" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_syncing-description.mdx"; +import Description from "/services/reference/_partials/_eth_syncing-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_syncing-example.mdx"; +import Example from "/services/reference/_partials/_eth_syncing-example.mdx" ### Request -import Request from "./_eth_syncing-request.mdx"; +import Request from "./_eth_syncing-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_syncing-response.mdx"; +import Response from "/services/reference/_partials/_eth_syncing-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/net_listening.mdx b/services/reference/palm/json-rpc-methods/net_listening.mdx index 10de017b29a..b10ffc556cf 100644 --- a/services/reference/palm/json-rpc-methods/net_listening.mdx +++ b/services/reference/palm/json-rpc-methods/net_listening.mdx @@ -2,39 +2,39 @@ title: "net_listening" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_listening-description.mdx"; +import Description from "/services/reference/_partials/_net_listening-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_listening-parameters.mdx"; +import Params from "/services/reference/_partials/_net_listening-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_listening-returns.mdx"; +import Returns from "/services/reference/_partials/_net_listening-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_listening-example.mdx"; +import Example from "/services/reference/_partials/_net_listening-example.mdx" ### Request -import Request from "./_net_listening-request.mdx"; +import Request from "./_net_listening-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_listening-response.mdx"; +import Response from "/services/reference/_partials/_net_listening-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/net_peercount.mdx b/services/reference/palm/json-rpc-methods/net_peercount.mdx index 9ff570e4c70..c0246b44d39 100644 --- a/services/reference/palm/json-rpc-methods/net_peercount.mdx +++ b/services/reference/palm/json-rpc-methods/net_peercount.mdx @@ -2,39 +2,39 @@ title: "net_peerCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_peercount-description.mdx"; +import Description from "/services/reference/_partials/_net_peercount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_peercount-parameters.mdx"; +import Params from "/services/reference/_partials/_net_peercount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_peercount-returns.mdx"; +import Returns from "/services/reference/_partials/_net_peercount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_peercount-example.mdx"; +import Example from "/services/reference/_partials/_net_peercount-example.mdx" ### Request -import Request from "./_net_peercount-request.mdx"; +import Request from "./_net_peercount-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_peercount-response.mdx"; +import Response from "/services/reference/_partials/_net_peercount-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/net_version.mdx b/services/reference/palm/json-rpc-methods/net_version.mdx index d55ab80402d..1d6c0080c60 100644 --- a/services/reference/palm/json-rpc-methods/net_version.mdx +++ b/services/reference/palm/json-rpc-methods/net_version.mdx @@ -2,39 +2,39 @@ title: "net_version" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_version-description.mdx"; +import Description from "/services/reference/_partials/_net_version-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_version-parameters.mdx"; +import Params from "/services/reference/_partials/_net_version-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_version-returns.mdx"; +import Returns from "/services/reference/_partials/_net_version-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_version-example.mdx"; +import Example from "/services/reference/_partials/_net_version-example.mdx" ### Request -import Request from "./_net_version-request.mdx"; +import Request from "./_net_version-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_version-response.mdx"; +import Response from "/services/reference/_partials/_net_version-response.mdx" diff --git a/services/reference/palm/json-rpc-methods/web3_clientversion.mdx b/services/reference/palm/json-rpc-methods/web3_clientversion.mdx index 11997e5c36d..c5ee316d699 100644 --- a/services/reference/palm/json-rpc-methods/web3_clientversion.mdx +++ b/services/reference/palm/json-rpc-methods/web3_clientversion.mdx @@ -2,39 +2,39 @@ title: "web3_clientVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_web3_clientversion-description.mdx"; +import Description from "/services/reference/_partials/_web3_clientversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx"; +import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx"; +import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_web3_clientversion-example.mdx"; +import Example from "/services/reference/_partials/_web3_clientversion-example.mdx" ### Request -import Request from "./_web3_clientversion-request.mdx"; +import Request from "./_web3_clientversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_web3_clientversion-response.mdx"; +import Response from "/services/reference/_partials/_web3_clientversion-response.mdx" diff --git a/services/reference/palm/quickstart.md b/services/reference/palm/quickstart.md index 33d5d376e02..6c084b80531 100644 --- a/services/reference/palm/quickstart.md +++ b/services/reference/palm/quickstart.md @@ -16,7 +16,7 @@ Don't have an Infura account? Sign up for our free plan and start using the Palm ## Prerequisites Ensure you have an [API key](../../../../developer-tools/dashboard/get-started/create-api/) with the Palm network enabled. - + ## Make calls ### cURL @@ -25,163 +25,165 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://palm-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ### Node (JavaScript) -In these examples,you'll use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) as your package manager. +In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) as your package manager. #### Node Fetch -1. In your project folder, install the Node Fetch package using npm: +1. In your project folder, install the `node-fetch` package using npm:: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://palm-mainnet.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://palm-mainnet.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios -1. In your project folder, install the Axios package using npm: +1. In your project folder, install the `axios` package using npm: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require('axios'); - - axios.post('https://palm-mainnet.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'eth_blockNumber', - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios") + + axios + .post("https://palm-mainnet.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }) + .then((response) => { + console.log(response.data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Ethers 1. In your project folder, install the `ethers` package using npm: - ```bash - npm install ethers - `````` + ```bash + npm install ethers + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.js" - const ethers = require('ethers'); + ```javascript title="index.js" + const ethers = require("ethers") - const provider = new ethers.providers.JsonRpcProvider('https://palm-mainnet.infura.io/v3/YOUR-API-KEY'); + const provider = new ethers.providers.JsonRpcProvider( + "https://palm-mainnet.infura.io/v3/YOUR-API-KEY" + ) - provider.getBlockNumber() - .then(blockNumber => { - console.log(blockNumber); - }) - .catch(error => { - console.error(error); - }); - ``` + provider + .getBlockNumber() + .then((blockNumber) => { + console.log(blockNumber) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` -1. Create your JavaScript file and copy the following code: +1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = 'https://palm-mainnet.infura.io/v3/YOUR-API-KEY' + url = "https://palm-mainnet.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + } - headers = {'content-type': 'application/json'} + headers = {"content-type": "application/json"} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` + ```bash + python index.py + ``` ## Next steps @@ -189,7 +191,7 @@ Now that you have successfully made a call to the Palm network, you can explore by Infura. Here are some suggestions: - **Explore other Palm APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Arbitrum, Polygon, Optimism, IPFS, and more. @@ -197,4 +199,3 @@ by Infura. Here are some suggestions: Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/reference/polygon-pos/index.md b/services/reference/polygon-pos/index.md index 7a905326d1a..f514add446e 100644 --- a/services/reference/polygon-pos/index.md +++ b/services/reference/polygon-pos/index.md @@ -8,7 +8,7 @@ import CardList from '@site/src/components/CardList' :::note Failover protection -[Failover protection](../../concepts/failover-protection.md) is available on the Polygon network for customers on the Growth or Custom plans. +[Failover protection](../../concepts/failover-protection.md) is available on the Polygon network for customers on the Growth or Custom plans. Calls to the network are routed to [partner infrastructure providers](#partners-and-privacy-policies). ::: @@ -53,8 +53,10 @@ No personal information is sent as part of partner requests, only information ne For any parameters required in an RPC request, these could be the type that describe the method, addresses, gas, and session. + Rivet.Cloud ([Terms of Service](https://rivet.cloud/terms), [Privacy Policy](https://rivet.cloud/privacy-policy)) is Infura's failover-protection partner. While Rivet.Cloud supports most Infura methods, it does not yet support the following methods: + - `eth_accounts` @@ -65,4 +67,4 @@ it does not yet support the following methods: - `eth_hashrate` - `eth_mining` - `eth_sendTransaction` -- `eth_sign` \ No newline at end of file +- `eth_sign` diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_accounts-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_accounts-request.mdx index c65600354d4..f2595923bc3 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_accounts-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_accounts-request.mdx @@ -1,24 +1,23 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` ```bash -wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_blocknumber-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_blocknumber-request.mdx index b67487e541c..0cf217993ce 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_blocknumber-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_blocknumber-request.mdx @@ -1,24 +1,23 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ```bash -wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_blocknumber-requestfop.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_blocknumber-requestfop.mdx index 8ee89a3cf89..c04d96b8316 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_blocknumber-requestfop.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_blocknumber-requestfop.mdx @@ -1,14 +1,14 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "X-INFURA-FAILOVER: true" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -X POST \ + -H "X-INFURA-FAILOVER: true" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` @@ -16,17 +16,17 @@ curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ ```bash const provider = new Web3.providers.HttpProvider( - "https://polygon-mainnet.infura.io/v3/YOUR-API-KEY" + "https://polygon-mainnet.infura.io/v3/YOUR-API-KEY" ); const options = { - headers: [ - { - name: "X-INFURA-FAILOVER", - value: "true", - }, - ], - }; + headers: [ + { + name: "X-INFURA-FAILOVER", + value: "true", + }, +], +}; const web3 = new Web3(provider, options); ``` @@ -36,21 +36,22 @@ const web3 = new Web3(provider, options); ```bash class InfuraJsonRpcProvider extends JsonRpcProvider { - constructor(url) { - super(url); - this.preflightFunc = async (req) => { - if (req.hasBody()) { - req.setHeader("X-INFURA-FAILOVER", true); - } - return req; - }; - } + constructor(url) { + super(url); + this.preflightFunc = async (req) => { + if (req.hasBody()) { + req.setHeader("X-INFURA-FAILOVER", true); + } + return req; + }; + } } +``` provider = new InfuraJsonRpcProvider( - "https://polygon-mainnet.infura.io/v3/YOUR-API-KEY" + "https://polygon-mainnet.infura.io/v3/YOUR-API-KEY" ); ``` - \ No newline at end of file + diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_call-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_call-request.mdx index 15996eb0de9..c55a30bb210 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_call-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_call-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_chainid-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_chainid-request.mdx index e93d3d5a092..79e3ff53524 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_chainid-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_chainid-request.mdx @@ -1,24 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` ```bash -wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` - - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_createaccesslist-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_createaccesslist-request.mdx index 5e3a9920c9f..3948161c101 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_createaccesslist-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_createaccesslist-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"method":"eth_createAccessList","params":[{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"],"id":1,"jsonrpc":"2.0"}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"method": "eth_createAccessList", "params": [{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"], "id": 1, "jsonrpc": "2.0"}' ``` ```bash -wscat -c wss:///polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"method":"eth_createAccessList","params":[{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"],"id":1,"jsonrpc":"2.0"}' +wscat -c wss:///polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"method": "eth_createAccessList", "params": [{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"], "id": 1, "jsonrpc": "2.0"}' ``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_estimategas-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_estimategas-request.mdx index 941ee68be91..cc93525003d 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_estimategas-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_estimategas-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_feehistory-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_feehistory-request.mdx index ea324a5ab0d..58ab99b506b 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_feehistory-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_feehistory-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x5", "latest", []],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", []], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_gasprice-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_gasprice-request.mdx index 82837652b5e..f43bc06c892 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_gasprice-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_gasprice-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getbalance-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getbalance-request.mdx index a6ab273a11b..7ace8461b46 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getbalance-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getbalance-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getblockbyhash-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getblockbyhash-request.mdx index 710e40e19fc..4912f6721e8 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getblockbyhash-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getblockbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getblockbynumber-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getblockbynumber-request.mdx index cad99239d00..8619e088a0b 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getblockbynumber-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getblockbynumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x5BAD55",false],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params": ["0x5BAD55",false],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx index bf7431097e4..07a2838cc7c 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx index f803fe33012..fc6f443e9af 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getcode-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getcode-request.mdx index f35ce9ac083..d5bd2ff58bf 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getcode-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getcode-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getlogs-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getlogs-request.mdx index 1c91adae4f2..96184361a80 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getlogs-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getlogs-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics": ["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics": ["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getproof-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getproof-request.mdx index 6522acff4ac..984723c5a81 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getproof-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getproof-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0","method": "eth_getProof","id": 1,"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getProof", "id": 1, "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getProof","params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getProof", "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getstorageat-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getstorageat-request.mdx index 6afc225df5f..38105588f05 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getstorageat-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getstorageat-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx index b3864bb7f62..985d8a1eba7 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx index d1c3a9c89a4..5ba610d082c 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionbyhash-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionbyhash-request.mdx index 31ae76092e6..c1a4cd076ac 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionbyhash-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionbyhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactioncount-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactioncount-request.mdx index 5a383b62d85..495084fbf90 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactioncount-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactioncount-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionreceipt-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionreceipt-request.mdx index 0d98e59314e..869dc7c2385 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionreceipt-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_gettransactionreceipt-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx index c6378eb2ff1..2dec1f44bd9 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx index 8ee9ad63841..37177a5c60e 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c", "0x0"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx index e0b0866608e..b5726fa9077 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0","method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx index 08be756be7d..455d1dc6093 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_getwork-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_getwork-request.mdx index 5b148004e04..80178c2626a 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_getwork-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_getwork-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getWork","params": [],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getWork", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_getWork","params": [],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getWork", "params": [], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_hashrate-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_hashrate-request.mdx index 011e6d05cca..e7a632a6730 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_hashrate-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_hashrate-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_hashrate","params": [],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_hashrate", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_hashrate","params": [],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_hashrate", "params": [], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx index e380b2773ad..78ab71f1944 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/d23391e03c6d40738530a1b4b679e66e -x '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/d23391e03c6d40738530a1b4b679e66e -x '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_mining-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_mining-request.mdx index 6496ecf4fd1..8e3b3ba63f3 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_mining-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_mining-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_mining","params": [],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_mining", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_mining","params": [],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_mining", "params": [], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_protocolversion-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_protocolversion-request.mdx index 42f649a2dbe..9e62f43fbda 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_protocolversion-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_protocolversion-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_protocolVersion", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_protocolVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_sendrawtransaction-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_sendrawtransaction-request.mdx index 2b1c0900398..e8f0534c85e 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_sendrawtransaction-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_sendrawtransaction-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_eth_syncing-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_eth_syncing-request.mdx index 5c963ce28e3..5070d65caf4 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_eth_syncing-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_eth_syncing-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_net_listening-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_net_listening-request.mdx index 0ebbca18818..44fe0903987 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_net_listening-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_net_listening-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_net_peercount-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_net_peercount-request.mdx index b6ba874d567..f2604a67c27 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_net_peercount-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_net_peercount-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_net_version-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_net_version-request.mdx index 92bb486f2d3..7aed76c2dcf 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_net_version-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_net_version-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/_web3_clientversion-request.mdx b/services/reference/polygon-pos/json-rpc-methods/_web3_clientversion-request.mdx index 8f8a12df4d2..54e6c5e3d2b 100644 --- a/services/reference/polygon-pos/json-rpc-methods/_web3_clientversion-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/_web3_clientversion-request.mdx @@ -1,23 +1,22 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/bor_getauthor.md b/services/reference/polygon-pos/json-rpc-methods/bor_getauthor.md index 90bc0f08dc3..ad43d989e60 100644 --- a/services/reference/polygon-pos/json-rpc-methods/bor_getauthor.md +++ b/services/reference/polygon-pos/json-rpc-methods/bor_getauthor.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # bor_getAuthor @@ -34,19 +34,19 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ --X POST \ --H "Content-Type: application/json" \ --d '{"jsonrpc":"2.0","method":"bor_getAuthor","params":["0x1000"], "id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "bor_getAuthor", "params": ["0x1000"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x {"jsonrpc":"2.0","method":"bor_getAuthor","params":["0x1000"], "id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x {"jsonrpc": "2.0", "method": "bor_getAuthor", "params": ["0x1000"], "id": 1}' +``` @@ -54,5 +54,9 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ### Response ```json -{"jsonrpc":"2.0","id":1,"result":"0x42eefcda06ead475cde3731b8eb138e88cd0bac3"} +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x42eefcda06ead475cde3731b8eb138e88cd0bac3" +} ``` diff --git a/services/reference/polygon-pos/json-rpc-methods/bor_getcurrentproposer.md b/services/reference/polygon-pos/json-rpc-methods/bor_getcurrentproposer.md index 4731b9864e0..5ebbb8e00fe 100644 --- a/services/reference/polygon-pos/json-rpc-methods/bor_getcurrentproposer.md +++ b/services/reference/polygon-pos/json-rpc-methods/bor_getcurrentproposer.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # bor_getCurrentProposer @@ -34,25 +34,29 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ --X POST \ --H "Content-Type: application/json" \ --d '{"jsonrpc":"2.0","method":"bor_getCurrentProposer","params":[], "id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "bor_getCurrentProposer", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x {"jsonrpc":"2.0","method":"bor_getCurrentProposer","params":[], "id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "bor_getCurrentProposer", "params": [], "id": 1}' +``` ### Response -``` -{"jsonrpc":"2.0","id":1,"result":"0x88c5e96c1459d224383dcb1fe0cedd1fcee25ffb"} +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "0x88c5e96c1459d224383dcb1fe0cedd1fcee25ffb" +} ``` diff --git a/services/reference/polygon-pos/json-rpc-methods/bor_getcurrentvalidators.md b/services/reference/polygon-pos/json-rpc-methods/bor_getcurrentvalidators.md index 2dc68ce563c..fc2c25ce474 100644 --- a/services/reference/polygon-pos/json-rpc-methods/bor_getcurrentvalidators.md +++ b/services/reference/polygon-pos/json-rpc-methods/bor_getcurrentvalidators.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # bor_getCurrentValidators @@ -39,19 +39,19 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ --X POST \ --H "Content-Type: application/json" \ --d '{"jsonrpc":"2.0","method":"bor_getCurrentValidators","params":[], "id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "bor_getCurrentValidators", "params": [], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x {"jsonrpc":"2.0","method":"bor_getCurrentValidators","params":[], "id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x {"jsonrpc": "2.0", "method": "bor_getCurrentValidators", "params": [], "id": 1}' +``` @@ -60,28 +60,28 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ```json { - "jsonrpc": "2.0", - "id": 1, - "result": [ - { - "ID": 0, - "accum": 14, - "power": 1, - "signer": "0x055bd801ca712b4ddf67db8bc23fb6c8510d52b9" - }, - { - "ID": 0, - "accum": 0, - "power": 4, - "signer": "0x1ca971963bdb4ba2bf337c90660674acff5beb3f" - }, - { - "ID": 0, - "accum": -15, - "power": 1, - "signer": "0x26c80cc193b27d73d2c40943acec77f4da2c5bd8" - }, - ... - ] + "jsonrpc": "2.0", + "id": 1, + "result": [ + { + "ID": 0, + "accum": 14, + "power": 1, + "signer": "0x055bd801ca712b4ddf67db8bc23fb6c8510d52b9" + }, + { + "ID": 0, + "accum": 0, + "power": 4, + "signer": "0x1ca971963bdb4ba2bf337c90660674acff5beb3f" + }, + { + "ID": 0, + "accum": -15, + "power": 1, + "signer": "0x26c80cc193b27d73d2c40943acec77f4da2c5bd8" + } + // Additional objects here + ] } ``` diff --git a/services/reference/polygon-pos/json-rpc-methods/bor_getroothash.md b/services/reference/polygon-pos/json-rpc-methods/bor_getroothash.md index 1ab61d1fe06..f175e7d1882 100644 --- a/services/reference/polygon-pos/json-rpc-methods/bor_getroothash.md +++ b/services/reference/polygon-pos/json-rpc-methods/bor_getroothash.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # bor_getRootHash @@ -41,25 +41,29 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ --X POST \ --H "Content-Type: application/json" \ --d '{"jsonrpc":"2.0","method":"bor_getRootHash","params":[1000, 1032], "id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "bor_getRootHash", "params": [1000, 1032], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x {"jsonrpc":"2.0","method":"bor_getRootHash","params":[1000, 1032], "id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x {"jsonrpc": "2.0", "method": "bor_getRootHash", "params": [1000, 1032], "id": 1}' +``` ### Response -``` -{"jsonrpc":"2.0","id":1,"result":"67518d9fc6bf9ff886ba1a4e932a0d0a8a1318b3f300518773aaf2210410cf73"} +```json +{ + "jsonrpc": "2.0", + "id": 1, + "result": "67518d9fc6bf9ff886ba1a4e932a0d0a8a1318b3f300518773aaf2210410cf73" +} ``` diff --git a/services/reference/polygon-pos/json-rpc-methods/bor_getsignersathash.md b/services/reference/polygon-pos/json-rpc-methods/bor_getsignersathash.md index a261abe9759..72e196fba75 100644 --- a/services/reference/polygon-pos/json-rpc-methods/bor_getsignersathash.md +++ b/services/reference/polygon-pos/json-rpc-methods/bor_getsignersathash.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # bor_getSignersAtHash @@ -34,37 +34,37 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ --X POST \ --H "Content-Type: application/json" \ --d '{"jsonrpc":"2.0","method":"bor_getSignersAtHash","params":["0x29fa73e3da83ddac98f527254fe37002e052725a88904bac14f03e919e1e2876"], "id":1}' - ``` +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "bor_getSignersAtHash", "params": ["0x29fa73e3da83ddac98f527254fe37002e052725a88904bac14f03e919e1e2876"], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x {"jsonrpc":"2.0","method":"bor_getSignersAtHash","params":["0x29fa73e3da83ddac98f527254fe37002e052725a88904bac14f03e919e1e2876"], "id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x {"jsonrpc": "2.0", "method": "bor_getSignersAtHash", "params":["0x29fa73e3da83ddac98f527254fe37002e052725a88904bac14f03e919e1e2876"], "id": 1}' +``` ### Response -``` +```json { - "jsonrpc": "2.0", - "id": 1, - "result": [ - "0x0375b2fc7140977c9c76d45421564e354ed42277", - "0x42eefcda06ead475cde3731b8eb138e88cd0bac3", - "0x5973918275c01f50555d44e92c9d9b353cadad54", - "0x7fcd58c2d53d980b247f1612fdba93e9a76193e6", - "0xb702f1c9154ac9c08da247a8e30ee6f2f3373f41", - "0xb8bb158b93c94ed35c1970d610d1e2b34e26652c", - "0xf84c74dea96df0ec22e11e7c33996c73fcc2d822" - ] + "jsonrpc": "2.0", + "id": 1, + "result": [ + "0x0375b2fc7140977c9c76d45421564e354ed42277", + "0x42eefcda06ead475cde3731b8eb138e88cd0bac3", + "0x5973918275c01f50555d44e92c9d9b353cadad54", + "0x7fcd58c2d53d980b247f1612fdba93e9a76193e6", + "0xb702f1c9154ac9c08da247a8e30ee6f2f3373f41", + "0xb8bb158b93c94ed35c1970d610d1e2b34e26652c", + "0xf84c74dea96df0ec22e11e7c33996c73fcc2d822" + ] } ``` diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_accounts.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_accounts.mdx index 0cc7304b6ec..0dafbcb7389 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_accounts.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_accounts.mdx @@ -2,39 +2,39 @@ title: "eth_accounts" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_accounts-description.mdx"; +import Description from "/services/reference/_partials/_eth_accounts-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_accounts-example.mdx"; +import Example from "/services/reference/_partials/_eth_accounts-example.mdx" ### Request -import Request from "./_eth_accounts-request.mdx"; +import Request from "./_eth_accounts-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_accounts-response.mdx"; +import Response from "/services/reference/_partials/_eth_accounts-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_blocknumber.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_blocknumber.mdx index ac82d8a4920..bd9a02c2311 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_blocknumber.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_blocknumber.mdx @@ -2,10 +2,10 @@ title: "eth_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx" ### Request -import Request from "./_eth_blocknumber-request.mdx"; +import Request from "./_eth_blocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_call.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_call.mdx index 2f6bda39558..f0e5b6ea176 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_call.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_call.mdx @@ -2,10 +2,10 @@ title: "eth_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_call-description.mdx"; +import Description from "/services/reference/_partials/_eth_call-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_call-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_call-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_call-example.mdx"; +import Example from "/services/reference/_partials/_eth_call-example.mdx" ### Request -import Request from "./_eth_call-request.mdx"; +import Request from "./_eth_call-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_call-response.mdx"; +import Response from "/services/reference/_partials/_eth_call-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_chainid.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_chainid.mdx index f3322d92976..799efdf20d2 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_chainid.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_chainid.mdx @@ -2,10 +2,10 @@ title: "eth_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_chainid-description.mdx"; +import Description from "/services/reference/_partials/_eth_chainid-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_chainid-example.mdx"; +import Example from "/services/reference/_partials/_eth_chainid-example.mdx" ### Request -import Request from "./_eth_chainid-request.mdx"; +import Request from "./_eth_chainid-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_chainid-response.mdx"; +import Response from "/services/reference/_partials/_eth_chainid-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_coinbase.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_coinbase.mdx index e9bb3ff61cd..8957df7e522 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_coinbase.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_coinbase.mdx @@ -2,9 +2,9 @@ title: "eth_coinbase" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_coinbase-description.mdx"; +import Description from "/services/reference/_partials/_eth_coinbase-description.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_createaccesslist.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_createaccesslist.mdx index e75f81c8a7a..0aef291b632 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_createaccesslist.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_createaccesslist.mdx @@ -2,10 +2,10 @@ title: "eth_createAccessList" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_createaccesslist-description.mdx"; +import Description from "/services/reference/_partials/_eth_createaccesslist-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_createaccesslist-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_createaccesslist-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_createaccesslist-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_createaccesslist-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_createaccesslist-example.mdx"; +import Example from "/services/reference/_partials/_eth_createaccesslist-example.mdx" ### Request -import Request from "./_eth_createaccesslist-request.mdx"; +import Request from "./_eth_createaccesslist-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_createaccesslist-response.mdx"; +import Response from "/services/reference/_partials/_eth_createaccesslist-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_estimategas.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_estimategas.mdx index b0e290a3a01..8b8a5fd9d82 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_estimategas.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_estimategas.mdx @@ -2,10 +2,10 @@ title: "eth_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_estimategas-description.mdx"; +import Description from "/services/reference/_partials/_eth_estimategas-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_estimategas-example.mdx"; +import Example from "/services/reference/_partials/_eth_estimategas-example.mdx" ### Request -import Request from "./_eth_estimategas-request.mdx"; +import Request from "./_eth_estimategas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_estimategas-response.mdx"; +import Response from "/services/reference/_partials/_eth_estimategas-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_feehistory.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_feehistory.mdx index 4d417ed7ce2..549cf6cd962 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_feehistory.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_feehistory.mdx @@ -2,10 +2,10 @@ title: "eth_feeHistory" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_feehistory-description.mdx"; +import Description from "/services/reference/_partials/_eth_feehistory-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_feehistory-example.mdx"; +import Example from "/services/reference/_partials/_eth_feehistory-example.mdx" ### Request -import Request from "./_eth_feehistory-request.mdx"; +import Request from "./_eth_feehistory-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_feehistory-response.mdx"; +import Response from "/services/reference/_partials/_eth_feehistory-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_gasprice.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_gasprice.mdx index 8d8ba44c993..65c6516d81c 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_gasprice.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_gasprice.mdx @@ -2,10 +2,10 @@ title: "eth_gasPrice" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gasprice-description.mdx"; +import Description from "/services/reference/_partials/_eth_gasprice-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gasprice-example.mdx"; +import Example from "/services/reference/_partials/_eth_gasprice-example.mdx" ### Request -import Request from "./_eth_gasprice-request.mdx"; +import Request from "./_eth_gasprice-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gasprice-response.mdx"; +import Response from "/services/reference/_partials/_eth_gasprice-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getbalance.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getbalance.mdx index c978923ee8b..ee59217d1fe 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getbalance.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getbalance.mdx @@ -2,10 +2,10 @@ title: "eth_getBalance" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getbalance-description.mdx"; +import Description from "/services/reference/_partials/_eth_getbalance-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getbalance-example.mdx"; +import Example from "/services/reference/_partials/_eth_getbalance-example.mdx" ### Request -import Request from "./_eth_getbalance-request.mdx"; +import Request from "./_eth_getbalance-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getbalance-response.mdx"; +import Response from "/services/reference/_partials/_eth_getbalance-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getblockbyhash.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getblockbyhash.mdx index ec24800e03b..3ea45a032d8 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getblockbyhash.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getblockbyhash.mdx @@ -2,10 +2,10 @@ title: "eth_getBlockByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx" ### Request -import Request from "./_eth_getblockbyhash-request.mdx"; +import Request from "./_eth_getblockbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getblockbynumber.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getblockbynumber.mdx index 69e57ad8b69..da6f586bcb7 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getblockbynumber.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getblockbynumber.mdx @@ -2,10 +2,10 @@ title: "eth_getBlockByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx" ### Request -import Request from "./_eth_getblockbynumber-request.mdx"; +import Request from "./_eth_getblockbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx index b5ce6a06045..7fc5b999d4d 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx @@ -2,10 +2,10 @@ title: "eth_getBlockTransactionCountByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbyhash-request.mdx"; +import Request from "./_eth_getblocktransactioncountbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx index 46ab097450d..6bdaca1fad4 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx @@ -2,10 +2,10 @@ title: "eth_getBlockTransactionCountByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbynumber-request.mdx"; +import Request from "./_eth_getblocktransactioncountbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getcode.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getcode.mdx index d7839917298..9ffd4be0a39 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getcode.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getcode.mdx @@ -2,10 +2,10 @@ title: "eth_getCode" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getcode-description.mdx"; +import Description from "/services/reference/_partials/_eth_getcode-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getcode-example.mdx"; +import Example from "/services/reference/_partials/_eth_getcode-example.mdx" ### Request -import Request from "./_eth_getcode-request.mdx"; +import Request from "./_eth_getcode-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getcode-response.mdx"; +import Response from "/services/reference/_partials/_eth_getcode-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getlogs.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getlogs.mdx index abc57b9747c..462e55f18e1 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getlogs.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getlogs.mdx @@ -2,10 +2,10 @@ title: "eth_getLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getlogs-description.mdx"; +import Description from "/services/reference/_partials/_eth_getlogs-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getlogs-example.mdx"; +import Example from "/services/reference/_partials/_eth_getlogs-example.mdx" ### Request -import Request from "./_eth_getlogs-request.mdx"; +import Request from "./_eth_getlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getlogs-response.mdx"; +import Response from "/services/reference/_partials/_eth_getlogs-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getproof.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getproof.mdx index 72f41508c79..8e29ae8a1db 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getproof.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getproof.mdx @@ -2,10 +2,10 @@ title: "eth_getProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getproof-description.mdx"; +import Description from "/services/reference/_partials/_eth_getproof-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getproof-example.mdx"; +import Example from "/services/reference/_partials/_eth_getproof-example.mdx" ### Request -import Request from "./_eth_getproof-request.mdx"; +import Request from "./_eth_getproof-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getproof-response.mdx"; +import Response from "/services/reference/_partials/_eth_getproof-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getroothash.md b/services/reference/polygon-pos/json-rpc-methods/eth_getroothash.md index ccdf13fa9ea..cb43c4e311b 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getroothash.md +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getroothash.md @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # eth_getRootHash @@ -27,19 +27,19 @@ The maximum difference between the specified block range can be 32767. - ```bash - curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ +```bash +curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ -X POST \ -H "Content-Type: application/json" \ --d '{"jsonrpc":"2.0","method":"eth_getRootHash","params":[1000, 1032], "id":1}' - ``` +-d '{"jsonrpc": "2.0", "method": "eth_getRootHash", "params": [1000, 1032], "id": 1}' +``` - ```bash - wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x {"jsonrpc":"2.0","method":"eth_getRootHash","params":[1000, 1032], "id":1}' - ``` +```bash +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "method": "eth_getRootHash", "params":[1000, 1032], "id": 1}' +``` @@ -47,6 +47,9 @@ The maximum difference between the specified block range can be 32767. ### Response ```json -{"jsonrpc":"2.0","id":1,"result":"67518d9fc6bf9ff886ba1a4e932a0d0a8a1318b3f300518773aaf2210410cf73"} +{ + "jsonrpc": "2.0", + "id": 1, + "result": "67518d9fc6bf9ff886ba1a4e932a0d0a8a1318b3f300518773aaf2210410cf73" +} ``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getstorageat.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getstorageat.mdx index 6a99b6f3ea4..83b7304628e 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getstorageat.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getstorageat.mdx @@ -2,10 +2,10 @@ title: "eth_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx"; +import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx"; +import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx" ### Request -import Request from "./_eth_getstorageat-request.mdx"; +import Request from "./_eth_getstorageat-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx"; +import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx index 4a4035d13e3..3c67412fed9 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx @@ -2,10 +2,10 @@ title: "eth_getTransactionByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx index 12e924925a8..a76b6541f9c 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx @@ -2,10 +2,10 @@ title: "eth_getTransactionByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionbyhash.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionbyhash.mdx index 54611394ba0..2ccc4643541 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionbyhash.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionbyhash.mdx @@ -2,10 +2,10 @@ title: "eth_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx" ### Request -import Request from "./_eth_gettransactionbyhash-request.mdx"; +import Request from "./_eth_gettransactionbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_gettransactioncount.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_gettransactioncount.mdx index 62c556f47dd..920423d11e3 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_gettransactioncount.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_gettransactioncount.mdx @@ -2,10 +2,10 @@ title: "eth_getTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx" ### Request -import Request from "./_eth_gettransactioncount-request.mdx"; +import Request from "./_eth_gettransactioncount-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionreceipt.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionreceipt.mdx index f722354f83e..6b59d7a2b41 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionreceipt.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_gettransactionreceipt.mdx @@ -2,10 +2,10 @@ title: "eth_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx" ### Request -import Request from "./_eth_gettransactionreceipt-request.mdx"; +import Request from "./_eth_gettransactionreceipt-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getunclebyblockhashandindex.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getunclebyblockhashandindex.mdx index 3d2a2851526..87621afb216 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getunclebyblockhashandindex.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getunclebyblockhashandindex.mdx @@ -2,10 +2,10 @@ title: "eth_getUncleByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblockhashandindex-request.mdx"; +import Request from "./_eth_getunclebyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx index 321c22c4ce0..07c458cb7ad 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblocknumberandindex-request.mdx"; +import Request from "./_eth_getunclebyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getunclecountbyblockhash.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getunclecountbyblockhash.mdx index fc758fe9dd0..f09966e73a3 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getunclecountbyblockhash.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getunclecountbyblockhash.mdx @@ -2,10 +2,10 @@ title: "eth_getUncleCountByBlockHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblockhash-request.mdx"; +import Request from "./_eth_getunclecountbyblockhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getunclecountbyblocknumber.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getunclecountbyblocknumber.mdx index e77d0057d2d..8c8553361f8 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getunclecountbyblocknumber.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getunclecountbyblocknumber.mdx @@ -2,10 +2,10 @@ title: "eth_getUncleCountByBlockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblocknumber-request.mdx"; +import Request from "./_eth_getunclecountbyblocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_getwork.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_getwork.mdx index ff9964e4737..31dd81816b7 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_getwork.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_getwork.mdx @@ -2,39 +2,39 @@ title: "eth_getWork" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getwork-description.mdx"; +import Description from "/services/reference/_partials/_eth_getwork-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getwork-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getwork-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getwork-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getwork-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getwork-example.mdx"; +import Example from "/services/reference/_partials/_eth_getwork-example.mdx" ### Request -import Request from "./_eth_getwork-request.mdx"; +import Request from "./_eth_getwork-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getwork-response.mdx"; +import Response from "/services/reference/_partials/_eth_getwork-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_hashrate.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_hashrate.mdx index 8ea8d622b56..21ba47abdef 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_hashrate.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_hashrate.mdx @@ -2,39 +2,39 @@ title: "eth_hashrate" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_hashrate-description.mdx"; +import Description from "/services/reference/_partials/_eth_hashrate-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_hashrate-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_hashrate-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_hashrate-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_hashrate-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_hashrate-example.mdx"; +import Example from "/services/reference/_partials/_eth_hashrate-example.mdx" ### Request -import Request from "./_eth_hashrate-request.mdx"; +import Request from "./_eth_hashrate-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_hashrate-response.mdx"; +import Response from "/services/reference/_partials/_eth_hashrate-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_maxpriorityfeepergas.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_maxpriorityfeepergas.mdx index fa4c94106be..fa1c7b43afb 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_maxpriorityfeepergas.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_maxpriorityfeepergas.mdx @@ -2,10 +2,10 @@ title: "eth_maxPriorityFeePerGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx"; +import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx"; +import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx" ### Request -import Request from "./_eth_maxpriorityfeepergas-request.mdx"; +import Request from "./_eth_maxpriorityfeepergas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx"; +import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_mining.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_mining.mdx index 8b17ae80655..3e755d68509 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_mining.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_mining.mdx @@ -2,39 +2,39 @@ title: "eth_mining" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_mining-description.mdx"; +import Description from "/services/reference/_partials/_eth_mining-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_mining-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_mining-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_mining-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_mining-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_mining-example.mdx"; +import Example from "/services/reference/_partials/_eth_mining-example.mdx" ### Request -import Request from "./_eth_mining-request.mdx"; +import Request from "./_eth_mining-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_mining-response.mdx"; +import Response from "/services/reference/_partials/_eth_mining-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_protocolversion.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_protocolversion.mdx index 84d1864098a..65249812128 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_protocolversion.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_protocolversion.mdx @@ -2,10 +2,10 @@ title: "eth_protocolVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx"; +import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx"; +import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx" ### Request -import Request from "./_eth_protocolversion-request.mdx"; +import Request from "./_eth_protocolversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx"; +import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_sendrawtransaction.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_sendrawtransaction.mdx index e93845081dd..b1fa56808e9 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_sendrawtransaction.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_sendrawtransaction.mdx @@ -2,10 +2,10 @@ title: "eth_sendRawTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx" @@ -20,32 +20,33 @@ If you would like failover protection but don't qualify under your current plan, self-upgrade to the Growth plan or contact a sales representative to upgrade to a Custom plan. ::: + ## Parameters -import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx"; +import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx" ### Request -import Request from "./_eth_sendrawtransaction-request.mdx"; +import Request from "./_eth_sendrawtransaction-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx"; +import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_sendtransaction.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_sendtransaction.mdx index ac6ebfd02dd..5c13a1d5c8f 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_sendtransaction.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_sendtransaction.mdx @@ -2,10 +2,9 @@ title: "eth_sendTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx" - diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_sign.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_sign.mdx index 073b1040681..f8c6a17df92 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_sign.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_sign.mdx @@ -2,9 +2,9 @@ title: "eth_sign" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sign-description.mdx"; +import Description from "/services/reference/_partials/_eth_sign-description.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/eth_syncing.mdx b/services/reference/polygon-pos/json-rpc-methods/eth_syncing.mdx index 1b251d0b368..325d4975286 100644 --- a/services/reference/polygon-pos/json-rpc-methods/eth_syncing.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/eth_syncing.mdx @@ -2,10 +2,10 @@ title: "eth_syncing" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_syncing-description.mdx"; +import Description from "/services/reference/_partials/_eth_syncing-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_syncing-example.mdx"; +import Example from "/services/reference/_partials/_eth_syncing-example.mdx" ### Request -import Request from "./_eth_syncing-request.mdx"; +import Request from "./_eth_syncing-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_syncing-response.mdx"; +import Response from "/services/reference/_partials/_eth_syncing-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/net_listening.mdx b/services/reference/polygon-pos/json-rpc-methods/net_listening.mdx index e7cfe256841..e7b5d831294 100644 --- a/services/reference/polygon-pos/json-rpc-methods/net_listening.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/net_listening.mdx @@ -2,10 +2,10 @@ title: "net_listening" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_listening-description.mdx"; +import Description from "/services/reference/_partials/_net_listening-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_net_listening-parameters.mdx"; +import Params from "/services/reference/_partials/_net_listening-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_listening-returns.mdx"; +import Returns from "/services/reference/_partials/_net_listening-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_listening-example.mdx"; +import Example from "/services/reference/_partials/_net_listening-example.mdx" ### Request -import Request from "./_net_listening-request.mdx"; +import Request from "./_net_listening-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_listening-response.mdx"; +import Response from "/services/reference/_partials/_net_listening-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/net_peercount.mdx b/services/reference/polygon-pos/json-rpc-methods/net_peercount.mdx index 83bc11d3511..3e468ebcbe4 100644 --- a/services/reference/polygon-pos/json-rpc-methods/net_peercount.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/net_peercount.mdx @@ -2,10 +2,10 @@ title: "net_peerCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_peercount-description.mdx"; +import Description from "/services/reference/_partials/_net_peercount-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_net_peercount-parameters.mdx"; +import Params from "/services/reference/_partials/_net_peercount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_peercount-returns.mdx"; +import Returns from "/services/reference/_partials/_net_peercount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_peercount-example.mdx"; +import Example from "/services/reference/_partials/_net_peercount-example.mdx" ### Request -import Request from "./_net_peercount-request.mdx"; +import Request from "./_net_peercount-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_peercount-response.mdx"; +import Response from "/services/reference/_partials/_net_peercount-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/net_version.mdx b/services/reference/polygon-pos/json-rpc-methods/net_version.mdx index 797619b4df4..14c08b796b6 100644 --- a/services/reference/polygon-pos/json-rpc-methods/net_version.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/net_version.mdx @@ -2,10 +2,10 @@ title: "net_version" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_version-description.mdx"; +import Description from "/services/reference/_partials/_net_version-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_net_version-parameters.mdx"; +import Params from "/services/reference/_partials/_net_version-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_version-returns.mdx"; +import Returns from "/services/reference/_partials/_net_version-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_version-example.mdx"; +import Example from "/services/reference/_partials/_net_version-example.mdx" ### Request -import Request from "./_net_version-request.mdx"; +import Request from "./_net_version-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_version-response.mdx"; +import Response from "/services/reference/_partials/_net_version-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx b/services/reference/polygon-pos/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx index b3565a60ada..442bf01adb2 100644 --- a/services/reference/polygon-pos/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/subscription-methods/_eth_subscribe-request.mdx @@ -1,18 +1,18 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash -wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}' ``` ```bash -wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["logs", {"address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd", "topics":["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]}]}' ``` @@ -20,9 +20,8 @@ wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0" ```bash -wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}' +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}' ``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx b/services/reference/polygon-pos/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx index aa3885eef70..e931b155f10 100644 --- a/services/reference/polygon-pos/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/subscription-methods/_eth_unsubscribe-request.mdx @@ -1,14 +1,13 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" ```bash -wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}' +wscat -c wss://polygon-mainnet.infura.io/ws/v3/YOUR-API-KEY -x '{"jsonrpc": "2.0", "id": 1, "method": "eth_unsubscribe", "params": ["0x9cef478923ff08bf67fde6c64013158d"]}' ``` - diff --git a/services/reference/polygon-pos/json-rpc-methods/subscription-methods/eth_subscribe.mdx b/services/reference/polygon-pos/json-rpc-methods/subscription-methods/eth_subscribe.mdx index 06553a5124c..97cda659788 100644 --- a/services/reference/polygon-pos/json-rpc-methods/subscription-methods/eth_subscribe.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/subscription-methods/eth_subscribe.mdx @@ -2,10 +2,10 @@ title: "eth_subscribe" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/subscription-methods/_eth_subscribe-description.mdx"; +import Description from "/services/reference/_partials/subscription-methods/_eth_subscribe-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters.mdx"; +import Params from "/services/reference/_partials/subscription-methods/_eth_subscribe-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx"; +import Returns from "/services/reference/_partials/subscription-methods/_eth_subscribe-returns.mdx" ## Example -import Example from "/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx"; +import Example from "/services/reference/_partials/subscription-methods/_eth_subscribe-example.mdx" ### Request -import Request from "./_eth_subscribe-request.mdx"; +import Request from "./_eth_subscribe-request.mdx" ### Response -import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx"; +import Response from "/services/reference/_partials/subscription-methods/_eth_subscribe-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx b/services/reference/polygon-pos/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx index bca94250511..708989cae29 100644 --- a/services/reference/polygon-pos/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/subscription-methods/eth_unsubscribe.mdx @@ -2,10 +2,10 @@ title: "eth_unsubscribe" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-description.mdx"; +import Description from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-description.mdx" @@ -23,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx"; +import Params from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx"; +import Returns from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-returns.mdx" ## Example -import Example from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx"; +import Example from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-example.mdx" ### Request -import Request from "./_eth_unsubscribe-request.mdx"; +import Request from "./_eth_unsubscribe-request.mdx" ### Response -import Response from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx"; +import Response from "/services/reference/_partials/subscription-methods/_eth_unsubscribe-response.mdx" diff --git a/services/reference/polygon-pos/json-rpc-methods/subscription-methods/index.md b/services/reference/polygon-pos/json-rpc-methods/subscription-methods/index.md index 8f4aa79050e..2bbfccdadf5 100644 --- a/services/reference/polygon-pos/json-rpc-methods/subscription-methods/index.md +++ b/services/reference/polygon-pos/json-rpc-methods/subscription-methods/index.md @@ -2,8 +2,8 @@ title: "Subscription methods" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Subscription methods diff --git a/services/reference/polygon-pos/json-rpc-methods/web3_clientversion.mdx b/services/reference/polygon-pos/json-rpc-methods/web3_clientversion.mdx index 810ee857ee2..559db78ccf4 100644 --- a/services/reference/polygon-pos/json-rpc-methods/web3_clientversion.mdx +++ b/services/reference/polygon-pos/json-rpc-methods/web3_clientversion.mdx @@ -1,10 +1,11 @@ --- title: "web3_clientVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -import Description from "/services/reference/_partials/_web3_clientversion-description.mdx"; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" + +import Description from "/services/reference/_partials/_web3_clientversion-description.mdx" @@ -22,30 +23,30 @@ self-upgrade to the Growth plan or contact a sales representative to upgrade to ## Parameters -import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx"; +import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx"; +import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_web3_clientversion-example.mdx"; +import Example from "/services/reference/_partials/_web3_clientversion-example.mdx" ### Request -import Request from "./_web3_clientversion-request.mdx"; +import Request from "./_web3_clientversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_web3_clientversion-response.mdx"; +import Response from "/services/reference/_partials/_web3_clientversion-response.mdx" diff --git a/services/reference/polygon-pos/quickstart.md b/services/reference/polygon-pos/quickstart.md index a5641fbea60..f0a3970debc 100644 --- a/services/reference/polygon-pos/quickstart.md +++ b/services/reference/polygon-pos/quickstart.md @@ -25,163 +25,165 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://polygon-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ### Node (JavaScript) -In these examples,you'll use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) as your package manager. +In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) as your package manager. #### Node Fetch -1. In your project folder, install the Node Fetch package using npm: +1. In your project folder, install the `node-fetch` package using npm:: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://polygon-mainnet.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://polygon-mainnet.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios -1. In your project folder, install the Axios package using npm: +1. In your project folder, install the `axios` package using npm: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require('axios'); - - axios.post('https://polygon-mainnet.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'eth_blockNumber', - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios") + + axios + .post("https://polygon-mainnet.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }) + .then((response) => { + console.log(response.data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Ethers 1. In your project folder, install the `ethers` package using npm: - ```bash - npm install ethers - `````` + ```bash + npm install ethers + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.js" - const ethers = require('ethers'); + ```javascript title="index.js" + const ethers = require("ethers") - const provider = new ethers.providers.JsonRpcProvider('https://polygon-mainnet.infura.io/v3/YOUR-API-KEY'); + const provider = new ethers.providers.JsonRpcProvider( + "https://polygon-mainnet.infura.io/v3/YOUR-API-KEY" + ) - provider.getBlockNumber() - .then(blockNumber => { - console.log(blockNumber); - }) - .catch(error => { - console.error(error); - }); - ``` + provider + .getBlockNumber() + .then((blockNumber) => { + console.log(blockNumber) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` -1. Create your JavaScript file and copy the following code: +1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = 'https://polygon-mainnet.infura.io/v3/YOUR-API-KEY' + url = "https://polygon-mainnet.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + } - headers = {'content-type': 'application/json'} + headers = {"content-type": "application/json"} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` + ```bash + python index.py + ``` ## Next steps @@ -189,7 +191,7 @@ Now that you have successfully made a call to the Polygon network, you can explo by Infura. Here are some suggestions: - **Explore other Polygon APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Arbitrum, Ethereum, Optimism, IPFS and more. @@ -197,4 +199,3 @@ by Infura. Here are some suggestions: Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/reference/starknet/index.md b/services/reference/starknet/index.md index 303b4b512e4..ee13e200c57 100644 --- a/services/reference/starknet/index.md +++ b/services/reference/starknet/index.md @@ -35,4 +35,4 @@ See the [StarkNet documentation](https://docs.starknet.io/documentation/) to fin description: "Learn how to create an API key and secure and share it with your team." } ]} -/> \ No newline at end of file +/> diff --git a/services/reference/starknet/json-rpc-methods/starknet_adddeclaretransaction.mdx b/services/reference/starknet/json-rpc-methods/starknet_adddeclaretransaction.mdx index 2c9302b974e..213d4555812 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_adddeclaretransaction.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_adddeclaretransaction.mdx @@ -2,8 +2,8 @@ title: "starknet_addDeclareTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Submits a new class declaration transaction. diff --git a/services/reference/starknet/json-rpc-methods/starknet_adddeployaccounttransaction.mdx b/services/reference/starknet/json-rpc-methods/starknet_adddeployaccounttransaction.mdx index b7e43a81870..8827ff2a94e 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_adddeployaccounttransaction.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_adddeployaccounttransaction.mdx @@ -2,8 +2,8 @@ title: "starknet_addDeployAccountTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Submits a new deploy account transaction. diff --git a/services/reference/starknet/json-rpc-methods/starknet_addinvoketransaction.mdx b/services/reference/starknet/json-rpc-methods/starknet_addinvoketransaction.mdx index e1ba6679190..9e0f2df755c 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_addinvoketransaction.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_addinvoketransaction.mdx @@ -2,8 +2,8 @@ title: "starknet_addInvokeTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Submits a new invoke transaction. diff --git a/services/reference/starknet/json-rpc-methods/starknet_blockhashandnumber.mdx b/services/reference/starknet/json-rpc-methods/starknet_blockhashandnumber.mdx index 2e2d0bf5f9e..39b6d08bce3 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_blockhashandnumber.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_blockhashandnumber.mdx @@ -2,8 +2,8 @@ title: "starknet_blockHashAndNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the block hash and number of the most recent accepted block. diff --git a/services/reference/starknet/json-rpc-methods/starknet_blocknumber.mdx b/services/reference/starknet/json-rpc-methods/starknet_blocknumber.mdx index e36ed840f57..9969bc0db8f 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_blocknumber.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_blocknumber.mdx @@ -2,8 +2,8 @@ title: "starknet_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the block number of the most recent accepted block. diff --git a/services/reference/starknet/json-rpc-methods/starknet_call.mdx b/services/reference/starknet/json-rpc-methods/starknet_call.mdx index bf4012c7015..9813c718c52 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_call.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_call.mdx @@ -2,8 +2,8 @@ title: "starknet_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Calls the specified contract function at the specified block, and returns the value of the function, without creating a StarkNet transaction. @@ -12,9 +12,9 @@ This method does not change the network state. ## Parameters - `request`: [*Required*] The function call object containing: - - `contract_address`: (string) [*Required*] Address the transaction is sent from. - - `entry_point_selector`: (string) [*Required*] Smart contract entry point selector. - - `calldata`: (array of strings)[*Required*] The parameters passed to the function. + - `contract_address`: (string) [*Required*] Address the transaction is sent from. + - `entry_point_selector`: (string) [*Required*] Smart contract entry point selector. + - `calldata`: (array of strings)[*Required*] The parameters passed to the function. - `block_id`: [*Required*] The block parameter object containing one of the following: - `block_hash`: (string) Block hash. - `block_number`: (integer) Decimal block number. diff --git a/services/reference/starknet/json-rpc-methods/starknet_chainid.mdx b/services/reference/starknet/json-rpc-methods/starknet_chainid.mdx index 0916bc8cc1c..59d50f3372f 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_chainid.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_chainid.mdx @@ -2,8 +2,8 @@ title: "starknet_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the currently connected StarkNet chain ID. diff --git a/services/reference/starknet/json-rpc-methods/starknet_estimatefee.mdx b/services/reference/starknet/json-rpc-methods/starknet_estimatefee.mdx index cb8fd075130..a86000e8ec9 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_estimatefee.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_estimatefee.mdx @@ -2,8 +2,8 @@ title: "starknet_estimateFee" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns an estimate of the fee required for the network to process the specified transactions, at the specified block. @@ -89,11 +89,13 @@ curl https://starknet-mainnet.infura.io/v3/YOUR-API-KEY \ ```json { "jsonrpc": "2.0", - "result": [{ - "gas_consumed": "0x41de", - "gas_price": "0x67edb4f57", - "overall_fee": "0x1abd7b153e472" - }], + "result": [ + { + "gas_consumed": "0x41de", + "gas_price": "0x67edb4f57", + "overall_fee": "0x1abd7b153e472" + } + ], "id": 0 } ``` diff --git a/services/reference/starknet/json-rpc-methods/starknet_estimatemessagefee.mdx b/services/reference/starknet/json-rpc-methods/starknet_estimatemessagefee.mdx index 5de4cee55c4..7a4b821a014 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_estimatemessagefee.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_estimatemessagefee.mdx @@ -2,8 +2,8 @@ title: "starknet_estimateMessageFee" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns an estimate of the L2 fee required for the network to process the specified L1 message, at the specified block. @@ -13,7 +13,7 @@ the specified block. - `message`: [*Required*] The message to estimate, which includes the following fields: - `from_address`: (string) [*Required*] The address of the L1 contract sending the message. - `to_address`: (string) [*Required*] The L2 address the message is sent to. - - `entry_point_selector`: (string) [*Required*] The entry point selector. + - `entry_point_selector`: (string) [*Required*] The entry point selector. - `payload`: (array) [*Required*] The payload of the message. - `block_id`: [*Required*] The block parameter object containing one of the following: - `block_hash`: (string) Block hash. @@ -28,7 +28,6 @@ A fee estimate object containing: - `gas_price`: The gas price (in gwei) that was used in the cost estimation. - `overall_fee`: The estimated fee for the transaction (in gwei), product of `gas_consumed` and `gas_price`. - ## Example Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/starknet/json-rpc-methods/starknet_getblocktransactioncount.mdx b/services/reference/starknet/json-rpc-methods/starknet_getblocktransactioncount.mdx index 09af3eee366..e884247cd24 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_getblocktransactioncount.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_getblocktransactioncount.mdx @@ -2,17 +2,18 @@ title: "starknet_getBlockTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the number of transactions in the specified block. ## Parameters `block_id`: [*Required*] The block parameter object containing one of the following: - - `block_hash`: (string) Block hash. - - `block_number`: (integer) Decimal block number. - - One of the string tags `latest` or `pending`. + +- `block_hash`: (string) Block hash. +- `block_number`: (integer) Decimal block number. +- One of the string tags `latest` or `pending`. ## Returns diff --git a/services/reference/starknet/json-rpc-methods/starknet_getblockwithtxhashes.mdx b/services/reference/starknet/json-rpc-methods/starknet_getblockwithtxhashes.mdx index d1a1d5b6e83..ad8acc9c581 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_getblockwithtxhashes.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_getblockwithtxhashes.mdx @@ -2,17 +2,18 @@ title: "starknet_getBlockWithTxHashes" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns block information of the specified block, including a list of transaction hashes. ## Parameters `block_id`: [*Required*] The block parameter object containing one of the following: - - `block_hash`: (string) Block hash. - - `block_number`: (integer) Decimal block number. - - One of the string tags `latest` or `pending`. + +- `block_hash`: (string) Block hash. +- `block_number`: (integer) Decimal block number. +- One of the string tags `latest` or `pending`. ## Returns @@ -82,7 +83,158 @@ curl https://starknet-mainnet.infura.io/v3/YOUR-API-KEY \ "price_in_wei": "0xab3d3c644" }, "starknet_version": "0.12.2", - "transactions": ["0x6a19b22f4fe4018d4d60ff844770a5459534d0a69f850f3c9cdcf70a132df94", "0x5fb5b63f0226ef426c81168d0235269398b63aa145ca6a3c47294caa691cfdc", "0x7af3c8de416f943660ac19ff1b12f552897eabc8316807320cddbeadf9bc01e", "0x2de627287f870f91dfd4e929df03980c994f6ffaa2d1cbf8d0e942fdf0c84d4", "0x7d1439901f2af25627470e18348787cbee190ae08ea3fac2be9fc3b6357a948", "0x119986a68f01623d2193ad1e26338b3dcc1f9a8add4503893e30bde7d6b80d1", "0x19e2e79abfb5495c4d8e7683ea19c918b7c8c2977517de4d232abfc15221d8f", "0x4e72fd133424d979d5ecca4d36481892bb549ddef779f1bc6340f001a682fe3", "0x7a7aa878974390c5546550c45fdcd66bd353063c22cff7f6b98211bb415043f", "0x1d1220e61366b36701332b3b74587443c3d08a3418c2c1fed3db9548b8940ec", "0x5458747fd956625cd857a4d07f51315b3781f9163b5b7987df59ce821a7d6f7", "0x402222e40e37eb6579b2785b53c51ce18e5e45a858f7ba1839ef875aa0f6c7f", "0x3539f55ea7282a543403278bd365f87c5622aa4d497ee56af6cb61ae8ed1d15", "0x68e8e3015ec6377176a944992fa8e28aab4f68dab07c4dde87bc8167c08ebf6", "0x47b3ff195d403d5197a9114055274f12181c56b3095aa6dfa1fa1e0e2ec27f6", "0x465ef3fd70dcc90adee9ae232935a83dd5c41e67c6b6fab6d5dbfe84fbd75c2", "0x305de8770bbbee4a09e22621b91d1f3ee9a81a07646a09fa9dfbbea296c152f", "0x4f8811a176b673fec7b56621dab0bff369f4463588aaf69cb6570956e10c25a", "0x3d77c910504507c826768091fe743533fdc9a8707e3043303a65f626f540ab0", "0x6d27aac48f79fc959a09f552d3327d30ea51bd0d1fb0dbb1e7e79eb0ae99077", "0x1972a1cb17120d32cd598e516672b31350163408fbb16cafe80389a83047755", "0x4907cf31e42fc59bb8e2ea6113b0ef8c3c70b092aa5ef72e64cd9c96ad3cb3e", "0x12dfaa3fc3a275cf2160f1b98403ddcc18a3e05a2c5cd9caf77009a0fa09992", "0x91354783b608a433cf98d19edb6639db9ba411cbe624a9d5aeb76345498ccc", "0x74e6323b9a458566bf2939fa2eab72a06ae9c61b173ef67a9331d0bbd746e", "0x1b061e37822c7233045c6750e4a5155730d24b5c530c50bb1e4fd682b5304c9", "0x226fed48f1add6d3ad5a85be4e2c2032b0218a6428e6a9c131e39f7cd46f76f", "0x55d830026b39f839cc7c309c3a70a01ac8a72224571da9ad17cebb2fc885695", "0x724cc4e4d9e24143abb7307208123577c7e36c37b977e4b56289b89bed7179f", "0xe7055b5f28f258df552694dcefea9dad076f1dedb053f4fdd7a1fc616c88f0", "0x5a2d0b0159078f4e05b440990c5035c530fe462e01bea690aad40fa88055da7", "0xe95220158ac886ef53014504d0abe85285c29c9619bfe120e123116e12db67", "0x41d2032e3cc6e44a4148b489781156e86fdf060988fc05567150a964a0cf2a0", "0x23685839dac61dd10bc1ce09653549adfd4f5e271fa003446742868e9a05d17", "0x1879fb020ecb591e824316103107c912f1ea9b7ebe3826db8946ac899aae067", "0x79a40be06ba57890040b900cc77693082cead101de7047ba5ca75fb662f583c", "0x53f11d85ee1e250e0047b3d9a7e2d64e410165ef6279662686a68f32a2b7c9d", "0x55ba4f854a49fe915e97a120dca973d3e86b6cc846497487fd075ee0ea66b0", "0x913c67b1e4001a3b40443ea3ad736b56c5afb68b9304b21f936dfa4ca2bc74", "0x1fd7dc1d327547b100e28f55a74ec40a96c5e645afc456ee8616614480989ff", "0x5ad1db62e4824188c06568eabd1f6f60673d3c24e8335437d3a90ddce208e29", "0x34bf36c31b3e44b4c2e76ed4243c8d83f66681f8d97b48a958c54026a0bba9d", "0x3917638733704590bb38dd4e264dd50fa97861d4b3289762f492c39237a1c67", "0x19466a532ba216c84ea9f56dd4f7a5cb37d491612fc8197068e3ae7eb3e4d24", "0x3aec8bfe1601ed9e84cd374a3d7b4522d368dd81d59f9f7eed24a0977e16a63", "0x15cc76efede4779e0626cc9455b870dbd3c39023a6a3d5b343953eb1da7423", "0x145f16e44be68a0a56e1c5fed55db411c1caac022a2daeb91323d845059c690", "0x973674f1b71a6329b354f5533c8e0a9a1a59cff4fb8714bb8314418af22fe1", "0x39fe0e652cc0cddd7936924f64641170aeca4fe690058c02f2df54f41b38962", "0x3a32d48539508c865cbca3bb6648825c9641425fc9554be2dea6376db80e159", "0x53f11e55a96e3a809667d5758d2604baf0dca32e2a9baa0aefdce5fda392020", "0x39b03ae51f182195fa9ee4aa361afbbdc7ada31f467d8c4b793e90add2b60c7", "0x6cdd403ebc3acb2218523f3311024a31731b16d9985b875c7589cce6bc1595d", "0x25755bf3e49a8c911c431f7ae8d16ac20a6275bb95fabac8a30212a560aeca3", "0x3b77efc5725186b67dcbb939b513b8471a7c3a1af84e67d0dffefd1b6f0fc37", "0xaed67850897d736381002a877474ff5a30d0e1e6b72dc1ff79dc42d4aa358a", "0x61e1c3b2735d81133236f81fe2b9855966a30381ede8c6711bfb22b184e0c38", "0x2a91aebdf9346ce984426fb5b72fdb58636e14c903cdd9670a656d60c86e08d", "0x5dd6a1941c3b4ae2442b24db1527955459850a48920369306b6e5c9af431a27", "0x5ecf3fde654402b72cccca619051b73150149a992ffad2f8614814267ba81d1", "0x728559d1ae47d08cb76a97e613cc94aa01380387ef369539254ccdb92ae0379", "0x6c2acdafb5dad6d64098c65b1cd33c74c0fe77d28f6f551245694e3edfabb1", "0x4088dceb1e51274a41259d8abc2336999f3305a0525e5311fc316e01fe83d45", "0x21b5c0db57fb61d977aec75bfb9662e63116ed09854744efc86ad48aae58463", "0x12f22e9091c698bca8fe503aea557e31418a884db2f2ed18bc8b655d391c4af", "0x4b2a530e1a331b327ded25e9f5e86d101743f0dfba4b5a1a25061557ab2b1ce", "0x4b60ac7980f64a3a723cc10662f3bd32673addbaca86f12de2ddf12747d215f", "0xf4c29ec66f689665eb37b5acfbfcaecab9a08a6ea9ea92a4475ea302c0d75d", "0x3d2df4c4ada5c94949e804691890136d44f5fe462372b45d531a2ba694a5073", "0x30cbb4d3f5d4d67a9c308576484e7c5232285ea3260b6eed87f64ff40c0b059", "0x7d724bfc8e81f2d7a6e5e65addfd993acf857780a1a618651a3e170b0b23fd9", "0x5d5c1c82c1fc35c9405689e6fa7a2c020395af52ce412dce5bf49a212477339", "0x617af6328e447002109f1c12d5280493ca1a17eb2fad93048113306d949f2f9", "0x7faecea29d75f5cc1e42216ed2edc07f6b54c600e892d52ad5233a5957a028e", "0x67b9151ce5334ade1fcdeca59c0e7dc5c6062526b8a8f3ccfa583184e2774d6", "0x6a0b4cf4cd5fbcce79ea433f8d14127124843a9c84f8dd8ede0879c9e0a8b4a", "0x50a12f79fac66fc0539433f1cb7aefe3705d944dad28ed9dd364f3596fa3ceb", "0x4fe426dcae2a30816764c1e247ce1bc1d7842787421cceb1967de5a47f901c7", "0x2dfac50eaed7ccf19bd09e1a10db43286f5a789ce374a58a56ea77de04cb14e", "0x1b2b41d01cef36a82330eddb75eae0f6f3e94a4a799b4400d17c86e6ada4657", "0x6873a856f503f86e4e4bb187c8142966fa030030005b3967371e98836af045f", "0x59c158d8673ca6f77421cc85e54fa097cda673bc7034ab4f28880e6a645cd25", "0x61ca47d997b1d73b774200a1ac356a2890ad0a6d0f93e9751d71d0e0f2fba5", "0x5228f835fb10cc5db551c4c65364ddda6bd1058cfe803f87044d9704caf903a", "0x5232c402534064fae933db6cc63c50be76a503e1a33dbe32d755f245735cec2", "0x42d2c06b5a3db9dca6a615e1fe81d2b11b21ee4b4c891c10b70cc63b08c60f8", "0x9c6a72c3f49032519043915215f92dd5c1914e6ab548c3e3619f70b472a9d1", "0x50af21e19b12e44bb6cbf9dde901593e16d4708403b096984f1423dd1f07594", "0x3778c11b029612720e60161d30f47a64a2eebd6b6c714495251ca3231f33873", "0x48ea633caf5a1eae263216d7e3c33ec7b4c1b10627bd1c37e49789a80112e03", "0x6298260739f887174e32297e4c9efa0ec6fe0c81a952163c1797016d5d44f7a", "0x7aba11ae89d8d79010c4e092161a8ab095e9b396ce6596a992a381b78632f57", "0x431451f7583fcdee2831a12d80d4d57c253a714ae6dd1ec2a53735d4c345f3a", "0x6cae53f22dbd03d535e430eb0ac90b7b7f541c71306c8413557b6c2d0532b9", "0x131216a8d9372e571dbe9baa12814faa52740c02ffc1f7653e69d2b86ff7ffb", "0x76b970d837bc5be03aef97c6385256482e2efde56fed1d7771ebd7760781c4", "0x65beda587edf5f45734fe239b1fa62e2fb4c8389c8fd0e3c2118886e85d4c2b", "0x647834320613e4afe139c83be5dd7ddffd3b284bfdade91238fddc31b874ac4", "0x5ab5d89897e9ed61bb13a80ce8ae470e1c0d9094abd3aa65bd2ee4f40db721c", "0xf5b414d49b7035bf0ebf978e9f6853bbcfa0c39a5faee86a66f7b66f4d7da0", "0xcca2ccb142a3e1bd5d2d2011e495f17a53924de5048518bd3195afc29ea1f2", "0x7168aa7f9412a3b22ce55a10b3514b2a403b382c76d55b81c01c58a938ce507", "0x4c347cf2a75ec1791c9955367867b691cff13c32beb0963940959baca37775b", "0x6de3fb7574121333466be710f13e6d317db9a5564d44fa05eff6cbe870ef1bc", "0x7db10ec88b84dcb96d10d2c8c047fdc9e0fabfab55fb2d218bff4103d75fc5c", "0x4a9bbf937d5fb24e3bf940f1718cf108340281054380f56a751c9cb23670e25", "0x78cc5dd5518d0018752a4b167c2612224e412e0a2e430401aac01c736cd035b", "0x2ef83d51bf4a8c7bfae2899e0cc8b31fdb989f715cc1db2be92e5bfc52c209f", "0x221d9ff51aba26ba01176fe3553666384f48bf29d125c20a34cf82704de7cec", "0x3a76adc8d114069ad5c6348e16a288b291fd212fc5d3eed166148690b0bcf80", "0x7217ca04871b7b39c0e390ec99127f0edca6eb8f992b89a4ec1b35bd78035de", "0x25a28b54cee6efe4b6b44f25861d2b1e6e0f18b696dd0998663ed034f4fea9", "0x5708e0fdac5d433fea00163d0d75d0d0f055b392b5055731f76ef4ec1cd8abd", "0x28ffa60afc8c5a045d455b3a5502d6cc83e95e0950f0cffe426a66f81a7c6cb", "0x78292dfeb6cc498e7fba715c6cd7b1a1f5212a5601d4e86a200e87606b791ba", "0x6bd46d7f3bdb4c517aaab3d3967d1a2c6b8e96b0204fb2165dda87ec3360cf", "0x785e61d8819f322a0f2df63a1c09248af35436f43a673dbd00360216ab1c9c9", "0x30b0e27832e38146232aa482bf3a7abe22c5310b141b81fb06b53956e018218", "0x5514a31b2f70b774ffa3bac4b36ab6fc41355fe2dca6c38400c3289adc3bf1a", "0x3a426adb3769ccfa2b55cfe4bacf5add83fca4853089d4b9cc051e1be257cec", "0x74172e5f3c485fa76442353377477e095333b1f5a761e4188fb8d02c6c0d1b2", "0x3a485ff5eae627cbd862c4609dc3fafb028a9f9bb0bc9911fac9d76ff2de9c0", "0x3b66291ef9b42b8ee29b8370071a7a6ea19bf315535df4db730baab370af4fb", "0x24b9c0f27934f22b9c7d8bb1b28b7b640403d8beae241342912865774988a0", "0x351a586cad8bde5ffbde99b7f9ea1d4865439357822608a38b0d8b1479e6358", "0x1a7bcf9e94fe4cd9c85de1ba0e1b9941c42399054d39c4f519f9fba8dc223de", "0x21159bcfb54ef6bb52ad93fa631aa36c2424a9747e434818c4bb4722582a713", "0x188b884c9e507a007c639c4547984b90c1cecc0cf2221e156b1b075b3fb7655", "0x56d15b44d0640869cd9be489497264e00dd73df5455b003078ff56a98aba149", "0x2eddfaa325c18d8845ff721b75808216d6ef391160d67c609bc30f59393bf9", "0x74cb241a323c476dc2287c1754aa75b6156f21e9f93f6df364c97b977683462", "0x13fed22d5c67af47f9e84e072bf782461f6f682d14235803fd2dc178c1e383e", "0x439e88605bb0a6e172c3d599257f38140018ea81910a6480ff1b63638ebd268", "0x1e795281ec4cc4d3e76902a8e713b8355a52fb9c46883169e3dc0e509e374f6", "0x1ac511e20f9ab384e7c1cb7706c284d06ee1a05d8131ad7cc20341e9c344e32", "0x2c96bd9bdcd0173d8dd08cb735bb234ba082acab6b956255b627d7e944f9817", "0xddfd7272311b588c92adf91d75d7352177a55728104b7c745b716e3c2f54b2", "0x4998af8695aea3e9301f1db32f89101d6725a2b04442b600bf2b71fd9b80449", "0x4d8f684a8c58df7ef4d1fdb7643d5b34d488363e246d9bf575b7323f0c372f6", "0x78625b74ad44bb049b0344eb16be7abef9de9aa5fd212ddfee196e8505bba0", "0x1cfe4e308ce443529962e17d877994ca647c42cc53ff303e02085c70f19f3a5", "0x7657f6571b83fcdd524d672e4ba178432a60eadbf9683399557a54c3526b1d3", "0x34da350253263c647dbd153c9eb6186c06f2bfd7b32b8c70786774b14a9157a", "0x23a0ec2f7faecb95595d19ed28dd9c320835d1aaee7b1d52c1b93d56b92e7cd", "0x44b8afa4dbfd64240f380390653a59e12f974aee68b52a20cacd3681d143304", "0x5eb267c6da61f84812fa2776ddcc7f19b920fd9e50cd3096c88cb053acb27f9", "0x6011b791c3c4e81f3e897f216e524680ebd11686201d9554e2cee2aee0e9ecc", "0x2a0e8e734bbbf135c7eb094b4ac9566e4b925c8cc155171744ee6c7e175a00f", "0x1c429d2c8fcf7687063cfdb951afa3da8cb0ffae8fd560058c1813a9e1fbcb8", "0x121aaba2894a63cce81acabb559eb2c114f4859dc5803e0b91349ec398d2eb0"] + "transactions": [ + "0x6a19b22f4fe4018d4d60ff844770a5459534d0a69f850f3c9cdcf70a132df94", + "0x5fb5b63f0226ef426c81168d0235269398b63aa145ca6a3c47294caa691cfdc", + "0x7af3c8de416f943660ac19ff1b12f552897eabc8316807320cddbeadf9bc01e", + "0x2de627287f870f91dfd4e929df03980c994f6ffaa2d1cbf8d0e942fdf0c84d4", + "0x7d1439901f2af25627470e18348787cbee190ae08ea3fac2be9fc3b6357a948", + "0x119986a68f01623d2193ad1e26338b3dcc1f9a8add4503893e30bde7d6b80d1", + "0x19e2e79abfb5495c4d8e7683ea19c918b7c8c2977517de4d232abfc15221d8f", + "0x4e72fd133424d979d5ecca4d36481892bb549ddef779f1bc6340f001a682fe3", + "0x7a7aa878974390c5546550c45fdcd66bd353063c22cff7f6b98211bb415043f", + "0x1d1220e61366b36701332b3b74587443c3d08a3418c2c1fed3db9548b8940ec", + "0x5458747fd956625cd857a4d07f51315b3781f9163b5b7987df59ce821a7d6f7", + "0x402222e40e37eb6579b2785b53c51ce18e5e45a858f7ba1839ef875aa0f6c7f", + "0x3539f55ea7282a543403278bd365f87c5622aa4d497ee56af6cb61ae8ed1d15", + "0x68e8e3015ec6377176a944992fa8e28aab4f68dab07c4dde87bc8167c08ebf6", + "0x47b3ff195d403d5197a9114055274f12181c56b3095aa6dfa1fa1e0e2ec27f6", + "0x465ef3fd70dcc90adee9ae232935a83dd5c41e67c6b6fab6d5dbfe84fbd75c2", + "0x305de8770bbbee4a09e22621b91d1f3ee9a81a07646a09fa9dfbbea296c152f", + "0x4f8811a176b673fec7b56621dab0bff369f4463588aaf69cb6570956e10c25a", + "0x3d77c910504507c826768091fe743533fdc9a8707e3043303a65f626f540ab0", + "0x6d27aac48f79fc959a09f552d3327d30ea51bd0d1fb0dbb1e7e79eb0ae99077", + "0x1972a1cb17120d32cd598e516672b31350163408fbb16cafe80389a83047755", + "0x4907cf31e42fc59bb8e2ea6113b0ef8c3c70b092aa5ef72e64cd9c96ad3cb3e", + "0x12dfaa3fc3a275cf2160f1b98403ddcc18a3e05a2c5cd9caf77009a0fa09992", + "0x91354783b608a433cf98d19edb6639db9ba411cbe624a9d5aeb76345498ccc", + "0x74e6323b9a458566bf2939fa2eab72a06ae9c61b173ef67a9331d0bbd746e", + "0x1b061e37822c7233045c6750e4a5155730d24b5c530c50bb1e4fd682b5304c9", + "0x226fed48f1add6d3ad5a85be4e2c2032b0218a6428e6a9c131e39f7cd46f76f", + "0x55d830026b39f839cc7c309c3a70a01ac8a72224571da9ad17cebb2fc885695", + "0x724cc4e4d9e24143abb7307208123577c7e36c37b977e4b56289b89bed7179f", + "0xe7055b5f28f258df552694dcefea9dad076f1dedb053f4fdd7a1fc616c88f0", + "0x5a2d0b0159078f4e05b440990c5035c530fe462e01bea690aad40fa88055da7", + "0xe95220158ac886ef53014504d0abe85285c29c9619bfe120e123116e12db67", + "0x41d2032e3cc6e44a4148b489781156e86fdf060988fc05567150a964a0cf2a0", + "0x23685839dac61dd10bc1ce09653549adfd4f5e271fa003446742868e9a05d17", + "0x1879fb020ecb591e824316103107c912f1ea9b7ebe3826db8946ac899aae067", + "0x79a40be06ba57890040b900cc77693082cead101de7047ba5ca75fb662f583c", + "0x53f11d85ee1e250e0047b3d9a7e2d64e410165ef6279662686a68f32a2b7c9d", + "0x55ba4f854a49fe915e97a120dca973d3e86b6cc846497487fd075ee0ea66b0", + "0x913c67b1e4001a3b40443ea3ad736b56c5afb68b9304b21f936dfa4ca2bc74", + "0x1fd7dc1d327547b100e28f55a74ec40a96c5e645afc456ee8616614480989ff", + "0x5ad1db62e4824188c06568eabd1f6f60673d3c24e8335437d3a90ddce208e29", + "0x34bf36c31b3e44b4c2e76ed4243c8d83f66681f8d97b48a958c54026a0bba9d", + "0x3917638733704590bb38dd4e264dd50fa97861d4b3289762f492c39237a1c67", + "0x19466a532ba216c84ea9f56dd4f7a5cb37d491612fc8197068e3ae7eb3e4d24", + "0x3aec8bfe1601ed9e84cd374a3d7b4522d368dd81d59f9f7eed24a0977e16a63", + "0x15cc76efede4779e0626cc9455b870dbd3c39023a6a3d5b343953eb1da7423", + "0x145f16e44be68a0a56e1c5fed55db411c1caac022a2daeb91323d845059c690", + "0x973674f1b71a6329b354f5533c8e0a9a1a59cff4fb8714bb8314418af22fe1", + "0x39fe0e652cc0cddd7936924f64641170aeca4fe690058c02f2df54f41b38962", + "0x3a32d48539508c865cbca3bb6648825c9641425fc9554be2dea6376db80e159", + "0x53f11e55a96e3a809667d5758d2604baf0dca32e2a9baa0aefdce5fda392020", + "0x39b03ae51f182195fa9ee4aa361afbbdc7ada31f467d8c4b793e90add2b60c7", + "0x6cdd403ebc3acb2218523f3311024a31731b16d9985b875c7589cce6bc1595d", + "0x25755bf3e49a8c911c431f7ae8d16ac20a6275bb95fabac8a30212a560aeca3", + "0x3b77efc5725186b67dcbb939b513b8471a7c3a1af84e67d0dffefd1b6f0fc37", + "0xaed67850897d736381002a877474ff5a30d0e1e6b72dc1ff79dc42d4aa358a", + "0x61e1c3b2735d81133236f81fe2b9855966a30381ede8c6711bfb22b184e0c38", + "0x2a91aebdf9346ce984426fb5b72fdb58636e14c903cdd9670a656d60c86e08d", + "0x5dd6a1941c3b4ae2442b24db1527955459850a48920369306b6e5c9af431a27", + "0x5ecf3fde654402b72cccca619051b73150149a992ffad2f8614814267ba81d1", + "0x728559d1ae47d08cb76a97e613cc94aa01380387ef369539254ccdb92ae0379", + "0x6c2acdafb5dad6d64098c65b1cd33c74c0fe77d28f6f551245694e3edfabb1", + "0x4088dceb1e51274a41259d8abc2336999f3305a0525e5311fc316e01fe83d45", + "0x21b5c0db57fb61d977aec75bfb9662e63116ed09854744efc86ad48aae58463", + "0x12f22e9091c698bca8fe503aea557e31418a884db2f2ed18bc8b655d391c4af", + "0x4b2a530e1a331b327ded25e9f5e86d101743f0dfba4b5a1a25061557ab2b1ce", + "0x4b60ac7980f64a3a723cc10662f3bd32673addbaca86f12de2ddf12747d215f", + "0xf4c29ec66f689665eb37b5acfbfcaecab9a08a6ea9ea92a4475ea302c0d75d", + "0x3d2df4c4ada5c94949e804691890136d44f5fe462372b45d531a2ba694a5073", + "0x30cbb4d3f5d4d67a9c308576484e7c5232285ea3260b6eed87f64ff40c0b059", + "0x7d724bfc8e81f2d7a6e5e65addfd993acf857780a1a618651a3e170b0b23fd9", + "0x5d5c1c82c1fc35c9405689e6fa7a2c020395af52ce412dce5bf49a212477339", + "0x617af6328e447002109f1c12d5280493ca1a17eb2fad93048113306d949f2f9", + "0x7faecea29d75f5cc1e42216ed2edc07f6b54c600e892d52ad5233a5957a028e", + "0x67b9151ce5334ade1fcdeca59c0e7dc5c6062526b8a8f3ccfa583184e2774d6", + "0x6a0b4cf4cd5fbcce79ea433f8d14127124843a9c84f8dd8ede0879c9e0a8b4a", + "0x50a12f79fac66fc0539433f1cb7aefe3705d944dad28ed9dd364f3596fa3ceb", + "0x4fe426dcae2a30816764c1e247ce1bc1d7842787421cceb1967de5a47f901c7", + "0x2dfac50eaed7ccf19bd09e1a10db43286f5a789ce374a58a56ea77de04cb14e", + "0x1b2b41d01cef36a82330eddb75eae0f6f3e94a4a799b4400d17c86e6ada4657", + "0x6873a856f503f86e4e4bb187c8142966fa030030005b3967371e98836af045f", + "0x59c158d8673ca6f77421cc85e54fa097cda673bc7034ab4f28880e6a645cd25", + "0x61ca47d997b1d73b774200a1ac356a2890ad0a6d0f93e9751d71d0e0f2fba5", + "0x5228f835fb10cc5db551c4c65364ddda6bd1058cfe803f87044d9704caf903a", + "0x5232c402534064fae933db6cc63c50be76a503e1a33dbe32d755f245735cec2", + "0x42d2c06b5a3db9dca6a615e1fe81d2b11b21ee4b4c891c10b70cc63b08c60f8", + "0x9c6a72c3f49032519043915215f92dd5c1914e6ab548c3e3619f70b472a9d1", + "0x50af21e19b12e44bb6cbf9dde901593e16d4708403b096984f1423dd1f07594", + "0x3778c11b029612720e60161d30f47a64a2eebd6b6c714495251ca3231f33873", + "0x48ea633caf5a1eae263216d7e3c33ec7b4c1b10627bd1c37e49789a80112e03", + "0x6298260739f887174e32297e4c9efa0ec6fe0c81a952163c1797016d5d44f7a", + "0x7aba11ae89d8d79010c4e092161a8ab095e9b396ce6596a992a381b78632f57", + "0x431451f7583fcdee2831a12d80d4d57c253a714ae6dd1ec2a53735d4c345f3a", + "0x6cae53f22dbd03d535e430eb0ac90b7b7f541c71306c8413557b6c2d0532b9", + "0x131216a8d9372e571dbe9baa12814faa52740c02ffc1f7653e69d2b86ff7ffb", + "0x76b970d837bc5be03aef97c6385256482e2efde56fed1d7771ebd7760781c4", + "0x65beda587edf5f45734fe239b1fa62e2fb4c8389c8fd0e3c2118886e85d4c2b", + "0x647834320613e4afe139c83be5dd7ddffd3b284bfdade91238fddc31b874ac4", + "0x5ab5d89897e9ed61bb13a80ce8ae470e1c0d9094abd3aa65bd2ee4f40db721c", + "0xf5b414d49b7035bf0ebf978e9f6853bbcfa0c39a5faee86a66f7b66f4d7da0", + "0xcca2ccb142a3e1bd5d2d2011e495f17a53924de5048518bd3195afc29ea1f2", + "0x7168aa7f9412a3b22ce55a10b3514b2a403b382c76d55b81c01c58a938ce507", + "0x4c347cf2a75ec1791c9955367867b691cff13c32beb0963940959baca37775b", + "0x6de3fb7574121333466be710f13e6d317db9a5564d44fa05eff6cbe870ef1bc", + "0x7db10ec88b84dcb96d10d2c8c047fdc9e0fabfab55fb2d218bff4103d75fc5c", + "0x4a9bbf937d5fb24e3bf940f1718cf108340281054380f56a751c9cb23670e25", + "0x78cc5dd5518d0018752a4b167c2612224e412e0a2e430401aac01c736cd035b", + "0x2ef83d51bf4a8c7bfae2899e0cc8b31fdb989f715cc1db2be92e5bfc52c209f", + "0x221d9ff51aba26ba01176fe3553666384f48bf29d125c20a34cf82704de7cec", + "0x3a76adc8d114069ad5c6348e16a288b291fd212fc5d3eed166148690b0bcf80", + "0x7217ca04871b7b39c0e390ec99127f0edca6eb8f992b89a4ec1b35bd78035de", + "0x25a28b54cee6efe4b6b44f25861d2b1e6e0f18b696dd0998663ed034f4fea9", + "0x5708e0fdac5d433fea00163d0d75d0d0f055b392b5055731f76ef4ec1cd8abd", + "0x28ffa60afc8c5a045d455b3a5502d6cc83e95e0950f0cffe426a66f81a7c6cb", + "0x78292dfeb6cc498e7fba715c6cd7b1a1f5212a5601d4e86a200e87606b791ba", + "0x6bd46d7f3bdb4c517aaab3d3967d1a2c6b8e96b0204fb2165dda87ec3360cf", + "0x785e61d8819f322a0f2df63a1c09248af35436f43a673dbd00360216ab1c9c9", + "0x30b0e27832e38146232aa482bf3a7abe22c5310b141b81fb06b53956e018218", + "0x5514a31b2f70b774ffa3bac4b36ab6fc41355fe2dca6c38400c3289adc3bf1a", + "0x3a426adb3769ccfa2b55cfe4bacf5add83fca4853089d4b9cc051e1be257cec", + "0x74172e5f3c485fa76442353377477e095333b1f5a761e4188fb8d02c6c0d1b2", + "0x3a485ff5eae627cbd862c4609dc3fafb028a9f9bb0bc9911fac9d76ff2de9c0", + "0x3b66291ef9b42b8ee29b8370071a7a6ea19bf315535df4db730baab370af4fb", + "0x24b9c0f27934f22b9c7d8bb1b28b7b640403d8beae241342912865774988a0", + "0x351a586cad8bde5ffbde99b7f9ea1d4865439357822608a38b0d8b1479e6358", + "0x1a7bcf9e94fe4cd9c85de1ba0e1b9941c42399054d39c4f519f9fba8dc223de", + "0x21159bcfb54ef6bb52ad93fa631aa36c2424a9747e434818c4bb4722582a713", + "0x188b884c9e507a007c639c4547984b90c1cecc0cf2221e156b1b075b3fb7655", + "0x56d15b44d0640869cd9be489497264e00dd73df5455b003078ff56a98aba149", + "0x2eddfaa325c18d8845ff721b75808216d6ef391160d67c609bc30f59393bf9", + "0x74cb241a323c476dc2287c1754aa75b6156f21e9f93f6df364c97b977683462", + "0x13fed22d5c67af47f9e84e072bf782461f6f682d14235803fd2dc178c1e383e", + "0x439e88605bb0a6e172c3d599257f38140018ea81910a6480ff1b63638ebd268", + "0x1e795281ec4cc4d3e76902a8e713b8355a52fb9c46883169e3dc0e509e374f6", + "0x1ac511e20f9ab384e7c1cb7706c284d06ee1a05d8131ad7cc20341e9c344e32", + "0x2c96bd9bdcd0173d8dd08cb735bb234ba082acab6b956255b627d7e944f9817", + "0xddfd7272311b588c92adf91d75d7352177a55728104b7c745b716e3c2f54b2", + "0x4998af8695aea3e9301f1db32f89101d6725a2b04442b600bf2b71fd9b80449", + "0x4d8f684a8c58df7ef4d1fdb7643d5b34d488363e246d9bf575b7323f0c372f6", + "0x78625b74ad44bb049b0344eb16be7abef9de9aa5fd212ddfee196e8505bba0", + "0x1cfe4e308ce443529962e17d877994ca647c42cc53ff303e02085c70f19f3a5", + "0x7657f6571b83fcdd524d672e4ba178432a60eadbf9683399557a54c3526b1d3", + "0x34da350253263c647dbd153c9eb6186c06f2bfd7b32b8c70786774b14a9157a", + "0x23a0ec2f7faecb95595d19ed28dd9c320835d1aaee7b1d52c1b93d56b92e7cd", + "0x44b8afa4dbfd64240f380390653a59e12f974aee68b52a20cacd3681d143304", + "0x5eb267c6da61f84812fa2776ddcc7f19b920fd9e50cd3096c88cb053acb27f9", + "0x6011b791c3c4e81f3e897f216e524680ebd11686201d9554e2cee2aee0e9ecc", + "0x2a0e8e734bbbf135c7eb094b4ac9566e4b925c8cc155171744ee6c7e175a00f", + "0x1c429d2c8fcf7687063cfdb951afa3da8cb0ffae8fd560058c1813a9e1fbcb8", + "0x121aaba2894a63cce81acabb559eb2c114f4859dc5803e0b91349ec398d2eb0" + ] }, "id": 0 } diff --git a/services/reference/starknet/json-rpc-methods/starknet_getblockwithtxs.mdx b/services/reference/starknet/json-rpc-methods/starknet_getblockwithtxs.mdx index e00c29503ce..c8e8e50e927 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_getblockwithtxs.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_getblockwithtxs.mdx @@ -2,17 +2,18 @@ title: "starknet_getBlockWithTxs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns block information of the specified block, including a list of transaction objects. ## Parameters `block_id`: [*Required*] The block parameter object containing one of the following: - - `block_hash`: (string) Block hash. - - `block_number`: (integer) Decimal block number. - - One of the string tags `latest` or `pending`. + +- `block_hash`: (string) Block hash. +- `block_number`: (integer) Decimal block number. +- One of the string tags `latest` or `pending`. ## Returns @@ -82,34 +83,918 @@ curl https://starknet-mainnet.infura.io/v3/YOUR-API-KEY \ "starknet_version": "0.12.2", "status": "ACCEPTED_ON_L2", "timestamp": 1702635071, - "transactions": [{ - "calldata": ["0xc9", "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", "0x219209e083275171774dab1df80982e9df2096516f06319c5c6d71ae0a8480c", "0x3", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x2869809251f0000", "0x0", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f"], - "max_fee": "0x2c68af0bb140000", - "nonce": "0xf", - "sender_address": "0x67d96b338b55f1644fc7231a907f738541d6840b03491d74507eb0de40b68c6", - "signature": ["0x6fc7dcc4588761e802d03f074529286860dff5c59b16fd221f08397374961eb", "0x4039c7009b9e251dccd14cd03171f53eb6bad3705bd80d64ffc3ac4a55e521c"], - "transaction_hash": "0x4371f723d29a0bfe4143c29f8e12991590c0ae38538e49563ad91540ee6de3", - "type": "INVOKE", - "version": "0x1" - }, { - "calldata": ["0x2", "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", "0x219209e083275171774dab1df80982e9df2096516f06319c5c6d71ae0a8480c", "0x0", "0x3", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x3", "0x1", "0x4", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x33ba3e2bee000", "0x0", "0x434149524f"], - "max_fee": "0x38d7ea4c68000", - "nonce": "0x17", - "sender_address": "0x4f5e44a3c0dccdbacf701ba6fe2ac4bef590d4337992e65ae490779db761d66", - "signature": ["0x2e2620b94659b5f4725704be47a6178ba0f32a357f32ed52beb8ed4543696d8", "0x47ee15096d3cc4ab2c2131bda49b4cc649832459d1c64ff5ff0c7444f49fce4"], - "transaction_hash": "0x39cbca70da5074f815d18a62ac5c8b83d2ba66547a4a012a2395dff4aaf36b2", - "type": "INVOKE", - "version": "0x1" - }, { - "calldata": ["0xb", "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", "0x219209e083275171774dab1df80982e9df2096516f06319c5c6d71ae0a8480c", "0x3", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x205466db74c000", "0x0", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f", "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", "0x1", "0x434149524f"], - "max_fee": "0x2386f26fc10000", - "nonce": "0x3d", - "sender_address": "0x18d43ec13d5b27c7352162a2b249c2fdf02fb13063b3ff975a3a47fa7bd78d9", - "signature": ["0x1b72166ae8c0c6756a98ffb2f1c094855b1d2ea2fee645707f0ba709e6119eb", "0x762d0c01dee0625146f617f77fa8168b55a546583782493ac8f2fbd7d4fe9e3"], - "transaction_hash": "0x42cb3ec5e6a0587ab5d0e688a72758f14ded2e7ab11ac4b317cc9587f889048", - "type": "INVOKE", - "version": "0x1" - }] + "transactions": [ + { + "calldata": [ + "0xc9", + "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", + "0x219209e083275171774dab1df80982e9df2096516f06319c5c6d71ae0a8480c", + "0x3", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x2869809251f0000", + "0x0", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f" + ], + "max_fee": "0x2c68af0bb140000", + "nonce": "0xf", + "sender_address": "0x67d96b338b55f1644fc7231a907f738541d6840b03491d74507eb0de40b68c6", + "signature": [ + "0x6fc7dcc4588761e802d03f074529286860dff5c59b16fd221f08397374961eb", + "0x4039c7009b9e251dccd14cd03171f53eb6bad3705bd80d64ffc3ac4a55e521c" + ], + "transaction_hash": "0x4371f723d29a0bfe4143c29f8e12991590c0ae38538e49563ad91540ee6de3", + "type": "INVOKE", + "version": "0x1" + }, + { + "calldata": [ + "0x2", + "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", + "0x219209e083275171774dab1df80982e9df2096516f06319c5c6d71ae0a8480c", + "0x0", + "0x3", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x3", + "0x1", + "0x4", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x33ba3e2bee000", + "0x0", + "0x434149524f" + ], + "max_fee": "0x38d7ea4c68000", + "nonce": "0x17", + "sender_address": "0x4f5e44a3c0dccdbacf701ba6fe2ac4bef590d4337992e65ae490779db761d66", + "signature": [ + "0x2e2620b94659b5f4725704be47a6178ba0f32a357f32ed52beb8ed4543696d8", + "0x47ee15096d3cc4ab2c2131bda49b4cc649832459d1c64ff5ff0c7444f49fce4" + ], + "transaction_hash": "0x39cbca70da5074f815d18a62ac5c8b83d2ba66547a4a012a2395dff4aaf36b2", + "type": "INVOKE", + "version": "0x1" + }, + { + "calldata": [ + "0xb", + "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", + "0x219209e083275171774dab1df80982e9df2096516f06319c5c6d71ae0a8480c", + "0x3", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x205466db74c000", + "0x0", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f", + "0x3b554093fb0a7460913be2d5c011cb5ac4333dfcfe6125851bcd3f926a3b558", + "0x1fd12fd4580400368d8953eca1bf472ee233e7e06245d1ef8c176ff12bd3c4", + "0x1", + "0x434149524f" + ], + "max_fee": "0x2386f26fc10000", + "nonce": "0x3d", + "sender_address": "0x18d43ec13d5b27c7352162a2b249c2fdf02fb13063b3ff975a3a47fa7bd78d9", + "signature": [ + "0x1b72166ae8c0c6756a98ffb2f1c094855b1d2ea2fee645707f0ba709e6119eb", + "0x762d0c01dee0625146f617f77fa8168b55a546583782493ac8f2fbd7d4fe9e3" + ], + "transaction_hash": "0x42cb3ec5e6a0587ab5d0e688a72758f14ded2e7ab11ac4b317cc9587f889048", + "type": "INVOKE", + "version": "0x1" + } + ] } } ``` diff --git a/services/reference/starknet/json-rpc-methods/starknet_getclass.mdx b/services/reference/starknet/json-rpc-methods/starknet_getclass.mdx index ad70ed2a5d3..a2244d805ee 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_getclass.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_getclass.mdx @@ -2,8 +2,8 @@ title: "starknet_getClass" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the contract class definition of the specified contract class hash in the specified block. @@ -14,8 +14,8 @@ Returns the contract class definition of the specified contract class hash in th - `block_number`: (integer) Decimal block number. - One of the string tags `latest` or `pending`. - `class_hash`: (string) [*Required*] The - [class hash](https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/class-hash/) - of the requested contract class. + [class hash](https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/class-hash/) + of the requested contract class. ## Returns diff --git a/services/reference/starknet/json-rpc-methods/starknet_getclassat.mdx b/services/reference/starknet/json-rpc-methods/starknet_getclassat.mdx index 1fc675b5dd8..89291bbe971 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_getclassat.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_getclassat.mdx @@ -2,8 +2,8 @@ title: "starknet_getClassAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the contract class definition of the specified contract class address in the specified block. @@ -14,7 +14,7 @@ Returns the contract class definition of the specified contract class address in - `block_number`: (integer) Decimal block number. - One of the string tags `latest` or `pending`. - `contract_address`: (string) [*Required*] The address of the requested - [contract class](https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/contract-classes/). + [contract class](https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/contract-classes/). ## Returns diff --git a/services/reference/starknet/json-rpc-methods/starknet_getclasshashat.mdx b/services/reference/starknet/json-rpc-methods/starknet_getclasshashat.mdx index 8352e469187..4c81abb16e6 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_getclasshashat.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_getclasshashat.mdx @@ -2,8 +2,8 @@ title: "starknet_getClassHashAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the contract class hash of the specified contract class address in the specified block. @@ -14,7 +14,7 @@ Returns the contract class hash of the specified contract class address in the s - `block_number`: (integer) Decimal block number. - One of the string tags `latest` or `pending`. - `contract_address`: (string) [*Required*] The address of the requested - [contract class](https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/contract-classes/). + [contract class](https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/contract-classes/). ## Returns @@ -57,9 +57,9 @@ curl https://starknet-mainnet.infura.io/v3/YOUR-API-KEY \ ```json { - "jsonrpc":"2.0", - "id":0, - "result":"0x515dd668a1798214e7ca9ec90c52e267229b8104fb296a90f20b6f70baaef53" + "jsonrpc": "2.0", + "id": 0, + "result": "0x515dd668a1798214e7ca9ec90c52e267229b8104fb296a90f20b6f70baaef53" } ``` diff --git a/services/reference/starknet/json-rpc-methods/starknet_getevents.mdx b/services/reference/starknet/json-rpc-methods/starknet_getevents.mdx index 5cd1b8f45f4..cf55c730d05 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_getevents.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_getevents.mdx @@ -2,27 +2,28 @@ title: "starknet_getEvents" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns all event objects matching the conditions in the specified filter. ## Parameters `filter`: (object) [*Required*] The conditions used to filter the returned events, including: - - `from_block`: [*Required*] Block parameter object containing one of the following: - - `block_hash`: (string) Block hash. - - `block_number`: (integer) Decimal block number. - - One of the string tags `latest` or `pending`. - - `to_block`: [*Required*] Block parameter object containing one of the following: - - `block_hash`: (string) Block hash. - - `block_number`: (integer) Decimal block number. - - One of the string tags `latest` or `pending`. - - `address`: (string) Sender contract address. - - `keys`: (array) The values used to filter the events. - - `continuation_token`: (string) The token returned from the previous query. - If no token is provided, the first page is returned. - - `chunk_size`: (integer) [*Required*] Chunk size. + +- `from_block`: [*Required*] Block parameter object containing one of the following: + - `block_hash`: (string) Block hash. + - `block_number`: (integer) Decimal block number. + - One of the string tags `latest` or `pending`. +- `to_block`: [*Required*] Block parameter object containing one of the following: + - `block_hash`: (string) Block hash. + - `block_number`: (integer) Decimal block number. + - One of the string tags `latest` or `pending`. +- `address`: (string) Sender contract address. +- `keys`: (array) The values used to filter the events. +- `continuation_token`: (string) The token returned from the previous query. + If no token is provided, the first page is returned. +- `chunk_size`: (integer) [*Required*] Chunk size. ## Returns diff --git a/services/reference/starknet/json-rpc-methods/starknet_getnonce.mdx b/services/reference/starknet/json-rpc-methods/starknet_getnonce.mdx index 7247a8a7149..29a46377ab0 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_getnonce.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_getnonce.mdx @@ -2,8 +2,8 @@ title: "starknet_getNonce" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the nonce associated with the specified contract address in the specified block. diff --git a/services/reference/starknet/json-rpc-methods/starknet_getstateupdate.mdx b/services/reference/starknet/json-rpc-methods/starknet_getstateupdate.mdx index 51b870da027..c675141f178 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_getstateupdate.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_getstateupdate.mdx @@ -2,17 +2,18 @@ title: "starknet_getStateUpdate" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns information about the result of executing the specified block. ## Parameters `block_id`: [*Required*] The block parameter object containing one of the following: - - `block_hash`: (string) Block hash. - - `block_number`: (integer) Decimal block number. - - One of the string tags `latest` or `pending`. + +- `block_hash`: (string) Block hash. +- `block_number`: (integer) Decimal block number. +- One of the string tags `latest` or `pending`. ## Returns @@ -67,27 +68,33 @@ curl https://starknet-mainnet.infura.io/v3/YOUR-API-KEY \ "new_root": "0xc95a878188acf408e285027bd5e7674a88529b8c65ef6c1999b3569aea8bc8", "old_root": "0x7dd643fa7f254c8932c01558f538292304266c00728eeaf4b32b361b5d0d2dd", "state_diff": { - "storage_diffs": [{ - "address": "0x653d92ffdf2b532003d5e989f763fdedc16dc389e0b3889398a6eb1dac0d849", - "key": "0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc", - "value": "0x69577e6756a99b584b5d1ce8e60650ae33b6e2b13541783458268f07da6b38a" - }, { - "address": "0x653d92ffdf2b532003d5e989f763fdedc16dc389e0b3889398a6eb1dac0d849", - "key": "0x1379ac0624b939ceb9dede92211d7db5ee174fe28be72245b0a1a2abd81c98f", - "value": "0x36dbe3ef0a6ef13fc20e65315840832c0595986d54eba528e22483c7746c005" - }, { - "address": "0x653d92ffdf2b532003d5e989f763fdedc16dc389e0b3889398a6eb1dac0d849", - "key": "0x1813aac5f5e7799684c6dc33e51f44d3627fd748c800724a184ed5be09b713e", - "value": "0x4" - }, { - "address": "0x653d92ffdf2b532003d5e989f763fdedc16dc389e0b3889398a6eb1dac0d849", - "key": "0x321bace1036eaff095582583849a03598bd5764a6265edac86916b830a29d55", - "value": "0x1" - }, { - "address": "0x653d92ffdf2b532003d5e989f763fdedc16dc389e0b3889398a6eb1dac0d849", - "key": "0x37501df619c4fc4e96f6c0243f55e3abe7d1aca7db9af8f3740ba3696b3fdac", - "value": "0x3" - }] + "storage_diffs": [ + { + "address": "0x653d92ffdf2b532003d5e989f763fdedc16dc389e0b3889398a6eb1dac0d849", + "key": "0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc", + "value": "0x69577e6756a99b584b5d1ce8e60650ae33b6e2b13541783458268f07da6b38a" + }, + { + "address": "0x653d92ffdf2b532003d5e989f763fdedc16dc389e0b3889398a6eb1dac0d849", + "key": "0x1379ac0624b939ceb9dede92211d7db5ee174fe28be72245b0a1a2abd81c98f", + "value": "0x36dbe3ef0a6ef13fc20e65315840832c0595986d54eba528e22483c7746c005" + }, + { + "address": "0x653d92ffdf2b532003d5e989f763fdedc16dc389e0b3889398a6eb1dac0d849", + "key": "0x1813aac5f5e7799684c6dc33e51f44d3627fd748c800724a184ed5be09b713e", + "value": "0x4" + }, + { + "address": "0x653d92ffdf2b532003d5e989f763fdedc16dc389e0b3889398a6eb1dac0d849", + "key": "0x321bace1036eaff095582583849a03598bd5764a6265edac86916b830a29d55", + "value": "0x1" + }, + { + "address": "0x653d92ffdf2b532003d5e989f763fdedc16dc389e0b3889398a6eb1dac0d849", + "key": "0x37501df619c4fc4e96f6c0243f55e3abe7d1aca7db9af8f3740ba3696b3fdac", + "value": "0x3" + } + ] } } } diff --git a/services/reference/starknet/json-rpc-methods/starknet_getstorageat.mdx b/services/reference/starknet/json-rpc-methods/starknet_getstorageat.mdx index d98d80f29d5..b3ddf995673 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_getstorageat.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_getstorageat.mdx @@ -2,8 +2,8 @@ title: "starknet_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the value of the storage at the specified address and key. diff --git a/services/reference/starknet/json-rpc-methods/starknet_gettransactionbyblockidandindex.mdx b/services/reference/starknet/json-rpc-methods/starknet_gettransactionbyblockidandindex.mdx index 06c3f7d626a..4b140d7ed31 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_gettransactionbyblockidandindex.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_gettransactionbyblockidandindex.mdx @@ -2,8 +2,8 @@ title: "starknet_getTransactionByBlockIdAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the details of the specified transaction. @@ -62,11 +62,25 @@ curl https://starknet-mainnet.infura.io/v3/YOUR-API-KEY \ "transaction_hash": "0x5fb5b63f0226ef426c81168d0235269398b63aa145ca6a3c47294caa691cfdc", "max_fee": "0x1ff973cafa7fff", "version": "0x0", - "signature": ["0x5a1c0af2b96c461a9753e383107e2bba1849cdf6029ffaa2b97533ada03789f", "0x7261a61b45dcfe48d85fb6a687ed6a888816ba601871679dd32dcb99652de84"], + "signature": [ + "0x5a1c0af2b96c461a9753e383107e2bba1849cdf6029ffaa2b97533ada03789f", + "0x7261a61b45dcfe48d85fb6a687ed6a888816ba601871679dd32dcb99652de84" + ], "nonce": "0x0", "contract_address": "0x7c57808b9cea7130c44aab2f8ca6147b04408943b48c6d8c3c83eb8cfdd8c0b", "entry_point_selector": "0x15d40a3d6ca2ac30f4031e42be28da9b056fef9bb7357ac5e85627ee876e5ad", - "calldata": ["0x1", "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e", "0x0", "0x3", "0x3", "0x20b55314a52c19b78626a26d48ffd4a9b3e21b45cf3bc7bdf01ea52c4088860", "0x20f7338adef002", "0x0", "0x1457"] + "calldata": [ + "0x1", + "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", + "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e", + "0x0", + "0x3", + "0x3", + "0x20b55314a52c19b78626a26d48ffd4a9b3e21b45cf3bc7bdf01ea52c4088860", + "0x20f7338adef002", + "0x0", + "0x1457" + ] }, "id": 1 } diff --git a/services/reference/starknet/json-rpc-methods/starknet_gettransactionbyhash.mdx b/services/reference/starknet/json-rpc-methods/starknet_gettransactionbyhash.mdx index 423c7e6be01..03bbeef35a0 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_gettransactionbyhash.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_gettransactionbyhash.mdx @@ -2,8 +2,8 @@ title: "starknet_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the details of the specified transaction. @@ -55,11 +55,27 @@ curl https://starknet-mainnet.infura.io/v3/YOUR-API-KEY \ "transaction_hash": "0x121aaba2894a63cce81acabb559eb2c114f4859dc5803e0b91349ec398d2eb0", "max_fee": "0xcfa4301cf492", "version": "0x0", - "signature": ["0x71847081cae237a92ddcfbc8ff4144df8237ed251027563e709aeb69af35099", "0x36da171a5c558c8a1b233a163a399ac5c54d82a7bd0bbfdbc360cd7c3e2700d"], + "signature": [ + "0x71847081cae237a92ddcfbc8ff4144df8237ed251027563e709aeb69af35099", + "0x36da171a5c558c8a1b233a163a399ac5c54d82a7bd0bbfdbc360cd7c3e2700d" + ], "nonce": "0x0", "contract_address": "0x206cd6b8b25de0ca44b944d13c2608b355e9a9224a887e2e9447cf5ae3cb2a8", "entry_point_selector": "0x15d40a3d6ca2ac30f4031e42be28da9b056fef9bb7357ac5e85627ee876e5ad", - "calldata": ["0x1", "0x173f81c529191726c6e7287e24626fe24760ac44dae2a1f7e02080230f8458b", "0x68bcbdba7cc8cac2832d23e2c32e9eec39a9f1d03521eff5dff800a62725fa", "0x0", "0x5", "0x5", "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", "0x7c57808b9cea7130c44aab2f8ca6147b04408943b48c6d8c3c83eb8cfdd8c0b", "0xd6f06df0e9632b", "0x0", "0x6873917301545706d657c47a11d83ad9840fbeb3", "0x9"] + "calldata": [ + "0x1", + "0x173f81c529191726c6e7287e24626fe24760ac44dae2a1f7e02080230f8458b", + "0x68bcbdba7cc8cac2832d23e2c32e9eec39a9f1d03521eff5dff800a62725fa", + "0x0", + "0x5", + "0x5", + "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", + "0x7c57808b9cea7130c44aab2f8ca6147b04408943b48c6d8c3c83eb8cfdd8c0b", + "0xd6f06df0e9632b", + "0x0", + "0x6873917301545706d657c47a11d83ad9840fbeb3", + "0x9" + ] }, "id": 1 } diff --git a/services/reference/starknet/json-rpc-methods/starknet_gettransactionreceipt.mdx b/services/reference/starknet/json-rpc-methods/starknet_gettransactionreceipt.mdx index 1865f971793..6814802385f 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_gettransactionreceipt.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_gettransactionreceipt.mdx @@ -2,8 +2,8 @@ title: "starknet_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the receipt of the specified transaction. @@ -57,15 +57,30 @@ curl https://starknet-mainnet.infura.io/v3/YOUR-API-KEY \ "block_hash": "0x18ec1a3931bb5a286f801a950e1153bd427d6d3811591cc01e6f074615a1f76", "block_number": 4503, "messages_sent": [], - "events": [{ - "from_address": "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", - "keys": ["0x99cd8bde557814842a3121e8ddfd433a539b8c9f14bf31ebf108d12e6196e9"], - "data": ["0x206cd6b8b25de0ca44b944d13c2608b355e9a9224a887e2e9447cf5ae3cb2a8", "0x7c57808b9cea7130c44aab2f8ca6147b04408943b48c6d8c3c83eb8cfdd8c0b", "0xd6f06df0e9632b", "0x0"] - }, { - "from_address": "0x206cd6b8b25de0ca44b944d13c2608b355e9a9224a887e2e9447cf5ae3cb2a8", - "keys": ["0x5ad857f66a5b55f1301ff1ed7e098ac6d4433148f0b72ebc4a2945ab85ad53"], - "data": ["0x121aaba2894a63cce81acabb559eb2c114f4859dc5803e0b91349ec398d2eb0", "0x0"] - }] + "events": [ + { + "from_address": "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", + "keys": [ + "0x99cd8bde557814842a3121e8ddfd433a539b8c9f14bf31ebf108d12e6196e9" + ], + "data": [ + "0x206cd6b8b25de0ca44b944d13c2608b355e9a9224a887e2e9447cf5ae3cb2a8", + "0x7c57808b9cea7130c44aab2f8ca6147b04408943b48c6d8c3c83eb8cfdd8c0b", + "0xd6f06df0e9632b", + "0x0" + ] + }, + { + "from_address": "0x206cd6b8b25de0ca44b944d13c2608b355e9a9224a887e2e9447cf5ae3cb2a8", + "keys": [ + "0x5ad857f66a5b55f1301ff1ed7e098ac6d4433148f0b72ebc4a2945ab85ad53" + ], + "data": [ + "0x121aaba2894a63cce81acabb559eb2c114f4859dc5803e0b91349ec398d2eb0", + "0x0" + ] + } + ] }, "id": 1 } diff --git a/services/reference/starknet/json-rpc-methods/starknet_gettransactionstatus.mdx b/services/reference/starknet/json-rpc-methods/starknet_gettransactionstatus.mdx index f7415441848..e6849fa491a 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_gettransactionstatus.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_gettransactionstatus.mdx @@ -2,8 +2,8 @@ title: "starknet_getTransactionStatus" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the transaction status. diff --git a/services/reference/starknet/json-rpc-methods/starknet_simulatetransactions.mdx b/services/reference/starknet/json-rpc-methods/starknet_simulatetransactions.mdx index ed0e5b0e4d4..9f59d58ef7e 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_simulatetransactions.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_simulatetransactions.mdx @@ -2,8 +2,8 @@ title: "starknet_simulateTransactions" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Simulates the execution of the specified transactions at the specified block. diff --git a/services/reference/starknet/json-rpc-methods/starknet_specversion.mdx b/services/reference/starknet/json-rpc-methods/starknet_specversion.mdx index 6141d82f9b0..80544cb8594 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_specversion.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_specversion.mdx @@ -2,8 +2,8 @@ title: "starknet_specVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the version of the StarkNet JSON-RPC specification that the client is using. diff --git a/services/reference/starknet/json-rpc-methods/starknet_syncing.mdx b/services/reference/starknet/json-rpc-methods/starknet_syncing.mdx index a033325f0dc..4798e7860d3 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_syncing.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_syncing.mdx @@ -2,8 +2,8 @@ title: "starknet_syncing" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the synchronization status of the node. @@ -24,7 +24,6 @@ A syncing status object containing: This method returns `false` if the node is not currently syncing state. - ## Example Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). diff --git a/services/reference/starknet/json-rpc-methods/starknet_traceblocktransactions.mdx b/services/reference/starknet/json-rpc-methods/starknet_traceblocktransactions.mdx index cccc364d65a..5ab020fb61a 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_traceblocktransactions.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_traceblocktransactions.mdx @@ -2,8 +2,8 @@ title: "starknet_traceBlockTransactions" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the execution trace of all transactions in the specified block. This provides the exact sequence of operations that were performed during the execution of each @@ -12,9 +12,10 @@ transaction, and can be useful for debugging. ## Parameters `block_id`: [*Required*] The block parameter object containing one of the following: - - `block_hash`: (string) Block hash. - - `block_number`: (integer) Decimal block number. - - One of the string tags `latest` or `pending`. + +- `block_hash`: (string) Block hash. +- `block_number`: (integer) Decimal block number. +- One of the string tags `latest` or `pending`. ## Returns diff --git a/services/reference/starknet/json-rpc-methods/starknet_tracetransaction.mdx b/services/reference/starknet/json-rpc-methods/starknet_tracetransaction.mdx index 8b11b976a47..2105937bfcf 100644 --- a/services/reference/starknet/json-rpc-methods/starknet_tracetransaction.mdx +++ b/services/reference/starknet/json-rpc-methods/starknet_tracetransaction.mdx @@ -2,8 +2,8 @@ title: "starknet_traceTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the execution trace of the specified transaction. This provides the exact sequence of operations that were performed during the execution of the diff --git a/services/reference/starknet/quickstart.md b/services/reference/starknet/quickstart.md index b5a4fad9c5b..aea5e45ed7f 100644 --- a/services/reference/starknet/quickstart.md +++ b/services/reference/starknet/quickstart.md @@ -25,9 +25,9 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a ```bash curl https://starknet-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"starknet_blockNumber","params":[],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "starknet_blockNumber", "params": [], "id": 1}' ``` ### Node (JavaScript) @@ -36,128 +36,127 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta #### Node Fetch -1. In your project folder, install the Node Fetch package using npm: +1. In your project folder, install the `node-fetch` package using npm:: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://starknet-mainnet.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "starknet_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://starknet-mainnet.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "starknet_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios -1. In your project folder, install the Axios package using npm: +1. In your project folder, install the `axios` package using npm: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require('axios'); - - axios.post('https://starknet-mainnet.infura.io/v3/YOUR-API-KEY', { - jsonrpc: '2.0', - method: 'starknet_blockNumber', - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios") + + axios + .post("https://starknet-mainnet.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "starknet_blockNumber", + params: [], + id: 1, + }) + .then((response) => { + console.log(response.data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` 1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```python title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = 'https://starknet-mainnet.infura.io/v3/YOUR-API-KEY' + url = "https://starknet-mainnet.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "starknet_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "starknet_blockNumber", + "params": [], + "id": 1 + } - headers = {'content-type': 'application/json'} + headers = {"content-type": "application/json"} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` - + ```bash + python index.py + ``` + ## Next steps Now that you have successfully made a call to the Starknet network, you can explore more functionalities and APIs provided by Infura. Here are some suggestions: - **Explore other Starknet APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Arbitrum, Ethereum, Optimism, IPFS and more. @@ -165,4 +164,3 @@ by Infura. Here are some suggestions: Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/reference/zksync/index.md b/services/reference/zksync/index.md index 73c2a6d710e..c1deb6d425f 100644 --- a/services/reference/zksync/index.md +++ b/services/reference/zksync/index.md @@ -21,7 +21,7 @@ ZKsync Era is a zero-knowledge Ethereum Virtual Machine (zkEVM) that scales Ethe :::info see also - See the [official ZKsync Era documentation](https://docs.zksync.io/build) for more information. +See the [official ZKsync Era documentation](https://docs.zksync.io/build) for more information. ::: @@ -48,7 +48,9 @@ ZKsync Era is a zero-knowledge Ethereum Virtual Machine (zkEVM) that scales Ethe ## Partners and privacy policies The following partners provide access to the ZKsync Era network: + + - Chainstack ([Terms of Use](https://chainstack.com/tos/), [Privacy Policy](https://chainstack.com/privacy/)) - Laconic LLC ([Privacy Policy](https://www.laconic.com/privacy-policy)) diff --git a/services/reference/zksync/json-rpc-methods/_eth_accounts-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_accounts-request.mdx index 739b121d5f6..933be38bde4 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_accounts-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_accounts-request.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -8,9 +8,8 @@ import TabItem from '@theme/TabItem'; curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ -X POST \ -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' + -d '{"jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 1}' ``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_blocknumber-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_blocknumber-request.mdx index 73ecee54150..1f33d35dd68 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_blocknumber-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_blocknumber-request.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -8,9 +8,8 @@ import TabItem from '@theme/TabItem'; curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ -X POST \ -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}' + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_call-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_call-request.mdx index 333efb54d0a..35f5b058cf6 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_call-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_call-request.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -8,9 +8,8 @@ import TabItem from '@theme/TabItem'; curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ -X POST \ -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_call","params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","gas": "0x76c0","gasPrice": "0x9184e72a000","value": "0x9184e72a","data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"],"id":1}' - ``` + -d '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "gas": "0x76c0", "gasPrice": "0x9184e72a000", "value": "0x9184e72a", "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"}, "latest"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_chainid-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_chainid-request.mdx index 9be3ef3151a..e9529cd8383 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_chainid-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_chainid-request.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -8,9 +8,8 @@ import TabItem from '@theme/TabItem'; curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ -X POST \ -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_chainId","params": [],"id":1}' + -d '{"jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1}' ``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_estimategas-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_estimategas-request.mdx index 0f27f84d6c0..ecb0f159c7d 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_estimategas-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_estimategas-request.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -8,9 +8,8 @@ import TabItem from '@theme/TabItem'; curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ -X POST \ -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_estimateGas","params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC","to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}],"id":1}' + -d '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x9cE564c7d09f88E7d8233Cdd3A4d7AC42aBFf3aC", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a"}], "id": 1}' ``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_feehistory-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_feehistory-request.mdx index efe6417536d..28ee8907da1 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_feehistory-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_feehistory-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"id": 1, "jsonrpc": "2.0", "method": "eth_feeHistory", "params": ["0x5", "latest", [20,30]] }' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_gasprice-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_gasprice-request.mdx index 36e82128e96..27fb90e179f 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_gasprice-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_gasprice-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params": [],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getbalance-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getbalance-request.mdx index 582337a9284..c8d589f6c3a 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getbalance-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getbalance-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBalance","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBalance", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getblockbyhash-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getblockbyhash-request.mdx index 80feb74336a..5499741795a 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getblockbyhash-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getblockbyhash-request.mdx @@ -1,5 +1,5 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" @@ -8,9 +8,8 @@ import TabItem from '@theme/TabItem'; curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ -X POST \ -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}' + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", false], "id": 1}' ``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getblockbynumber-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getblockbynumber-request.mdx index 2a6153d7938..9a33d0f536f 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getblockbynumber-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getblockbynumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x5BAD55",false],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55",false], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx index 2460ed5c6c6..bdb1e60760c 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getblocktransactioncountbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx index b9a30174b26..283f22df547 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getblocktransactioncountbynumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params": ["latest"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": ["latest"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getcode-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getcode-request.mdx index 4b1984b6a0b..040dba25272 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getcode-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getcode-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getCode","params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getCode", "params": ["0x06012c8cf97bead5deae237070f9587f8e7a266d", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getlogs-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getlogs-request.mdx index cc895cc8edb..d3a8d36cee2 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getlogs-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getlogs-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"blockHash": "0x7c5a35e9cb3e8ae0e221ab470abae9d446c3a5626ce6689fc777dcffcab52c70", "topics":["0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"]}], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getproof-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getproof-request.mdx index 4caa69c1a08..256d6ca9fe9 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getproof-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getproof-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0","method": "eth_getProof","id": 1,"params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getProof", "id": 1, "params": ["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842", ["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"], "latest"]}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getstorageat-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getstorageat-request.mdx index adca0e16a6d..127e28e46f3 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getstorageat-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getstorageat-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getStorageAt","params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getStorageAt", "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9", "0x65a8db"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx index 058d70bec5a..7253b18e780 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_gettransactionbyblockhashandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx index a87a7e0ce97..c474fc562a8 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_gettransactionbyblocknumberandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params": ["0x5BAD55","0x0"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByBlockNumberAndIndex", "params": ["0x5BAD55", "0x0"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_gettransactionbyhash-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_gettransactionbyhash-request.mdx index 1759f9d47ed..aba87e7c04e 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_gettransactionbyhash-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_gettransactionbyhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionByHash", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_gettransactioncount-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_gettransactioncount-request.mdx index 04dc2f7ed43..9843137caf4 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_gettransactioncount-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_gettransactioncount-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f","0x5bad55"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_gettransactionreceipt-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_gettransactionreceipt-request.mdx index c1277770c69..ef8cb939c21 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_gettransactionreceipt-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_gettransactionreceipt-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getTransactionReceipt", "params": ["0xbb3a336e3f823ec18197f1e13ee875700f08f03e2cab75f0d0b118dabb44cba0"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx index 8a3e3333b34..d9d29e3c3cc 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getunclebyblockhashandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35","0x0"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockHashAndIndex", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35", "0x0"], "id":1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx index 863d8d0f3ab..bad76ac75f3 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getunclebyblocknumberandindex-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params": ["0x29c","0x0"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleByBlockNumberAndIndex", "params": ["0x29c","0x0"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx index 4b102693c0b..068daa8006b 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getunclecountbyblockhash-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockHash", "params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx index de940b927dd..0dc3f66281b 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getunclecountbyblocknumber-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params": ["0x5bad55"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getUncleCountByBlockNumber", "params": ["0x5bad55"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_getwork-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_getwork-request.mdx index d3b95f0f21a..a3bef10acf2 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_getwork-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_getwork-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_getWork","params": [],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_getWork", "params": [], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_hashrate-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_hashrate-request.mdx index 86c568c780a..c0ab3e6419d 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_hashrate-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_hashrate-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_hashrate","params": [],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_hashrate", "params": [], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx index 6c5f592aba3..f3fbb2e48b0 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_maxpriorityfeepergas-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params": [],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_mining-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_mining-request.mdx index 37fff78761f..51b34d98709 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_mining-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_mining-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_mining","params": [],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_mining", "params": [], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_protocolversion-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_protocolversion-request.mdx index a865c66b3ca..afcbf4fddb7 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_protocolversion-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_protocolversion-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_protocolVersion","params": [],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_protocolVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_sendrawtransaction-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_sendrawtransaction-request.mdx index eb1e8a83c20..583ea65794d 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_sendrawtransaction-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_sendrawtransaction-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_submitwork-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_submitwork-request.mdx index c9ba7e50d03..4b45a618070 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_submitwork-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_submitwork-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_submitWork","params": ["0x0000000000000001","0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_submitWork", "params": ["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1FE5700000000000000000000000000D1FE5700000000000000000000000000"], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_eth_syncing-request.mdx b/services/reference/zksync/json-rpc-methods/_eth_syncing-request.mdx index 3d84157b04b..43d14f73dfa 100644 --- a/services/reference/zksync/json-rpc-methods/_eth_syncing-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_eth_syncing-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_syncing","params": [],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_net_listening-request.mdx b/services/reference/zksync/json-rpc-methods/_net_listening-request.mdx index bb3b35099ae..7b583767df9 100644 --- a/services/reference/zksync/json-rpc-methods/_net_listening-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_net_listening-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_listening","params": [],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_listening", "params": [], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_net_peercount-request.mdx b/services/reference/zksync/json-rpc-methods/_net_peercount-request.mdx index 125d0818af3..8d4ed323e98 100644 --- a/services/reference/zksync/json-rpc-methods/_net_peercount-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_net_peercount-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_peerCount","params": [],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_net_version-request.mdx b/services/reference/zksync/json-rpc-methods/_net_version-request.mdx index 3e053fe78f7..26a086a39be 100644 --- a/services/reference/zksync/json-rpc-methods/_net_version-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_net_version-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "net_version", "params": [], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/_web3_clientversion-request.mdx b/services/reference/zksync/json-rpc-methods/_web3_clientversion-request.mdx index 5fbf2629b02..fa2314c7a33 100644 --- a/services/reference/zksync/json-rpc-methods/_web3_clientversion-request.mdx +++ b/services/reference/zksync/json-rpc-methods/_web3_clientversion-request.mdx @@ -1,16 +1,15 @@ -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' +``` - diff --git a/services/reference/zksync/json-rpc-methods/eth_accounts.mdx b/services/reference/zksync/json-rpc-methods/eth_accounts.mdx index 0cc7304b6ec..0dafbcb7389 100644 --- a/services/reference/zksync/json-rpc-methods/eth_accounts.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_accounts.mdx @@ -2,39 +2,39 @@ title: "eth_accounts" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_accounts-description.mdx"; +import Description from "/services/reference/_partials/_eth_accounts-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_accounts-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_accounts-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_accounts-example.mdx"; +import Example from "/services/reference/_partials/_eth_accounts-example.mdx" ### Request -import Request from "./_eth_accounts-request.mdx"; +import Request from "./_eth_accounts-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_accounts-response.mdx"; +import Response from "/services/reference/_partials/_eth_accounts-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_blocknumber.mdx b/services/reference/zksync/json-rpc-methods/eth_blocknumber.mdx index 7896c8c46f6..076b45d83ce 100644 --- a/services/reference/zksync/json-rpc-methods/eth_blocknumber.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_blocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_blockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_blocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_blocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_blocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_blocknumber-example.mdx" ### Request -import Request from "./_eth_blocknumber-request.mdx"; +import Request from "./_eth_blocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_blocknumber-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_call.mdx b/services/reference/zksync/json-rpc-methods/eth_call.mdx index 88b3857775d..5c6ebee7de3 100644 --- a/services/reference/zksync/json-rpc-methods/eth_call.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_call.mdx @@ -2,39 +2,39 @@ title: "eth_call" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_call-description.mdx"; +import Description from "/services/reference/_partials/_eth_call-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_call-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_call-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_call-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_call-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_call-example.mdx"; +import Example from "/services/reference/_partials/_eth_call-example.mdx" ### Request -import Request from "./_eth_call-request.mdx"; +import Request from "./_eth_call-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_call-response.mdx"; +import Response from "/services/reference/_partials/_eth_call-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_chainid.mdx b/services/reference/zksync/json-rpc-methods/eth_chainid.mdx index e544b1003a4..a6f446ad268 100644 --- a/services/reference/zksync/json-rpc-methods/eth_chainid.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_chainid.mdx @@ -2,39 +2,39 @@ title: "eth_chainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_chainid-description.mdx"; +import Description from "/services/reference/_partials/_eth_chainid-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_chainid-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_chainid-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_chainid-example.mdx"; +import Example from "/services/reference/_partials/_eth_chainid-example.mdx" ### Request -import Request from "./_eth_chainid-request.mdx"; +import Request from "./_eth_chainid-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_chainid-response.mdx"; +import Response from "/services/reference/_partials/_eth_chainid-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_coinbase.mdx b/services/reference/zksync/json-rpc-methods/eth_coinbase.mdx index e9bb3ff61cd..8957df7e522 100644 --- a/services/reference/zksync/json-rpc-methods/eth_coinbase.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_coinbase.mdx @@ -2,9 +2,9 @@ title: "eth_coinbase" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_coinbase-description.mdx"; +import Description from "/services/reference/_partials/_eth_coinbase-description.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_estimategas.mdx b/services/reference/zksync/json-rpc-methods/eth_estimategas.mdx index af6c5ad77da..47c6b01804e 100644 --- a/services/reference/zksync/json-rpc-methods/eth_estimategas.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_estimategas.mdx @@ -2,39 +2,39 @@ title: "eth_estimateGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_estimategas-description.mdx"; +import Description from "/services/reference/_partials/_eth_estimategas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_estimategas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_estimategas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_estimategas-example.mdx"; +import Example from "/services/reference/_partials/_eth_estimategas-example.mdx" ### Request -import Request from "./_eth_estimategas-request.mdx"; +import Request from "./_eth_estimategas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_estimategas-response.mdx"; +import Response from "/services/reference/_partials/_eth_estimategas-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_feehistory.mdx b/services/reference/zksync/json-rpc-methods/eth_feehistory.mdx index 21e4962e114..9aafc564c46 100644 --- a/services/reference/zksync/json-rpc-methods/eth_feehistory.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_feehistory.mdx @@ -2,39 +2,39 @@ title: "eth_feeHistory" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_feehistory-description.mdx"; +import Description from "/services/reference/_partials/_eth_feehistory-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_feehistory-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_feehistory-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_feehistory-example.mdx"; +import Example from "/services/reference/_partials/_eth_feehistory-example.mdx" ### Request -import Request from "./_eth_feehistory-request.mdx"; +import Request from "./_eth_feehistory-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_feehistory-response.mdx"; +import Response from "/services/reference/_partials/_eth_feehistory-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_gasprice.mdx b/services/reference/zksync/json-rpc-methods/eth_gasprice.mdx index c602d61c293..8980dcc8a39 100644 --- a/services/reference/zksync/json-rpc-methods/eth_gasprice.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_gasprice.mdx @@ -2,39 +2,39 @@ title: "eth_gasPrice" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gasprice-description.mdx"; +import Description from "/services/reference/_partials/_eth_gasprice-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gasprice-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gasprice-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gasprice-example.mdx"; +import Example from "/services/reference/_partials/_eth_gasprice-example.mdx" ### Request -import Request from "./_eth_gasprice-request.mdx"; +import Request from "./_eth_gasprice-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gasprice-response.mdx"; +import Response from "/services/reference/_partials/_eth_gasprice-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getbalance.mdx b/services/reference/zksync/json-rpc-methods/eth_getbalance.mdx index c50eba5fd61..1ff5a0d31c8 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getbalance.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getbalance.mdx @@ -2,39 +2,39 @@ title: "eth_getBalance" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getbalance-description.mdx"; +import Description from "/services/reference/_partials/_eth_getbalance-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getbalance-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getbalance-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getbalance-example.mdx"; +import Example from "/services/reference/_partials/_eth_getbalance-example.mdx" ### Request -import Request from "./_eth_getbalance-request.mdx"; +import Request from "./_eth_getbalance-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getbalance-response.mdx"; +import Response from "/services/reference/_partials/_eth_getbalance-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getblockbyhash.mdx b/services/reference/zksync/json-rpc-methods/eth_getblockbyhash.mdx index ad555110b71..970e6c27704 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getblockbyhash.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getblockbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbyhash-example.mdx" ### Request -import Request from "./_eth_getblockbyhash-request.mdx"; +import Request from "./_eth_getblockbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbyhash-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getblockbynumber.mdx b/services/reference/zksync/json-rpc-methods/eth_getblockbynumber.mdx index 2faabaa3e86..f14e34f1531 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getblockbynumber.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getblockbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblockbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblockbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblockbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblockbynumber-example.mdx" ### Request -import Request from "./_eth_getblockbynumber-request.mdx"; +import Request from "./_eth_getblockbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblockbynumber-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx b/services/reference/zksync/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx index aacb2e0e3af..36944d31e1f 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getblocktransactioncountbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbyhash-request.mdx"; +import Request from "./_eth_getblocktransactioncountbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbyhash-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx b/services/reference/zksync/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx index 161e7fe344b..c355e33cb53 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getblocktransactioncountbynumber.mdx @@ -2,39 +2,39 @@ title: "eth_getBlockTransactionCountByNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-example.mdx" ### Request -import Request from "./_eth_getblocktransactioncountbynumber-request.mdx"; +import Request from "./_eth_getblocktransactioncountbynumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getblocktransactioncountbynumber-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getcode.mdx b/services/reference/zksync/json-rpc-methods/eth_getcode.mdx index 8364a077f09..ace0da8cb26 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getcode.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getcode.mdx @@ -2,39 +2,39 @@ title: "eth_getCode" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getcode-description.mdx"; +import Description from "/services/reference/_partials/_eth_getcode-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getcode-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getcode-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getcode-example.mdx"; +import Example from "/services/reference/_partials/_eth_getcode-example.mdx" ### Request -import Request from "./_eth_getcode-request.mdx"; +import Request from "./_eth_getcode-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getcode-response.mdx"; +import Response from "/services/reference/_partials/_eth_getcode-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getlogs.mdx b/services/reference/zksync/json-rpc-methods/eth_getlogs.mdx index 546d66f9148..4a1c1a031c4 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getlogs.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getlogs.mdx @@ -2,39 +2,39 @@ title: "eth_getLogs" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getlogs-description.mdx"; +import Description from "/services/reference/_partials/_eth_getlogs-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getlogs-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getlogs-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getlogs-example.mdx"; +import Example from "/services/reference/_partials/_eth_getlogs-example.mdx" ### Request -import Request from "./_eth_getlogs-request.mdx"; +import Request from "./_eth_getlogs-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getlogs-response.mdx"; +import Response from "/services/reference/_partials/_eth_getlogs-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getproof.mdx b/services/reference/zksync/json-rpc-methods/eth_getproof.mdx index 7cb028bd44f..0d7b5743dc4 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getproof.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getproof.mdx @@ -2,39 +2,39 @@ title: "eth_getProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getproof-description.mdx"; +import Description from "/services/reference/_partials/_eth_getproof-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getproof-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getproof-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getproof-example.mdx"; +import Example from "/services/reference/_partials/_eth_getproof-example.mdx" ### Request -import Request from "./_eth_getproof-request.mdx"; +import Request from "./_eth_getproof-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getproof-response.mdx"; +import Response from "/services/reference/_partials/_eth_getproof-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getstorageat.mdx b/services/reference/zksync/json-rpc-methods/eth_getstorageat.mdx index aee85d0fde8..d91e20b3979 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getstorageat.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getstorageat.mdx @@ -2,39 +2,39 @@ title: "eth_getStorageAt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx"; +import Description from "/services/reference/_partials/_eth_getstorageat-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getstorageat-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getstorageat-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx"; +import Example from "/services/reference/_partials/_eth_getstorageat-example.mdx" ### Request -import Request from "./_eth_getstorageat-request.mdx"; +import Request from "./_eth_getstorageat-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx"; +import Response from "/services/reference/_partials/_eth_getstorageat-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx b/services/reference/zksync/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx index 5422dc7f552..e04f9c75a5c 100644 --- a/services/reference/zksync/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_gettransactionbyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblockhashandindex-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx b/services/reference/zksync/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx index 6861fb566a4..28ba85246a2 100644 --- a/services/reference/zksync/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_gettransactionbyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx"; +import Request from "./_eth_gettransactionbyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyblocknumberandindex-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_gettransactionbyhash.mdx b/services/reference/zksync/json-rpc-methods/eth_gettransactionbyhash.mdx index 1adc6ff1eb4..28548a1fd58 100644 --- a/services/reference/zksync/json-rpc-methods/eth_gettransactionbyhash.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_gettransactionbyhash.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionbyhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionbyhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionbyhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionbyhash-example.mdx" ### Request -import Request from "./_eth_gettransactionbyhash-request.mdx"; +import Request from "./_eth_gettransactionbyhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionbyhash-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_gettransactioncount.mdx b/services/reference/zksync/json-rpc-methods/eth_gettransactioncount.mdx index 73985353185..9cf5c71e500 100644 --- a/services/reference/zksync/json-rpc-methods/eth_gettransactioncount.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_gettransactioncount.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactioncount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactioncount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactioncount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactioncount-example.mdx" ### Request -import Request from "./_eth_gettransactioncount-request.mdx"; +import Request from "./_eth_gettransactioncount-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactioncount-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_gettransactionreceipt.mdx b/services/reference/zksync/json-rpc-methods/eth_gettransactionreceipt.mdx index 370d08c0402..1ab2ba12676 100644 --- a/services/reference/zksync/json-rpc-methods/eth_gettransactionreceipt.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_gettransactionreceipt.mdx @@ -2,39 +2,39 @@ title: "eth_getTransactionReceipt" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx"; +import Description from "/services/reference/_partials/_eth_gettransactionreceipt-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_gettransactionreceipt-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_gettransactionreceipt-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx"; +import Example from "/services/reference/_partials/_eth_gettransactionreceipt-example.mdx" ### Request -import Request from "./_eth_gettransactionreceipt-request.mdx"; +import Request from "./_eth_gettransactionreceipt-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx"; +import Response from "/services/reference/_partials/_eth_gettransactionreceipt-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getunclebyblockhashandindex.mdx b/services/reference/zksync/json-rpc-methods/eth_getunclebyblockhashandindex.mdx index dce1f045d95..d6a9a959a37 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getunclebyblockhashandindex.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getunclebyblockhashandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockHashAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblockhashandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblockhashandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblockhashandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblockhashandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblockhashandindex-request.mdx"; +import Request from "./_eth_getunclebyblockhashandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblockhashandindex-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx b/services/reference/zksync/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx index 321c22c4ce0..07c458cb7ad 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getunclebyblocknumberandindex.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleByBlockNumberAndIndex" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-example.mdx" ### Request -import Request from "./_eth_getunclebyblocknumberandindex-request.mdx"; +import Request from "./_eth_getunclebyblocknumberandindex-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclebyblocknumberandindex-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getunclecountbyblockhash.mdx b/services/reference/zksync/json-rpc-methods/eth_getunclecountbyblockhash.mdx index c21e8c283a8..298b5c520e8 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getunclecountbyblockhash.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getunclecountbyblockhash.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblockhash-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblockhash-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblockhash-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblockhash-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblockhash-request.mdx"; +import Request from "./_eth_getunclecountbyblockhash-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblockhash-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getunclecountbyblocknumber.mdx b/services/reference/zksync/json-rpc-methods/eth_getunclecountbyblocknumber.mdx index 824fdf8de1b..2cc5dbbf753 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getunclecountbyblocknumber.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getunclecountbyblocknumber.mdx @@ -2,39 +2,39 @@ title: "eth_getUncleCountByBlockNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx"; +import Description from "/services/reference/_partials/_eth_getunclecountbyblocknumber-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getunclecountbyblocknumber-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getunclecountbyblocknumber-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx"; +import Example from "/services/reference/_partials/_eth_getunclecountbyblocknumber-example.mdx" ### Request -import Request from "./_eth_getunclecountbyblocknumber-request.mdx"; +import Request from "./_eth_getunclecountbyblocknumber-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx"; +import Response from "/services/reference/_partials/_eth_getunclecountbyblocknumber-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_getwork.mdx b/services/reference/zksync/json-rpc-methods/eth_getwork.mdx index ff9964e4737..31dd81816b7 100644 --- a/services/reference/zksync/json-rpc-methods/eth_getwork.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_getwork.mdx @@ -2,39 +2,39 @@ title: "eth_getWork" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_getwork-description.mdx"; +import Description from "/services/reference/_partials/_eth_getwork-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_getwork-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_getwork-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_getwork-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_getwork-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_getwork-example.mdx"; +import Example from "/services/reference/_partials/_eth_getwork-example.mdx" ### Request -import Request from "./_eth_getwork-request.mdx"; +import Request from "./_eth_getwork-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_getwork-response.mdx"; +import Response from "/services/reference/_partials/_eth_getwork-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_hashrate.mdx b/services/reference/zksync/json-rpc-methods/eth_hashrate.mdx index 8ea8d622b56..21ba47abdef 100644 --- a/services/reference/zksync/json-rpc-methods/eth_hashrate.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_hashrate.mdx @@ -2,39 +2,39 @@ title: "eth_hashrate" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_hashrate-description.mdx"; +import Description from "/services/reference/_partials/_eth_hashrate-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_hashrate-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_hashrate-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_hashrate-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_hashrate-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_hashrate-example.mdx"; +import Example from "/services/reference/_partials/_eth_hashrate-example.mdx" ### Request -import Request from "./_eth_hashrate-request.mdx"; +import Request from "./_eth_hashrate-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_hashrate-response.mdx"; +import Response from "/services/reference/_partials/_eth_hashrate-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_maxpriorityfeepergas.mdx b/services/reference/zksync/json-rpc-methods/eth_maxpriorityfeepergas.mdx index 87e39538aaf..6f818052ae7 100644 --- a/services/reference/zksync/json-rpc-methods/eth_maxpriorityfeepergas.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_maxpriorityfeepergas.mdx @@ -2,39 +2,39 @@ title: "eth_maxPriorityFeePerGas" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx"; +import Description from "/services/reference/_partials/_eth_maxpriorityfeepergas-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_maxpriorityfeepergas-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_maxpriorityfeepergas-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx"; +import Example from "/services/reference/_partials/_eth_maxpriorityfeepergas-example.mdx" ### Request -import Request from "./_eth_maxpriorityfeepergas-request.mdx"; +import Request from "./_eth_maxpriorityfeepergas-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx"; +import Response from "/services/reference/_partials/_eth_maxpriorityfeepergas-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_mining.mdx b/services/reference/zksync/json-rpc-methods/eth_mining.mdx index 8b17ae80655..3e755d68509 100644 --- a/services/reference/zksync/json-rpc-methods/eth_mining.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_mining.mdx @@ -2,39 +2,39 @@ title: "eth_mining" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_mining-description.mdx"; +import Description from "/services/reference/_partials/_eth_mining-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_mining-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_mining-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_mining-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_mining-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_mining-example.mdx"; +import Example from "/services/reference/_partials/_eth_mining-example.mdx" ### Request -import Request from "./_eth_mining-request.mdx"; +import Request from "./_eth_mining-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_mining-response.mdx"; +import Response from "/services/reference/_partials/_eth_mining-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_protocolversion.mdx b/services/reference/zksync/json-rpc-methods/eth_protocolversion.mdx index 38863109276..02b5da95bff 100644 --- a/services/reference/zksync/json-rpc-methods/eth_protocolversion.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_protocolversion.mdx @@ -2,39 +2,39 @@ title: "eth_protocolVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx"; +import Description from "/services/reference/_partials/_eth_protocolversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_protocolversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_protocolversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx"; +import Example from "/services/reference/_partials/_eth_protocolversion-example.mdx" ### Request -import Request from "./_eth_protocolversion-request.mdx"; +import Request from "./_eth_protocolversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx"; +import Response from "/services/reference/_partials/_eth_protocolversion-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_sendrawtransaction.mdx b/services/reference/zksync/json-rpc-methods/eth_sendrawtransaction.mdx index 4dfc4e6f296..dd39a5bafd4 100644 --- a/services/reference/zksync/json-rpc-methods/eth_sendrawtransaction.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_sendrawtransaction.mdx @@ -2,39 +2,39 @@ title: "eth_sendRawTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendrawtransaction-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_sendrawtransaction-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_sendrawtransaction-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx"; +import Example from "/services/reference/_partials/_eth_sendrawtransaction-example.mdx" ### Request -import Request from "./_eth_sendrawtransaction-request.mdx"; +import Request from "./_eth_sendrawtransaction-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx"; +import Response from "/services/reference/_partials/_eth_sendrawtransaction-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_sendtransaction.mdx b/services/reference/zksync/json-rpc-methods/eth_sendtransaction.mdx index ac6ebfd02dd..5c13a1d5c8f 100644 --- a/services/reference/zksync/json-rpc-methods/eth_sendtransaction.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_sendtransaction.mdx @@ -2,10 +2,9 @@ title: "eth_sendTransaction" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx"; +import Description from "/services/reference/_partials/_eth_sendtransaction-description.mdx" - diff --git a/services/reference/zksync/json-rpc-methods/eth_sign.mdx b/services/reference/zksync/json-rpc-methods/eth_sign.mdx index 073b1040681..f8c6a17df92 100644 --- a/services/reference/zksync/json-rpc-methods/eth_sign.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_sign.mdx @@ -2,9 +2,9 @@ title: "eth_sign" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_sign-description.mdx"; +import Description from "/services/reference/_partials/_eth_sign-description.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_submitwork.mdx b/services/reference/zksync/json-rpc-methods/eth_submitwork.mdx index b286c9b49de..3e302cecfe3 100644 --- a/services/reference/zksync/json-rpc-methods/eth_submitwork.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_submitwork.mdx @@ -2,39 +2,39 @@ title: "eth_submitWork" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_submitwork-description.mdx"; +import Description from "/services/reference/_partials/_eth_submitwork-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_submitwork-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_submitwork-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_submitwork-example.mdx"; +import Example from "/services/reference/_partials/_eth_submitwork-example.mdx" ### Request -import Request from "./_eth_submitwork-request.mdx"; +import Request from "./_eth_submitwork-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_submitwork-response.mdx"; +import Response from "/services/reference/_partials/_eth_submitwork-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/eth_syncing.mdx b/services/reference/zksync/json-rpc-methods/eth_syncing.mdx index bfb89e8c209..7ffbcd44560 100644 --- a/services/reference/zksync/json-rpc-methods/eth_syncing.mdx +++ b/services/reference/zksync/json-rpc-methods/eth_syncing.mdx @@ -2,39 +2,39 @@ title: "eth_syncing" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_eth_syncing-description.mdx"; +import Description from "/services/reference/_partials/_eth_syncing-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx"; +import Params from "/services/reference/_partials/_eth_syncing-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx"; +import Returns from "/services/reference/_partials/_eth_syncing-returns.mdx" ## Example -import Example from "/services/reference/_partials/_eth_syncing-example.mdx"; +import Example from "/services/reference/_partials/_eth_syncing-example.mdx" ### Request -import Request from "./_eth_syncing-request.mdx"; +import Request from "./_eth_syncing-request.mdx" ### Response -import Response from "/services/reference/_partials/_eth_syncing-response.mdx"; +import Response from "/services/reference/_partials/_eth_syncing-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/index.md b/services/reference/zksync/json-rpc-methods/index.md index 62d3facbf45..59012b8644b 100644 --- a/services/reference/zksync/json-rpc-methods/index.md +++ b/services/reference/zksync/json-rpc-methods/index.md @@ -1,4 +1,4 @@ # JSON-RPC methods ZKsync Era supports the standard Ethereum JSON-RPC-APIs and additional -ZKsync Era-specific methods not supported on Ethereum. \ No newline at end of file +ZKsync Era-specific methods not supported on Ethereum. diff --git a/services/reference/zksync/json-rpc-methods/net_listening.mdx b/services/reference/zksync/json-rpc-methods/net_listening.mdx index 10de017b29a..b10ffc556cf 100644 --- a/services/reference/zksync/json-rpc-methods/net_listening.mdx +++ b/services/reference/zksync/json-rpc-methods/net_listening.mdx @@ -2,39 +2,39 @@ title: "net_listening" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_listening-description.mdx"; +import Description from "/services/reference/_partials/_net_listening-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_listening-parameters.mdx"; +import Params from "/services/reference/_partials/_net_listening-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_listening-returns.mdx"; +import Returns from "/services/reference/_partials/_net_listening-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_listening-example.mdx"; +import Example from "/services/reference/_partials/_net_listening-example.mdx" ### Request -import Request from "./_net_listening-request.mdx"; +import Request from "./_net_listening-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_listening-response.mdx"; +import Response from "/services/reference/_partials/_net_listening-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/net_peercount.mdx b/services/reference/zksync/json-rpc-methods/net_peercount.mdx index 9ff570e4c70..c0246b44d39 100644 --- a/services/reference/zksync/json-rpc-methods/net_peercount.mdx +++ b/services/reference/zksync/json-rpc-methods/net_peercount.mdx @@ -2,39 +2,39 @@ title: "net_peerCount" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_peercount-description.mdx"; +import Description from "/services/reference/_partials/_net_peercount-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_peercount-parameters.mdx"; +import Params from "/services/reference/_partials/_net_peercount-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_peercount-returns.mdx"; +import Returns from "/services/reference/_partials/_net_peercount-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_peercount-example.mdx"; +import Example from "/services/reference/_partials/_net_peercount-example.mdx" ### Request -import Request from "./_net_peercount-request.mdx"; +import Request from "./_net_peercount-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_peercount-response.mdx"; +import Response from "/services/reference/_partials/_net_peercount-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/net_version.mdx b/services/reference/zksync/json-rpc-methods/net_version.mdx index d55ab80402d..1d6c0080c60 100644 --- a/services/reference/zksync/json-rpc-methods/net_version.mdx +++ b/services/reference/zksync/json-rpc-methods/net_version.mdx @@ -2,39 +2,39 @@ title: "net_version" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_net_version-description.mdx"; +import Description from "/services/reference/_partials/_net_version-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_net_version-parameters.mdx"; +import Params from "/services/reference/_partials/_net_version-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_net_version-returns.mdx"; +import Returns from "/services/reference/_partials/_net_version-returns.mdx" ## Example -import Example from "/services/reference/_partials/_net_version-example.mdx"; +import Example from "/services/reference/_partials/_net_version-example.mdx" ### Request -import Request from "./_net_version-request.mdx"; +import Request from "./_net_version-request.mdx" ### Response -import Response from "/services/reference/_partials/_net_version-response.mdx"; +import Response from "/services/reference/_partials/_net_version-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/web3_clientversion.mdx b/services/reference/zksync/json-rpc-methods/web3_clientversion.mdx index 11997e5c36d..c5ee316d699 100644 --- a/services/reference/zksync/json-rpc-methods/web3_clientversion.mdx +++ b/services/reference/zksync/json-rpc-methods/web3_clientversion.mdx @@ -2,39 +2,39 @@ title: "web3_clientVersion" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" -import Description from "/services/reference/_partials/_web3_clientversion-description.mdx"; +import Description from "/services/reference/_partials/_web3_clientversion-description.mdx" ## Parameters -import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx"; +import Params from "/services/reference/_partials/_web3_clientversion-parameters.mdx" ## Returns -import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx"; +import Returns from "/services/reference/_partials/_web3_clientversion-returns.mdx" ## Example -import Example from "/services/reference/_partials/_web3_clientversion-example.mdx"; +import Example from "/services/reference/_partials/_web3_clientversion-example.mdx" ### Request -import Request from "./_web3_clientversion-request.mdx"; +import Request from "./_web3_clientversion-request.mdx" ### Response -import Response from "/services/reference/_partials/_web3_clientversion-response.mdx"; +import Response from "/services/reference/_partials/_web3_clientversion-response.mdx" diff --git a/services/reference/zksync/json-rpc-methods/zks_estimatefee.mdx b/services/reference/zksync/json-rpc-methods/zks_estimatefee.mdx index df96e7c084c..5841d6be8f3 100644 --- a/services/reference/zksync/json-rpc-methods/zks_estimatefee.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_estimatefee.mdx @@ -2,8 +2,8 @@ title: "zks_estimateFee" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the fee for the transaction. @@ -24,7 +24,7 @@ The estimated fee which includes: ## Example -Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). +Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). ### Request @@ -37,6 +37,7 @@ curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0", "id":2, "method": "zks_estimateFee", "params": [ { "from": "0x1111111111111111111111111111111111111111", "to":"0x2222222222222222222222222222222222222222", "data": "0xffffffff" } ] }' ``` + @@ -59,4 +60,4 @@ curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_estimategasl1tol2.mdx b/services/reference/zksync/json-rpc-methods/zks_estimategasl1tol2.mdx index d5bb37b60fe..547e75186c9 100644 --- a/services/reference/zksync/json-rpc-methods/zks_estimategasl1tol2.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_estimategasl1tol2.mdx @@ -2,8 +2,8 @@ title: "zks_estimateGasL1ToL2" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns an estimate of the gas required for a layer 1 (L1) to layer 2 (L2) transaction. @@ -26,12 +26,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0", "id":2, "method": "zks_estimateGasL1ToL2", "params": [ { "from": "0x1111111111111111111111111111111111111111", "to":"0x2222222222222222222222222222222222222222", "data": "0xffffffff" } ] }' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc":"2.0", "id":2, "method": "zks_estimateGasL1ToL2", "params": [ { "from": "0x1111111111111111111111111111111111111111", "to":"0x2222222222222222222222222222222222222222", "data": "0xffffffff" } ] }' +``` + diff --git a/services/reference/zksync/json-rpc-methods/zks_getallaccountbalances.mdx b/services/reference/zksync/json-rpc-methods/zks_getallaccountbalances.mdx index a9b77a7b0be..802f5dfa167 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getallaccountbalances.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getallaccountbalances.mdx @@ -2,8 +2,8 @@ title: "zks_getAllAccountBalances" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns all balances for confirmed tokens given by an account address. @@ -50,4 +50,4 @@ curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_getblockdetails.mdx b/services/reference/zksync/json-rpc-methods/zks_getblockdetails.mdx index 82377c3a015..82f54a6dde3 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getblockdetails.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getblockdetails.mdx @@ -2,8 +2,8 @@ title: "zks_getBlockDetails" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns additional ZKsync-specific information about the L2 block. @@ -16,8 +16,8 @@ Returns additional ZKsync-specific information about the L2 block. Object containing the details of the L2 block: - `baseSystemContractsHashes`: An object containing hashes of the base system contracts used in the transaction: - - `bootloader`: The hash of the bootloader contract. - - `default_aa`: The hash of the default account contract. + - `bootloader`: The hash of the bootloader contract. + - `default_aa`: The hash of the default account contract. - `commitTxHash`: The hash of the transaction committed to the network. - `committedAt`: The timestamp when the transaction was committed to the network. - `executeTxHash`: The hash of the transaction executed on the network. @@ -35,7 +35,6 @@ Object containing the details of the L2 block: - `status`: The status of the transaction. - `timestamp`: The timestamp of the transaction. - ## Example Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infura.io/dashboard). @@ -45,12 +44,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getBlockDetails", "params": [ 140599 ]}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getBlockDetails", "params": [ 140599 ]}' +``` + @@ -87,4 +87,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu } ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_getbridgecontracts.mdx b/services/reference/zksync/json-rpc-methods/zks_getbridgecontracts.mdx index fe4cd0411cb..7dd0471ec8b 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getbridgecontracts.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getbridgecontracts.mdx @@ -2,8 +2,8 @@ title: "zks_getBridgeContracts" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the L1 and L2 address of the default bridges. @@ -16,9 +16,9 @@ None. The default bridges used in the ZKsync network: - `1Erc20DefaultBridge` - The address of the default bridge contract responsible for handling ERC-20 token - transfers from the L1 network to the L2 network + transfers from the L1 network to the L2 network - `l2Erc20DefaultBridge` - The address of the default bridge contract responsible for handling ERC-20 token - transfers from the L2 network to the L1 network + transfers from the L2 network to the L1 network ## Example @@ -54,4 +54,4 @@ curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ } ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_getbytecodebyhash.mdx b/services/reference/zksync/json-rpc-methods/zks_getbytecodebyhash.mdx index d8dd2c4bb40..22f4b195548 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getbytecodebyhash.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getbytecodebyhash.mdx @@ -2,8 +2,8 @@ title: "zks_getBytecodeByHash" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the bytecode of a transaction for the provided hash. @@ -11,7 +11,6 @@ Returns the bytecode of a transaction for the provided hash. - `hash`: (string) [_Required_] The hash of the transaction. - ## Response The byte code of the given transaction. @@ -25,12 +24,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getBytecodeByHash", "params": ["0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"]}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getBytecodeByHash", "params": ["0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"]}' +``` + @@ -60,4 +60,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_getl1batchblockrange.mdx b/services/reference/zksync/json-rpc-methods/zks_getl1batchblockrange.mdx index f0945e47397..748d874ee5a 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getl1batchblockrange.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getl1batchblockrange.mdx @@ -2,17 +2,15 @@ title: "zks_getL1BatchBlockRange" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the range of blocks contained within a given batch. - ## Parameters - `batch`: (integer) [_Required_] The layer 1 batch number. - ## Response The range of blocks contained within the specified batch. The range is given by the @@ -27,12 +25,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getL1BatchBlockRange", "params": [12345]}' \ - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getL1BatchBlockRange", "params": [12345]}' \ +``` + @@ -48,4 +47,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu } ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_getl1batchdetails.mdx b/services/reference/zksync/json-rpc-methods/zks_getl1batchdetails.mdx index 8d64feaff30..e35a9c4f1ec 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getl1batchdetails.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getl1batchdetails.mdx @@ -2,8 +2,8 @@ title: "zks_getL1BatchDetails" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns data pertaining to a given L1 batch. @@ -16,8 +16,8 @@ Returns data pertaining to a given L1 batch. Detailed information about the specified L1 batch: - `baseSystemContractsHashes`: An object containing hashes of the base system contracts used in the transaction: - - `bootloader`: The hash of the bootloader contract. - - `default_aa`: The hash of the default account contract. + - `bootloader`: The hash of the bootloader contract. + - `default_aa`: The hash of the default account contract. - `commitTxHash`: The hash of the transaction committed to the network. - `committedAt`: The timestamp when the transaction was committed to the network. - `executeTxHash`: The hash of the transaction executed on the network. @@ -44,12 +44,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getL1BatchDetails", "params": [12345]}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getL1BatchDetails", "params": [12345]}' +``` + @@ -65,4 +66,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu } ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_getl2tol1logproof.mdx b/services/reference/zksync/json-rpc-methods/zks_getl2tol1logproof.mdx index 5458266f829..e76de085dee 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getl2tol1logproof.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getl2tol1logproof.mdx @@ -2,8 +2,8 @@ title: "zks_getL2ToL1LogProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the proof for the corresponding L2 to L1 log. The index of the log that can be obtained from the transaction receipt. @@ -13,7 +13,6 @@ from the transaction receipt. - `tx_hash`: [_Required_] Hash of the L2 transaction the L2 to L1 log was produced in. - `l2_to_l1_log_index`: [_Optional_] The index of the L2 to L1 log in the transaction. - ## Response - `id` - The position of the leaf in the Merkle tree of L2 to L1 messages for the block. @@ -29,12 +28,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getL2ToL1LogProof", "params": ["0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e"]}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getL2ToL1LogProof", "params": ["0x2a1c6c74b184965c0cb015aae9ea134fd96215d2e4f4979cfec12563295f610e"]}' +``` + @@ -64,4 +64,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu } ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_getl2tol1msgproof.mdx b/services/reference/zksync/json-rpc-methods/zks_getl2tol1msgproof.mdx index bac0b34f45a..af806264336 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getl2tol1msgproof.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getl2tol1msgproof.mdx @@ -2,11 +2,11 @@ title: "zks_getL2ToL1MsgProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the proof for a message sent through the L1Messenger system contract, given a -block, sender, message, and an optional message log index containing the L1 to L2 message. +block, sender, message, and an optional message log index containing the L1 to L2 message. ## Parameters @@ -14,7 +14,7 @@ block, sender, message, and an optional message log index containing the L1 to L - `sender`: (string) [_Required_] The sender (account) of the message. - `msg`: [_Required_] The keccak256 hash of the sent message. - `l2_log_position`: The index in the block of the event that was emitted by the L1Messenger - when submitting this message. If it is omitted, the proof for the first message is returned. + when submitting this message. If it is omitted, the proof for the first message is returned. ## Response @@ -31,12 +31,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getL2ToL1MsgProof", "params": [5187, "0x87869cb87c4Fa78ca278dF358E890FF73B42a39E", "0x22de7debaa98758afdaee89f447ff43bab5da3de6acca7528b281cc2f1be2ee9"]}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getL2ToL1MsgProof", "params": [5187, "0x87869cb87c4Fa78ca278dF358E890FF73B42a39E", "0x22de7debaa98758afdaee89f447ff43bab5da3de6acca7528b281cc2f1be2ee9"]}' +``` + @@ -52,4 +53,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu } ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_getmaincontract.mdx b/services/reference/zksync/json-rpc-methods/zks_getmaincontract.mdx index b21892a6586..2d94b4566ee 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getmaincontract.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getmaincontract.mdx @@ -2,8 +2,8 @@ title: "zks_getMainContract" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the address of the ZKsync Era contract. @@ -11,7 +11,6 @@ Returns the address of the ZKsync Era contract. None. - ## Response The address of the main ZKsync Era contract on the network. @@ -25,12 +24,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getMainContract", "params": []}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getMainContract", "params": []}' +``` + @@ -46,4 +46,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu } ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_getproof.mdx b/services/reference/zksync/json-rpc-methods/zks_getproof.mdx index 22e1738fde8..b351c1dcc09 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getproof.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getproof.mdx @@ -2,8 +2,8 @@ title: "zks_getProof" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns Merkle proofs for one or more storage values for the specified account along with a Merkle proof of their authenticity. This allows you to verify that the values have not been tampered with. @@ -14,16 +14,15 @@ of their authenticity. This allows you to verify that the values have not been t - `keys`: [_Required_] Vector of storage keys in the account. - `l1BatchNumber`: [_Required_] Number of the L1 batch specifying the point in time at which the requested values are returned. - ## Response - `address`: The account address. - `storageProof`: Proof for each of the requested keys in the order at which they were requested: - - `key` - The requested storage key. - - `value` - The storage value. - - `index` - Index of the tree entry. - - `proof` - Sequence of zero or more 32-byte hashes that form a Merkle path for the key in the Merkle tree. - Hashes are listed using the root-to-leaf ordering. The root hash is excluded; it is published on L1 as a part of L1 batch commit data. + - `key` - The requested storage key. + - `value` - The storage value. + - `index` - Index of the tree entry. + - `proof` - Sequence of zero or more 32-byte hashes that form a Merkle path for the key in the Merkle tree. + Hashes are listed using the root-to-leaf ordering. The root hash is excluded; it is published on L1 as a part of L1 batch commit data. ## Example @@ -34,12 +33,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getProof", "params": ["0x0000000000000000000000000000000000008003", ["0x8b65c0cf1012ea9f393197eb24619fd814379b298b238285649e14f936a5eb12"], 354895]}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getProof", "params": ["0x0000000000000000000000000000000000008003", ["0x8b65c0cf1012ea9f393197eb24619fd814379b298b238285649e14f936a5eb12"], 354895]}' +``` + @@ -70,6 +70,7 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu "id": 1 } - ``` - - \ No newline at end of file +``` + + +``` diff --git a/services/reference/zksync/json-rpc-methods/zks_getrawblocktransactions.mdx b/services/reference/zksync/json-rpc-methods/zks_getrawblocktransactions.mdx index 8698f66a47c..e38758e219e 100644 --- a/services/reference/zksync/json-rpc-methods/zks_getrawblocktransactions.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_getrawblocktransactions.mdx @@ -2,8 +2,8 @@ title: "zks_getRawBlockTransactions" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns data about the transactions in the specified block. @@ -16,26 +16,26 @@ Returns data about the transactions in the specified block. Object containing the data about the executed transaction: - `L1`: Object containing information about the corresponding transaction on the L1 network: - - `canonicalTxHash`: The canonical hash of the transaction on the L1 network. - - `deadlineBlock`: The deadline block for the transaction on the L1 network. - - `ethBlock`: The Ethereum block number for the transaction. - - `ethHash`: The Ethereum transaction hash for the transaction. - - `fullFee`: The full fee for the transaction in hexadecimal format. - - `gasLimit`: The gas limit for the transaction in hexadecimal format. - - `gasPerPubdataLimit`: The gas per public data limit for the transaction in hexadecimal format. - - `layer2TipFee`: The tip fee for the transaction on the L2 network in hexadecimal format. - - `maxFeePerGas`: The maximum fee per gas for the transaction in hexadecimal format. - - `opProcessingType`: The type of operation processing used for the transaction. - - `priorityQueueType`: The type of priority queue used for the transaction. - - `refundRecipient`: The recipient address for any potential refund for the transaction. - - `sender`: The sender address of the transaction. - - `serialId`: The serial ID of the transaction. - - `toMint`: The address to mint tokens for the transaction. + - `canonicalTxHash`: The canonical hash of the transaction on the L1 network. + - `deadlineBlock`: The deadline block for the transaction on the L1 network. + - `ethBlock`: The Ethereum block number for the transaction. + - `ethHash`: The Ethereum transaction hash for the transaction. + - `fullFee`: The full fee for the transaction in hexadecimal format. + - `gasLimit`: The gas limit for the transaction in hexadecimal format. + - `gasPerPubdataLimit`: The gas per public data limit for the transaction in hexadecimal format. + - `layer2TipFee`: The tip fee for the transaction on the L2 network in hexadecimal format. + - `maxFeePerGas`: The maximum fee per gas for the transaction in hexadecimal format. + - `opProcessingType`: The type of operation processing used for the transaction. + - `priorityQueueType`: The type of priority queue used for the transaction. + - `refundRecipient`: The recipient address for any potential refund for the transaction. + - `sender`: The sender address of the transaction. + - `serialId`: The serial ID of the transaction. + - `toMint`: The address to mint tokens for the transaction. - `execute`: Object that contains information about the transaction execution: - - `calldata`: The calldata for the execution in hexadecimal format. - - `contractAddress`: The contract address for the execution. - - `factoryDeps`: An array containing factory dependencies for the execution. - - `value`: The value for the execution in hexadecimal format. + - `calldata`: The calldata for the execution in hexadecimal format. + - `contractAddress`: The contract address for the execution. + - `factoryDeps`: An array containing factory dependencies for the execution. + - `value`: The value for the execution in hexadecimal format. - `received_timestamp_ms`: The transaction timestamp. ## Example @@ -98,4 +98,4 @@ curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ } ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_gettestnetpaymaster.mdx b/services/reference/zksync/json-rpc-methods/zks_gettestnetpaymaster.mdx index 79c3054354c..595b46c597c 100644 --- a/services/reference/zksync/json-rpc-methods/zks_gettestnetpaymaster.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_gettestnetpaymaster.mdx @@ -2,8 +2,8 @@ title: "zks_getTestnetPaymaster" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the address of the [testnet paymaster](https://docs.zksync.io/build/developer-reference/account-abstraction.html#testnet-paymaster) available on testnets and enables paying fees in ERC-20 compatible tokens. @@ -25,12 +25,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-sepolia.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getTestnetPaymaster", "params": []}' - ``` +```bash +curl https://zksync-sepolia.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getTestnetPaymaster", "params": []}' +``` + @@ -46,4 +47,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu } ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_gettransactiondetails.mdx b/services/reference/zksync/json-rpc-methods/zks_gettransactiondetails.mdx index 03bbba657d9..80df036ad2f 100644 --- a/services/reference/zksync/json-rpc-methods/zks_gettransactiondetails.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_gettransactiondetails.mdx @@ -2,8 +2,8 @@ title: "zks_getTransactionDetails" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns data about a transaction given by the transaction hash. @@ -34,12 +34,12 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getTransactionDetails", "params": ["0x22de7debaa98758afdaee89f447ff43bab5da3de6acca7528b281cc2f1be2ee9"]}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getTransactionDetails", "params": ["0x22de7debaa98758afdaee89f447ff43bab5da3de6acca7528b281cc2f1be2ee9"]}' +``` @@ -66,4 +66,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu } ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_l1batchnumber.mdx b/services/reference/zksync/json-rpc-methods/zks_l1batchnumber.mdx index 61237497a28..89ce9bcf70d 100644 --- a/services/reference/zksync/json-rpc-methods/zks_l1batchnumber.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_l1batchnumber.mdx @@ -2,8 +2,8 @@ title: "zks_L1BatchNumber" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the latest L1 batch number. @@ -11,7 +11,6 @@ Returns the latest L1 batch number. None. - ## Response The latest L1 batch number in hexidecimal format. @@ -25,12 +24,13 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu - ```bash - curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_L1BatchNumber", "params": []}' - ``` +```bash +curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_L1BatchNumber", "params": []}' +``` + @@ -46,4 +46,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu } ``` - \ No newline at end of file + diff --git a/services/reference/zksync/json-rpc-methods/zks_l1chainid.mdx b/services/reference/zksync/json-rpc-methods/zks_l1chainid.mdx index 587a6cea261..076c4bde15e 100644 --- a/services/reference/zksync/json-rpc-methods/zks_l1chainid.mdx +++ b/services/reference/zksync/json-rpc-methods/zks_l1chainid.mdx @@ -2,8 +2,8 @@ title: "zks_L1ChainId" --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs" +import TabItem from "@theme/TabItem" Returns the chain ID of the underlying L1. @@ -11,7 +11,6 @@ Returns the chain ID of the underlying L1. None. - ## Response The L1 chain ID. @@ -45,4 +44,4 @@ Replace `YOUR-API-KEY` with an API key from your [Infura dashboard](https://infu } ``` - \ No newline at end of file + diff --git a/services/reference/zksync/quickstart.md b/services/reference/zksync/quickstart.md index 37b989f3a77..aa68ff5fbea 100644 --- a/services/reference/zksync/quickstart.md +++ b/services/reference/zksync/quickstart.md @@ -27,7 +27,7 @@ Run the following command in your terminal, replacing `YOUR-API-KEY` with your a curl https://zksync-mainnet.infura.io/v3/YOUR-API-KEY \ -X POST \ -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + -d '{"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}' ``` ### Node (JavaScript) @@ -36,152 +36,154 @@ In these examples, you'll use [npm](https://docs.npmjs.com/downloading-and-insta #### Node Fetch -1. In your project folder, install the Node Fetch package using npm: +1. In your project folder, install the `node-fetch` package using npm:: - ```bash - npm i node-fetch - `````` + ```bash + npm i node-fetch + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - import fetch from 'node-fetch'; - - fetch("https://zksync-mainnet.infura.io/v3/YOUR-API-KEY", { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - }) - .then(response => - response.json() - ) - .then(data => { - console.log(data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + import fetch from "node-fetch" + + fetch("https://zksync-mainnet.infura.io/v3/YOUR-API-KEY", { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }), + }) + .then((response) => response.json()) + .then((data) => { + console.log(data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Axios -1. In your project folder, install the Axios package using npm: +1. In your project folder, install the `axios` package using npm: - ```bash - npm i axios - `````` + ```bash + npm i axios + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. - - ```javascript title="index.js" - const axios = require("axios"); - - axios.post("https://zksync-mainnet.infura.io/v3/YOUR-API-KEY", { - jsonrpc: "2.0", - method: "eth_blockNumber", - params: [], - id: 1 - }) - .then(response => { - console.log(response.data); - }) - .catch(error => { - console.error(error); - }); - ``` + Replace `YOUR-API-KEY` with your actual Infura API key. + + ```javascript title="index.js" + const axios = require("axios") + + axios + .post("https://zksync-mainnet.infura.io/v3/YOUR-API-KEY", { + jsonrpc: "2.0", + method: "eth_blockNumber", + params: [], + id: 1, + }) + .then((response) => { + console.log(response.data) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` #### Ethers 1. In your project folder, install the `ethers` package using npm: - ```bash - npm install ethers - `````` + ```bash + npm install ethers + ``` 1. Create your JavaScript file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```javascript title="index.js" - const ethers = require("ethers"); + ```javascript title="index.js" + const ethers = require("ethers") - const provider = new ethers.providers.JsonRpcProvider("https://zksync-mainnet.infura.io/v3/YOUR-API-KEY"); + const provider = new ethers.providers.JsonRpcProvider( + "https://zksync-mainnet.infura.io/v3/YOUR-API-KEY" + ) - provider.getBlockNumber() - .then(blockNumber => { - console.log(blockNumber); - }) - .catch(error => { - console.error(error); - }); - ``` + provider + .getBlockNumber() + .then((blockNumber) => { + console.log(blockNumber) + }) + .catch((error) => { + console.error(error) + }) + ``` 1. Run the code using the following command: - ```bash - node index.js - ``` + ```bash + node index.js + ``` ### Python 1. In your project folder, install the `requests` library: - ```bash - pip install requests - `````` + ```bash + pip install requests + ``` 1. Create your Python file and copy the following code: - Replace `YOUR-API-KEY` with your actual Infura API key. + Replace `YOUR-API-KEY` with your actual Infura API key. - ```python title="index.py" - import requests - import json + ```python title="index.py" + import requests + import json - url = "https://zksync-mainnet.infura.io/v3/YOUR-API-KEY" + url = "https://zksync-mainnet.infura.io/v3/YOUR-API-KEY" - payload = { - "jsonrpc": "2.0", - "method": "eth_blockNumber", - "params": [], - "id": 1 - } + payload = { + "jsonrpc": "2.0", + "method": "eth_blockNumber", + "params": [], + "id": 1 + } - headers = {"content-type": "application/json"} + headers = {"content-type": "application/json"} - response = requests.post(url, data=json.dumps(payload), headers=headers).json() + response = requests.post(url, data=json.dumps(payload), headers=headers).json() - print(response) - ``` + print(response) + ``` 1. Run the code using the following command: - ```bash - python index.py - ``` + ```bash + python index.py + ``` ## Next Steps @@ -189,7 +191,7 @@ Now that you have successfully made a call to the ZKsync Era network, you can ex by Infura. Here are some suggestions: - **Explore other ZKsync Era APIs**: Infura supports a wide range of APIs. You can find more information in the -[JSON-RPC API method documentation](json-rpc-methods/index.md). + [JSON-RPC API method documentation](json-rpc-methods/index.md). - **Try out different networks**: Infura supports multiple networks including Arbitrum, Polygon, Optimism, IPFS, and more. @@ -197,4 +199,3 @@ by Infura. Here are some suggestions: Remember, the Infura community is here to help. If you have any questions or run into any issues, check out the [Infura community](https://community.infura.io/) for help and answers to common questions. - diff --git a/services/test-net/bridge-funds-to-linea.md b/services/test-net/bridge-funds-to-linea.md index 28e10bcb3c3..ad2529e01f1 100644 --- a/services/test-net/bridge-funds-to-linea.md +++ b/services/test-net/bridge-funds-to-linea.md @@ -25,4 +25,4 @@ Alternatively, you can obtain [Sepolia ETH](https://www.infura.io/faucet/sepolia See the [official Linea documentation](https://docs.linea.build/use-mainnet/bridges-of-linea/how-to-bridge-eth) for information about additional faucets and bridging funds. -::: \ No newline at end of file +::: diff --git a/services/test-net/get-celo-tokens.md b/services/test-net/get-celo-tokens.md index 0f3cf14aa84..fa4ffa71a51 100644 --- a/services/test-net/get-celo-tokens.md +++ b/services/test-net/get-celo-tokens.md @@ -1,5 +1,5 @@ --- -description: Get Celo test tokens +description: Get Celo test tokens --- # Get Celo tokens diff --git a/services/test-net/get-some-testnet-eth-optimism.md b/services/test-net/get-some-testnet-eth-optimism.md index a26d8858b9e..f0cfdb2809a 100644 --- a/services/test-net/get-some-testnet-eth-optimism.md +++ b/services/test-net/get-some-testnet-eth-optimism.md @@ -11,4 +11,4 @@ Optimism recommends the [Optimism Sepolia faucet](https://faucet.quicknode.com/o :::note If you already have Sepolia ETH, you can deposit it by sending it to the Optimism Portal on L1 Sepolia. See [Optimism Docs](https://community.optimism.io/docs/useful-tools/networks/#op-sepolia). -::: \ No newline at end of file +::: diff --git a/services/test-net/get-testnet-eth-mantle.md b/services/test-net/get-testnet-eth-mantle.md index 92b88cddf7f..0388b079195 100644 --- a/services/test-net/get-testnet-eth-mantle.md +++ b/services/test-net/get-testnet-eth-mantle.md @@ -7,10 +7,10 @@ description: Get test tokens for the Mantle testnet. You need Sepolia ETH and Sepolia MNT to transact on the Sepolia Mantle testnet. To do this: 1. Obtain Sepolia ETH for the Mantle network from the - [Infura Sepolia faucet](https://www.infura.io/faucet/sepolia), you can find a list - of Sepolia ETH faucets on the [Faucetlink webpage](https://faucetlink.to/sepolia). + [Infura Sepolia faucet](https://www.infura.io/faucet/sepolia), you can find a list + of Sepolia ETH faucets on the [Faucetlink webpage](https://faucetlink.to/sepolia). 1. Obtain Sepolia MNT from the [Mantle testnet faucet](https://faucet.sepolia.mantle.xyz/). You need - Sepolia ETH to mint your MNT tokens. + Sepolia ETH to mint your MNT tokens. -1. [Bridge your MNT tokens](https://bridge.sepolia.mantle.xyz/) to the Sepolia Mantle testnet. +1. [Bridge your MNT tokens](https://bridge.sepolia.mantle.xyz/) to the Sepolia Mantle testnet. diff --git a/services/tutorials/ethereum/_category_.json b/services/tutorials/ethereum/_category_.json index 167f2e50b53..c629f387bf0 100644 --- a/services/tutorials/ethereum/_category_.json +++ b/services/tutorials/ethereum/_category_.json @@ -1,10 +1,10 @@ { - "label": "Ethereum", - "collapsible": true, - "collapsed": true, - "link": { - "type": "generated-index", - "slug": "tutorials/ethereum", - "description": "This section provides tutorials for using the Infura API to perform various tasks on the Ethereum blockchain." - } -} \ No newline at end of file + "label": "Ethereum", + "collapsible": true, + "collapsed": true, + "link": { + "type": "generated-index", + "slug": "tutorials/ethereum", + "description": "This section provides tutorials for using the Infura API to perform various tasks on the Ethereum blockchain." + } +} diff --git a/services/tutorials/ethereum/call-a-contract.md b/services/tutorials/ethereum/call-a-contract.md index a5b9eb66163..ce41c9fc8f8 100644 --- a/services/tutorials/ethereum/call-a-contract.md +++ b/services/tutorials/ethereum/call-a-contract.md @@ -20,58 +20,61 @@ In the `deployContract` folder created [earlier](deploy-a-contract-using-web3.js In this example we'll create the `call.js` file with the following contents: ```javascript -const { Web3 } = require("web3"); +const { Web3 } = require("web3") // Loading the contract ABI // (the results of a previous compilation step) -const fs = require("fs"); -const { abi } = JSON.parse(fs.readFileSync("Demo.json")); +const fs = require("fs") +const { abi } = JSON.parse(fs.readFileSync("Demo.json")) async function main() { // Configuring the connection to an Ethereum node - const network = process.env.ETHEREUM_NETWORK; + const network = process.env.ETHEREUM_NETWORK const web3 = new Web3( new Web3.providers.HttpProvider( - `https://${network}.infura.io/v3/${process.env.INFURA_API_KEY}`, - ), - ); + `https://${network}.infura.io/v3/${process.env.INFURA_API_KEY}` + ) + ) // Creating a signing account from a private key const signer = web3.eth.accounts.privateKeyToAccount( "0x" + process.env.SIGNER_PRIVATE_KEY - ); - web3.eth.accounts.wallet.add(signer); + ) + web3.eth.accounts.wallet.add(signer) // Creating a Contract instance const contract = new web3.eth.Contract( abi, // Replace this with the address of your deployed contract - process.env.DEMO_CONTRACT, - ); + process.env.DEMO_CONTRACT + ) // Issuing a transaction that calls the `echo` method - const method_abi = contract.methods.echo("Hello, world!").encodeABI(); + const method_abi = contract.methods.echo("Hello, world!").encodeABI() const tx = { from: signer.address, to: contract.options.address, data: method_abi, - value: '0', - gasPrice: '100000000000', - }; - const gas_estimate = await web3.eth.estimateGas(tx); - tx.gas = gas_estimate; - const signedTx = await web3.eth.accounts.signTransaction(tx, signer.privateKey); - console.log("Raw transaction data: " + ( signedTx).rawTransaction); + value: "0", + gasPrice: "100000000000", + } + const gas_estimate = await web3.eth.estimateGas(tx) + tx.gas = gas_estimate + const signedTx = await web3.eth.accounts.signTransaction( + tx, + signer.privateKey + ) + console.log("Raw transaction data: " + signedTx.rawTransaction) // Sending the transaction to the network const receipt = await web3.eth .sendSignedTransaction(signedTx.rawTransaction) .once("transactionHash", (txhash) => { - console.log(`Mining transaction ...`); - console.log(`https://${network}.etherscan.io/tx/${txhash}`); - }); + console.log(`Mining transaction ...`) + console.log(`https://${network}.etherscan.io/tx/${txhash}`) + }) // The transaction is now on chain! - console.log(`Mined in block ${receipt.blockNumber}`); + console.log(`Mined in block ${receipt.blockNumber}`) } -require("dotenv").config(); -main(); +require("dotenv").config() +main() ``` ### 2. Call the contract diff --git a/services/tutorials/ethereum/deploy-a-contract-using-web3.js.md b/services/tutorials/ethereum/deploy-a-contract-using-web3.js.md index 02a3c1047c1..eeb74d21ede 100644 --- a/services/tutorials/ethereum/deploy-a-contract-using-web3.js.md +++ b/services/tutorials/ethereum/deploy-a-contract-using-web3.js.md @@ -63,7 +63,6 @@ This example has been written for web3js v4.x. It may not work for earlier versi ::: - Install the solidity compiler (`solc` package): ``` @@ -127,17 +126,17 @@ You can compile the smart contract using the [`solc` command line options](https Create a file called `compile.js` with the following content: ```javascript -const fs = require("fs").promises; -const solc = require("solc"); +const fs = require("fs").promises +const solc = require("solc") async function main() { // Load the contract source code - const sourceCode = await fs.readFile("Demo.sol", "utf8"); + const sourceCode = await fs.readFile("Demo.sol", "utf8") // Compile the source code and retrieve the ABI and Bytecode - const { abi, bytecode } = compile(sourceCode, "Demo"); + const { abi, bytecode } = compile(sourceCode, "Demo") // Store the ABI and Bytecode into a JSON file - const artifact = JSON.stringify({ abi, bytecode }, null, 2); - await fs.writeFile("Demo.json", artifact); + const artifact = JSON.stringify({ abi, bytecode }, null, 2) + await fs.writeFile("Demo.json", artifact) } function compile(sourceCode, contractName) { @@ -146,14 +145,14 @@ function compile(sourceCode, contractName) { language: "Solidity", sources: { main: { content: sourceCode } }, settings: { outputSelection: { "*": { "*": ["abi", "evm.bytecode"] } } }, - }; + } // Parse the compiler output to retrieve the ABI and Bytecode - const output = solc.compile(JSON.stringify(input)); - const artifact = JSON.parse(output).contracts.main[contractName]; + const output = solc.compile(JSON.stringify(input)) + const artifact = JSON.parse(output).contracts.main[contractName] return { abi: artifact.abi, bytecode: artifact.evm.bytecode.object, - }; + } } main() @@ -176,49 +175,49 @@ A file called `Demo.json` should be created in the directory. Next, we'll create a deployment script called `deploy.js`. The script uses the Web3 methods to sign the transaction and deploy the smart contract to the network. ```javascript -const { Web3 } = require("web3"); +const { Web3 } = require("web3") // Loading the contract ABI and Bytecode // (the results of a previous compilation step) -const fs = require("fs"); -const { abi, bytecode } = JSON.parse(fs.readFileSync("Demo.json")); +const fs = require("fs") +const { abi, bytecode } = JSON.parse(fs.readFileSync("Demo.json")) async function main() { // Configuring the connection to an Ethereum node - const network = process.env.ETHEREUM_NETWORK; + const network = process.env.ETHEREUM_NETWORK const web3 = new Web3( new Web3.providers.HttpProvider( - `https://${network}.infura.io/v3/${process.env.INFURA_API_KEY}`, - ), - ); + `https://${network}.infura.io/v3/${process.env.INFURA_API_KEY}` + ) + ) // Creating a signing account from a private key const signer = web3.eth.accounts.privateKeyToAccount( - '0x' + process.env.SIGNER_PRIVATE_KEY, - ); - web3.eth.accounts.wallet.add(signer); + "0x" + process.env.SIGNER_PRIVATE_KEY + ) + web3.eth.accounts.wallet.add(signer) // Using the signing account to deploy the contract - const contract = new web3.eth.Contract(abi); - contract.options.data = bytecode; - const deployTx = contract.deploy(); + const contract = new web3.eth.Contract(abi) + contract.options.data = bytecode + const deployTx = contract.deploy() const deployedContract = await deployTx .send({ from: signer.address, gas: await deployTx.estimateGas(), }) .once("transactionHash", (txhash) => { - console.log(`Mining deployment transaction ...`); - console.log(`https://${network}.etherscan.io/tx/${txhash}`); - }); + console.log(`Mining deployment transaction ...`) + console.log(`https://${network}.etherscan.io/tx/${txhash}`) + }) // The contract is now deployed on chain! - console.log(`Contract deployed at ${deployedContract.options.address}`); + console.log(`Contract deployed at ${deployedContract.options.address}`) console.log( - `Add DEMO_CONTRACT to the.env file to store the contract address: ${deployedContract.options.address}`, - ); + `Add DEMO_CONTRACT to the.env file to store the contract address: ${deployedContract.options.address}` + ) } -require("dotenv").config(); -main(); +require("dotenv").config() +main() ``` ### 9. Deploy the contract diff --git a/services/tutorials/ethereum/monitor-transfers-using-python.md b/services/tutorials/ethereum/monitor-transfers-using-python.md index 723a5cb6388..0f460c095f3 100644 --- a/services/tutorials/ethereum/monitor-transfers-using-python.md +++ b/services/tutorials/ethereum/monitor-transfers-using-python.md @@ -3,8 +3,8 @@ description: Monitor transfers to an Ethereum account. sidebar_position: 3 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Monitor transfers using Python @@ -52,8 +52,8 @@ import time Connect to the Infura endpoint and the address of the account: ```python -infura_url = 'https://mainnet.infura.io/v3/' -account = '' +infura_url = "https://mainnet.infura.io/v3/ ```python Searching in block 15019035 Transaction found in block 15019035 : -{'hash': '0x0f878eb882dfd069c482740df533e0ddef63504d795dcc3c934c3f9a6c159362', 'from': '0x95B564F3B3BaE3f206aa418667bA000AFAFAcc8a', 'value': 0} +{"hash": "0x0f878eb882dfd069c482740df533e0ddef63504d795dcc3c934c3f9a6c159362", "from": "0x95B564F3B3BaE3f206aa418667bA000AFAFAcc8a", "value": 0} Transaction found in block 15019035 : -{'hash': '0xee75ed766e17fef1cae917686b5b73e7c72b2fcf51e1558629b8fe96a7e5a1bd', 'from': '0x9696f59E4d72E237BE84fFD425DCaD154Bf96976', 'value': 0} +{"hash": "0xee75ed766e17fef1cae917686b5b73e7c72b2fcf51e1558629b8fe96a7e5a1bd", "from": "0x9696f59E4d72E237BE84fFD425DCaD154Bf96976", "value": 0} Transaction found in block 15019035 : -{'hash': '0x1cddbeff3ac97651f5d7e49e98f4289aeef728e08b05180c75bc04cdc970895d', 'from': '0x21a31Ee1afC51d94C2eFcCAa2092aD1028285549', 'value': 0} +{"hash": "0x1cddbeff3ac97651f5d7e49e98f4289aeef728e08b05180c75bc04cdc970895d", "from": "0x21a31Ee1afC51d94C2eFcCAa2092aD1028285549", "value": 0} ... 67341 ``` @@ -142,32 +143,32 @@ Transaction found in block 15019035 : from web3 import Web3 import time -infura_url = 'https://mainnet.infura.io/v3/' -account = '' +infura_url = "https://mainnet.infura.io/v3/" +account = "" web3 = Web3(Web3.HTTPProvider(infura_url)) def confirmations(tx_hash): - tx = web3.eth.get_transaction(tx_hash) - return web3.eth.block_number - tx.blockNumber + tx = web3.eth.get_transaction(tx_hash) + return web3.eth.block_number - tx.blockNumber def watch(): - while True: - block = web3.eth.get_block('latest') - print("Searching in block " + str(block.number)) - - if block and block.transactions: - for transaction in block.transactions: - tx_hash = transaction.hex() # the hashes are stored in a hexBytes format - tx = web3.eth.get_transaction(tx_hash) - if tx.to != None: - if tx.to == account: - print("Transaction found in block {} :".format(block.number)) - print({ - "hash": tx_hash, - "from": tx["from"], - "value": web3.from_wei(tx["value"], 'ether') - }) - time.sleep(5) + while True: + block = web3.eth.get_block("latest") + print("Searching in block " + str(block.number)) + + if block and block.transactions: + for transaction in block.transactions: + tx_hash = transaction.hex() # the hashes are stored in a hexBytes format + tx = web3.eth.get_transaction(tx_hash) + if tx.to is not None: + if tx.to == account: + print("Transaction found in block {} :".format(block.number)) + print({ + "hash": tx_hash, + "from": tx["from"], + "value": web3.from_wei(tx["value"], "ether") + }) + time.sleep(5) watch() # print(confirmations("0x0d40d60e118e9e1f61c2baa2252cc5f8b8ed491c885ec35db6fd6cfc8589c1a7")) diff --git a/services/tutorials/ethereum/retrieve-and-display-erc-721-and-erc-1155-tokens.md b/services/tutorials/ethereum/retrieve-and-display-erc-721-and-erc-1155-tokens.md index a301fe3fcd7..16916786aae 100644 --- a/services/tutorials/ethereum/retrieve-and-display-erc-721-and-erc-1155-tokens.md +++ b/services/tutorials/ethereum/retrieve-and-display-erc-721-and-erc-1155-tokens.md @@ -3,8 +3,8 @@ description: Retrieve and display ERC-721 and ERC-1155 tokens. sidebar_position: 4 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Retrieve and display ERC-721 and ERC-1155 tokens @@ -45,19 +45,16 @@ This example has been written for web3js v4.x. It may not work for earlier versi ::: - ### 3. Set up the script Create a file called `retrieveBalance.js`. At the top of file, add the following lines to import the web3.js library and connect to the Infura HTTPS endpoint: ```javascript -const { Web3 } = require("web3"); +const { Web3 } = require("web3") const web3 = new Web3( - new Web3.providers.HttpProvider( - "https://mainnet.infura.io/v3/" - ) -); + new Web3.providers.HttpProvider("https://mainnet.infura.io/v3/") +) ``` Replace `` with your Infura API key. @@ -94,7 +91,7 @@ const tokenURIABI = [ stateMutability: "view", type: "function", }, -]; +] ``` @@ -123,7 +120,7 @@ const uriABI = [ stateMutability: "view", type: "function", }, -]; +] ``` @@ -137,16 +134,16 @@ Define the ABI for the respective method by adding the following to the script: ```javascript -const tokenContract = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"; -const tokenId = 101; +const tokenContract = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" +const tokenId = 101 ``` ```javascript -const tokenContract = "0x76be3b62873462d2142405439777e971754e8e77"; -const tokenId = 10570; +const tokenContract = "0x76be3b62873462d2142405439777e971754e8e77" +const tokenId = 10570 ``` @@ -160,14 +157,14 @@ Define the contract using `web3.eth.Contract()`, passing the ABI and contract ad ```javascript -const contract = new web3.eth.Contract(tokenURIABI, tokenContract); +const contract = new web3.eth.Contract(tokenURIABI, tokenContract) ``` ```javascript -const contract = new web3.eth.Contract(uriABI, tokenContract); +const contract = new web3.eth.Contract(uriABI, tokenContract) ``` @@ -182,12 +179,12 @@ This calls the ABI function defined in [step 4](retrieve-and-display-erc-721-and ```javascript async function getNFTMetadata() { - const result = await contract.methods.tokenURI(tokenId).call(); + const result = await contract.methods.tokenURI(tokenId).call() - console.log(result); // ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/101 + console.log(result) // ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/101 } -getNFTMetadata(); +getNFTMetadata() ``` @@ -195,12 +192,12 @@ getNFTMetadata(); ```javascript async function getNFTMetadata() { - const result = await contract.methods.uri(tokenId).call(); + const result = await contract.methods.uri(tokenId).call() - console.log(result); // https://nftdata.parallelnft.com/api/parallel-alpha/ipfs/QmSwnqTmpwvZH51Uv47opPUxGYx2nknYmGoKoRJQRMDcLL + console.log(result) // https://nftdata.parallelnft.com/api/parallel-alpha/ipfs/QmSwnqTmpwvZH51Uv47opPUxGYx2nknYmGoKoRJQRMDcLL } -getNFTMetadata(); +getNFTMetadata() ``` @@ -221,12 +218,12 @@ In the script, add a function to combine the IPFS hash and your Infura subdomain ```javascript function addIPFSProxy(ipfsHash) { - const URL = "https://.infura-ipfs.io/ipfs/"; - const hash = ipfsHash.replace(/^ipfs?:\/\//, ""); - const ipfsURL = URL + hash; + const URL = "https://.infura-ipfs.io/ipfs/" + const hash = ipfsHash.replace(/^ipfs?:\/\//, "") + const ipfsURL = URL + hash - console.log(ipfsURL); // https://.infura-ipfs.io/ipfs/ - return ipfsURL; + console.log(ipfsURL) // https://.infura-ipfs.io/ipfs/ + return ipfsURL } ``` @@ -240,13 +237,13 @@ Replace `` with your Infura IPFS subdomain. Update the request for metadata to allow access to the IPFS hash through your Infura endpoint. In the `getNFTMetadata` function defined in [step 5](retrieve-and-display-erc-721-and-erc-1155-tokens.md#5-request-the-metadata), add the following: ```javascript - const ipfsURL = addIPFSProxy(result); +const ipfsURL = addIPFSProxy(result) - const response = await fetch(ipfsURL); - const metadata = await response.json(); - console.log(metadata); // Metadata in JSON +const response = await fetch(ipfsURL) +const metadata = await response.json() +console.log(metadata) // Metadata in JSON - const image = addIPFSProxy(metadata.image); +const image = addIPFSProxy(metadata.image) ``` Also add this line to the top of the file: @@ -273,14 +270,12 @@ Note some ERC-721 contracts return a regular HTTP URL, while some ERC-1155 contr ```js -const fetch = require("node-fetch"); -const { Web3 } = require("web3"); +const fetch = require("node-fetch") +const { Web3 } = require("web3") const web3 = new Web3( - new Web3.providers.HttpProvider( - "https://mainnet.infura.io/v3/" - ) -); + new Web3.providers.HttpProvider("https://mainnet.infura.io/v3/") +) const tokenURIABI = [ { @@ -302,36 +297,36 @@ const tokenURIABI = [ stateMutability: "view", type: "function", }, -]; +] -const tokenContract = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"; // BAYC contract address -const tokenId = 101; // A token we'd like to retrieve its metadata of +const tokenContract = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d" // BAYC contract address +const tokenId = 101 // A token we'd like to retrieve its metadata of -const contract = new web3.eth.Contract(tokenURIABI, tokenContract); +const contract = new web3.eth.Contract(tokenURIABI, tokenContract) async function getNFTMetadata() { - const result = await contract.methods.tokenURI(tokenId).call(); + const result = await contract.methods.tokenURI(tokenId).call() - console.log(result); // ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/101 + console.log(result) // ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/101 - const ipfsURL = addIPFSProxy(result); + const ipfsURL = addIPFSProxy(result) - const response = await fetch(ipfsURL); - const metadata = await response.json(); - console.log(metadata); // Metadata in JSON + const response = await fetch(ipfsURL) + const metadata = await response.json() + console.log(metadata) // Metadata in JSON - const image = addIPFSProxy(metadata.image); + const image = addIPFSProxy(metadata.image) } -getNFTMetadata(); +getNFTMetadata() function addIPFSProxy(ipfsHash) { - const URL = "https://.infura-ipfs.io/ipfs/"; - const hash = ipfsHash.replace(/^ipfs?:\/\//, ""); - const ipfsURL = URL + hash; + const URL = "https://.infura-ipfs.io/ipfs/" + const hash = ipfsHash.replace(/^ipfs?:\/\//, "") + const ipfsURL = URL + hash - console.log(ipfsURL); // https://.infura-ipfs.io/ipfs/ - return ipfsURL; + console.log(ipfsURL) // https://.infura-ipfs.io/ipfs/ + return ipfsURL } ``` @@ -339,13 +334,11 @@ function addIPFSProxy(ipfsHash) { ```javascript -const { Web3 } = require("web3"); +const { Web3 } = require("web3") const web3 = new Web3( - new Web3.providers.HttpProvider( - "https://mainnet.infura.io/v3/" - ) -); + new Web3.providers.HttpProvider("https://mainnet.infura.io/v3/") +) const uriABI = [ { @@ -369,20 +362,20 @@ const uriABI = [ stateMutability: "view", type: "function", }, -]; +] -const tokenContract = "0x76be3b62873462d2142405439777e971754e8e77"; // Parallel contract address -const tokenId = 10570; // A token we'd like to retrieve its metadata of +const tokenContract = "0x76be3b62873462d2142405439777e971754e8e77" // Parallel contract address +const tokenId = 10570 // A token we'd like to retrieve its metadata of -const contract = new web3.eth.Contract(uriABI, tokenContract); +const contract = new web3.eth.Contract(uriABI, tokenContract) async function getNFTMetadata() { - const result = await contract.methods.uri(tokenId).call(); + const result = await contract.methods.uri(tokenId).call() - console.log(result); // https://nftdata.parallelnft.com/api/parallel-alpha/ipfs/QmSwnqTmpwvZH51Uv47opPUxGYx2nknYmGoKoRJQRMDcLL + console.log(result) // https://nftdata.parallelnft.com/api/parallel-alpha/ipfs/QmSwnqTmpwvZH51Uv47opPUxGYx2nknYmGoKoRJQRMDcLL } -getNFTMetadata(); +getNFTMetadata() ``` diff --git a/services/tutorials/ethereum/retrieve-the-balance-of-an-erc-20-token.md b/services/tutorials/ethereum/retrieve-the-balance-of-an-erc-20-token.md index 4144a96d10c..0cf925cad6a 100644 --- a/services/tutorials/ethereum/retrieve-the-balance-of-an-erc-20-token.md +++ b/services/tutorials/ethereum/retrieve-the-balance-of-an-erc-20-token.md @@ -3,8 +3,8 @@ description: Retrieve the balance of an ERC-20 token. sidebar_position: 5 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Retrieve the balance of an ERC-20 token @@ -44,12 +44,10 @@ npm install web3 Create a file called `retrieveBalance.js`. At the top of file, add the following lines to import the web3.js library and connect to the Infura HTTPS endpoint: ```javascript -const { Web3 } = require("web3"); +const { Web3 } = require("web3") const web3 = new Web3( - new Web3.providers.HttpProvider( - "https://mainnet.infura.io/v3/", - ), -); + new Web3.providers.HttpProvider("https://mainnet.infura.io/v3/") +) ``` Make sure to replace `` with your Infura API key. @@ -79,7 +77,7 @@ const balanceOfABI = [ stateMutability: "view", type: "function", }, -]; +] ``` ### 5. Select a token address @@ -95,14 +93,14 @@ This example uses a DAI token contract. However, you can use any ERC-20 token co Define the addresses to use in the `retrieveBalance.js` script: ```javascript -const tokenContract = "0x6b175474e89094c44da98b954eedeac495271d0f"; -const tokenHolder = "0xf326e4de8f66a0bdc0970b79e0924e33c79f1915"; +const tokenContract = "0x6b175474e89094c44da98b954eedeac495271d0f" +const tokenHolder = "0xf326e4de8f66a0bdc0970b79e0924e33c79f1915" ``` Define `contract` using `web3.eth.Contract()`, passing the `balanceOfABI` and the token contract address `tokenContract` as parameters: ```javascript -const contract = new web3.eth.Contract(balanceOfABI, tokenContract); +const contract = new web3.eth.Contract(balanceOfABI, tokenContract) ``` Next, call `methods.balanceOf()` on the `contract` and pass the `tokenHolder` address. This call sends a request to your Infura endpoint to request the token balance in the `tokenHolder` account address. @@ -111,8 +109,8 @@ Create the below `async` function `getTokenBalance` that accomplishes this by in ```javascript async function getTokenBalance() { - const result = await.contract.methods.balanceOf(tokenHolder).call(); - console.log(result) + const result = await.contract.methods.balanceOf(tokenHolder).call(); + console.log(result) } getTokenBalance(); @@ -125,13 +123,13 @@ By default, calling `balanceOf` returns the balance value in `wei`, which is the Use `web3.utils.fromWei(result, "ether")` to get the actual number of DAI tokens, by adding the following line to the `async` function: ```javascript -const formattedResult = web3.utils.fromWei(result, "ether"); +const formattedResult = web3.utils.fromWei(result, "ether") ``` Also, update your `console.log(format)`: ```javascript -console.log(formattedResult); +console.log(formattedResult) ``` ### 8. Run the script @@ -141,12 +139,10 @@ console.log(formattedResult); Here is the complete code for `retrieveBalance.js`. Before running it make sure you replace `` with your Infura API key. ```javascript -const { Web3 } = require("web3"); +const { Web3 } = require("web3") const web3 = new Web3( - new Web3.providers.HttpProvider( - "https://mainnet.infura.io/v3/", - ), -); + new Web3.providers.HttpProvider("https://mainnet.infura.io/v3/") +) const balanceOfABI = [ { @@ -168,21 +164,21 @@ const balanceOfABI = [ stateMutability: "view", type: "function", }, -]; +] // DAI token contract -const tokenContract = "0x6B175474E89094C44Da98b954EedeAC495271d0F"; +const tokenContract = "0x6B175474E89094C44Da98b954EedeAC495271d0F" // A DAI token holder -const tokenHolder = "0x075e72a5eDf65F0A5f44699c7654C1a76941Ddc8"; -const contract = new web3.eth.Contract(balanceOfABI, tokenContract); +const tokenHolder = "0x075e72a5eDf65F0A5f44699c7654C1a76941Ddc8" +const contract = new web3.eth.Contract(balanceOfABI, tokenContract) async function getTokenBalance() { - const result = await contract.methods.balanceOf(tokenHolder).call(); - const formattedResult = web3.utils.fromWei(result, "ether"); - console.log(formattedResult); + const result = await contract.methods.balanceOf(tokenHolder).call() + const formattedResult = web3.utils.fromWei(result, "ether") + console.log(formattedResult) } -getTokenBalance(); +getTokenBalance() ``` Run the script using the following command: @@ -204,4 +200,4 @@ node retrieveBalance.js ``` - \ No newline at end of file + diff --git a/services/tutorials/ethereum/send-a-transaction/_category_.json b/services/tutorials/ethereum/send-a-transaction/_category_.json index c2510e45855..8af87ddd618 100644 --- a/services/tutorials/ethereum/send-a-transaction/_category_.json +++ b/services/tutorials/ethereum/send-a-transaction/_category_.json @@ -1,10 +1,10 @@ { - "label": "Send transactions", - "collapsible": true, - "collapsed": true, - "link": { - "type": "generated-index", - "slug": "tutorials/ethereum/send-a-transaction", - "description": "These tutorials use various Web3 libraries to send transactions on the Ethereum testnet." - } -} \ No newline at end of file + "label": "Send transactions", + "collapsible": true, + "collapsed": true, + "link": { + "type": "generated-index", + "slug": "tutorials/ethereum/send-a-transaction", + "description": "These tutorials use various Web3 libraries to send transactions on the Ethereum testnet." + } +} diff --git a/services/tutorials/ethereum/send-a-transaction/send-a-transaction-ethers.md b/services/tutorials/ethereum/send-a-transaction/send-a-transaction-ethers.md index ff1043f409e..ecb89583dc0 100644 --- a/services/tutorials/ethereum/send-a-transaction/send-a-transaction-ethers.md +++ b/services/tutorials/ethereum/send-a-transaction/send-a-transaction-ethers.md @@ -75,31 +75,33 @@ Replace `to_account` with the relevant details. ```go const { ethers } = require("ethers"); - async function main() { - // Configuring the connection to an Ethereum node - const network = process.env.ETHEREUM_NETWORK; - const provider = new ethers.providers.InfuraProvider( - network, - process.env.INFURA_API_KEY - ); - // Creating a signing account from a private key - const signer = new ethers.Wallet(process.env.SIGNER_PRIVATE_KEY, provider); - - // Creating and sending the transaction object - const tx = await signer.sendTransaction({ - to: "", - value: ethers.utils.parseUnits("0.001", "ether"), - }); - console.log("Mining transaction..."); - console.log(`https://${network}.etherscan.io/tx/${tx.hash}`); - // Waiting for the transaction to be mined - const receipt = await tx.wait(); - // The transaction is now on chain! - console.log(`Mined in block ${receipt.blockNumber}`); - } - - require("dotenv").config(); - main(); +async function main() { + // Configuring the connection to an Ethereum node + const network = process.env.ETHEREUM_NETWORK; + const provider = new ethers.providers.InfuraProvider( + network, + process.env.INFURA_API_KEY + ); + + // Creating a signing account from a private key + const signer = new ethers.Wallet(process.env.SIGNER_PRIVATE_KEY, provider); + + // Creating and sending the transaction object + const tx = await signer.sendTransaction({ + to: "", + value: ethers.utils.parseUnits("0.001", "ether"), + }); + console.log("Mining transaction..."); + console.log(`https://${network}.etherscan.io/tx/${tx.hash}`); + + // Waiting for the transaction to be mined + const receipt = await tx.wait(); + // The transaction is now on chain! + console.log(`Mined in block ${receipt.blockNumber}`); +} + +require("dotenv").config(); +main(); ``` ### 5. Execute the transaction @@ -129,7 +131,7 @@ const limit = provider.estimateGas({ from: signer.address, to: "", value: ethers.utils.parseUnits("0.001", "ether"), -}); +}) // Creating and sending the transaction object const tx = await signer.sendTransaction({ @@ -139,5 +141,5 @@ const tx = await signer.sendTransaction({ nonce: signer.getTransactionCount(), maxPriorityFeePerGas: ethers.utils.parseUnits("2", "gwei"), chainId: 3, -}); +}) ``` diff --git a/services/tutorials/ethereum/send-a-transaction/send-a-transaction-go.md b/services/tutorials/ethereum/send-a-transaction/send-a-transaction-go.md index b6e9ec49b7b..986c1d4b9c5 100644 --- a/services/tutorials/ethereum/send-a-transaction/send-a-transaction-go.md +++ b/services/tutorials/ethereum/send-a-transaction/send-a-transaction-go.md @@ -49,82 +49,80 @@ go get github.com/ethereum/go-ethereum/rpc@v1.10.17 package main import ( - "context" - "crypto/ecdsa" - "fmt" - "log" - "math/big" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethclient" + "context" + "crypto/ecdsa" + "fmt" + "log" + "math/big" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethclient" ) func main() { - client, err := ethclient.Dial("https://sepolia.infura.io/v3/API_KEY") - if err != nil { - log.Fatal(err) - } - - privateKey, err := crypto.HexToECDSA("PRIVATE_KEY") - if err != nil { - log.Fatal(err) - } - - publicKey := privateKey.Public() - publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) - if !ok { - log.Fatal("error casting public key to ECDSA") - } - - fromAddress := crypto.PubkeyToAddress(*publicKeyECDSA) - - nonce, err := client.PendingNonceAt(context.Background(), fromAddress) - if err != nil { - log.Fatal(err) - } - - value := big.NewInt(10000000000000000) // in wei (0.01 eth) - gasLimit := uint64(21000) // in units - tip := big.NewInt(2000000000) // maxPriorityFeePerGas = 2 Gwei - feeCap := big.NewInt(20000000000) // maxFeePerGas = 20 Gwei - if err != nil { - log.Fatal(err) - } - - toAddress := common.HexToAddress("ADDRESS_TO") - var data []byte - - chainID, err := client.NetworkID(context.Background()) - if err != nil { - log.Fatal(err) - } - - tx := types.NewTx(&types.DynamicFeeTx{ - ChainID: chainID, - Nonce: nonce, - GasFeeCap: feeCap, - GasTipCap: tip, - Gas: gasLimit, - To: &toAddress, - Value: value, - Data: data, - }) - - signedTx, err := types.SignTx(tx, types.LatestSignerForChainID(chainID), privateKey) - - if err != nil { - log.Fatal(err) - } - - err = client.SendTransaction(context.Background(), signedTx) - if err != nil { - log.Fatal(err) - } - - fmt.Printf("Transaction hash: %s", signedTx.Hash().Hex()) - + client, err := ethclient.Dial("https://sepolia.infura.io/v3/API_KEY") + if err != nil { + log.Fatal(err) + } + + privateKey, err := crypto.HexToECDSA("PRIVATE_KEY") + if err != nil { + log.Fatal(err) + } + + publicKey := privateKey.Public() + publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) + if !ok { + log.Fatal("error casting public key to ECDSA") + } + + fromAddress := crypto.PubkeyToAddress(*publicKeyECDSA) + + nonce, err := client.PendingNonceAt(context.Background(), fromAddress) + if err != nil { + log.Fatal(err) + } + + value := big.NewInt(10000000000000000) // in wei (0.01 eth) + gasLimit := uint64(21000) // in units + tip := big.NewInt(2000000000) // maxPriorityFeePerGas = 2 Gwei + feeCap := big.NewInt(20000000000) // maxFeePerGas = 20 Gwei + if err != nil { + log.Fatal(err) + } + + toAddress := common.HexToAddress("ADDRESS_TO") + var data []byte + + chainID, err := client.NetworkID(context.Background()) + if err != nil { + log.Fatal(err) + } + + tx := types.NewTx(&types.DynamicFeeTx{ + ChainID: chainID, + Nonce: nonce, + GasFeeCap: feeCap, + GasTipCap: tip, + Gas: gasLimit, + To: &toAddress, + Value: value, + Data: data, + }) + + signedTx, err := types.SignTx(tx, types.LatestSignerForChainID(chainID), privateKey) + if err != nil { + log.Fatal(err) + } + + err = client.SendTransaction(context.Background(), signedTx) + if err != nil { + log.Fatal(err) + } + + fmt.Printf("Transaction hash: %s", signedTx.Hash().Hex()) } ``` diff --git a/services/tutorials/ethereum/send-a-transaction/send-a-transaction-py.md b/services/tutorials/ethereum/send-a-transaction/send-a-transaction-py.md index 2c71183350b..4a2df5df804 100644 --- a/services/tutorials/ethereum/send-a-transaction/send-a-transaction-py.md +++ b/services/tutorials/ethereum/send-a-transaction/send-a-transaction-py.md @@ -67,41 +67,41 @@ A malicious actor who has access to your private key can steal your assets. Create a file named `eip1559_tx.py` and add the following lines of code. ```python -import os -from dotenv import load_dotenv -from web3 import Web3, exceptions - -load_dotenv() - -infura_url = 'https://sepolia.infura.io/v3/' -private_key = os.getenv('PRIVATE_KEY') -from_account = '' -to_account = '' -web3 = Web3(Web3.HTTPProvider(infura_url)) - -try: - from_account = web3.to_checksum_address(from_account) -except exceptions.InvalidAddress: - print(f"Invalid 'from_account' address: {from_account}") - -try: - to_account = web3.to_checksum_address(to_account) -except exceptions.InvalidAddress: - print(f"Invalid 'to_account' address: {to_account}") - -nonce = web3.eth.get_transaction_count(from_account) +import os +from dotenv import load_dotenv +from web3 import Web3, exceptions + +load_dotenv() + +infura_url = "https://sepolia.infura.io/v3/" +private_key = os.getenv("PRIVATE_KEY") +from_account = "" +to_account = "" +web3 = Web3(Web3.HTTPProvider(infura_url)) + +try: + from_account = web3.to_checksum_address(from_account) +except exceptions.InvalidAddress: + print(f"Invalid 'from_account' address: {from_account}") + +try: + to_account = web3.to_checksum_address(to_account) +except exceptions.InvalidAddress: + print(f"Invalid 'to_account' address: {to_account}") + +nonce = web3.eth.get_transaction_count(from_account) tx = { - 'type': '0x2', - 'nonce': nonce, - 'from': from_account, - 'to': to_account, - 'value': web3.to_wei(0.01, 'ether'), - 'maxFeePerGas': web3.to_wei('250', 'gwei'), - 'maxPriorityFeePerGas': web3.to_wei('3', 'gwei'), - 'chainId': 11155111 + "type": "0x2", + "nonce": nonce, + "from": from_account, + "to": to_account, + "value": web3.to_wei(0.01, "ether"), + "maxFeePerGas": web3.to_wei("250", "gwei"), + "maxPriorityFeePerGas": web3.to_wei("3", "gwei"), + "chainId": 11155111 } gas = web3.eth.estimate_gas(tx) -tx['gas'] = gas +tx["gas"] = gas signed_tx = web3.eth.account.sign_transaction(tx, private_key) tx_hash = web3.eth.send_raw_transaction(signed_tx.rawTransaction) print("Transaction hash: " + str(web3.to_hex(tx_hash))) diff --git a/services/tutorials/ethereum/send-a-transaction/use-ethers.js-infuraprovider-or-web3provider.md b/services/tutorials/ethereum/send-a-transaction/use-ethers.js-infuraprovider-or-web3provider.md index ac5ed11dda2..2a1d9130ecb 100644 --- a/services/tutorials/ethereum/send-a-transaction/use-ethers.js-infuraprovider-or-web3provider.md +++ b/services/tutorials/ethereum/send-a-transaction/use-ethers.js-infuraprovider-or-web3provider.md @@ -87,20 +87,17 @@ Import the required dependencies and create the providers for communicating with In the `src` directory open the `App.js` file. Remove the existing code and add the following code: ```javascript title="App.js" -import React, { useState } from "react"; -import "./App.css"; +import React, { useState } from "react" +import "./App.css" function App() { - const ethers = require("ethers"); - const API_KEY = process.env.REACT_APP_API_KEY; - const PRIVATE_KEY = process.env.REACT_APP_PRIVATE_KEY; - const provider_Metamask = new ethers.providers.Web3Provider(window.ethereum); - const infuraProvider = new ethers.providers.InfuraProvider( - "sepolia", - API_KEY, - ); + const ethers = require("ethers") + const API_KEY = process.env.REACT_APP_API_KEY + const PRIVATE_KEY = process.env.REACT_APP_PRIVATE_KEY + const provider_Metamask = new ethers.providers.Web3Provider(window.ethereum) + const infuraProvider = new ethers.providers.InfuraProvider("sepolia", API_KEY) } -export default App; +export default App ``` #### Maintain the app state @@ -109,9 +106,9 @@ Next, use the `useState` hook function to maintain the state of the app. Add the ```javascript title="App.js" // Use the useState hook function to add state variables to a functional component. -const [blockNumber, setBlockNumber] = useState(null); -const [txSent, setTxSent] = useState(null); -const [txSentInfura, setTxSentInfura] = useState(null); +const [blockNumber, setBlockNumber] = useState(null) +const [txSent, setTxSent] = useState(null) +const [txSentInfura, setTxSentInfura] = useState(null) ``` #### Create the app frontend @@ -149,7 +146,7 @@ return (
-); +) ``` #### Retrieve the latest block number @@ -159,14 +156,14 @@ Create the code to retrieve the latest block number. Add the following code abov ```javascript // Get the latest block using the InfuraProvider or wallet const handleButton1 = async () => { - const latest_block = await infuraProvider.getBlockNumber("latest"); - setBlockNumber(latest_block); -}; + const latest_block = await infuraProvider.getBlockNumber("latest") + setBlockNumber(latest_block) +} const handleButton2 = async () => { - const latest_block = await provider_Metamask.getBlockNumber("latest"); - setBlockNumber(latest_block); -}; + const latest_block = await provider_Metamask.getBlockNumber("latest") + setBlockNumber(latest_block) +} ``` #### Send the transaction @@ -176,21 +173,21 @@ To send the transaction, you need the target address and the amount to send. Add ```javascript // Handle the form submissions to send the transactions const handleSubmitWeb3 = async (e) => { - e.preventDefault(); - const data = new FormData(e.target); - const address = data.get("address"); - const amount = data.get("amount"); - sendTransaction(address, amount); -}; + e.preventDefault() + const data = new FormData(e.target) + const address = data.get("address") + const amount = data.get("amount") + sendTransaction(address, amount) +} const handleSubmitInfura = async (e) => { - e.preventDefault(); - const data = new FormData(e.target); - const address = data.get("address"); - const amount = data.get("amount"); - const signer = new ethers.Wallet(PRIVATE_KEY, infuraProvider); - sendTransaction(address, amount, signer); -}; + e.preventDefault() + const data = new FormData(e.target) + const address = data.get("address") + const amount = data.get("amount") + const signer = new ethers.Wallet(PRIVATE_KEY, infuraProvider) + sendTransaction(address, amount, signer) +} ``` Next, create the `sendTransaction()` function that sends the transaction. Place the following code below the two `handleSubmit` methods. @@ -210,7 +207,7 @@ Next, create the `sendTransaction()` function that sends the transaction. Place value: ethers.utils.parseEther(amount) }); console.log("tx", tx); - setTxSent('Transaction initiated! Tx hash: ' + tx.hash); + setTxSent("Transaction initiated! Tx hash: " + tx.hash); } } else // InfuraProvider @@ -220,9 +217,9 @@ Next, create the `sendTransaction()` function that sends the transaction. Place value: ethers.utils.parseEther(amount) }); console.log("tx", tx); - setTxSentInfura('Transaction initiated! Tx hash: ' + tx.hash); + setTxSentInfura("Transaction initiated! Tx hash: " + tx.hash); } - }Ja + } ``` ### 5. Run the app @@ -263,76 +260,76 @@ If you transfer funds using the InfuraProvider, then the funds are transferred d The complete code sample looks like this: ```javascript -import React, { useState } from "react"; -import "./App.css"; +import React, { useState } from "react" +import "./App.css" function App() { - const ethers = require("ethers"); - const API_KEY = process.env.REACT_APP_API_KEY; - const PRIVATE_KEY = process.env.REACT_APP_PRIVATE_KEY; - const provider_Metamask = new ethers.providers.Web3Provider(window.ethereum); - const infuraProvider = new ethers.providers.InfuraProvider("goerli", API_KEY); + const ethers = require("ethers") + const API_KEY = process.env.REACT_APP_API_KEY + const PRIVATE_KEY = process.env.REACT_APP_PRIVATE_KEY + const provider_Metamask = new ethers.providers.Web3Provider(window.ethereum) + const infuraProvider = new ethers.providers.InfuraProvider("goerli", API_KEY) // Use the useState hook function to add state variables to a functional component. - const [blockNumber, setBlockNumber] = useState(null); - const [txSent, setTxSent] = useState(null); - const [txSentInfura, setTxSentInfura] = useState(null); + const [blockNumber, setBlockNumber] = useState(null) + const [txSent, setTxSent] = useState(null) + const [txSentInfura, setTxSentInfura] = useState(null) // Get the latest block using the InfuraProvider or wallet const handleButton1 = async () => { - const latest_block = await infuraProvider.getBlockNumber("latest"); - setBlockNumber(latest_block); - }; + const latest_block = await infuraProvider.getBlockNumber("latest") + setBlockNumber(latest_block) + } const handleButton2 = async () => { - const latest_block = await provider_Metamask.getBlockNumber("latest"); - setBlockNumber(latest_block); - }; + const latest_block = await provider_Metamask.getBlockNumber("latest") + setBlockNumber(latest_block) + } // Handle the form submissions to send the transactions const handleSubmitWeb3 = async (e) => { - e.preventDefault(); - const data = new FormData(e.target); - const address = data.get("address"); - const amount = data.get("amount"); - sendTransaction(address, amount); - }; + e.preventDefault() + const data = new FormData(e.target) + const address = data.get("address") + const amount = data.get("amount") + sendTransaction(address, amount) + } const handleSubmitInfura = async (e) => { - e.preventDefault(); - const data = new FormData(e.target); - const address = data.get("address"); - const amount = data.get("amount"); - const signer = new ethers.Wallet(PRIVATE_KEY, infuraProvider); - sendTransaction(address, amount, signer); - }; + e.preventDefault() + const data = new FormData(e.target) + const address = data.get("address") + const amount = data.get("amount") + const signer = new ethers.Wallet(PRIVATE_KEY, infuraProvider) + sendTransaction(address, amount, signer) + } // Send the transaction using either the Web3Provider or InfuraProvider const sendTransaction = async (address, amount, signer = null) => { if (signer == null) { // Web3 Provider - if (!window.ethereum) console.error("No wallet found!"); + if (!window.ethereum) console.error("No wallet found!") else { - await window.ethereum.send("eth_requestAccounts"); - const provider = new ethers.providers.Web3Provider(window.ethereum); - const signer = provider.getSigner(); + await window.ethereum.send("eth_requestAccounts") + const provider = new ethers.providers.Web3Provider(window.ethereum) + const signer = provider.getSigner() const tx = await signer.sendTransaction({ to: address, value: ethers.utils.parseEther(amount), - }); - console.log("tx", tx); - setTxSent("Transaction initiated! Tx hash: " + tx.hash); + }) + console.log("tx", tx) + setTxSent("Transaction initiated! Tx hash: " + tx.hash) } } // InfuraProvider else { const tx = await signer.sendTransaction({ to: address, value: ethers.utils.parseEther(amount), - }); - console.log("tx", tx); - setTxSentInfura("Transaction initiated! Tx hash: " + tx.hash); + }) + console.log("tx", tx) + setTxSentInfura("Transaction initiated! Tx hash: " + tx.hash) } - }; + } // Configure the app frontend return ( @@ -364,8 +361,8 @@ function App() {
- ); + ) } -export default App; +export default App ``` diff --git a/services/tutorials/ethereum/send-a-transaction/use-rust.md b/services/tutorials/ethereum/send-a-transaction/use-rust.md index 2ee3d6c76bc..5d6c37baab2 100644 --- a/services/tutorials/ethereum/send-a-transaction/use-rust.md +++ b/services/tutorials/ethereum/send-a-transaction/use-rust.md @@ -2,6 +2,7 @@ title: "Use Rust" description: A tutorial for legacy and EIP-1559 transactions. --- + # Use Rust In this two-part tutorial we'll use Rust and the [ethers-rs library](https://www.gakonst.com/ethers-rs/getting-started/intro.html) to: @@ -9,19 +10,19 @@ In this two-part tutorial we'll use Rust and the [ethers-rs library](https://www - Send a legacy transaction `("type":"0x0")` - Send an EIP-1559 transaction `("type":"0x2")` -This tutorial uses the Sepolia testnet. Also see [Transaction types](../../../concepts/transaction-types.md). +This tutorial uses the Sepolia testnet. Also see [Transaction types](../../../concepts/transaction-types.md). ## Prerequisites - Make sure that you have test ETH in your MetaMask wallet. You can obtain test ETH for the Sepolia network using the - [Infura Sepolia faucet](https://www.infura.io/faucet/sepolia). + [Infura Sepolia faucet](https://www.infura.io/faucet/sepolia). - [Install Rust from The Cargo Book](https://doc.rust-lang.org/cargo/getting-started/installation.html). ## Send a legacy transaction ### 1. Create a new project -Open a terminal and create a new project. +Open a terminal and create a new project. ```Rust cargo new infura_rs @@ -41,6 +42,7 @@ infura_rs Refer to the [Cargo documentation](https://doc.rust-lang.org/cargo/getting-started/first-steps.html) for more information about getting started with Cargo. ::: + ### 2. Edit the dependencies Open `Cargo.toml` with your preferred editor and add the following dependencies to it: @@ -56,75 +58,75 @@ serde_json = "1.0.96" ### 3. Update the main code -Open the Rust source `src/main.rs` and replace its contents with the following code: +Open the Rust source `src/main.rs` and replace its contents with the following code: ```rust showLineNumbers use ethers::{ - core::{types::TransactionRequest}, - middleware::SignerMiddleware, - providers::{Http, Middleware, Provider}, - signers::{LocalWallet, Signer}, - utils, - prelude::* + core::{types::TransactionRequest}, + middleware::SignerMiddleware, + providers::{Http, Middleware, Provider}, + signers::{LocalWallet, Signer}, + utils, + prelude::* }; use eyre::Result; use std::convert::TryFrom; #[tokio::main] async fn main() -> Result<()> { + // Connect to the network + let provider = Provider::::try_from("https://sepolia.infura.io/v3/INFURA_API_KEY")?; - // Connect to the network - let provider = Provider::::try_from("https://sepolia.infura.io/v3/INFURA_API_KEY")?; - - let chain_id = provider.get_chainid().await?; + let chain_id = provider.get_chainid().await?; - // Define the signer. - // Replace the SIGNER_PRIVATE_KEY with - // the private key of your Ethereum account (without the 0x prefix). - // However, we recommended that you load it from - // an .env file or external vault. - let wallet: LocalWallet = "SIGNER_PRIVATE_KEY" - .parse::()? - .with_chain_id(chain_id.as_u64()); + // Define the signer. + // Replace the SIGNER_PRIVATE_KEY with + // the private key of your Ethereum account (without the 0x prefix). + // However, we recommended that you load it from + // an .env file or external vault. + let wallet: LocalWallet = "SIGNER_PRIVATE_KEY" + .parse::()? + .with_chain_id(chain_id.as_u64()); - let to_address = "0xAED01C776d98303eE080D25A21f0a42D94a86D9c"; + let to_address = "0xAED01C776d98303eE080D25A21f0a42D94a86D9c"; - // connect the wallet to the provider - let client = SignerMiddleware::new(provider, wallet); + // Connect the wallet to the provider + let client = SignerMiddleware::new(provider, wallet); - // Craft the transaction - // The below code knows how to figure out the - // default gas value and determine the next nonce - // so you do not need to explicitly add them. - let tx = TransactionRequest::new() - .to(to_address) - .value(U256::from(utils::parse_ether(0.01)?)); + // Craft the transaction + // The below code knows how to figure out the + // default gas value and determine the next nonce + // so you do not need to explicitly add them. + let tx = TransactionRequest::new() + .to(to_address) + .value(U256::from(utils::parse_ether(0.01)?)); - // send it! - let pending_tx = client.send_transaction(tx, None).await?; + // Send it! + let pending_tx = client.send_transaction(tx, None).await?; - // get the mined tx - let receipt = pending_tx.await?.ok_or_else(|| eyre::format_err!("tx dropped from mempool"))?; - let tx = client.get_transaction(receipt.transaction_hash).await?; + // Get the mined tx + let receipt = pending_tx.await?.ok_or_else(|| eyre::format_err!("tx dropped from mempool"))?; + let tx = client.get_transaction(receipt.transaction_hash).await?; - println!("Sent tx: {}\n", serde_json::to_string(&tx)?); - println!("Tx receipt: {}", serde_json::to_string(&receipt)?); + println!("Sent tx: {}\n", serde_json::to_string(&tx)?); + println!("Tx receipt: {}", serde_json::to_string(&receipt)?); - Ok(()) + Ok(()) } ``` Next, make the following updates to the above code: - On line 16 replace the `INFURA_API_KEY` with you API key from the - [Infura dashboard](../../../../../developer-tools/dashboard/get-started/create-api/). -- On line 26 replace the `SIGNER_PRIVATE_KEY` with the private key of your Ethereum account. + [Infura dashboard](../../../../../developer-tools/dashboard/get-started/create-api/). +- On line 26 replace the `SIGNER_PRIVATE_KEY` with the private key of your Ethereum account. - On line 29, use a test address, such as [`0xAED01C776d98303eE080D25A21f0a42D94a86D9c`](https://sepolia.etherscan.io/address/0xaed01c776d98303ee080d25a21f0a42d94a86d9c). :::tip Secure your keys To better secure your keys, follow the recommended approach described in the section [Create the .env file](../../../tutorials/ethereum/send-a-transaction/use-web3.js.md#4-create-the-env-file). ::: ` + ### 4. Run the code From the `infura_rs` directory, run the code. @@ -133,18 +135,54 @@ From the `infura_rs` directory, run the code. cargo run ``` -You will see an output similar to the following. +You will see an output similar to the following: + :::note Use the wrap button Use the wrap button on the top right of the below code block window for wrapped display. ::: ```log Compiling infura_rs v0.1.0 (/Users/rajkaramchedu/onboarding/traian-tutorials/infura_rs) - Finished dev [unoptimized + debuginfo] target(s) in 2.14s - Running `target/debug/infura_rs` -Sent tx: {"hash":"0x3cb5a5fac18e889457905351c9950108873a8f0789fe83e8a733b8367f49a67a","nonce":"0x1","blockHash":"0xa2787f5ec22d491588a8ffc6e7cec3ed97fccac4845e448650d02fce672a657c","blockNumber":"0x3a7608","transactionIndex":"0x3d","from":"0xe33fef60722ba79989aeaa1b6e6daf7f351c0fbb","to":"0xaed01c776d98303ee080d25a21f0a42d94a86d9c","value":"0x2386f26fc10000","gasPrice":"0x3cc","gas":"0x5208","input":"0x","v":"0x1546d71","r":"0x92aa9fe6039946db5ea291a245529a5d67f5531e95d74c483fe8283cca9ec666","s":"0x4a5c0de8e64c79659965fb36f2b0ea1d295ae868f5f65809ef4cf1ef55239e09","type":"0x0","chainId":"0xaa36a7"} +Finished dev [unoptimized + debuginfo] target(s) in 2.14s +Running `target/debug/infura_rs` + +Sent tx: +{ + "hash": "0x3cb5a5fac18e889457905351c9950108873a8f0789fe83e8a733b8367f49a67a", + "nonce": "0x1", + "blockHash": "0xa2787f5ec22d491588a8ffc6e7cec3ed97fccac4845e448650d02fce672a657c", + "blockNumber": "0x3a7608", + "transactionIndex": "0x3d", + "from": "0xe33fef60722ba79989aeaa1b6e6daf7f351c0fbb", + "to": "0xaed01c776d98303ee080d25a21f0a42d94a86d9c", + "value": "0x2386f26fc10000", + "gasPrice": "0x3cc", + "gas": "0x5208", + "input": "0x", + "v": "0x1546d71", + "r": "0x92aa9fe6039946db5ea291a245529a5d67f5531e95d74c483fe8283cca9ec666", + "s": "0x4a5c0de8e64c79659965fb36f2b0ea1d295ae868f5f65809ef4cf1ef55239e09", + "type": "0x0", + "chainId": "0xaa36a7" +} -Tx receipt: {"transactionHash":"0x3cb5a5fac18e889457905351c9950108873a8f0789fe83e8a733b8367f49a67a","transactionIndex":"0x3d","blockHash":"0xa2787f5ec22d491588a8ffc6e7cec3ed97fccac4845e448650d02fce672a657c","blockNumber":"0x3a7608","from":"0xe33fef60722ba79989aeaa1b6e6daf7f351c0fbb","to":"0xaed01c776d98303ee080d25a21f0a42d94a86d9c","cumulativeGasUsed":"0x406e87","gasUsed":"0x5208","contractAddress":null,"logs":[],"status":"0x1","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","type":"0x0","effectiveGasPrice":"0x3cc"} +Tx receipt: +{ + "transactionHash": "0x3cb5a5fac18e889457905351c9950108873a8f0789fe83e8a733b8367f49a67a", + "transactionIndex": "0x3d", + "blockHash": "0xa2787f5ec22d491588a8ffc6e7cec3ed97fccac4845e448650d02fce672a657c", + "blockNumber": "0x3a7608", + "from": "0xe33fef60722ba79989aeaa1b6e6daf7f351c0fbb", + "to": "0xaed01c776d98303ee080d25a21f0a42d94a86d9c", + "cumulativeGasUsed": "0x406e87", + "gasUsed": "0x5208", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x0", + "effectiveGasPrice": "0x3cc" +} ``` In the above transaction receipt, the transaction type shows `"type":"0x0"` indicating that this was a legacy transaction. Next, we will send an EIP-1559 transaction, which is of the type `"type":"0x2"`. @@ -157,12 +195,12 @@ To send an EIP-1559 transaction, i.e., of the `"type":"0x2"` you must use `Eip15 ```rust showLineNumbers use ethers::{ - core::{types::TransactionRequest}, - middleware::SignerMiddleware, - providers::{Http, Middleware, Provider}, - signers::{LocalWallet, Signer}, - utils, - prelude::* + core::{types::TransactionRequest}, + middleware::SignerMiddleware, + providers::{Http, Middleware, Provider}, + signers::{LocalWallet, Signer}, + utils, + prelude::* }; use eyre::Result; use std::convert::TryFrom; @@ -170,44 +208,44 @@ use types::Eip1559TransactionRequest; #[tokio::main] async fn main() -> Result<()> { + // Connect to the network + let provider = Provider::::try_from("https://sepolia.infura.io/v3/INFURA_API_KEY")?; - // connect to the network - let provider = Provider::::try_from("https://sepolia.infura.io/v3/INFURA_API_KEY")?; - - let chain_id = provider.get_chainid().await?; + let chain_id = provider.get_chainid().await?; - // Define the signer. - // Replace the SIGNER_PRIVATE_KEY with - // the private key of your Ethereum account (without the 0x prefix). - // However, we recommended that you load it from - // an .env file or external vault. - let wallet: LocalWallet = "SIGNER_PRIVATE_KEY" - .parse::()? - .with_chain_id(chain_id.as_u64()); + // Define the signer. + // Replace the SIGNER_PRIVATE_KEY with + // the private key of your Ethereum account (without the 0x prefix). + // However, we recommended that you load it from + // an .env file or external vault. + let wallet: LocalWallet = "SIGNER_PRIVATE_KEY" + .parse::()? + .with_chain_id(chain_id.as_u64()); - let to_address = "0xAED01C776d98303eE080D25A21f0a42D94a86D9c"; + let to_address = "0xAED01C776d98303eE080D25A21f0a42D94a86D9c"; - // connect the wallet to the provider - let client = SignerMiddleware::new(provider, wallet); + // Connect the wallet to the provider + let client = SignerMiddleware::new(provider, wallet); - // craft the transaction - // this also knows to estimate the `max_priority_fee_per_gas` but added it manually just to see how it would look - let tx = Eip1559TransactionRequest::new() - .to(to_address) - .value(U256::from(utils::parse_ether(0.01)?)) - .max_priority_fee_per_gas(U256::from(2000000000_u128)); // 2 Gwei + // Craft the transaction + // This also knows to estimate the `max_priority_fee_per_gas` + // but added it manually just to see how it would look + let tx = Eip1559TransactionRequest::new() + .to(to_address) + .value(U256::from(utils::parse_ether(0.01)?)) + .max_priority_fee_per_gas(U256::from(2000000000_u128)); // 2 Gwei - // send it! - let pending_tx = client.send_transaction(tx, None).await?; + // Send it! + let pending_tx = client.send_transaction(tx, None).await?; - // get the mined tx - let receipt = pending_tx.await?.ok_or_else(|| eyre::format_err!("tx dropped from mempool"))?; - let tx = client.get_transaction(receipt.transaction_hash).await?; + // Get the mined tx + let receipt = pending_tx.await?.ok_or_else(|| eyre::format_err!("tx dropped from mempool"))?; + let tx = client.get_transaction(receipt.transaction_hash).await?; - println!("Sent tx: {}\n", serde_json::to_string(&tx)?); - println!("Tx receipt: {}", serde_json::to_string(&receipt)?); + println!("Sent tx: {}\n", serde_json::to_string(&tx)?); + println!("Tx receipt: {}", serde_json::to_string(&receipt)?); - Ok(()) + Ok(()) } ``` @@ -219,7 +257,7 @@ From the `infura_rs` directory, run the code. cargo run ``` -You will see an output similar to the following. +You will see an output similar to the following. ```log Compiling infura_rs v0.1.0 (/Users/rajkaramchedu/onboarding/traian-tutorials/infura_rs) @@ -232,11 +270,50 @@ warning: unused import: `types::TransactionRequest` = note: `#[warn(unused_imports)]` on by default warning: `infura_rs` (bin "infura_rs") generated 1 warning (run `cargo fix --bin "infura_rs"` to apply 1 suggestion) - Finished dev [unoptimized + debuginfo] target(s) in 2.42s - Running `target/debug/infura_rs` -Sent tx: {"hash":"0xbbc036f4dfe00b590c3693b8a2516316dec5748b3e4085ec92dfc040d8b8492b","nonce":"0x4","blockHash":"0xe64a029af23b18738a69c6eab19b85d99dc2844e8ce54a4bedcc1a75fe18dc08","blockNumber":"0x3a7a42","transactionIndex":"0xf","from":"0xe33fef60722ba79989aeaa1b6e6daf7f351c0fbb","to":"0xaed01c776d98303ee080d25a21f0a42d94a86d9c","value":"0x2386f26fc10000","gasPrice":"0x7735940c","gas":"0x5208","input":"0x","v":"0x1","r":"0xa0e4125501b3146910750408adaa255cd3e3a06461e311e1146a0983fcd9b0e0","s":"0x35c5c6cf6650dcff0ed1e25689d0ce17f7f5986342276f11651976c7048172d1","type":"0x2","accessList":[],"maxPriorityFeePerGas":"0x77359400","maxFeePerGas":"0xb2d05e16","chainId":"0xaa36a7"} +Finished dev [unoptimized + debuginfo] target(s) in 2.42s +Running `target/debug/infura_rs` + +Sent tx: +{ + "hash": "0xbbc036f4dfe00b590c3693b8a2516316dec5748b3e4085ec92dfc040d8b8492b", + "nonce": "0x4", + "blockHash": "0xe64a029af23b18738a69c6eab19b85d99dc2844e8ce54a4bedcc1a75fe18dc08", + "blockNumber": "0x3a7a42", + "transactionIndex": "0xf", + "from": "0xe33fef60722ba79989aeaa1b6e6daf7f351c0fbb", + "to": "0xaed01c776d98303ee080d25a21f0a42d94a86d9c", + "value": "0x2386f26fc10000", + "gasPrice": "0x7735940c", + "gas": "0x5208", + "input": "0x", + "v": "0x1", + "r": "0xa0e4125501b3146910750408adaa255cd3e3a06461e311e1146a0983fcd9b0e0", + "s": "0x35c5c6cf6650dcff0ed1e25689d0ce17f7f5986342276f11651976c7048172d1", + "type": "0x2", + "accessList": [], + "maxPriorityFeePerGas": "0x77359400", + "maxFeePerGas": "0xb2d05e16", + "chainId": "0xaa36a7" +} -Tx receipt: {"transactionHash":"0xbbc036f4dfe00b590c3693b8a2516316dec5748b3e4085ec92dfc040d8b8492b","transactionIndex":"0xf","blockHash":"0xe64a029af23b18738a69c6eab19b85d99dc2844e8ce54a4bedcc1a75fe18dc08","blockNumber":"0x3a7a42","from":"0xe33fef60722ba79989aeaa1b6e6daf7f351c0fbb","to":"0xaed01c776d98303ee080d25a21f0a42d94a86d9c","cumulativeGasUsed":"0x6a7187","gasUsed":"0x5208","contractAddress":null,"logs":[],"status":"0x1","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","type":"0x2","effectiveGasPrice":"0x7735940c"} +Tx receipt: +{ + "transactionHash": "0xbbc036f4dfe00b590c3693b8a2516316dec5748b3e4085ec92dfc040d8b8492b", + "transactionIndex": "0xf", + "blockHash": "0xe64a029af23b18738a69c6eab19b85d99dc2844e8ce54a4bedcc1a75fe18dc08", + "blockNumber": "0x3a7a42", + "from": "0xe33fef60722ba79989aeaa1b6e6daf7f351c0fbb", + "to": "0xaed01c776d98303ee080d25a21f0a42d94a86d9c", + "cumulativeGasUsed": "0x6a7187", + "gasUsed": "0x5208", + "contractAddress": null, + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "effectiveGasPrice": "0x7735940c" +} ``` -Ignore the `"warning: unused import: types::TransactionRequest"` above. In the above transaction receipt, the transaction type shows `"type":"0x2"` indicating that this was an EIP-1559 transaction. \ No newline at end of file +Ignore the `"warning: unused import: types::TransactionRequest"`. +In the above transaction receipt, the transaction type shows `"type":"0x2"` indicating that this was an EIP-1559 transaction. diff --git a/services/tutorials/ethereum/send-a-transaction/use-web3.js.md b/services/tutorials/ethereum/send-a-transaction/use-web3.js.md index 8fc482cd9b6..97c5037baf8 100644 --- a/services/tutorials/ethereum/send-a-transaction/use-web3.js.md +++ b/services/tutorials/ethereum/send-a-transaction/use-web3.js.md @@ -98,21 +98,21 @@ SIGNER_PRIVATE_KEY = "0x561...x...61df" In this example we'll create a JavaScript file (`send.js`) in the project directory which configures and sends the transaction. ```javascript showLineNumbers -const { Web3 } = require("web3"); -const { ETH_DATA_FORMAT, DEFAULT_RETURN_FORMAT } = require("web3"); +const { Web3 } = require("web3") +const { ETH_DATA_FORMAT, DEFAULT_RETURN_FORMAT } = require("web3") async function main() { // Configuring the connection to an Ethereum node - const network = process.env.ETHEREUM_NETWORK; + const network = process.env.ETHEREUM_NETWORK const web3 = new Web3( new Web3.providers.HttpProvider( - `https://${network}.infura.io/v3/${process.env.INFURA_API_KEY}`, - ), - ); + `https://${network}.infura.io/v3/${process.env.INFURA_API_KEY}` + ) + ) // Creating a signing account from a private key const signer = web3.eth.accounts.privateKeyToAccount( - process.env.SIGNER_PRIVATE_KEY, - ); - web3.eth.accounts.wallet.add(signer); + process.env.SIGNER_PRIVATE_KEY + ) + web3.eth.accounts.wallet.add(signer) await web3.eth .estimateGas( { @@ -121,11 +121,11 @@ async function main() { value: web3.utils.toWei("0.0001", "ether"), }, "latest", - ETH_DATA_FORMAT, + ETH_DATA_FORMAT ) .then((value) => { - limit = value; - }); + limit = value + }) // Creating the transaction object const tx = { @@ -138,21 +138,21 @@ async function main() { maxFeePerGas: web3.utils.toWei("3", "gwei"), chainId: 11155111, type: 0x2, - }; - signedTx = await web3.eth.accounts.signTransaction(tx, signer.privateKey); - console.log("Raw transaction data: " + signedTx.rawTransaction); + } + signedTx = await web3.eth.accounts.signTransaction(tx, signer.privateKey) + console.log("Raw transaction data: " + signedTx.rawTransaction) // Sending the transaction to the network const receipt = await web3.eth .sendSignedTransaction(signedTx.rawTransaction) .once("transactionHash", (txhash) => { - console.log(`Mining transaction ...`); - console.log(`https://${network}.etherscan.io/tx/${txhash}`); - }); + console.log(`Mining transaction ...`) + console.log(`https://${network}.etherscan.io/tx/${txhash}`) + }) // The transaction is now on chain! - console.log(`Mined in block ${receipt.blockNumber}`); + console.log(`Mined in block ${receipt.blockNumber}`) } -require("dotenv").config(); -main(); +require("dotenv").config() +main() ``` ### 6. Execute the transaction diff --git a/services/tutorials/ethereum/send-erc-20-token-rust.md b/services/tutorials/ethereum/send-erc-20-token-rust.md index a7c09e3d46c..7519bf62c9b 100644 --- a/services/tutorials/ethereum/send-erc-20-token-rust.md +++ b/services/tutorials/ethereum/send-erc-20-token-rust.md @@ -1,12 +1,11 @@ --- description: A tutorial for sending ERC-20 tokens. sidebar_position: 6 - --- # Send an ERC-20 token -In this tutorial we'll use Rust and the [ethers-rs library](https://www.gakonst.com/ethers-rs/getting-started/intro.html) to send an ERC-20 token from one address to another. This tutorial uses the Sepolia testnet and sends the [Chainlink token (LINK)](https://sepolia.etherscan.io/token/0x779877a7b0d9e8603169ddbd7836e478b4624789#code). +In this tutorial we'll use Rust and the [ethers-rs library](https://www.gakonst.com/ethers-rs/getting-started/intro.html) to send an ERC-20 token from one address to another. This tutorial uses the Sepolia testnet and sends the [Chainlink token (LINK)](https://sepolia.etherscan.io/token/0x779877a7b0d9e8603169ddbd7836e478b4624789#code). ## Prerequisites @@ -17,7 +16,7 @@ In this tutorial we'll use Rust and the [ethers-rs library](https://www.gakonst. ### 1. Create a new project -Open a terminal and create a new project. +Open a terminal and create a new project. ```Rust cargo new infura_rs @@ -53,19 +52,19 @@ serde_json = "1.0.96" ### 3. Copy the contract ABI -- Create a text file with the name `ct.json` in the `infura-rs` project directory. Visit the [ChainLink Token site on Etherscan](https://sepolia.etherscan.io/token/0x779877a7b0d9e8603169ddbd7836e478b4624789#code) and copy the `Contract ABI` (you will see it in a bottom section of the page) into the `ct.json` file. +- Create a text file with the name `ct.json` in the `infura-rs` project directory. Visit the [ChainLink Token site on Etherscan](https://sepolia.etherscan.io/token/0x779877a7b0d9e8603169ddbd7836e478b4624789#code) and copy the `Contract ABI` (you will see it in a bottom section of the page) into the `ct.json` file. ### 4. Update the main code -Open the Rust source `src/main.rs` and replace its contents with the following code: +Open the Rust source `src/main.rs` and replace its contents with the following code: ```rust showLineNumbers use ethers::{ - middleware::SignerMiddleware, - providers::{Http, Middleware, Provider}, - signers::{LocalWallet, Signer}, - types::{Address, U256}, - contract::abigen + middleware::SignerMiddleware, + providers::{Http, Middleware, Provider}, + signers::{LocalWallet, Signer}, + types::{Address, U256}, + contract::abigen }; use eyre::Result; use std::convert::TryFrom; @@ -74,59 +73,58 @@ use serde_json::Value; #[tokio::main] async fn main() -> Result<()> { + // connect to the network, don't forget to replace your INFURA_API_KEY + let provider = Provider::::try_from("https://sepolia.infura.io/v3/INFURA_API_KEY")?; - // connect to the network, don't forget to replace your INFURA_API_KEY - let provider = Provider::::try_from("https://sepolia.infura.io/v3/INFURA_API_KEY")?; - - let chain_id = provider.get_chainid().await?; + let chain_id = provider.get_chainid().await?; - let contract_address = "0x779877A7B0D9E8603169DdbD7836e478b4624789".parse::
()?; + let contract_address = "0x779877A7B0D9E8603169DdbD7836e478b4624789".parse::
()?; - // define a `ERC20Contract` struct from the ABI - abigen!(ERC20Contract, "./ct.json",); + // define a `ERC20Contract` struct from the ABI + abigen!(ERC20Contract, "./ct.json",); - let to_address = "0xF1B792820b52e6503208CAb98ec0B7b89ac64D6A".parse::
()?; + let to_address = "0xF1B792820b52e6503208CAb98ec0B7b89ac64D6A".parse::
()?; - // Create the contract instance to let us call methods of the contract and let it sign transactions with the sender wallet. - // for simplicity replace the private key (without 0x), ofc it always recommended to load it from an .env file or external vault - let wallet: LocalWallet = "SIGNER_PRIVATE_KEY" - .parse::()? - .with_chain_id(chain_id.as_u64()); + // Create the contract instance to let us call methods of the contract and let it sign transactions with the sender wallet. + // for simplicity replace the private key (without 0x), ofc it always recommended to load it from an .env file or external vault + let wallet: LocalWallet = "SIGNER_PRIVATE_KEY" + .parse::()? + .with_chain_id(chain_id.as_u64()); - let signer = Arc::new(SignerMiddleware::new(provider, wallet.with_chain_id(chain_id.as_u64()))); - let contract = ERC20Contract::new(contract_address, signer); + let signer = Arc::new(SignerMiddleware::new(provider, wallet.with_chain_id(chain_id.as_u64()))); + let contract = ERC20Contract::new(contract_address, signer); - // Fetch the decimals used by the contract so we can compute the decimal amount to send. - let whole_amount: u64 = 1; - let decimals = contract.decimals().call().await?; - let decimal_amount = U256::from(whole_amount) * U256::exp10(decimals as usize); + // Fetch the decimals used by the contract so we can compute the decimal amount to send. + let whole_amount: u64 = 1; + let decimals = contract.decimals().call().await?; + let decimal_amount = U256::from(whole_amount) * U256::exp10(decimals as usize); - // Transfer the desired amount of tokens to the `to_address` - let tx = contract.transfer(to_address, decimal_amount); - let pending_tx = tx.send().await?; - let _mined_tx = pending_tx.await?; + // Transfer the desired amount of tokens to the `to_address` + let tx = contract.transfer(to_address, decimal_amount); + let pending_tx = tx.send().await?; + let _mined_tx = pending_tx.await?; - println!("Transaction Receipt: {}", serde_json::to_string(&_mined_tx)?); + println!("Transaction Receipt: {}", serde_json::to_string(&_mined_tx)?); - // Extract the tx hash for printing - let json_str = serde_json::to_string(&_mined_tx)?; - let json: Value = serde_json::from_str(&json_str)?; + // Extract the tx hash for printing + let json_str = serde_json::to_string(&_mined_tx)?; + let json: Value = serde_json::from_str(&json_str)?; - if let Some(transaction_hash) = json["transactionHash"].as_str() { - println!("\n URL: https://sepolia.etherscan.io/tx/{}", transaction_hash); - } else { - println!("Transaction Hash not found"); - } + if let Some(transaction_hash) = json["transactionHash"].as_str() { + println!("\n URL: https://sepolia.etherscan.io/tx/{}", transaction_hash); + } else { + println!("Transaction Hash not found"); + } - Ok(()) + Ok(()) } ``` Next, make the following updates to the above code: - On line 17 replace the `INFURA_API_KEY` with the API key of your API project from - [Infura dashboard](../../dashboard/create-api.md). -- On line 30 replace the `SIGNER_PRIVATE_KEY` with the private key of your Ethereum account. + [Infura dashboard](../../dashboard/create-api.md). +- On line 30 replace the `SIGNER_PRIVATE_KEY` with the private key of your Ethereum account. :::tip Secure your keys To better secure your keys, follow the recommended approach described in the section [Create the .env file](../../tutorials/ethereum/send-a-transaction/use-web3.js.md#4-create-the-env-file). @@ -140,7 +138,7 @@ From the `infura_rs` directory, run the code. cargo run ``` -You will see an output similar to the following. +You will see an output similar to the following. :::note Use the wrap button Use the wrap button on the top right of the below code block window for wrapped display. ::: @@ -151,6 +149,6 @@ Finished dev [unoptimized + debuginfo] target(s) in 0.31s Transaction Receipt: {"transactionHash":"0x301ae601943c5a1822886bf36e58c289ef942ca4bb08226ea3090b685aef9c7e","transactionIndex":"0x4","blockHash":"0xba6c880b14a7927ed2b6a5ac4e434d13d051dc770fe5f68666bb4d9b9ee1faed","blockNumber":"0x3a91b7","from":"0xe33fef60722ba79989aeaa1b6e6daf7f351c0fbb","to":"0x779877a7b0d9e8603169ddbd7836e478b4624789","cumulativeGasUsed":"0xd4673","gasUsed":"0x86fe","contractAddress":null,"logs":[{"address":"0x779877a7b0d9e8603169ddbd7836e478b4624789","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x000000000000000000000000e33fef60722ba79989aeaa1b6e6daf7f351c0fbb","0x000000000000000000000000f1b792820b52e6503208cab98ec0b7b89ac64d6a"],"data":"0x0000000000000000000000000000000000000000000000000de0b6b3a7640000","blockHash":"0xba6c880b14a7927ed2b6a5ac4e434d13d051dc770fe5f68666bb4d9b9ee1faed","blockNumber":"0x3a91b7","transactionHash":"0x301ae601943c5a1822886bf36e58c289ef942ca4bb08226ea3090b685aef9c7e","transactionIndex":"0x4","logIndex":"0x7","removed":false}],"status":"0x1","logsBloom":"0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000040000001000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000082000000000000000000000000000000008000000100000000000000000000000000008000000000000000000000000000000000000000000000000000","type":"0x2","effectiveGasPrice":"0xb2d05e09"} URL: https://sepolia.etherscan.io/tx/0x301ae601943c5a1822886bf36e58c289ef942ca4bb08226ea3090b685aef9c7e - ``` +``` -Visit the URL displayed at the bottom of the above terminal log to confirm the transfer of the LINK token. \ No newline at end of file +Visit the URL displayed at the bottom of the above terminal log to confirm the transfer of the LINK token. diff --git a/services/tutorials/ethereum/subscribe-to-pending-transactions.md b/services/tutorials/ethereum/subscribe-to-pending-transactions.md index 53e895a5f1a..1cebebc6880 100644 --- a/services/tutorials/ethereum/subscribe-to-pending-transactions.md +++ b/services/tutorials/ethereum/subscribe-to-pending-transactions.md @@ -57,8 +57,8 @@ Connect to Infura’s WebSockets endpoint to subscribe to new pending transactio Define the following endpoints in your file: ```python -infura_ws_url = 'wss://goerli.infura.io/ws/v3/' -infura_http_url = 'https://goerli.infura.io/v3/' +infura_ws_url = "wss://goerli.infura.io/ws/v3/" +infura_http_url = "https://goerli.infura.io/v3/" web3 = Web3(Web3.HTTPProvider(infura_http_url)) ``` @@ -74,10 +74,10 @@ Create an `async` method that connects to Infura’s WebSocket endpoint: ```python async def get_event(): - async with connect(infura_ws_url) as ws: - await ws.send('{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}') - subscription_response = await ws.recv() - print(subscription_response) # {"jsonrpc":"2.0","id":1,"result":"0xd67da23f62a01f58042bc73d3f1c8936"} + async with connect(infura_ws_url) as ws: + await ws.send('{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}') + subscription_response = await ws.recv() + print(subscription_response) # {"jsonrpc": "2.0", "id": 1, "result": "0xd67da23f62a01f58042bc73d3f1c8936"} ``` In the method we use `ws.send()` to start a new subscription for new pending transactions, after which we get a confirmation back from the node with our subscription ID. @@ -86,23 +86,23 @@ Next, we can await any new messages from the Infura node and print the transacti ```python while True: - try: - message = await asyncio.wait_for(ws.recv(), timeout=15) - response = json.loads(message) - txHash = response['params']['result'] - print(txHash) - pass - except: - passy + try: + message = await asyncio.wait_for(ws.recv(), timeout=15) + response = json.loads(message) + txHash = response["params"]["result"] + print(txHash) + except Exception as e: + print(f"An error occurred: {e}") + pass ``` Finally, we'll add an `if __name__ == "__main__"` statement, so that our program runs when we execute it from a command line. ```python if __name__ == "__main__": - loop = asyncio.get_event_loop() - while True: - loop.run_until_complete(get_event()) + loop = asyncio.get_event_loop() + while True: + loop.run_until_complete(get_event()) ``` The complete code sample should now look as follows: @@ -114,30 +114,30 @@ import requests from web3 import Web3 from websockets import connect -infura_ws_url = 'wss://goerli.infura.io/ws/v3/' -infura_http_url = 'https://goerli.infura.io/v3/' +infura_ws_url = "wss://goerli.infura.io/ws/v3/" +infura_http_url = "https://goerli.infura.io/v3/" web3 = Web3(Web3.HTTPProvider(infura_http_url)) async def get_event(): - async with connect(infura_ws_url) as ws: - await ws.send('{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}') - subscription_response = await ws.recv() - print(subscription_response) - - while True: - try: - message = await asyncio.wait_for(ws.recv(), timeout=15) - response = json.loads(message) - txHash = response['params']['result'] - print(txHash) - pass - except: - pass + async with connect(infura_ws_url) as ws: + await ws.send('{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}') + subscription_response = await ws.recv() + print(subscription_response) -if __name__ == "__main__": - loop = asyncio.get_event_loop() while True: - loop.run_until_complete(get_event()) + try: + message = await asyncio.wait_for(ws.recv(), timeout=15) + response = json.loads(message) + txHash = response["params"]["result"] + print(txHash) + except Exception as e: + print(f"An error occurred: {e}") + pass + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + while True: + loop.run_until_complete(get_event()) ``` ### 5. Execute the program @@ -151,7 +151,7 @@ Python python3 subscribe.py You should now see the terminal fill up with Ethereum transfers: ``` -{"jsonrpc":"2.0","id":1,"result":"0xf1c8df0cb54ea89828976b86f2325930"} +{"jsonrpc": "2.0", "id": 1, "result": "0xf1c8df0cb54ea89828976b86f2325930"} 0x9831d16f46bfe723514594e990cb3c66824a584fd849984f28adac8fb5523702 0x1c3837ceffdd48325e19754f7b84fda4effd32c0c141b7dafa90d741cdc2c8f9 0x4f8e5706c60be6482f810af9a5d9191447d55c7441f68f4019a124d04d2a40d4 @@ -164,7 +164,7 @@ You should now see the terminal fill up with Ethereum transfers: You can update the program to monitor incoming transactions to a specific Ethereum address. Let’s define an account we’d like to monitor first, outside of the `get_event()` function: ```python -account = '' +account = "" ``` Then, inside the function and `try` block, append the following to check whether the recipient is the address we specified, after which it will print the transaction hash, sender address, and the value sent in Ether. @@ -172,11 +172,11 @@ Then, inside the function and `try` block, append the following to check whether ```python tx = web3.eth.get_transaction(txHash) if tx.to == account: - print("Pending transaction found with the following details:") - print({ - "hash": txHash, - "from": tx["from"], - "value": web3.fromWei(tx["value"], 'ether') + print("Pending transaction found with the following details:") + print({ + "hash": txHash, + "from": tx["from"], + "value": web3.fromWei(tx["value"], "ether") }) ``` @@ -189,40 +189,40 @@ import requests from web3 import Web3 from websockets import connect -infura_ws_url = 'wss://goerli.infura.io/ws/v3/' -infura_http_url = 'https://goerli.infura.io/v3/' +infura_ws_url = "wss://goerli.infura.io/ws/v3/" +infura_http_url = "https://goerli.infura.io/v3/" web3 = Web3(Web3.HTTPProvider(infura_http_url)) # Used if you want to monitor ETH transactions to a specific address -account = '' +account = "" async def get_event(): - async with connect(infura_ws_url) as ws: - await ws.send('{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}') - subscription_response = await ws.recv() - print(subscription_response) - - while True: - try: - message = await asyncio.wait_for(ws.recv(), timeout=15) - response = json.loads(message) - txHash = response['params']['result'] - print(txHash) - # Monitor transactions to a specific address - tx = web3.eth.get_transaction(txHash) - if tx.to == account: - print("Pending transaction found with the following details:") - print({ - "hash": txHash, - "from": tx["from"], - "value": web3.fromWei(tx["value"], 'ether') - }) - pass - except: - pass + async with connect(infura_ws_url) as ws: + await ws.send('{"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newPendingTransactions"]}') + subscription_response = await ws.recv() + print(subscription_response) -if __name__ == "__main__": - loop = asyncio.get_event_loop() while True: - loop.run_until_complete(get_event()) + try: + message = await asyncio.wait_for(ws.recv(), timeout=15) + response = json.loads(message) + txHash = response["params"]["result"] + print(txHash) + # Monitor transactions to a specific address + tx = web3.eth.get_transaction(txHash) + if tx.to == account: + print("Pending transaction found with the following details:") + print({ + "hash": txHash, + "from": tx["from"], + "value": web3.fromWei(tx["value"], "ether") + }) + except Exception as e: + print(f"An error occurred: {e}") + pass + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + while True: + loop.run_until_complete(get_event()) ``` diff --git a/services/tutorials/ethereum/track-erc-20-token-transfers.md b/services/tutorials/ethereum/track-erc-20-token-transfers.md index 09b2394a669..707079309ba 100644 --- a/services/tutorials/ethereum/track-erc-20-token-transfers.md +++ b/services/tutorials/ethereum/track-erc-20-token-transfers.md @@ -3,8 +3,8 @@ description: Track ERC-20 token transfers. sidebar_position: 8 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Track ERC-20 token transfers @@ -66,36 +66,36 @@ Make sure to replace `` with your Infura API key. Define the ERC-20 ABI by adding the following to the script: ```json - const abi = [ - { - constant: true, - inputs: [], - name: "symbol", - outputs: [ - { - name: "", - type: "string", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "decimals", - outputs: [ - { - name: "", - type: "uint8", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - ]; +const abi = [ + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; ``` ### 5. Subscribe to contract events @@ -105,15 +105,15 @@ You can subscribe to the events that token contracts emit, allowing you to track Add the following filter to the script, which tells the `web3.eth.subscribe` function in web3.js which events to track: ```javascript - let options = { - topics: [web3.utils.sha3("Transfer(address,address,uint256)")], - }; +let options = { + topics: [web3.utils.sha3("Transfer(address,address,uint256)")], +} ``` Then, initiate the subscription by passing along the filter: ```javascript - let subscription = await web3.eth.subscribe("logs", options); +let subscription = await web3.eth.subscribe("logs", options) ``` :::info @@ -125,12 +125,12 @@ In [step 3](#3-set-up-the-script), you wrap the whole script in an async functio You can also add the following lines to the script to see whether the subscription started successfully or if any errors occurred: ```javascript - subscription.on("error", (err) => { - throw err; - }); - subscription.on("connected", (nr) => - console.log("Subscription on ERC-20 started with ID %s", nr), - ); +subscription.on("error", (err) => { + throw err +}) +subscription.on("connected", (nr) => + console.log("Subscription on ERC-20 started with ID %s", nr) +) ``` ### 6. Read ERC-20 transfers @@ -138,10 +138,10 @@ You can also add the following lines to the script to see whether the subscripti You can set the listener for the `subscription` created in [step 5](track-erc-20-token-transfers.md#5-subscribe-to-contract-events) by adding the following lines to the script: ```javascript - subscription.on("data", (event) => { - if (event.topics.length == 3) { - ... - } +subscription.on("data", (event) => { + if (event.topics.length == 3) { + // ... + } }); ``` @@ -154,29 +154,31 @@ To verify that the `Transfer` event you catch is an ERC-20 transfer, these lines Because you can't read the event topics on their own, you must decode them using the ERC-20 ABI. Edit the listener as follows: ```javascript - subscription.on("data", (event) => { - if (event.topics.length == 3) { - let transaction = web3.eth.abi.decodeLog( - [ - { - type: "address", - name: "from", - indexed: true, - }, - { - type: "address", - name: "to", - indexed: true, - }, - { - type: "uint256", - name: "value", - indexed: false, - }, - ], - event.data, - [event.topics[0], event.topics[1], event.topics[2]], - ); +subscription.on("data", (event) => { + if (event.topics.length == 3) { + let transaction = web3.eth.abi.decodeLog( + [ + { + type: "address", + name: "from", + indexed: true, + }, + { + type: "address", + name: "to", + indexed: true, + }, + { + type: "uint256", + name: "value", + indexed: false, + }, + ], + event.data, + [event.topics[0], event.topics[1], event.topics[2]], + ); + } +}); ``` You can now retrieve the sender address (`from`), receiving address (`to`), and the number of tokens transferred (`value`, though yet to be converted, see [step 7](track-erc-20-token-transfers.md#7-read-contract-data)) from the `transaction` object. @@ -192,21 +194,19 @@ It is optional for ERC-20 contracts to implement these methods (see [EIP-20: ERC Outside the `subscription.on()` listener created in [step 6](track-erc-20-token-transfers.md#6-read-erc-20-transfers), define a new method that allows you to collect more information from the smart contract: ```javascript - async function collectData(contract) { - try { - var decimals = await contract.methods.decimals().call(); - } - catch { - decimals = 18n; - } - try { - var symbol = await contract.methods.symbol().call(); - } - catch { - symbol = '???'; - } - return { decimals, symbol }; +async function collectData(contract) { + try { + var decimals = await contract.methods.decimals().call() + } catch { + decimals = 18n + } + try { + var symbol = await contract.methods.symbol().call() + } catch { + symbol = "???" } + return { decimals, symbol } +} ``` :::info @@ -218,11 +218,29 @@ Since you’re already requesting the `decimals` value from the contract, you ca Inside the listener, call the `collectData` function every time a new ERC-20 transaction is found. You can also calculate the correct decimal value: ```javascript - subscription.on("data", (event) => { - if (event.topics.length == 3) { - let transaction = web3.eth.abi.decodeLog( - ... - ); +subscription.on("data", (event) => { + if (event.topics.length == 3) { + let transaction = web3.eth.abi.decodeLog( + [ + { + type: "address", + name: "from", + indexed: true, + }, + { + type: "address", + name: "to", + indexed: true, + }, + { + type: "uint256", + name: "value", + indexed: false, + }, + ], + event.data, + [event.topics[0], event.topics[1], event.topics[2]], + ); const contract = new web3.eth.Contract(abi, event.address); collectData(contract).then((contractData) => { @@ -231,14 +249,17 @@ Inside the listener, call the `collectData` function every time a new ERC-20 tra ); if (!unit) { // Simplification for contracts that use "non-standard" units, e.g. REDDIT contract returns decimals==8 - unit = "wei" + unit = "wei"; } const value = web3.utils.fromWei(transaction.value, unit); console.log( - `Transfer of ${value+' '.repeat(Math.max(0,30-value.length))} ${ - contractData.symbol+' '.repeat(Math.max(0,10-contractData.symbol.length)) - } from ${transaction.from} to ${transaction.to}`, + `Transfer of ${value + " ".repeat(Math.max(0, 30 - value.length))} ${ + contractData.symbol + " ".repeat(Math.max(0, 10 - contractData.symbol.length)) + } from ${transaction.from} to ${transaction.to}` ); + }); + } +}); ``` ### 8. Track a specific address @@ -246,17 +267,17 @@ Inside the listener, call the `collectData` function every time a new ERC-20 tra You can track a specific sender address by reading the `from` value of the decoded `transaction` object. Add the following line to the listener created in [step 6](track-erc-20-token-transfers.md#6-read-erc-20-transfers), replacing `` with the Ethereum address to track: ```javascript - if (transaction.from == "") { - console.log("Specified address sent an ERC-20 token!"); - } +if (transaction.from == "") { + console.log("Specified address sent an ERC-20 token!") +} ``` You can also track a specific recipient address receiving any tokens by tracking the `transaction.to` value: ```javascript - if (transaction.to == "") { - console.log("Specified address received an ERC-20 token!"); - } +if (transaction.to == "") { + console.log("Specified address received an ERC-20 token!") +} ``` ### 9. Track a specific token @@ -264,20 +285,20 @@ You can also track a specific recipient address receiving any tokens by tracking You can track a specific address sending a specific ERC-20 token, by checking for both `transaction.from` (the token sender) and `event.address` (the ERC-20 smart contract). Add the following line to the listener created in [step 6](track-erc-20-token-transfers.md#6-read-erc-20-transfers), replacing `` with the Ethereum address to track, and `` with the smart contract address to track: ```javascript - if ( - transaction.from == "" && - event.address == "" - ) { - console.log("Specified address transferred specified token!"); - } +if ( + transaction.from == "" && + event.address == "" +) { + console.log("Specified address transferred specified token!") +} ``` You can also track any transactions for a specific ERC-20 token, regardless of the sender or recipient: ```javascript - if (event.address == "") { - console.log("Specified ERC-20 transfer!"); - } +if (event.address == "") { + console.log("Specified ERC-20 transfer!") +} ``` ### 10. Run the script @@ -290,6 +311,7 @@ Run the script using the following command: ```bash node trackERC20.js ``` + @@ -304,18 +326,17 @@ Transfer of 9964.083347473883463154 RIO from 0x5b7E3E37a1aa6369386 - ### Complete code overview ```javascript -const { Web3 } = require("web3"); +const { Web3 } = require("web3") -async function main(){ - const web3 = new Web3("wss://mainnet.infura.io/ws/v3/"); +async function main() { + const web3 = new Web3("wss://mainnet.infura.io/ws/v3/") let options = { topics: [web3.utils.sha3("Transfer(address,address,uint256)")], - }; + } const abi = [ { @@ -346,24 +367,22 @@ async function main(){ stateMutability: "view", type: "function", }, - ]; + ] - let subscription = await web3.eth.subscribe("logs", options); + let subscription = await web3.eth.subscribe("logs", options) async function collectData(contract) { try { - var decimals = await contract.methods.decimals().call(); - } - catch { - decimals = 18n; + var decimals = await contract.methods.decimals().call() + } catch { + decimals = 18n } try { - var symbol = await contract.methods.symbol().call(); - } - catch { - symbol = '???'; + var symbol = await contract.methods.symbol().call() + } catch { + symbol = "???" } - return { decimals, symbol }; + return { decimals, symbol } } subscription.on("data", (event) => { @@ -387,53 +406,54 @@ async function main(){ }, ], event.data, - [event.topics[0], event.topics[1], event.topics[2]], - ); + [event.topics[0], event.topics[1], event.topics[2]] + ) - const contract = new web3.eth.Contract(abi, event.address); + const contract = new web3.eth.Contract(abi, event.address) collectData(contract).then((contractData) => { var unit = Object.keys(web3.utils.ethUnitMap).find( - (key) => web3.utils.ethUnitMap[key] == (BigInt(10) ** contractData.decimals) - ); + (key) => + web3.utils.ethUnitMap[key] == BigInt(10) ** contractData.decimals + ) if (!unit) { // Simplification for contracts that use "non-standard" units, e.g. REDDIT contract returns decimals==8 unit = "wei" } // This is logging each transfer event found: - const value = web3.utils.fromWei(transaction.value, unit); + const value = web3.utils.fromWei(transaction.value, unit) console.log( - `Transfer of ${value+' '.repeat(Math.max(0,30-value.length))} ${ - contractData.symbol+' '.repeat(Math.max(0,10-contractData.symbol.length)) - } from ${transaction.from} to ${transaction.to}`, - ); + `Transfer of ${value + " ".repeat(Math.max(0, 30 - value.length))} ${ + contractData.symbol + + " ".repeat(Math.max(0, 10 - contractData.symbol.length)) + } from ${transaction.from} to ${transaction.to}` + ) // Below are examples of testing for transactions involving particular EOA or contract addresses if (transaction.from == "0x495f947276749ce646f68ac8c248420045cb7b5e") { - console.log("Specified address sent an ERC-20 token!"); + console.log("Specified address sent an ERC-20 token!") } if (transaction.to == "0x495f947276749ce646f68ac8c248420045cb7b5e") { - console.log("Specified address received an ERC-20 token!"); + console.log("Specified address received an ERC-20 token!") } if ( transaction.from == "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D" && event.address == "0x6b175474e89094c44da98b954eedeac495271d0f" ) { - console.log("Specified address transferred specified token!"); + console.log("Specified address transferred specified token!") } // event.address contains the contract address if (event.address == "0x6b175474e89094c44da98b954eedeac495271d0f") { - console.log("Specified ERC-20 transfer!"); + console.log("Specified ERC-20 transfer!") } - }); + }) } - }); + }) subscription.on("error", (err) => { - throw err; - }); + throw err + }) subscription.on("connected", (nr) => - console.log("Subscription on ERC-20 started with ID %s", nr), - ); - + console.log("Subscription on ERC-20 started with ID %s", nr) + ) } -main(); +main() ``` diff --git a/services/tutorials/ethereum/track-erc-721-and-erc-1155-token-transfers.md b/services/tutorials/ethereum/track-erc-721-and-erc-1155-token-transfers.md index 3a6678b612f..ce0ec353f4e 100644 --- a/services/tutorials/ethereum/track-erc-721-and-erc-1155-token-transfers.md +++ b/services/tutorials/ethereum/track-erc-721-and-erc-1155-token-transfers.md @@ -3,8 +3,8 @@ description: Track ERC-721 and ERC-1155 token transfers. sidebar_position: 9 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Track ERC-721 and ERC-1155 token transfers @@ -70,20 +70,20 @@ Add the following filter to the script, which tells the `web3.eth.subscribe` fun ```javascript let options721 = { topics: [web3.utils.sha3("Transfer(address,address,uint256)")], -}; +} let options1155 = { topics: [ web3.utils.sha3("TransferSingle(address,address,address,uint256,uint256)"), ], -}; +} ``` Then, initiate the subscription by passing along the filter: ```javascript -let subscription721 = await web3.eth.subscribe("logs", options721); -let subscription1155 = await web3.eth.subscribe("logs", options1155); +let subscription721 = await web3.eth.subscribe("logs", options721) +let subscription1155 = await web3.eth.subscribe("logs", options1155) ``` :::info @@ -96,18 +96,18 @@ You can also add the following lines to the script to see whether the subscripti ```javascript subscription721.on("error", (err) => { - throw err; -}); + throw err +}) subscription1155.on("error", (err) => { - throw err; -}); + throw err +}) subscription721.on("connected", (nr) => - console.log("Subscription on ERC-721 started with ID %s", nr), -); + console.log("Subscription on ERC-721 started with ID %s", nr) +) subscription1155.on("connected", (nr) => - console.log("Subscription on ERC-1155 started with ID %s", nr), -); + console.log("Subscription on ERC-1155 started with ID %s", nr) +) ``` ### 5. Read ERC-721 transfers @@ -115,10 +115,10 @@ subscription1155.on("connected", (nr) => Set the listener for the `subscription721` created in [step 4](track-erc-721-and-erc-1155-token-transfers.md#4-subscribe-to-contract-events) by adding the following lines to the script: ```javascript -subscription721.on('data', event => { - if (event.topics.length == 4) { - ... - } +subscription721.on("data", (event) => { + if (event.topics.length == 4) { + // ... + } }); ``` @@ -150,8 +150,8 @@ let transaction = web3.eth.abi.decodeLog( }, ], event.data, - [event.topics[1], event.topics[2], event.topics[3]], -); + [event.topics[1], event.topics[2], event.topics[3]] +) ``` In order to directly call `from`, `to`, and `tokenId` on `transaction`, add the following: @@ -167,8 +167,8 @@ console.log( }\n` + `To: ${transaction.to}\n` + `Token contract: ${event.address}\n` + - `Token ID: ${transaction.tokenId}`, -); + `Token ID: ${transaction.tokenId}` +) ``` ### 6. Read ERC-1155 transfers @@ -176,9 +176,9 @@ console.log( You can set the listener for the `subscription1155` created in [step 4](track-erc-721-and-erc-1155-token-transfers.md#4.-subscribe-to-contract-events) by adding the following lines to the script: ```javascript -subscription1155.on('data', event => { - ... -}); +subscription1155.on("data", event => { + // ... +}) ``` As with ERC-721 in [Step 5](track-erc-721-and-erc-1155-token-transfers.md#5.-read-erc-721-transfers), add the ERC-1155 ABI to the listener: @@ -211,8 +211,8 @@ let transaction = web3.eth.abi.decodeLog( }, ], event.data, - [event.topics[1], event.topics[2], event.topics[3]], -); + [event.topics[1], event.topics[2], event.topics[3]] +) ``` In order to directly call `from`, `to`, and `tokenId` on `transaction`, add the following: @@ -229,8 +229,8 @@ console.log( }\n` + `To: ${transaction.to}\n` + `id: ${transaction.id}\n` + - `value: ${transaction.value}`, -); + `value: ${transaction.value}` +) ``` ### 7. Track a specific address @@ -239,7 +239,7 @@ You can track a specific sender address by reading the `from` value of the decod ```javascript if (transaction.from == "") { - console.log("Specified address sent an NFT!"); + console.log("Specified address sent an NFT!") } ``` @@ -247,7 +247,7 @@ You can also track a specific recipient address receiving any tokens by tracking ```javascript if (transaction.to == "") { - console.log("Specified address received an NFT"); + console.log("Specified address received an NFT") } ``` @@ -259,7 +259,7 @@ You can track a specific address sending a specific token, by checking for both ```javascript -if (event.address == '' && transaction.tokenId == ) { ('console.log('Specified ERC-721 NFT was transferred!') }; +if (event.address == "" && transaction.tokenId == ) { console.log("Specified ERC-721 NFT was transferred!"); } ``` @@ -267,14 +267,13 @@ if (event.address == '' && transaction.tokenId == ) ```javascript if (event.address == "") { - console.log("Specified ERC-1155 NFT was transferred!"); + console.log("Specified ERC-1155 NFT was transferred!") } ``` - ### 9. Run the script Run the script using the following command: @@ -315,16 +314,14 @@ value: 1 ### Complete code overview ```javascript -const { Web3 } = require("web3"); +const { Web3 } = require("web3") async function main() { - const web3 = new Web3( - "wss://mainnet.infura.io/ws/v3/" - ); + const web3 = new Web3("wss://mainnet.infura.io/ws/v3/") let options721 = { topics: [web3.utils.sha3("Transfer(address,address,uint256)")], - }; + } let options1155 = { topics: [ @@ -332,10 +329,10 @@ async function main() { "TransferSingle(address,address,address,uint256,uint256)" ), ], - }; + } - let subscription721 = await web3.eth.subscribe("logs", options721); - let subscription1155 = await web3.eth.subscribe("logs", options1155); + let subscription721 = await web3.eth.subscribe("logs", options721) + let subscription1155 = await web3.eth.subscribe("logs", options1155) subscription721.on("data", (event) => { if (event.topics.length == 4) { @@ -359,19 +356,19 @@ async function main() { ], event.data, [event.topics[1], event.topics[2], event.topics[3]] - ); + ) if (transaction.from == "0x495f947276749ce646f68ac8c248420045cb7b5e") { - console.log("Specified address sent an NFT!"); + console.log("Specified address sent an NFT!") } if (transaction.to == "0x495f947276749ce646f68ac8c248420045cb7b5e") { - console.log("Specified address received an NFT!"); + console.log("Specified address received an NFT!") } if ( event.address == "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D" && transaction.tokenId == 2500 ) { - console.log("Specified NFT was transferred!"); + console.log("Specified NFT was transferred!") } console.log( @@ -385,9 +382,9 @@ async function main() { `To: ${transaction.to}\n` + `Token contract: ${event.address}\n` + `Token ID: ${transaction.tokenId}` - ); + ) } - }); + }) subscription1155.on("data", (event) => { let transaction = web3.eth.abi.decodeLog( @@ -418,7 +415,7 @@ async function main() { ], event.data, [event.topics[1], event.topics[2], event.topics[3]] - ); + ) console.log( `\n` + @@ -432,23 +429,23 @@ async function main() { `To: ${transaction.to}\n` + `id: ${transaction.id}\n` + `value: ${transaction.value}` - ); - }); + ) + }) subscription721.on("error", (err) => { - throw err; - }); + throw err + }) subscription1155.on("error", (err) => { - throw err; - }); + throw err + }) subscription721.on("connected", (nr) => console.log("Subscription on ERC-721 started with ID %s", nr) - ); + ) subscription1155.on("connected", (nr) => console.log("Subscription on ERC-1155 started with ID %s", nr) - ); + ) } -main(); +main() ``` diff --git a/services/tutorials/ethereum/use-infura-as-a-reverse-proxy/_category_.json b/services/tutorials/ethereum/use-infura-as-a-reverse-proxy/_category_.json index 6d6db9f34b4..6ba8030e2a2 100644 --- a/services/tutorials/ethereum/use-infura-as-a-reverse-proxy/_category_.json +++ b/services/tutorials/ethereum/use-infura-as-a-reverse-proxy/_category_.json @@ -1,10 +1,10 @@ { - "label": "Use Infura as a reverse proxy", - "collapsible": true, - "collapsed": true, - "link": { - "type": "generated-index", - "slug": "tutorials/ethereum/use-infura-as-a-reverse-proxy", - "description": "A reverse proxy is a server that typically sits on the edge of your infrastructure. It receives requests from web clients and routes them to one or more backend web servers. You can set up Infura as a reverse proxy to ensure the flow of traffic between your clients and servers remains smooth." - } -} \ No newline at end of file + "label": "Use Infura as a reverse proxy", + "collapsible": true, + "collapsed": true, + "link": { + "type": "generated-index", + "slug": "tutorials/ethereum/use-infura-as-a-reverse-proxy", + "description": "A reverse proxy is a server that typically sits on the edge of your infrastructure. It receives requests from web clients and routes them to one or more backend web servers. You can set up Infura as a reverse proxy to ensure the flow of traffic between your clients and servers remains smooth." + } +} diff --git a/services/tutorials/ethereum/use-infura-as-a-reverse-proxy/set-up-a-simple-reverse-proxy.md b/services/tutorials/ethereum/use-infura-as-a-reverse-proxy/set-up-a-simple-reverse-proxy.md index 8c6ce544b68..50891d823cd 100644 --- a/services/tutorials/ethereum/use-infura-as-a-reverse-proxy/set-up-a-simple-reverse-proxy.md +++ b/services/tutorials/ethereum/use-infura-as-a-reverse-proxy/set-up-a-simple-reverse-proxy.md @@ -2,9 +2,9 @@ description: Use Caddy to set up a reverse proxy. --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -import SectionNetworks from '@site/src/components/Sections/SectionNetworks.jsx'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; +import SectionNetworks from "@site/src/components/Sections/SectionNetworks.jsx"; # Set up a simple reverse proxy @@ -75,14 +75,14 @@ In a new terminal window, make a curl request to `localhost`. The following exam curl https://localhost/v3/ \ -X POST \ -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' ``` ```javascript -{"jsonrpc":"2.0","id":1,"result":"Geth/v1.10.8-omnibus-aef5bfb3/linux-amd64/go1.16.7"} +{"jsonrpc": "2.0", "id": 1, "result": "Geth/v1.10.8-omnibus-aef5bfb3/linux-amd64/go1.16.7"} ``` @@ -97,14 +97,14 @@ To ensure that the reverse proxy is working, execute the same request, replacing curl https://goerli.infura.io/v3/ \ -X POST \ -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' ``` ```javascript -{"jsonrpc":"2.0","id":1,"result":"Geth/v1.10.8-omnibus-aef5bfb3/linux-amd64/go1.16.7"} +{"jsonrpc": "2.0", "id": 1, "result": "Geth/v1.10.8-omnibus-aef5bfb3/linux-amd64/go1.16.7"} ``` diff --git a/services/tutorials/ethereum/use-infura-as-a-reverse-proxy/use-infura-as-a-backup-for-your-node.md b/services/tutorials/ethereum/use-infura-as-a-reverse-proxy/use-infura-as-a-backup-for-your-node.md index c779e390c37..ff7de98287b 100644 --- a/services/tutorials/ethereum/use-infura-as-a-reverse-proxy/use-infura-as-a-backup-for-your-node.md +++ b/services/tutorials/ethereum/use-infura-as-a-reverse-proxy/use-infura-as-a-backup-for-your-node.md @@ -2,8 +2,8 @@ description: Use Caddy to set Infura as a backup for your node. --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Use Infura as a backup for your node @@ -44,27 +44,27 @@ brew install caddy You may be running your own Ethereum node, but for the sake of this tutorial, you can substitute a node with a Node.js stub. Create a file named `main.js` in the project directory with the following content: ```javascript -const https = require("https"); -const fs = require("fs"); +const https = require("https") +const fs = require("fs") const options = { key: fs.readFileSync(".pem"), cert: fs.readFileSync(".pem"), -}; +} -const hostname = "127.0.0.1"; -const port = 9000; +const hostname = "127.0.0.1" +const port = 9000 const server = https.createServer(options, function (req, res) { - res.statusCode = 200; - res.setHeader("Content-Type", "text/plain"); + res.statusCode = 200 + res.setHeader("Content-Type", "text/plain") setTimeout(() => { - res.end("Reverse proxy success!\n"); - }, 1000); -}); + res.end("Reverse proxy success!\n") + }, 1000) +}) server.listen(port, hostname, () => { - console.log(`Server running at https://${hostname}:${port}/`); -}); + console.log(`Server running at https://${hostname}:${port}/`) +}) ``` This sets up a backend HTTPS service running on `127.0.0.1:9000` (`localhost:9000`) and displays a success message if the proxy works. @@ -101,7 +101,7 @@ To create the reverse proxy, create a text file named `Caddyfile` with the follo localhost:3000 reverse_proxy https://localhost:9000 https://goerli.infura.io { - header_up Host {/v3/} + header_up Host {/v3/} } ``` @@ -126,9 +126,9 @@ In a new terminal window, make a curl request to `localhost`. The following exam ```bash curl http://localhost:3000/v3/ \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' ``` @@ -150,16 +150,16 @@ If you close the Node.js server and send the request again, you should get the r ```bash curl http://localhost:3000/v3/ \ - -X POST \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","method":"web3_clientVersion","params": [],"id":1}' + -X POST \ + -H "Content-Type: application/json" \ + -d '{"jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1}' ``` ```javascript -{"jsonrpc":"2.0","id":1,"result":"Geth/v1.10.8-omnibus-aef5bfb3/linux-amd64/go1.16.7"} +{"jsonrpc": "2.0", "id":1, "result": "Geth/v1.10.8-omnibus-aef5bfb3/linux-amd64/go1.16.7"} ``` diff --git a/services/tutorials/layer-2-networks/_category_.json b/services/tutorials/layer-2-networks/_category_.json index 7bb1f40196e..3fb99a66a58 100644 --- a/services/tutorials/layer-2-networks/_category_.json +++ b/services/tutorials/layer-2-networks/_category_.json @@ -1,10 +1,10 @@ { - "label": "Layer 2 networks", - "collapsible": true, - "collapsed": true, - "link": { - "type": "generated-index", - "slug": "tutorials/layer-2-networks", - "description": "This section lists tutorials for using various layer 2 networks with Infura." - } -} \ No newline at end of file + "label": "Layer 2 networks", + "collapsible": true, + "collapsed": true, + "link": { + "type": "generated-index", + "slug": "tutorials/layer-2-networks", + "description": "This section lists tutorials for using various layer 2 networks with Infura." + } +} diff --git a/services/tutorials/layer-2-networks/send-a-transaction.md b/services/tutorials/layer-2-networks/send-a-transaction.md index c908cbbc8b2..2ecbec185b4 100644 --- a/services/tutorials/layer-2-networks/send-a-transaction.md +++ b/services/tutorials/layer-2-networks/send-a-transaction.md @@ -95,43 +95,43 @@ Never disclose your private key. Anyone with your private keys can steal any ass In this example we'll create a JavaScript file (`send.js`) in the project directory which configures and sends the transaction. ```javascript title="send.js" -const { Web3 } = require("web3"); +const { Web3 } = require("web3") async function main() { // Configuring the connection to the Polygon node - const network = process.env.POLYGON_NETWORK; + const network = process.env.POLYGON_NETWORK const web3 = new Web3( new Web3.providers.HttpProvider( - `https://${network}.infura.io/v3/${process.env.INFURA_API_KEY}`, - ), - ); + `https://${network}.infura.io/v3/${process.env.INFURA_API_KEY}` + ) + ) // Creating a signing account from a private key const signer = web3.eth.accounts.privateKeyToAccount( - process.env.SIGNER_PRIVATE_KEY, - ); - web3.eth.accounts.wallet.add(signer); + process.env.SIGNER_PRIVATE_KEY + ) + web3.eth.accounts.wallet.add(signer) // Creating the transaction object const tx = { from: signer.address, to: "0xAED01C776d98303eE080D25A21f0a42D94a86D9c", value: web3.utils.toWei("0.001", "ether"), - }; + } // Assigning the right amount of gas - tx.gas = await web3.eth.estimateGas(tx); + tx.gas = await web3.eth.estimateGas(tx) // Sending the transaction to the network const receipt = await web3.eth .sendTransaction(tx) .once("transactionHash", (txhash) => { - console.log(`Mining transaction ...`); - console.log(`Transaction hash: ${txhash}`); - }); + console.log(`Mining transaction ...`) + console.log(`Transaction hash: ${txhash}`) + }) // The transaction is now on chain! - console.log(`Mined in block ${receipt.blockNumber}`); + console.log(`Mined in block ${receipt.blockNumber}`) } -require("dotenv").config(); -main(); +require("dotenv").config() +main() ``` ### 7. Execute the transaction diff --git a/snaps/features/cron-jobs.md b/snaps/features/cron-jobs.md index 6de0ade699d..cc87cf056e3 100644 --- a/snaps/features/cron-jobs.md +++ b/snaps/features/cron-jobs.md @@ -41,7 +41,7 @@ the specified schedule with the requests defined in the `endowment:cronjob` perm The following example handles the `execute` method specified in the previous example: ```typescript title="index.ts" -import type { OnCronjobHandler } from "@metamask/snaps-sdk"; +import type { OnCronjobHandler } from "@metamask/snaps-sdk" export const onCronjob: OnCronjobHandler = async ({ request }) => { switch (request.method) { @@ -56,12 +56,12 @@ export const onCronjob: OnCronjobHandler = async ({ request }) => { text("This dialog was triggered by a cron job."), ]), }, - }); + }) default: - throw new Error("Method not found."); + throw new Error("Method not found.") } -}; +} ``` :::tip Access data from cron jobs diff --git a/snaps/features/custom-evm-accounts/create-account-snap.md b/snaps/features/custom-evm-accounts/create-account-snap.md index b6b9f39aafc..b3ac6efa2cc 100644 --- a/snaps/features/custom-evm-accounts/create-account-snap.md +++ b/snaps/features/custom-evm-accounts/create-account-snap.md @@ -5,19 +5,20 @@ tags: - Keyring API --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Create an account management Snap Create an account management Snap to connect to custom EVM accounts. :::tip see also + - [Custom EVM accounts](index.md) - [Create an account management companion dapp](create-companion-dapp.md) - [Account management Snap security guidelines](security.md) - [Keyring API reference](../../reference/keyring-api/index.md) -::: + ::: ## Prerequisites @@ -115,14 +116,14 @@ Your Snap must respond with either a synchronous or asynchronous result: ```typescript -return { pending: false, result }; +return { pending: false, result } ``` ```typescript -return { pending: true, redirect: { message, url } }; +return { pending: true, redirect: { message, url } } ``` The redirect message and URL are displayed to the user to help them continue the transaction flow. @@ -139,7 +140,7 @@ For example, when an account is created: ```typescript try { - emitSnapKeyringEvent(snap, KeyringEvent.AccountCreated, { account }); + emitSnapKeyringEvent(snap, KeyringEvent.AccountCreated, { account }) // Update your Snap's state. } catch (error) { // Handle the error. @@ -159,8 +160,8 @@ export const onKeyringRequest: OnKeyringRequestHandler = async ({ request, }) => { // Add custom logic here. - return handleKeyringRequest(keyring, request); -}; + return handleKeyringRequest(keyring, request) +} ``` ### 7. Create a companion dapp diff --git a/snaps/features/custom-evm-accounts/create-companion-dapp.md b/snaps/features/custom-evm-accounts/create-companion-dapp.md index 939fcba64b6..05cd3de7938 100644 --- a/snaps/features/custom-evm-accounts/create-companion-dapp.md +++ b/snaps/features/custom-evm-accounts/create-companion-dapp.md @@ -13,10 +13,11 @@ Call Keyring API methods from your companion dapp, enabling users to create and EVM accounts. :::tip see also + - [Custom EVM accounts](index.md) - [Create an account management Snap](create-account-snap.md) - [Keyring API reference](../../reference/keyring-api/index.md) -::: + ::: ## Prerequisites @@ -44,10 +45,10 @@ npm install @metamask/keyring-api Create a `KeyringSnapRpcClient`: ```ts -import { KeyringSnapRpcClient } from "@metamask/keyring-api"; -import { defaultSnapOrigin as snapId } from "../config"; +import { KeyringSnapRpcClient } from "@metamask/keyring-api" +import { defaultSnapOrigin as snapId } from "../config" -let client = new KeyringSnapRpcClient(snapId, window.ethereum); +let client = new KeyringSnapRpcClient(snapId, window.ethereum) ``` ### 3. Call Account Management API methods @@ -58,7 +59,7 @@ You can now use the `KeyringSnapRpcClient` to invoke For example, to call [`keyring_listAccounts`](../../reference/keyring-api/account-management/index.md#keyringlist_accounts): ```typescript -const accounts = await client.listAccounts(); +const accounts = await client.listAccounts() ``` ## Example diff --git a/snaps/features/custom-evm-accounts/index.md b/snaps/features/custom-evm-accounts/index.md index 2ca2138f3b5..ff9d00e76e3 100644 --- a/snaps/features/custom-evm-accounts/index.md +++ b/snaps/features/custom-evm-accounts/index.md @@ -22,11 +22,12 @@ You can then [call Keyring API methods from a companion dapp](create-companion-d to enable users to create and interact with the custom accounts. :::tip see also + - [Create an account management Snap](create-account-snap.md) - [Create an account management companion dapp](create-companion-dapp.md) - [Account management Snap security guidelines](security.md) - [Keyring API reference](../../reference/keyring-api/index.md) -::: + ::: ## System context diagram @@ -290,7 +291,7 @@ externally owned accounts (EOAs): ::: Account abstraction, specified by [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337), introduces -*user operations* and enables users to manage smart contract accounts containing arbitrary +_user operations_ and enables users to manage smart contract accounts containing arbitrary verification logic. Users can use these ERC-4337 accounts instead of externally owned accounts as primary accounts. diff --git a/snaps/features/custom-evm-accounts/security.md b/snaps/features/custom-evm-accounts/security.md index e3151cf6dda..27cdb91479f 100644 --- a/snaps/features/custom-evm-accounts/security.md +++ b/snaps/features/custom-evm-accounts/security.md @@ -11,11 +11,12 @@ tags: Refer to the following security guidelines when [creating an account management Snap](create-account-snap.md). :::tip see also + - [Custom EVM accounts](index.md) - [Create an account management Snap](create-account-snap.md) - [Create an account management companion dapp](create-companion-dapp.md) - [Keyring API reference](../../reference/keyring-api/index.md) -::: + ::: ## Do not add secret information to account objects @@ -26,41 +27,41 @@ For example: - ❌ **Do NOT do this:** - ```ts - const account: KeyringAccount = { - id: uuid(), - options: { - privateKey: "0x01234...78", // !!! DO NOT DO THIS !!! - }, - address, - methods: [ - EthMethod.PersonalSign, - EthMethod.Sign, - EthMethod.SignTransaction, - EthMethod.SignTypedDataV1, - EthMethod.SignTypedDataV3, - EthMethod.SignTypedDataV4, - ], - type: EthAccountType.Eoa, - }; - ``` + ```ts + const account: KeyringAccount = { + id: uuid(), + options: { + privateKey: "0x01234...78", // !!! DO NOT DO THIS !!! + }, + address, + methods: [ + EthMethod.PersonalSign, + EthMethod.Sign, + EthMethod.SignTransaction, + EthMethod.SignTypedDataV1, + EthMethod.SignTypedDataV3, + EthMethod.SignTypedDataV4, + ], + type: EthAccountType.Eoa, + } + ``` - ✅ **Do this instead:** - *Store any secret information that you need in the Snap's state:* - - ```ts - await snap.request({ - method: "snap_manageState", - params: { - operation: "update", - newState: { - // Your Snap's state here. - privateKey: "0x01234...78", - }, + _Store any secret information that you need in the Snap's state:_ + + ```ts + await snap.request({ + method: "snap_manageState", + params: { + operation: "update", + newState: { + // Your Snap's state here. + privateKey: "0x01234...78", }, - }); - ``` + }, + }) + ``` ## Limit the methods exposed to dapps @@ -69,7 +70,7 @@ By default, MetaMask enforces the following restrictions on calling the caller origin: | Method | MetaMask origin | Dapp origin | -|:---------------------------------------------------------------------------------------------------------------------|:------------------:|:------------------:| +| :------------------------------------------------------------------------------------------------------------------- | :----------------: | :----------------: | | [`keyring_listAccounts`](../../reference/keyring-api/account-management/index.md#keyring_listaccounts) | :white_check_mark: | :white_check_mark: | | [`keyring_getAccount`](../../reference/keyring-api/account-management/index.md#keyring_getaccount) | :white_check_mark: | :white_check_mark: | | [`keyring_createAccount`](../../reference/keyring-api/account-management/index.md#keyring_createaccount) | :x: | :white_check_mark: | @@ -107,7 +108,7 @@ const permissions: Record = { "https://": [ // List of allowed methods for Dapp 2. ], -}; +} if (origin !== "metamask" && !permissions[origin]?.includes(request.method)) { // Reject the request. @@ -162,7 +163,7 @@ For example: ```ts // If inputSecretValue contains invalid hexadecimal characters, its value // will be added to the error thrown by toBuffer. - const privateKey = toBuffer(inputSecretValue); + const privateKey = toBuffer(inputSecretValue) // Use privateKey here. ``` @@ -170,10 +171,10 @@ For example: ```ts try { - const privateKey = toBuffer(inputSecretValue); + const privateKey = toBuffer(inputSecretValue) // Use privateKey here. } catch (error) { - throw new Error("Invalid private key"); + throw new Error("Invalid private key") } ``` @@ -195,8 +196,8 @@ For example: origin, request, }) => { - return handleKeyringRequest(keyring, request); - }; + return handleKeyringRequest(keyring, request) + } ``` - ✅ **Do this instead:** @@ -208,8 +209,8 @@ For example: request, }) => { // Any custom logic or extra security checks here. - return handleKeyringRequest(keyring, request); - }; + return handleKeyringRequest(keyring, request) + } ``` ## Do not fetch remote code from inside your Snap diff --git a/snaps/features/custom-name-resolution.md b/snaps/features/custom-name-resolution.md index 805b4c5374e..79854b782fb 100644 --- a/snaps/features/custom-name-resolution.md +++ b/snaps/features/custom-name-resolution.md @@ -36,31 +36,36 @@ The following example implements a very basic resolution from Unstoppable Domain Ethereum addresses in `onNameLookup`: ```typescript title="index.ts" -import type { OnNameLookupHandler } from "@metamask/snaps-types"; +import type { OnNameLookupHandler } from "@metamask/snaps-types" -const UNSTOPPABLE_API_KEY = "xxx"; +const UNSTOPPABLE_API_KEY = "xxx" export const onNameLookup: OnNameLookupHandler = async (request) => { - const { chainId, domain } = request; + const { chainId, domain } = request if (domain && chainId === "eip155:1") { - const response = await fetch(`https://api.unstoppabledomains.com/resolve/domains/${domain}`, { - headers: { - accept: "application/json", - authorization: `Bearer ${UNSTOPPABLE_API_KEY}`, - }, - }); - const data = await response.json(); - const resolvedAddress = data.records["crypto.ETH.address"]; + const response = await fetch( + `https://api.unstoppabledomains.com/resolve/domains/${domain}`, + { + headers: { + accept: "application/json", + authorization: `Bearer ${UNSTOPPABLE_API_KEY}`, + }, + } + ) + const data = await response.json() + const resolvedAddress = data.records["crypto.ETH.address"] if (address) { return { - resolvedAddresses: [{ resolvedAddress, protocol: "Unstoppable Domains" }], - }; + resolvedAddresses: [ + { resolvedAddress, protocol: "Unstoppable Domains" }, + ], + } } } - return null; -}; + return null +} ``` ## Example diff --git a/snaps/features/custom-ui/dialogs.md b/snaps/features/custom-ui/dialogs.md index c48baa5c76e..c4aacb4f82d 100644 --- a/snaps/features/custom-ui/dialogs.md +++ b/snaps/features/custom-ui/dialogs.md @@ -36,7 +36,7 @@ To display an alert that can only be acknowledged, call The following example displays custom UI that alerts the user when something happens in the system: ```javascript title="index.js" -import { panel, text, heading } from "@metamask/snaps-sdk"; +import { panel, text, heading } from "@metamask/snaps-sdk" await snap.request({ method: "snap_dialog", @@ -47,7 +47,7 @@ await snap.request({ text("The thing that happened is..."), ]), }, -}); +}) // Code that should execute after the alert has been acknowledged. ``` @@ -64,7 +64,7 @@ The following example displays custom UI that asks the user to confirm whether t take an action: ```javascript title="index.js" -import { panel, text, heading } from "@metamask/snaps-sdk"; +import { panel, text, heading } from "@metamask/snaps-sdk" const result = await snap.request({ method: "snap_dialog", @@ -75,7 +75,7 @@ const result = await snap.request({ text("The action is..."), ]), }, -}); +}) if (result === true) { // Do the action. @@ -95,7 +95,7 @@ Prompt dialogs also accept a `placeholder` value that displays in the input fiel The following example displays custom UI that prompts the user to enter a wallet address: ```javascript title="index.js" -import { panel, text, heading } from "@metamask/snaps-sdk"; +import { panel, text, heading } from "@metamask/snaps-sdk" const walletAddress = await snap.request({ method: "snap_dialog", @@ -107,7 +107,7 @@ const walletAddress = await snap.request({ ]), placeholder: "0x123...", }, -}); +}) // walletAddress will be a string containing the address entered by the user. ``` diff --git a/snaps/features/custom-ui/home-pages.md b/snaps/features/custom-ui/home-pages.md index 5fff46457eb..b7fcfc34e44 100644 --- a/snaps/features/custom-ui/home-pages.md +++ b/snaps/features/custom-ui/home-pages.md @@ -33,8 +33,8 @@ MetaMask calls this method when a user selects your Snap name in the Snaps menu. The following example displays custom UI that welcomes the user to the Snap's home page: ```typescript title="index.ts" -import type { OnHomePageHandler } from "@metamask/snaps-sdk"; -import { panel, text, heading } from "@metamask/snaps-sdk"; +import type { OnHomePageHandler } from "@metamask/snaps-sdk" +import { panel, text, heading } from "@metamask/snaps-sdk" export const onHomePage: OnHomePageHandler = async () => { return { @@ -42,8 +42,8 @@ export const onHomePage: OnHomePageHandler = async () => { heading("Hello world!"), text("Welcome to my Snap home page!"), ]), - }; -}; + } +} ```

diff --git a/snaps/features/custom-ui/index.md b/snaps/features/custom-ui/index.md index 87252b04d5a..e886f0fe169 100644 --- a/snaps/features/custom-ui/index.md +++ b/snaps/features/custom-ui/index.md @@ -26,7 +26,7 @@ SDK and build your UI with them. For example, to display a [`panel`](#panel) using [`snap_dialog`](../../reference/snaps-api.md#snap_dialog): ```javascript title="index.js" -import { panel, heading, text } from "@metamask/snaps-sdk"; +import { panel, heading, text } from "@metamask/snaps-sdk" await snap.request({ method: "snap_dialog", @@ -37,7 +37,7 @@ await snap.request({ text("Something happened in the system."), ]), }, -}); +}) ``` ## Components @@ -46,14 +46,14 @@ The following custom UI components are available: ### `address` -Outputs a formatted text field for an Ethereum address. -The address is automatically displayed with a jazzicon and truncated value. +Outputs a formatted text field for an Ethereum address. +The address is automatically displayed with a jazzicon and truncated value. Hovering the address shows the full value in a tooltip. #### Example ```javascript title="index.js" -import { panel, heading, address } from "@metamask/snaps-sdk"; +import { panel, heading, address } from "@metamask/snaps-sdk" await snap.request({ method: "snap_dialog", @@ -64,7 +64,7 @@ await snap.request({ address("0x000000000000000000000000000000000000dEaD"), ]), }, -}); +}) ```

@@ -97,7 +97,7 @@ An object containing: #### Example ```javascript -import { button, panel, heading } from "@metamask/snaps-sdk"; +import { button, panel, heading } from "@metamask/snaps-sdk" const interfaceId = await snap.request({ method: "snap_createInterface", @@ -110,7 +110,7 @@ const interfaceId = await snap.request({ }), ]), }, -}); +}) await snap.request({ method: "snap_dialog", @@ -118,7 +118,7 @@ await snap.request({ type: "Alert", id: interfaceId, }, -}); +}) ```

@@ -132,7 +132,7 @@ Outputs a read-only text field with a copy-to-clipboard shortcut. #### Example ```javascript title="index.js" -import { text, copyable } from "@metamask/snaps-sdk"; +import { text, copyable } from "@metamask/snaps-sdk" await snap.request({ method: "snap_dialog", @@ -143,7 +143,7 @@ await snap.request({ copyable("0x000000000000000000000000000000000000dEaD"), ]), }, -}); +}) ```

@@ -190,7 +190,7 @@ An object containing: #### Example ```js -import { input, button, form } from "@metamask/snaps-sdk"; +import { input, button, form } from "@metamask/snaps-sdk" const interfaceId = await snap.request({ method: "snap_createInterface", @@ -209,7 +209,7 @@ const interfaceId = await snap.request({ ], }), }, -}); +}) await snap.request({ method: "snap_dialog", @@ -217,7 +217,7 @@ await snap.request({ type: "Alert", id: interfaceId, }, -}); +}) ```

@@ -251,7 +251,7 @@ module.exports.onHomePage = async () => { ### `image` -Outputs an image. +Outputs an image. This component takes an inline SVG. It does not support remote URLs. @@ -309,7 +309,7 @@ An object containing: #### Example ```js -import { input, form } from "@metamask/snaps-sdk"; +import { input, form } from "@metamask/snaps-sdk" const interfaceId = await snap.request({ method: "snap_createInterface", @@ -328,7 +328,7 @@ const interfaceId = await snap.request({ ], }), }, -}); +}) await snap.request({ method: "snap_dialog", @@ -336,7 +336,7 @@ await snap.request({ type: "Alert", id: interfaceId, }, -}); +}) ```

@@ -350,7 +350,7 @@ package for a full example of implementing images. ### `panel` -Outputs a panel, which can be used as a container for other components. +Outputs a panel, which can be used as a container for other components. This component takes an array of custom UI components. #### Example @@ -380,14 +380,14 @@ module.exports.onTransaction = async ({ transaction }) => { ### `row` -Outputs a row with a label and value, which can be used for key-value data. -The label must be a string. The value can be a child component of type +Outputs a row with a label and value, which can be used for key-value data. +The label must be a string. The value can be a child component of type [`text`](#text) or [`address`](#address). #### Example ```javascript title="index.js" -import { panel, row, text, address } from "@metamask/snaps-sdk"; +import { panel, row, text, address } from "@metamask/snaps-sdk" await snap.request({ method: "snap_dialog", @@ -398,7 +398,7 @@ await snap.request({ row("Balance", text("1.78 ETH")), ]), }, -}); +}) ```

@@ -412,18 +412,15 @@ Outputs a loading indicator. #### Example ```javascript title="index.js" -import { panel, heading, spinner } from "@metamask/snaps-sdk"; +import { panel, heading, spinner } from "@metamask/snaps-sdk" await snap.request({ method: "snap_dialog", params: { type: "alert", - content: panel([ - heading("Please wait..."), - spinner(), - ]), + content: panel([heading("Please wait..."), spinner()]), }, -}); +}) ```

@@ -432,7 +429,7 @@ await snap.request({ ### `text` -Outputs text. +Outputs text. #### Example @@ -461,7 +458,7 @@ module.exports.onHomePage = async () => { #### Example ```javascript title="index.js" -import { panel, heading, text } from "@metamask/snaps-sdk"; +import { panel, heading, text } from "@metamask/snaps-sdk" await snap.request({ method: "snap_dialog", @@ -472,7 +469,7 @@ await snap.request({ text("This is **bold** and this is _italic_."), ]), }, -}); +}) ```

@@ -511,7 +508,7 @@ Text-based components (such as [`heading`](#heading) and [`text`](#text)) accept #### Example ```javascript title="index.js" -import { panel, heading, text } from "@metamask/snaps-sdk"; +import { panel, heading, text } from "@metamask/snaps-sdk" await snap.request({ method: "snap_dialog", @@ -522,7 +519,7 @@ await snap.request({ text("This is an apple 🍎 and this is an orange 🍊."), ]), }, -}); +}) ```

diff --git a/snaps/features/custom-ui/interactive-ui.md b/snaps/features/custom-ui/interactive-ui.md index dd2084e900e..d3ff0a7a81f 100644 --- a/snaps/features/custom-ui/interactive-ui.md +++ b/snaps/features/custom-ui/interactive-ui.md @@ -42,7 +42,7 @@ asynchronous process. The following is an example flow: 1. The user activates an interactive interface to send Bitcoin funds to an address. - The initial interface contains an address input, an amount input, and a **Send funds** button. + The initial interface contains an address input, an amount input, and a **Send funds** button. 2. The user fills the fields, and selects the **Send funds** button. 3. `onUserInput` is called, and the logic detects that the **Send funds** button was selected. 4. `snap_updateInterface` is called, replacing the **Send funds** button with a [`spinner`](index.md#spinner). @@ -58,4 +58,4 @@ method with the ID of the interface. ## Example See the [`@metamask/interactive-ui-example-snap`](https://github.com/MetaMask/snaps/tree/main/packages/examples/packages/interactive-ui) -package for a full example of implementing interactive UI. \ No newline at end of file +package for a full example of implementing interactive UI. diff --git a/snaps/features/data-storage.md b/snaps/features/data-storage.md index 54f82e2dbfd..d66229e071e 100644 --- a/snaps/features/data-storage.md +++ b/snaps/features/data-storage.md @@ -14,7 +14,7 @@ We recommend using this method for storing data in a Snap long term. :::caution important Snaps are installed in each user's MetaMask instance. If a Snap stores data, that data is specific to that user's MetaMask instance. -However, this data can be shared across multiple dapps. +However, this data can be shared across multiple dapps. Do not assume that the data a Snap stores is unique to a single dapp unless it is specifically designed to be that way. ::: @@ -45,28 +45,28 @@ When the data is no longer required, the Snap's state is cleared using the `clea // Persist some data. await snap.request({ method: "snap_manageState", - params: { + params: { operation: "update", newState: { hello: "world" }, }, -}); +}) // At a later time, get the stored data. const persistedData = await snap.request({ method: "snap_manageState", params: { operation: "get" }, -}); +}) -console.log(persistedData); +console.log(persistedData) // { hello: "world" } // If data storage is no longer necessary, clear it. await snap.request({ method: "snap_manageState", - params: { + params: { operation: "clear", }, -}); +}) ``` :::tip @@ -89,33 +89,33 @@ MetaMask is locked. // Persist some data. await snap.request({ method: "snap_manageState", - params: { + params: { operation: "update", newState: { hello: "world" }, encrypted: false, }, -}); +}) // At a later time, get the stored data. const persistedData = await snap.request({ method: "snap_manageState", - params: { + params: { operation: "get", encrypted: false, }, -}); +}) -console.log(persistedData); +console.log(persistedData) // { hello: "world" } // If data storage is no longer necessary, clear it. await snap.request({ method: "snap_manageState", - params: { + params: { operation: "clear", encrypted: false, }, -}); +}) ``` ## Example diff --git a/snaps/features/lifecycle-hooks.md b/snaps/features/lifecycle-hooks.md index 6d223fbabda..ce7db582ddd 100644 --- a/snaps/features/lifecycle-hooks.md +++ b/snaps/features/lifecycle-hooks.md @@ -31,8 +31,8 @@ For example, you can use `onInstall` to perform any initialization that is requi The following example displays an [alert dialog](custom-ui/dialogs.md#display-an-alert-dialog) upon installation: ```typescript title="index.ts" -import type { OnInstallHandler } from "@metamask/snaps-sdk"; -import { heading, panel, text } from "@metamask/snaps-sdk"; +import type { OnInstallHandler } from "@metamask/snaps-sdk" +import { heading, panel, text } from "@metamask/snaps-sdk" export const onInstall: OnInstallHandler = async () => { await snap.request({ @@ -42,12 +42,12 @@ export const onInstall: OnInstallHandler = async () => { content: panel([ heading("Installation successful"), text( - "To use this Snap, visit the companion dapp at [metamask.io](https://metamask.io).", + "To use this Snap, visit the companion dapp at [metamask.io](https://metamask.io)." ), ]), }, - }); -}; + }) +} ``` ### 3. Run an action on update @@ -59,8 +59,8 @@ For example, you can use `onUpdate` to perform any migrations that are required The following example displays an [alert dialog](custom-ui/dialogs.md#display-an-alert-dialog) upon update: ```typescript title="index.ts" -import type { OnUpdateHandler } from "@metamask/snaps-sdk"; -import { heading, panel, text } from "@metamask/snaps-sdk"; +import type { OnUpdateHandler } from "@metamask/snaps-sdk" +import { heading, panel, text } from "@metamask/snaps-sdk" export const onUpdate: OnUpdateHandler = async () => { await snap.request({ @@ -69,16 +69,12 @@ export const onUpdate: OnUpdateHandler = async () => { type: "alert", content: panel([ heading("Update successful"), - text( - "New features added in this version:", - ), - text( - "Added a dialog that appears when updating." - ), + text("New features added in this version:"), + text("Added a dialog that appears when updating."), ]), }, - }); -}; + }) +} ``` ## Example diff --git a/snaps/features/localization.md b/snaps/features/localization.md index 72945284773..c474623460f 100644 --- a/snaps/features/localization.md +++ b/snaps/features/localization.md @@ -48,27 +48,27 @@ You can then use these files in a localization module. The following is an example module: ```ts -import da from "../locales/da.json"; -import en from "../locales/en.json"; -import nl from "../locales/nl.json"; +import da from "../locales/da.json" +import en from "../locales/en.json" +import nl from "../locales/nl.json" // Default language, to be used if there is not a valid translation in // the requested locale. -const FALLBACK_LANGUAGE: Locale = "en"; +const FALLBACK_LANGUAGE: Locale = "en" export const locales = { da: da.messages, en: en.messages, nl: nl.messages, -}; +} -export type Locale = keyof typeof locales; +export type Locale = keyof typeof locales export async function getMessage(id: keyof (typeof locales)[Locale]) { - const locale = (await snap.request({ method: "snap_getLocale" })) as Locale; - const { message } = locales[locale]?.[id] ?? locales[FALLBACK_LANGUAGE][id]; + const locale = (await snap.request({ method: "snap_getLocale" })) as Locale + const { message } = locales[locale]?.[id] ?? locales[FALLBACK_LANGUAGE][id] - return message; + return message } ``` @@ -78,25 +78,25 @@ English as the default if the user's locale isn't available. The following is an example of using `getMessage` in a Snap's RPC request handler: ```ts title="index.ts" -import { rpcErrors } from "@metamask/rpc-errors"; -import type { OnRpcRequestHandler } from "@metamask/snaps-sdk"; +import { rpcErrors } from "@metamask/rpc-errors" +import type { OnRpcRequestHandler } from "@metamask/snaps-sdk" -import { getMessage } from "./locales"; +import { getMessage } from "./locales" export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => { switch (request.method) { case "hello": - return await getMessage("hello"); + return await getMessage("hello") default: throw rpcErrors.methodNotFound({ data: { method: request.method }, - }); + }) } -}; +} ``` -### 3. Localize the Snap's manifest file +### 3. Localize the Snap's manifest file The Snap [manifest file](../learn/about-snaps/files.md#manifest-file) contains textual metadata such as `proposedName` and `description` that you can localize to display in the user's language. @@ -110,11 +110,7 @@ The following is an example of a localized manifest file: "proposedName": "{{ name }}", "source": { "shasum": "XXX", - "locales": [ - "locales/da.json", - "locales/en.json", - "locales/nl.json" - ] + "locales": ["locales/da.json", "locales/en.json", "locales/nl.json"] }, "initialPermissions": { "snap_getLocale": {} diff --git a/snaps/features/network-access.md b/snaps/features/network-access.md index 5d8de6de599..ee09bec6a77 100644 --- a/snaps/features/network-access.md +++ b/snaps/features/network-access.md @@ -28,8 +28,8 @@ The following example fetches a JSON file from the provided URL. ```ts title="index.ts" async function getJson(url: string) { - const response = await fetch(url); - return await response.json(); + const response = await fetch(url) + return await response.json() } ``` @@ -40,7 +40,7 @@ Since Snap code is executed in an iframe with the `sandbox` property, the browse header with the value `null` with outgoing requests. For the Snap to be able to read the response, the server must send an [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) CORS header -with the value `*` or `null` in the response. +with the value `*` or `null` in the response. Otherwise, you might need to [set up a proxy](https://stackoverflow.com/questions/43871637/no-access-control-allow-origin-header-is-present-on-the-requested-resource-whe/43881141#43881141). ::: diff --git a/snaps/features/non-evm-networks.md b/snaps/features/non-evm-networks.md index 42974429994..9516c2c7b64 100644 --- a/snaps/features/non-evm-networks.md +++ b/snaps/features/non-evm-networks.md @@ -45,15 +45,15 @@ The general rule is: **Don't create a situation where your users can lose assets To derive a user's private keys: 1. Choose between the BIP-32 or BIP-44 specifications to derive the user's private keys. - If the keys you want to derive conform to the - [BIP-44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) structure, use - [`snap_getBip44Entropy`](../reference/snaps-api.md#snap_getbip44entropy) to derive them. - Otherwise, use [`snap_getBip32Entropy`](../reference/snaps-api.md#snap_getbip32entropy). + If the keys you want to derive conform to the + [BIP-44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) structure, use + [`snap_getBip44Entropy`](../reference/snaps-api.md#snap_getbip44entropy) to derive them. + Otherwise, use [`snap_getBip32Entropy`](../reference/snaps-api.md#snap_getbip32entropy). 2. Add the required permission to your manifest file. 3. Find out the derivation path to use. - This is dependent on the application you're building. + This is dependent on the application you're building. 4. Use the [`@metamask/key-tree`](https://github.com/MetaMask/key-tree) module to derive the keys. - Any additional code, for example, to derive addresses from keys, is application-specific. + Any additional code, for example, to derive addresses from keys, is application-specific. ### Dogecoin example @@ -82,7 +82,7 @@ For example, to derive Dogecoin keys: To get the second Dogecoin account, add the following code to your Snap: ```javascript title="index.js" - import { getBIP44AddressKeyDeriver } from "@metamask/key-tree"; + import { getBIP44AddressKeyDeriver } from "@metamask/key-tree" // Get the Dogecoin node, corresponding to the path m/44'/3'. const dogecoinNode = await snap.request({ @@ -90,18 +90,18 @@ For example, to derive Dogecoin keys: params: { coinType: 3, }, - }); + }) /** * Create a function that takes an index and returns an extended private key for m/44'/3'/0'/0/address_index. * The second parameter to getBIP44AddressKeyDeriver isn't passed. This sets account and changes to 0. */ - const deriveDogecoinAddress = await getBIP44AddressKeyDeriver(dogecoinNode); + const deriveDogecoinAddress = await getBIP44AddressKeyDeriver(dogecoinNode) // Derive the second Dogecoin address, which has index 1. - const secondAccount = deriveDogecoinAddress(1); + const secondAccount = deriveDogecoinAddress(1) ``` - + ## Examples The following are examples of existing Snaps that manage accounts and keys: diff --git a/snaps/features/notifications.md b/snaps/features/notifications.md index 839734a9d5f..d84487265c1 100644 --- a/snaps/features/notifications.md +++ b/snaps/features/notifications.md @@ -44,7 +44,7 @@ await snap.request({ type: "inApp", message: "Hello, world!", }, -}); +}) ```

@@ -61,7 +61,7 @@ Each Snap can trigger up to: - Five in-app notifications per minute. - Two native notifications per five minutes. -::: + ::: ## Example diff --git a/snaps/features/signature-insights.md b/snaps/features/signature-insights.md index 140b88ea15b..dc06781a54b 100644 --- a/snaps/features/signature-insights.md +++ b/snaps/features/signature-insights.md @@ -5,8 +5,8 @@ sidebar_custom_props: flask_only: true --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Signature insights @@ -55,9 +55,9 @@ shapes, depending on the signing method used: ```typescript interface EthSignature { - from: string; - data: string; - signatureMethod: "eth_sign"; + from: string + data: string + signatureMethod: "eth_sign" } ``` @@ -66,9 +66,9 @@ interface EthSignature { ```typescript interface PersonalSignature { - from: string; - data: string; - signatureMethod: "personal_sign"; + from: string + data: string + signatureMethod: "personal_sign" } ``` @@ -77,9 +77,9 @@ interface PersonalSignature { ```typescript interface SignTypedDataSignature { - from: string; - data: Record[]; - signatureMethod: "eth_signTypedData"; + from: string + data: Record[] + signatureMethod: "eth_signTypedData" } ``` @@ -88,9 +88,9 @@ interface SignTypedDataSignature { ```typescript interface SignTypedDataV3Signature { - from: string; - data: Record; - signatureMethod: "eth_signTypedData_v3"; + from: string + data: Record + signatureMethod: "eth_signTypedData_v3" } ``` @@ -99,9 +99,9 @@ interface SignTypedDataV3Signature { ```typescript interface SignTypedDataV4Signature { - from: string; - data: Record; - signatureMethod: "eth_signTypedData_v4"; + from: string + data: Record + signatureMethod: "eth_signTypedData_v4" } ``` diff --git a/snaps/features/static-files.md b/snaps/features/static-files.md index f7ad2db29dc..d2dd1dfc312 100644 --- a/snaps/features/static-files.md +++ b/snaps/features/static-files.md @@ -43,10 +43,10 @@ const contents = await snap.request({ path: "./files/myfile.bin", encoding: "hex", }, -}); +}) // "0x..." -console.log(contents); +console.log(contents) ``` ## Example diff --git a/snaps/get-started/install-flask.md b/snaps/get-started/install-flask.md index 86971e8725d..5493aa5639b 100644 --- a/snaps/get-started/install-flask.md +++ b/snaps/get-started/install-flask.md @@ -6,8 +6,8 @@ sidebar_position: 1 # Install MetaMask Flask To get started building your own Snaps, install the MetaMask Flask browser extension on -[Google Chrome](https://chromewebstore.google.com/detail/metamask-flask-developmen/ljfoeinjpaedjfecbmggjgodbgkmjkjk) -or +[Google Chrome](https://chromewebstore.google.com/detail/metamask-flask-developmen/ljfoeinjpaedjfecbmggjgodbgkmjkjk) +or [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/metamask-flask/). Install Flask in a new browser profile, or disable any existing installed versions of MetaMask @@ -28,7 +28,7 @@ If you import accounts with funds into Flask, you do so at your own risk. MetaMask Flask is an experimental playground that provides developers access to upcoming MetaMask features. While a small set of audited Snaps are allowlisted in the stable version of the MetaMask browser extension, MetaMask Flask is intended for developers building and testing Snaps locally or from npm. -Also, new Snaps API features are enabled in Flask for testing and developer feedback before they're enabled in MetaMask stable. -These features appear in the documentation with the **Flask** or **FLASK ONLY** tag. -You can also view Flask-specific features by looking for the **\[FLASK\]** label in the +Also, new Snaps API features are enabled in Flask for testing and developer feedback before they're enabled in MetaMask stable. +These features appear in the documentation with the **Flask** or **FLASK ONLY** tag. +You can also view Flask-specific features by looking for the **\[FLASK\]** label in the [MetaMask Extension changelog](https://github.com/MetaMask/metamask-extension/blob/develop/CHANGELOG.md). diff --git a/snaps/get-started/quickstart.md b/snaps/get-started/quickstart.md index a2926f096d0..b58e51c8250 100644 --- a/snaps/get-started/quickstart.md +++ b/snaps/get-started/quickstart.md @@ -52,16 +52,16 @@ From the root of the newly created project, install the project dependencies usi yarn install ``` -You may get a warning like the following: +You may get a warning like the following: ```bash @lavamoat/allow-scripts has detected dependencies without configuration. explicit configuration required. run "allow-scripts auto" to automatically populate the configuration. ``` -You can fix this by running the following command: +You can fix this by running the following command: -```bash +```bash yarn run allow-scripts auto ``` @@ -90,8 +90,8 @@ You can customize your Snap by editing `index.ts` in the `packages/snap/src` fol [`snap_dialog`](../reference/snaps-api.md#snapdialog) method to display a custom confirmation screen: ```ts title="index.ts" -import type { OnRpcRequestHandler } from "@metamask/snaps-sdk"; -import { panel, text } from "@metamask/snaps-sdk"; +import type { OnRpcRequestHandler } from "@metamask/snaps-sdk" +import { panel, text } from "@metamask/snaps-sdk" /** * Handle incoming JSON-RPC requests, sent through wallet_invokeSnap. @@ -116,15 +116,15 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ text(`Hello, **${origin}**!`), text("This custom confirmation is just for display purposes."), text( - "But you can edit the Snap source code to make it do something, if you want to!", + "But you can edit the Snap source code to make it do something, if you want to!" ), ]), }, - }); + }) default: - throw new Error("Method not found."); + throw new Error("Method not found.") } -}; +} ``` Edit the text in any `text()` component and select the **Reconnect** button diff --git a/snaps/how-to/allow-automatic-connections.md b/snaps/how-to/allow-automatic-connections.md index eba6dc3d36c..099402985a6 100644 --- a/snaps/how-to/allow-automatic-connections.md +++ b/snaps/how-to/allow-automatic-connections.md @@ -33,7 +33,7 @@ For example: When testing, you can specify the local site. For example: -```json title="snap.manifest.json" +```json title="snap.manifest.json" "initialConnections": { "http://localhost:8000": {} } @@ -69,20 +69,20 @@ explicitly connected to it by calling [`wallet_requestSnaps`](../reference/wallet-api-for-snaps.md#wallet_requestsnaps). ```js title="script.js" -const snapId = "npm:@myorg/mysnap"; +const snapId = "npm:@myorg/mysnap" // This function is called when the EIP-6963 process of finding MetaMask is successful. const MetaMaskFound = async (providerDetail) => { - const { provider } = providerDetail; + const { provider } = providerDetail // This call returns the Snap ID if it is already installed. const snaps = await provider.request({ method: "wallet_getSnaps", - }); + }) if (Object.keys(snaps).includes(snapId)) { // If we're here, the Snap is installed. We're good to go. - return; + return } // If we're here, the Snap is not installed. Let's install it. @@ -93,14 +93,14 @@ const MetaMaskFound = async (providerDetail) => { params: { [snapId]: {}, }, - }); + }) // If we're here, the Snap is installed, and the dapp is successfully connected to it. } catch (err) { // If we're here, something went wrong. For example, the user might have declined the Snap // installation confirmation. } -}; +} ``` ## When to use initial connections diff --git a/snaps/how-to/communicate-errors.md b/snaps/how-to/communicate-errors.md index 1f466e502a5..61df8470baa 100644 --- a/snaps/how-to/communicate-errors.md +++ b/snaps/how-to/communicate-errors.md @@ -17,18 +17,18 @@ then throw them where needed. For example: ```typescript title="index.ts" -import type { OnRpcRequestHandler } from "@metamask/snaps-sdk"; -import { MethodNotFoundError } from "@metamask/snaps-sdk"; +import type { OnRpcRequestHandler } from "@metamask/snaps-sdk" +import { MethodNotFoundError } from "@metamask/snaps-sdk" export const onRpcRequest: OnRpcRequestHandler = async ({ request }) => { switch (request.method) { case "hello": - return "Hello World!"; - default: - // Throw a known error to avoid crashing the Snap. - throw new MethodNotFoundError(); + return "Hello World!" + default: + // Throw a known error to avoid crashing the Snap. + throw new MethodNotFoundError() } -}; +} ``` ### Pass data with the error @@ -37,7 +37,7 @@ The error class constructors exported by `@metamask/snaps-sdk` have the followin ```typescript class SnapJsonRpcError extends SnapError { - new (message?: string, data?: Record) + new(message?: string, data?: Record) } ``` diff --git a/snaps/how-to/connect-to-a-snap.md b/snaps/how-to/connect-to-a-snap.md index 1bd0ccc4122..bb383c737f3 100644 --- a/snaps/how-to/connect-to-a-snap.md +++ b/snaps/how-to/connect-to-a-snap.md @@ -3,8 +3,8 @@ description: Connect your dapp to existing, third-party Snaps. sidebar_position: 10 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Connect to a Snap @@ -20,13 +20,13 @@ See the Wallet documentation on [how to connect to MetaMask](/wallet/how-to/conn ### Detect MetaMask Flask When developing your Snap, you might need to require -[MetaMask Flask](../get-started/install-flask.md) in your dapp. +[MetaMask Flask](../get-started/install-flask.md) in your dapp. We recommend detecting MetaMask Flask using the -[multi-wallet detection mechanism](/wallet/concepts/wallet-interoperability) specified by EIP-6963. +[multi-wallet detection mechanism](/wallet/concepts/wallet-interoperability) specified by EIP-6963. Alternatively, you can use the `window.ethereum` injected provider, but this might fail if the user -is running multiple wallet extensions simultaneously. +is running multiple wallet extensions simultaneously. -To detect MetaMask Flask, you can add the following to `window.onload`: +To detect MetaMask Flask, you can add the following to `window.onload`: @@ -34,35 +34,35 @@ To detect MetaMask Flask, you can add the following to `window.onload`: ```js title="index.js" window.addEventListener("eip6963:announceProvider", (event) => { /* event.detail contains the discovered provider interface. */ - const providerDetail = event.detail; + const providerDetail = event.detail /* providerDetail.info.rdns is the best way to distinguish a wallet extension. */ if (providerDetail.info.rdns === "io.metamask.flask") { - console.log("MetaMask Flask successfully detected!"); + console.log("MetaMask Flask successfully detected!") // Now you can use Snaps! - } else { - console.error("Please install MetaMask Flask!"); + } else { + console.error("Please install MetaMask Flask!") } -}); +}) -window.dispatchEvent(new Event("eip6963:requestProvider")); +window.dispatchEvent(new Event("eip6963:requestProvider")) ``` ```js title="index.js" -const provider = window.ethereum; +const provider = window.ethereum -const isFlask = ( +const isFlask = ( await provider?.request({ method: "web3_clientVersion" }) -)?.includes("flask"); +)?.includes("flask") if (provider && isFlask) { - console.log("MetaMask Flask successfully detected!"); + console.log("MetaMask Flask successfully detected!") // Now you can use Snaps! } else { - console.error("Please install MetaMask Flask!", error); + console.error("Please install MetaMask Flask!", error) } ``` @@ -126,17 +126,17 @@ Each value is a nested object with additional information, such as the version o :::note `wallet_getSnaps` only returns the Snaps that are connected to your dapp. -The user may have other Snaps installed that your dapp is not aware of. +The user may have other Snaps installed that your dapp is not aware of. ::: The following example verifies whether a Snap with ID `npm:super-snap` is installed: ```ts title="index.ts" const snaps = await ethereum.request({ - method: "wallet_getSnaps" -}); + method: "wallet_getSnaps", +}) -const isMySnapInstalled = Object.keys(snaps).includes("npm:super-snap"); +const isMySnapInstalled = Object.keys(snaps).includes("npm:super-snap") ``` If you need to work with a specific version of a Snap, you can instead iterate over diff --git a/snaps/how-to/debug-a-snap/common-issues.md b/snaps/how-to/debug-a-snap/common-issues.md index 3603730abc9..b970f6adaa8 100644 --- a/snaps/how-to/debug-a-snap/common-issues.md +++ b/snaps/how-to/debug-a-snap/common-issues.md @@ -3,8 +3,8 @@ description: Solve common issues. sidebar_position: 1 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Troubleshoot common issues @@ -119,7 +119,7 @@ the file: ```javascript title="browser-ponyfill.js" // Choose between native implementation (global) or custom implementation (__self__) // var ctx = global.fetch ? global : __self__; -var ctx = __self__; // this line disable service worker support temporarily +var ctx = __self__ // this line disable service worker support temporarily ``` You can replace that with the following snippet: @@ -128,7 +128,7 @@ You can replace that with the following snippet: // Choose between native implementation (global) or custom implementation (__self__) var ctx = global.fetch ? { ...global, fetch: global.fetch.bind(global) } - : __self__; + : __self__ // var ctx = __self__; // this line disable service worker support temporarily ``` @@ -178,22 +178,22 @@ In a production environment this may be a large task depending on the usage of ` ```javascript const instance = axios.create({ baseURL: "https://api.github.com/", -}); +}) instance .get("users/MetaMask") .then((res) => { if (res.status >= 400) { - throw new Error("Bad response from server"); + throw new Error("Bad response from server") } - return res.data; + return res.data }) .then((user) => { - console.log(user); + console.log(user) }) .catch((err) => { - console.error(err); - }); + console.error(err) + }) ``` @@ -203,12 +203,12 @@ instance fetch("https://api.github.com/users/MetaMask") .then((res) => { if (!res.ok) { - throw new Error("Bad response from server"); + throw new Error("Bad response from server") } - return res.json(); + return res.json() }) .then((json) => console.log(json)) - .catch((err) => console.error(err)); + .catch((err) => console.error(err)) ``` diff --git a/snaps/how-to/get-allowlisted.md b/snaps/how-to/get-allowlisted.md index 881c77bd5f0..475fe2c0128 100644 --- a/snaps/how-to/get-allowlisted.md +++ b/snaps/how-to/get-allowlisted.md @@ -7,22 +7,22 @@ sidebar_position: 9 Once you have built your Snap, tested it, and published it to npm, you can make it available to MetaMask users. -If your Snap only uses [open permissions](#open-permissions), anyone can install it on the MetaMask extension. -However, third-party Snaps that use -[protected permissions](#open-permissions) +If your Snap only uses [open permissions](#open-permissions), anyone can install it on the MetaMask extension. +However, third-party Snaps that use +[protected permissions](#open-permissions) must be put on an allowlist before users can install them. -This means that at this time, for Snaps that use protected permissions, only those that are reviewed by MetaMask can be installed. +This means that at this time, for Snaps that use protected permissions, only those that are reviewed by MetaMask can be installed. In the future, this system will be opened up. :::caution Important -By including a Snap on the allowlist, Consensys is not endorsing, recommending, or guaranteeing the -safety of a Snap for your use or use for any reason. +By including a Snap on the allowlist, Consensys is not endorsing, recommending, or guaranteeing the +safety of a Snap for your use or use for any reason. Always do your own research before installing a Snap. ::: ## Prerequisites -To be added to the allowlist, a Snap must: +To be added to the allowlist, a Snap must: - Have publicly available source code. You don't need to publish your code with an open source license, but users should be able to read @@ -31,21 +31,21 @@ To be added to the allowlist, a Snap must: - Not impair our compliance with laws or regulations. Furthermore, if your Snap uses any of the following API methods related to key management, you must provide - evidence of a third-party audit from an approved auditor: +evidence of a third-party audit from an approved auditor: - - [`snap_getBip32Entropy`](../reference/snaps-api.md#snap_getbip32entropy) - - [`snap_getBip32PublicKey`](../reference/snaps-api.md#snap_getbip32publickey) - - [`snap_getBip44Entropy`](../reference/snaps-api.md#snap_getbip44entropy) - - [`snap_getEntropy`](../reference/snaps-api.md#snap_getentropy) - - [`snap_manageAccounts`](../reference/snaps-api.md#snap_manageaccounts) +- [`snap_getBip32Entropy`](../reference/snaps-api.md#snap_getbip32entropy) +- [`snap_getBip32PublicKey`](../reference/snaps-api.md#snap_getbip32publickey) +- [`snap_getBip44Entropy`](../reference/snaps-api.md#snap_getbip44entropy) +- [`snap_getEntropy`](../reference/snaps-api.md#snap_getentropy) +- [`snap_manageAccounts`](../reference/snaps-api.md#snap_manageaccounts) -The audit must cover the Snap source code that is to run within the Snaps system, and any modules -used for key management. -You must provide the commit that was audited and the commit that has any fixes documented in the +The audit must cover the Snap source code that is to run within the Snaps system, and any modules +used for key management. +You must provide the commit that was audited and the commit that has any fixes documented in the audit report. :::info -A list of approved third-party auditors and details about the audit process are available on the +A list of approved third-party auditors and details about the audit process are available on the [MetaMask Snaps Builder Engagement Program](https://consensys.notion.site/Audit-process-1acbc67819dc4631b7a3d6c664e387a3). ::: @@ -111,46 +111,46 @@ The form requests information about your Snap, including the following: ### 2. Allowlist review -Your Snap will be reviewed by the MetaMask Snaps team to ensure it is functional and well-designed. +Your Snap will be reviewed by the MetaMask Snaps team to ensure it is functional and well-designed. If the Snap requires an audit, the team will review the audit report to ensure that all -vulnerabilities with medium or higher risk have been addressed. +vulnerabilities with medium or higher risk have been addressed. All Snaps require at least two approvals to be allowlisted. ### 3. Directory listing -Once your Snap is on the allowlist, it will appear in the [MetaMask Snaps Directory](https://snaps.metamask.io). -You can direct users to the directory to find and install your Snap. +Once your Snap is on the allowlist, it will appear in the [MetaMask Snaps Directory](https://snaps.metamask.io). +You can direct users to the directory to find and install your Snap. ### 4. Distribute your Snap You can deploy a companion dapp where users can learn about your Snap and install it, or you can -integrate your Snap with your existing dapp. +integrate your Snap with your existing dapp. If your Snap is designed to communicate with dapps, you can encourage other dapp developers to [connect to your Snap](connect-to-a-snap.md). :::note -While testing your Snap, you might have designed your dapp to require MetaMask Flask. -Once your Snap is allowlisted, you should update your dapp to support any flavor of MetaMask, -and show the orange MetaMask logo instead of the purple Flask logo. +While testing your Snap, you might have designed your dapp to require MetaMask Flask. +Once your Snap is allowlisted, you should update your dapp to support any flavor of MetaMask, +and show the orange MetaMask logo instead of the purple Flask logo. ::: -### 5. Update your Snap +### 5. Update your Snap The allowlist uses strict versioning for all Snaps. After publishing a new version of your Snap to npm, you must re-submit it for allowlisting by filling out the [MetaMask Snaps Directory Information Update form](https://go.metamask.io/snaps-directory-update-request). -Users will not be able to install a new version until it is allowlisted. +Users will not be able to install a new version until it is allowlisted. You can also update any information about your Snap using the form. For fields that you don't need to update, you can leave them blank or enter "N/A." When providing the new version to be allowlisted, you should also note whether previous versions of -your Snap should be removed from the allowlist (effectively, replaced with the new version). +your Snap should be removed from the allowlist (effectively, replaced with the new version). ## Open permissions -The following is a list of permissions that do not require allowlisting: +The following is a list of permissions that do not require allowlisting: - [`endowment:cronjob`](../reference/permissions.md#endowmentcronjob) - [`endowment:ethereum-provider`](../reference/permissions.md#endowmentethereum-provider) @@ -163,7 +163,7 @@ The following is a list of permissions that do not require allowlisting: - [`snap_manageState`](../reference/snaps-api.md#snap_managestate) - [`snap_notify`](../reference/snaps-api.md#snap_notify) -If your Snap only uses permissions from this list, -it can be installed in the MetaMask extension without inclusion on the allowlist. +If your Snap only uses permissions from this list, +it can be installed in the MetaMask extension without inclusion on the allowlist. -Any permissions not on this list are _protected permissions_ and require allowlisting. +Any permissions not on this list are _protected permissions_ and require allowlisting. diff --git a/snaps/how-to/publish-a-snap.md b/snaps/how-to/publish-a-snap.md index 5c9b3d40ae9..4e04d7b5104 100644 --- a/snaps/how-to/publish-a-snap.md +++ b/snaps/how-to/publish-a-snap.md @@ -14,7 +14,7 @@ The following details are specific to Snaps: - The `repository.url` field in `package.json` should match the correct repository for your Snap. - The `source.location.npm.packageName` in `snap.manifest.json` should match the name in `package.json`. - The `proposedName` in `snap.manifest.json` should be a human-readable name and should not include - the words "MetaMask" or "Snap." + the words "MetaMask" or "Snap." - The image specified in `iconPath` in the manifest file is used as the icon displayed when installing the Snap, in custom dialogs, and in the settings menu. - This icon should be a valid SVG. @@ -24,15 +24,15 @@ After publishing the Snap, any dapp can connect to the Snap by using the Snap ID :::caution If you are using the Snap monorepo project generated in the [quickstart](../get-started/quickstart.md), -make sure to only publish the Snap package in `/packages/snap`. -You can use the [Snaps Simulator](https://metamask.github.io/snaps/snaps-simulator/staging/#/manifest) to verify -that your Snap was published correctly — just select **localhost** in the top right corner and change the -Snap location to **npm** and the ID of your Snap. +make sure to only publish the Snap package in `/packages/snap`. +You can use the [Snaps Simulator](https://metamask.github.io/snaps/snaps-simulator/staging/#/manifest) to verify +that your Snap was published correctly — just select **localhost** in the top right corner and change the +Snap location to **npm** and the ID of your Snap. Also, make sure to update the manifest file, icon file, and README to differentiate your Snap from the template. ::: -## Make a Snap available to users +## Make a Snap available to users After publishing a Snap, you can make it available to MetaMask users by [getting your Snap allowlisted](get-allowlisted.md). diff --git a/snaps/how-to/request-permissions.md b/snaps/how-to/request-permissions.md index 1f3a3d2ab02..f1b71eec312 100644 --- a/snaps/how-to/request-permissions.md +++ b/snaps/how-to/request-permissions.md @@ -28,12 +28,14 @@ following to the manifest file: ``` :::note + All Snaps API methods except the following interactive UI methods require requesting permission in the manifest file: - [`snap_createInterface`](../reference/snaps-api.md#snap_createinterface) - [`snap_getInterfaceState`](../reference/snaps-api.md#snap_getinterfacestate) - [`snap_updateInterface`](../reference/snaps-api.md#snap_updateInterface) + ::: ### Endowments @@ -79,15 +81,15 @@ await window.ethereum.request({ // Assuming the Snap is published to npm using the package name "hello-snap". "npm:hello-snap": {}, }, -}); +}) // Invoke the "hello" JSON-RPC method exposed by the Snap. const response = await window.ethereum.request({ method: "wallet_invokeSnap", params: { snapId: "npm:hello-snap", request: { method: "hello" } }, -}); +}) -console.log(response); // "world!" +console.log(response) // "world!" ``` :::note diff --git a/snaps/how-to/restrict-rpc-api.md b/snaps/how-to/restrict-rpc-api.md index a484f0f8f12..325d0922c02 100644 --- a/snaps/how-to/restrict-rpc-api.md +++ b/snaps/how-to/restrict-rpc-api.md @@ -26,21 +26,23 @@ You can restrict by method and origin using the `origin` parameter of the For example: ```typescript title="index.ts" -import type { OnRpcRequestHandler, UnauthorizedError } from "@metamask/snaps-sdk"; +import type { + OnRpcRequestHandler, + UnauthorizedError, +} from "@metamask/snaps-sdk" -type MethodPermission = "*" | string[]; +type MethodPermission = "*" | string[] const RPC_PERMISSIONS: Record = { hello: "*", - secureMethod: [ - "https://metamask.io", - "https://www.mydomain.com", - ] -}; + secureMethod: ["https://metamask.io", "https://www.mydomain.com"], +} const isAllowed = (method: string, origin: string) => { - return RPC_PERMISSIONS[method] === "*" || RPC_PERMISSIONS[method].includes(origin); -}; + return ( + RPC_PERMISSIONS[method] === "*" || RPC_PERMISSIONS[method].includes(origin) + ) +} export const onRpcRequest: OnRpcRequestHandler = async ({ origin, @@ -48,20 +50,22 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ }) => { // Check permissions. if (!isAllowed(request.method, origin)) { - throw new UnauthorizedError(`Method ${request.method} not authorized for origin ${origin}.`); + throw new UnauthorizedError( + `Method ${request.method} not authorized for origin ${origin}.` + ) } switch (request.method) { case "hello": - return "world!"; + return "world!" case "secureMethod": - return "The secret is: 42"; + return "The secret is: 42" default: - throw new Error("Method not found."); + throw new Error("Method not found.") } -}; +} ``` You can construct more powerful filtering methods using regular expressions or any other logic of diff --git a/snaps/how-to/test-a-snap.md b/snaps/how-to/test-a-snap.md index 03bdf7ee5e4..383f54a1164 100644 --- a/snaps/how-to/test-a-snap.md +++ b/snaps/how-to/test-a-snap.md @@ -37,7 +37,7 @@ In the `jest.config.js` file, add the following: ```js title="jest.config.js" module.exports = { preset: "@metamask/snaps-jest", -}; +} ``` This automatically configures Jest to use the `@metamask/snaps-jest` environment, and to use the @@ -58,7 +58,7 @@ environment and matchers to your Jest configuration manually: module.exports = { testEnvironment: "@metamask/snaps-jest", setupFilesAfterEnv: ["@metamask/snaps-jest/dist/cjs/setup.js"], -}; +} ``` You can pass any [Jest options](../reference/jest.md#options) to the test environment by adding a @@ -71,7 +71,7 @@ module.exports = { testEnvironmentOptions: { // Options go here. }, -}; +} ``` All options are optional. diff --git a/snaps/how-to/use-environment-variables.md b/snaps/how-to/use-environment-variables.md index 3edb71e61be..67ac057db4f 100644 --- a/snaps/how-to/use-environment-variables.md +++ b/snaps/how-to/use-environment-variables.md @@ -2,8 +2,8 @@ sidebar_position: 3 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Use environment variables @@ -20,88 +20,90 @@ Snaps CLI: - `NODE_ENV="production"` - `NODE_DEBUG=false` - `DEBUG=false` -::: + ::: ## Use environment variables on the command line 1. Specify environment variables on the command line. - For example: + For example: - ```bash - PUBLIC_KEY=abc123 SNAP_ENV=dev - ``` + ```bash + PUBLIC_KEY=abc123 SNAP_ENV=dev + ``` 2. Build your Snap using the [Snaps CLI](../reference/cli/subcommands.md): - ```bash - yarn mm-snap build - ``` + ```bash + yarn mm-snap build + ``` ## Use environment variables in a `.env` file 1. Specify environment variables in a `.env` file. - For example: - - ```text title=".env" - PUBLIC_KEY=abc123 - SNAP_ENV=dev - ``` + For example: + + ```text title=".env" + PUBLIC_KEY=abc123 + SNAP_ENV=dev + ``` 2. Specify the environment variables in your Snap's - [configuration file](../learn/about-snaps/files.md#configuration-file) using the `environment` option. - For example: - - - - - ```javascript title="snap.config.js" - require("dotenv").config(); - - module.exports = { - environment: { - SNAP_ENV: process.env.SNAP_ENV, - PUBLIC_KEY: process.env.PUBLIC_KEY, - }, - // Other options. - }; - ``` - - - - - ```typescript title="snap.config.ts" - import type { SnapConfig } from "@metamask/snaps-cli"; - import * as dotenv from "dotenv"; - dotenv.config(); - - const config: SnapConfig = { - environment: { - SNAP_ENV: process.env.SNAP_ENV, - PUBLIC_KEY: process.env.PUBLIC_KEY, - }, - // Other options. - }; - - export default config; - ``` - - - + [configuration file](../learn/about-snaps/files.md#configuration-file) using the `environment` option. + For example: + + + + + ```javascript title="snap.config.js" + require("dotenv").config() + + module.exports = { + environment: { + SNAP_ENV: process.env.SNAP_ENV, + PUBLIC_KEY: process.env.PUBLIC_KEY, + }, + // Other options. + } + ``` + + + + + ```typescript title="snap.config.ts" + import type { SnapConfig } from "@metamask/snaps-cli" + import * as dotenv from "dotenv" + dotenv.config() + + const config: SnapConfig = { + environment: { + SNAP_ENV: process.env.SNAP_ENV, + PUBLIC_KEY: process.env.PUBLIC_KEY, + }, + // Other options. + } + + export default config + ``` + + + 3. You can also use environment variables directly in your Snap. - For example: - - ```typescript title="index.ts" - import { panel, text, heading } from "@metamask/snaps-sdk"; - - await snap.request({ - method: "snap_dialog", - params: { - type: "alert", - content: panel([ - heading("This custom alert is just for display purposes."), - text(`SNAP_ENV is ${process.env.SNAP_ENV}, PUBLIC_KEY is ${process.env.PUBLIC_KEY}`), - ]), - }, - }); - ``` + For example: + + ```typescript title="index.ts" + import { panel, text, heading } from "@metamask/snaps-sdk" + + await snap.request({ + method: "snap_dialog", + params: { + type: "alert", + content: panel([ + heading("This custom alert is just for display purposes."), + text( + `SNAP_ENV is ${process.env.SNAP_ENV}, PUBLIC_KEY is ${process.env.PUBLIC_KEY}` + ), + ]), + }, + }) + ``` diff --git a/snaps/index.mdx b/snaps/index.mdx index 5f29e53b93c..843f95f0898 100644 --- a/snaps/index.mdx +++ b/snaps/index.mdx @@ -2,8 +2,8 @@ title: Introduction --- -import CardList from '@site/src/components/CardList' -import YoutubeEmbed from '@site/src/components/YoutubeEmbed' +import CardList from "@site/src/components/CardList" +import YoutubeEmbed from "@site/src/components/YoutubeEmbed" # Extend the functionality of MetaMask using Snaps @@ -18,7 +18,7 @@ modify existing functionalities using the [Snaps API](reference/snaps-api.md). Learn more in this video: -
+
The following Snaps features are available in the stable version of MetaMask: @@ -28,86 +28,96 @@ The following Snaps features are available in the stable version of MetaMask: icon: require("./assets/features/cronjob.png").default, href: "features/cron-jobs", title: "Cron jobs", - description: "Schedule periodic actions for your users." + description: "Schedule periodic actions for your users.", }, { icon: require("./assets/features/network.png").default, href: "features/custom-evm-accounts", title: "Custom EVM accounts", - description: "Connect to custom EVM accounts in MetaMask." + description: "Connect to custom EVM accounts in MetaMask.", }, { icon: require("./assets/features/custom-ui.png").default, href: "features/custom-ui", title: "Custom UI", - description: "Display custom UI in MetaMask using a set of pre-defined components." + description: + "Display custom UI in MetaMask using a set of pre-defined components.", }, { icon: require("./assets/features/state.png").default, href: "features/data-storage", title: "Data storage", - description: "Store encrypted and unencrypted data within a Snap." + description: "Store encrypted and unencrypted data within a Snap.", }, { icon: require("./assets/features/dialog.png").default, href: "features/custom-ui/dialogs", title: "Dialogs", - description: "Display custom alert, confirmation, or prompt screens in MetaMask." + description: + "Display custom alert, confirmation, or prompt screens in MetaMask.", }, { icon: require("./assets/features/homepage.png").default, href: "features/custom-ui/home-pages", title: "Home pages", - description: "Display a dedicated UI page in MetaMask for your Snap." + description: "Display a dedicated UI page in MetaMask for your Snap.", }, { icon: require("./assets/features/custom-ui.png").default, href: "features/custom-ui/interactive-ui", title: "Interactive UI", - description: "Display interactive UI in MetaMask that can be updated dynamically." + description: + "Display interactive UI in MetaMask that can be updated dynamically.", }, { icon: require("./assets/features/lifecycle-hooks.png").default, href: "features/lifecycle-hooks", title: "Lifecycle hooks", - description: "Call an action when your Snap is installed or updated." + description: "Call an action when your Snap is installed or updated.", }, { icon: require("./assets/features/locale.png").default, href: "features/localization", title: "Localization", - description: "Translate your Snap UI based on the user's locale." + description: "Translate your Snap UI based on the user's locale.", }, { icon: require("./assets/features/network.png").default, href: "features/network-access", title: "Network access", - description: <>Access the internet using the fetch function. + description: ( + <> + Access the internet using the fetch function. + + ), }, { icon: require("./assets/features/manage-keys.png").default, href: "features/non-evm-networks", title: "Non-EVM networks", - description: "Manage non-EVM accounts and assets in MetaMask." + description: "Manage non-EVM accounts and assets in MetaMask.", }, { icon: require("./assets/features/notifications.png").default, href: "features/notifications", title: "Notifications", - description: "Notify users directly in MetaMask, or natively in their OS." + description: + "Notify users directly in MetaMask, or natively in their OS.", }, { icon: require("./assets/features/getfile.png").default, href: "features/static-files", title: "Static files", - description: "Lazy-load static files such as Wasm modules or ZK circuits." + description: + "Lazy-load static files such as Wasm modules or ZK circuits.", }, { icon: require("./assets/features/insights.png").default, href: "features/transaction-insights", title: "Transaction insights", - description: "Provide transaction insights in MetaMask's transaction confirmation window." - } + description: + "Provide transaction insights in MetaMask's transaction confirmation window.", + }, ]} /> @@ -121,22 +131,22 @@ the canary distribution of MetaMask: href: "features/custom-evm-accounts#account-abstraction-erc-4337", title: "Account abstraction", description: "Connect to ERC-4337 accounts in MetaMask.", - flaskOnly: true + flaskOnly: true, }, { icon: require("./assets/features/name-resolution.png").default, href: "features/custom-name-resolution", title: "Name resolution", description: "Resolve names to addresses and vice versa.", - flaskOnly: true + flaskOnly: true, }, { icon: require("./assets/features/signature-insights.png").default, href: "features/signature-insights", title: "Signature insights", description: "Provide signature insights before a user signs a message.", - flaskOnly: true - } + flaskOnly: true, + }, ]} /> @@ -154,18 +164,21 @@ If you're new to Snaps, get started learning with the following topics: { href: "learn/about-snaps/apis", title: "About the Snaps APIs", - description: "Learn about how Snaps, dapps, and MetaMask communicate with each other.", + description: + "Learn about how Snaps, dapps, and MetaMask communicate with each other.", }, { href: "learn/tutorials/gas-estimation", title: "Gas estimation Snap tutorial", - description: "Follow an end-to-end tutorial to create a Snap that estimates gas fees.", + description: + "Follow an end-to-end tutorial to create a Snap that estimates gas fees.", }, { href: "learn/resources", title: "Snaps resources", - description: "Learn and explore MetaMask Snaps with supplemental resources, tools, examples, and guides.", - } + description: + "Learn and explore MetaMask Snaps with supplemental resources, tools, examples, and guides.", + }, ]} /> diff --git a/snaps/learn/about-snaps/apis.md b/snaps/learn/about-snaps/apis.md index c945f58d76d..50a1bf10259 100644 --- a/snaps/learn/about-snaps/apis.md +++ b/snaps/learn/about-snaps/apis.md @@ -35,7 +35,7 @@ await snap.request({ type: "inApp", message: "Hello, world!", }, -}); +}) ``` ## Wallet API @@ -66,20 +66,20 @@ await window.ethereum.request({ params: { "npm:hello-snap": {}, }, -}); +}) // Call the "hello" method of the Snap using wallet_snap. const response = await window.ethereum.request({ method: "wallet_snap", params: { snapId: "npm:hello-snap", - request: { + request: { method: "hello", }, }, -}); +}) -console.log(response); // "world!" +console.log(response) // "world!" ``` ### Snap requests @@ -101,7 +101,7 @@ the required permission: Your Snap can then call `eth_requestAccounts` in its source code: ```typescript title="index.ts" -await ethereum.request({ "method": "eth_requestAccounts" }); +await ethereum.request({ method: "eth_requestAccounts" }) ``` The `ethereum` global available to Snaps has fewer capabilities than `window.ethereum` for dapps. @@ -157,12 +157,12 @@ module.exports.onRpcRequest = async ({ origin, request }) => { switch (request.method) { // Expose a "hello" JSON-RPC method to dapps. case "hello": - return "world!"; + return "world!" default: - throw new Error("Method not found."); + throw new Error("Method not found.") } -}; +} ``` A dapp can then install the Snap and call the exposed method: @@ -176,7 +176,7 @@ await window.ethereum.request({ // Assuming the Snap is published to npm using the package name "hello-snap". "npm:hello-snap": {}, }, -}); +}) // Invoke the "hello" JSON-RPC method exposed by the Snap. const response = await window.ethereum.request({ @@ -187,7 +187,7 @@ const response = await window.ethereum.request({ method: "hello", }, }, -}); +}) -console.log(response); // "world!" -``` \ No newline at end of file +console.log(response) // "world!" +``` diff --git a/snaps/learn/about-snaps/files.md b/snaps/learn/about-snaps/files.md index cd090ed907d..fc9eab02f1c 100644 --- a/snaps/learn/about-snaps/files.md +++ b/snaps/learn/about-snaps/files.md @@ -3,8 +3,8 @@ description: Learn about the Snap project files. sidebar_position: 2 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Snaps files @@ -65,8 +65,8 @@ The manifest file of `Hello World` would look something like this: } } }, -"initialPermissions": {}, -"manifestVersion": "0.1" + "initialPermissions": {}, + "manifestVersion": "0.1" } ``` @@ -121,14 +121,14 @@ module.exports = { server: { port: 9000, }, -}; +} ``` ```typescript title="snap.config.ts" -import type { SnapConfig } from "@metamask/snaps-cli"; +import type { SnapConfig } from "@metamask/snaps-cli" const config: SnapConfig = { input: "src/index.js", @@ -138,9 +138,9 @@ const config: SnapConfig = { server: { port: 9000, }, -}; +} -export default config; +export default config ``` diff --git a/snaps/learn/best-practices/design-guidelines.md b/snaps/learn/best-practices/design-guidelines.md index 40636791b4c..8e582a5c7b5 100644 --- a/snaps/learn/best-practices/design-guidelines.md +++ b/snaps/learn/best-practices/design-guidelines.md @@ -79,8 +79,8 @@ Use conversational language when describing your Snap. If you need to use a technical term, briefly define it first. For example: -| Don't do this | Do this instead | -|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------| +| Don't do this | Do this instead | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | ❌ _Allow the Snap to perform actions that run periodically at fixed times, dates, or intervals. This can be used to trigger time-sensitive interactions or notifications._ | ✅ _Let this Snap schedule and run recurring tasks or notifications._ | | ❌ _Allow this Snap to display notifications regarding your ENS expiration._ | ✅ _Let this Snap notify you when your Ethereum Name Service is about to expire._ | @@ -109,8 +109,8 @@ Your Snap's icon should fit in a **32px circular frame in SVG format**. Avoid using images with small details, as they won't be impactful in the allotted space. Use something bold, simple, and easily understood. -The icon must be a valid SVG. -It should be clearly visible on both light and dark backgrounds. +The icon must be a valid SVG. +It should be clearly visible on both light and dark backgrounds. It should also be square, or else it will be stretched or cropped. You can use [SVGviewer.dev](https://www.svgviewer.dev/) to validate and optimize your SVG. @@ -129,8 +129,8 @@ For example:

-| Don't do this | Do this instead | -|------------------------------|---------------------| +| Don't do this | Do this instead | +| ----------------------------- | -------------------- | | ❌ _Solana Snap_ | ✅ _Solana Manager_ | | ❌ _Snap for Filecoin_ | ✅ _Filecoin Wallet_ | | ❌ _Best manager for Bitcoin_ | ✅ _Bitcoin Helper_ | @@ -163,8 +163,8 @@ There might be certain situations where passive voice is the better option, but active voice. For example: -| Don't do this | Do this instead | -|---------------------------------------|-------------------------------------| +| Don't do this | Do this instead | +| -------------------------------------- | ------------------------------------ | | ❌ _The problem is being investigated_ | ✅ _We're investigating the problem_ | ## Design for all users diff --git a/snaps/learn/best-practices/security-guidelines.md b/snaps/learn/best-practices/security-guidelines.md index 21944d4f7ae..ad500c8e891 100644 --- a/snaps/learn/best-practices/security-guidelines.md +++ b/snaps/learn/best-practices/security-guidelines.md @@ -52,6 +52,7 @@ The following are guidelines for user notifications, dialogs, and authorizations - **Transparent and consentful actions** - Before performing any of the following actions, display a [confirmation dialog](../../features/custom-ui/dialogs.md#display-a-confirmation-dialog) that contains detailed information about the action and asks the user to reject or accept it: + - **Modifying or reading state.** (In general, notify the user about any state changes.) - **Switching networks or accounts.** - **Deriving or generating key pairs, accounts, or smart contracts.** @@ -66,33 +67,33 @@ The following are guidelines for user notifications, dialogs, and authorizations - **Limit access to sensitive methods** - When building a Snap with sensitive RPC methods, use a companion dapp as an "admin interface" to interact with your Snap's sensitive methods. There are two ways to do this: - + 1. Restrict the [`endowment:rpc`](../../reference/permissions.md#endowmentrpc) permission to specific URLs using the `allowedOrigins` caveat. - 2. Filter specific methods to specific URLs using the built-in [URL - library](https://developer.mozilla.org/en-US/docs/Web/API/URL): - - ```javascript - const referrer = new URL(origin); - - if(referrer.protocol === "https:" && - (referrer.host.endsWith(".metamask.io") || referrer.host === "metamask.io")) { - console.log("URL is valid"); - } - else { - console.log("URL is NOT valid"); - } - ``` - - In this example, the RPC method can be restricted when the origin matches `https://metamask.io` - or any subdomain. - This check can be used on any RPC method that should not be callable by all sites. - - :::note - Avoid using regular expressions or string matching to filter URLs. - The URL library provides a much more reliable interface for matching URLs. - ::: + library](https://developer.mozilla.org/en-US/docs/Web/API/URL): + + ```javascript + const referrer = new URL(origin) + + if ( + referrer.protocol === "https:" && + (referrer.host.endsWith(".metamask.io") || referrer.host === "metamask.io") + ) { + console.log("URL is valid") + } else { + console.log("URL is NOT valid") + } + ``` + + In this example, the RPC method can be restricted when the origin matches `https://metamask.io` + or any subdomain. + This check can be used on any RPC method that should not be callable by all sites. + + :::note + Avoid using regular expressions or string matching to filter URLs. + The URL library provides a much more reliable interface for matching URLs. + ::: ## Secure sensitive information @@ -146,7 +147,7 @@ The following are guidelines for validating RPC parameters and handling values: interface component instead of `text`. When using dialogs, the input may contain special characters that render as Markdown and can mislead the user. - For example: + For example: Example not using copyable with Markdown rendering diff --git a/snaps/learn/resources.md b/snaps/learn/resources.md index 61599fff50d..36ff774b203 100644 --- a/snaps/learn/resources.md +++ b/snaps/learn/resources.md @@ -23,7 +23,7 @@ View the following Snaps resources in addition to this documentation site. - [Simple Keyring Snap](https://github.com/MetaMask/snap-simple-keyring) - An example account management Snap using the [Keyring API](../reference/keyring-api/index.md). - [Mystery Fox](https://github.com/Montoya/mystery-fox) - Provides random answers to questions and showcases interactive UI and images. - [Farcaster Insights](https://github.com/Montoya/farcaster-insights) - Shows if the recipient in a transaction request has a Farcaster account and their stats. -- [Smart Account Template](https://github.com/bcnmy/smart-account-keyring-template) - Template for integrating the Biconomy Smart Account with the [Keyring API](../reference/keyring-api/index.md). +- [Smart Account Template](https://github.com/bcnmy/smart-account-keyring-template) - Template for integrating the Biconomy Smart Account with the [Keyring API](../reference/keyring-api/index.md). ## Developer tools @@ -80,4 +80,4 @@ Many Snaps are designed to be used by developers. - [Galactica ZK Vault](https://docs.galactica.com/galactica-developer-documentation) - Integrates the Galactica Network for dapps to leverage ZK-proofs for compliant privacy. - [Hedera Wallet](https://docs.tuum.tech/hedera-wallet-snap) - Build Hedera dapps with the methods provided by Hedera Wallet. - [Leap Wallet](https://docs.leapwallet.io/cosmos/leap-metamask-snap/integrating-snaps) - Connect Cosmos dapps to MetaMask with Leap Wallet. -- [MinaPortal](https://github.com/sotatek-dev/mina-snap/tree/master/packages/snap#methods) - Build ZkApps on Mina Network with the dapp methods provided by MinaPortal. \ No newline at end of file +- [MinaPortal](https://github.com/sotatek-dev/mina-snap/tree/master/packages/snap#methods) - Build ZkApps on Mina Network with the dapp methods provided by MinaPortal. diff --git a/snaps/learn/tutorials/gas-estimation.md b/snaps/learn/tutorials/gas-estimation.md index 424736f7d18..5ac32b8bf92 100644 --- a/snaps/learn/tutorials/gas-estimation.md +++ b/snaps/learn/tutorials/gas-estimation.md @@ -20,7 +20,7 @@ information in an alert dialog. ### 1. Set up the project -Create a new Snap project using the +Create a new Snap project using the [`@metamask/create-snap`](https://github.com/MetaMask/snaps/tree/main/packages/create-snap) starter kit by running: @@ -46,36 +46,36 @@ Next, `cd` into the `gas-estimation-snap` project directory and run: yarn install ``` -This initializes your development environment with the required dependencies. -You may get a warning similar to the following: +This initializes your development environment with the required dependencies. +You may get a warning similar to the following: ```bash @lavamoat/allow-scripts has detected dependencies without configuration. explicit configuration required. run "allow-scripts auto" to automatically populate the configuration. ``` -You can resolve this error by running the following command: +You can resolve this error by running the following command: -```bash +```bash yarn run allow-scripts auto ``` ### 2. Add a custom icon -Your Snap must [display an icon](../best-practices/design-guidelines.md#optimize-your-metadata) in MetaMask. -To add an icon, create a new folder `images` in the Snap package `packages/snap/`: +Your Snap must [display an icon](../best-practices/design-guidelines.md#optimize-your-metadata) in MetaMask. +To add an icon, create a new folder `images` in the Snap package `packages/snap/`: -```bash +```bash mkdir packages/snap/images ``` -Download -[this `gas.svg` icon file](https://raw.githubusercontent.com/Montoya/gas-fee-snap/main/packages/snap/images/gas.svg) +Download +[this `gas.svg` icon file](https://raw.githubusercontent.com/Montoya/gas-fee-snap/main/packages/snap/images/gas.svg) into the `ìmages` folder you just created. This is a free icon, "Gas" by Mello from [Noun Project](https://thenounproject.com/browse/icons/term/gas/). -Your file structure should look like this: +Your file structure should look like this: ```text gas-estimation-snap/ @@ -99,10 +99,10 @@ gas-estimation-snap/ ├─ ... (other stuff) ``` -Open `packages/snap/snap.manifest.json` in a text editor. -This file contains the main configuration details for your Snap. +Open `packages/snap/snap.manifest.json` in a text editor. +This file contains the main configuration details for your Snap. Edit the `npm` object, within the `location` object, -and add `iconPath` with the value `"images/gas.svg"` to point to your new icon: +and add `iconPath` with the value `"images/gas.svg"` to point to your new icon: ```json title="snap.manifest.json" "location": { @@ -116,7 +116,7 @@ and add `iconPath` with the value `"images/gas.svg"` to point to your new icon: ``` Open `packages/snap/package.json` in a text editor. -Edit the `files` array and add the `images/` folder: +Edit the `files` array and add the `images/` folder: ```json title="package.json" "files": [ @@ -129,7 +129,7 @@ Edit the `files` array and add the `images/` folder: ### 3. Enable network access To enable your Snap to [access the internet using the `fetch` API](../../features/network-access.md), -request the [`endowment:network-access`](../../reference/permissions.md#endowmentnetwork-access) +request the [`endowment:network-access`](../../reference/permissions.md#endowmentnetwork-access) permission in `packages/snap/snap.manifest.json`: ```json title="snap.manifest.json" @@ -138,7 +138,7 @@ permission in `packages/snap/snap.manifest.json`: "endowment:rpc": { "dapps": true, "snaps": false - }, + }, "endowment:network-access": {} }, "manifestVersion": "0.1" @@ -153,20 +153,20 @@ To get a gas fee estimate, use the public API endpoint provided by Add the following `getFees()` function to the beginning of the `/packages/snap/src/index.ts` file: ```typescript title="index.ts" -import type { OnRpcRequestHandler } from "@metamask/snaps-sdk"; -import { panel, text } from "@metamask/snaps-sdk"; +import type { OnRpcRequestHandler } from "@metamask/snaps-sdk" +import { panel, text } from "@metamask/snaps-sdk" async function getFees() { - const response = await fetch("https://beaconcha.in/api/v1/execution/gasnow"); - return response.text(); + const response = await fetch("https://beaconcha.in/api/v1/execution/gasnow") + return response.text() } ``` -Next, add the `copyable` component to the second import of the file: +Next, add the `copyable` component to the second import of the file: ```typescript title="index.ts" -import type { OnRpcRequestHandler } from "@metamask/snaps-sdk"; -import { panel, text, copyable } from "@metamask/snaps-sdk"; +import type { OnRpcRequestHandler } from "@metamask/snaps-sdk" +import { panel, text, copyable } from "@metamask/snaps-sdk" ``` Modify the Snap RPC message handler that displays the dialog. @@ -200,30 +200,30 @@ case "hello": To build and test your Snap: 1. Open `package.json` in the root directory of the project, and increment the `"version"` (if the `"version"` is - `0.1.0`, increase it to `0.2.0`). + `0.1.0`, increase it to `0.2.0`). 2. From the command line, run `yarn start`. - In the terminal, at the bottom of the message log, you see the browser URL: + In the terminal, at the bottom of the message log, you see the browser URL: + + ```bash + You can now view site in the browser. - ```bash - You can now view site in the browser. - - http://localhost:8000/ - ``` + http://localhost:8000/ + ``` 3. Open [`localhost:8000`](http://localhost:8000/) in your browser (with MetaMask Flask installed). - A page like the following displays: + A page like the following displays: - Test dapp with template Snap + Test dapp with template Snap - This is a boilerplate test dapp for installing and testing your Snap. + This is a boilerplate test dapp for installing and testing your Snap. 4. Select **Connect** to connect Flask to the dapp. - After connecting, you're prompted to install the Snap with the following permissions: + After connecting, you're prompted to install the Snap with the following permissions: - - **Allow dapps to communicate directly with this Snap.** - - **Access the internet.** - - **Display dialog windows in MetaMask.** + - **Allow dapps to communicate directly with this Snap.** + - **Access the internet.** + - **Display dialog windows in MetaMask.** 5. Select **Approve** > **Install**. diff --git a/snaps/learn/tutorials/transaction-insights.md b/snaps/learn/tutorials/transaction-insights.md index 10fa1b75d6e..d5452462667 100644 --- a/snaps/learn/tutorials/transaction-insights.md +++ b/snaps/learn/tutorials/transaction-insights.md @@ -24,7 +24,7 @@ The Snap provides transaction insights in MetaMask's transaction confirmation wi ### 1. Set up the project -Create a new Snap project using the +Create a new Snap project using the [`@metamask/create-snap`](https://github.com/MetaMask/snaps/tree/main/packages/create-snap) starter kit by running: @@ -50,24 +50,24 @@ Next, `cd` into the `transaction-insights-snap` project directory and run: yarn install ``` -This initializes your development environment with the required dependencies. -You may get a warning similar to the following: +This initializes your development environment with the required dependencies. +You may get a warning similar to the following: ```bash @lavamoat/allow-scripts has detected dependencies without configuration. explicit configuration required. run "allow-scripts auto" to automatically populate the configuration. ``` -You can resolve the issue by running the following command: +You can resolve the issue by running the following command: -```bash +```bash yarn run allow-scripts auto ``` ### 2. Enable transaction insights and the Ethereum provider -The default template Snap, such as the one in -[Create a gas estimation Snap](gas-estimation.md), +The default template Snap, such as the one in +[Create a gas estimation Snap](gas-estimation.md), is configured to expose a JSON-RPC API with a simple hello command, which brings up a dialog box. In contrast, the Snap you're creating in this tutorial doesn't expose any API. Instead, it provides transaction insights directly in MetaMask's transaction confirmation window. @@ -101,35 +101,34 @@ To calculate and display the gas fees a user would pay as a percentage of their replace the code in `packages/snap/src/index.ts` with the following: ```typescript title="index.ts" -import type { OnTransactionHandler } from "@metamask/snaps-sdk"; -import { heading, panel, text } from "@metamask/snaps-sdk"; +import type { OnTransactionHandler } from "@metamask/snaps-sdk" +import { heading, panel, text } from "@metamask/snaps-sdk" // Handle outgoing transactions. export const onTransaction: OnTransactionHandler = async ({ transaction }) => { - // Use the Ethereum provider to fetch the gas price. - const currentGasPrice = await ethereum.request({ + const currentGasPrice = (await ethereum.request({ method: "eth_gasPrice", - }) as string; + })) as string // Get fields from the transaction object. - const transactionGas = parseInt(transaction.gas as string, 16); - const currentGasPriceInWei = parseInt(currentGasPrice ?? "", 16); - const maxFeePerGasInWei = parseInt(transaction.maxFeePerGas as string, 16); + const transactionGas = parseInt(transaction.gas as string, 16) + const currentGasPriceInWei = parseInt(currentGasPrice ?? "", 16) + const maxFeePerGasInWei = parseInt(transaction.maxFeePerGas as string, 16) const maxPriorityFeePerGasInWei = parseInt( transaction.maxPriorityFeePerGas as string, - 16, - ); + 16 + ) // Calculate gas fees the user would pay. const gasFees = Math.min( maxFeePerGasInWei * transactionGas, - (currentGasPriceInWei + maxPriorityFeePerGasInWei) * transactionGas, - ); + (currentGasPriceInWei + maxPriorityFeePerGasInWei) * transactionGas + ) // Calculate gas fees as percentage of transaction. - const transactionValueInWei = parseInt(transaction.value as string, 16); - const gasFeesPercentage = (gasFees / (gasFees + transactionValueInWei)) * 100; + const transactionValueInWei = parseInt(transaction.value as string, 16) + const gasFeesPercentage = (gasFees / (gasFees + transactionValueInWei)) * 100 // Display percentage of gas fees in the transaction insights UI. return { @@ -137,11 +136,11 @@ export const onTransaction: OnTransactionHandler = async ({ transaction }) => { heading("Transaction insights Snap"), text( `As set up, you are paying **${gasFeesPercentage.toFixed(2)}%** - in gas fees for this transaction.`, + in gas fees for this transaction.` ), ]), - }; -}; + } +} ``` :::tip @@ -155,24 +154,24 @@ Instead, when you request the `endowment:ethereum-provider` permission, your Sna To build and test your Snap: 1. From the command line, run `yarn start` in the root of your project. - This starts two development servers: one for watching and compiling the Snap, and another for the - React site. - The Snap bundle is served from `localhost:8080`, and the site is served from `localhost:8000`. - You should get a message that includes: + This starts two development servers: one for watching and compiling the Snap, and another for the + React site. + The Snap bundle is served from `localhost:8080`, and the site is served from `localhost:8000`. + You should get a message that includes: - ```bash - You can now view site in the browser. + ```bash + You can now view site in the browser. - http://localhost:8000/ - ``` + http://localhost:8000/ + ``` 2. Open [`localhost:8000`](http://localhost:8000) in your browser (with MetaMask Flask installed). 3. Select **Connect** and accept the permission request. 4. After connecting, you're prompted to install the Snap with the **Fetch and display transaction - insights** and **Access the Ethereum provider** permissions. - Select **Approve** > **Install**. + insights** and **Access the Ethereum provider** permissions. + Select **Approve** > **Install**. 5. From MetaMask Flask, create a new testnet ETH transfer. You can set up multiple accounts to transfer between your accounts. @@ -196,10 +195,10 @@ if (typeof transaction.data === "string" && transaction.data !== "0x") { content: panel([ heading("Percent Snap"), text( - "This Snap only provides transaction insights for simple ETH transfers.", + "This Snap only provides transaction insights for simple ETH transfers." ), ]), - }; + } } ``` @@ -223,8 +222,8 @@ The `version` and `repository` fields in `snap.manifest.json` inherit the values We recommend updating `version` and `repository` in `package.json` first, then building the Snap project. ::: -You should also add an icon by following the steps outlined in the -[gas estimation Snap tutorial](../tutorials/gas-estimation.md#2-add-a-custom-icon). +You should also add an icon by following the steps outlined in the +[gas estimation Snap tutorial](../tutorials/gas-estimation.md#2-add-a-custom-icon). Lastly, you can update the content of `packages/site/src/pages/index.tsx`, such as removing the template **Send Hello** button. diff --git a/snaps/reference/cli/options.md b/snaps/reference/cli/options.md index 908c31ff57f..11b66092110 100644 --- a/snaps/reference/cli/options.md +++ b/snaps/reference/cli/options.md @@ -5,8 +5,8 @@ toc_max_heading_level: 4 description: See the Snaps CLI options reference. --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Snaps configuration options @@ -167,7 +167,7 @@ When set to `true`, WebAssembly files can be imported in the Snap. For example: ```typescript -import program from "./program.wasm"; +import program from "./program.wasm" // Program is initialized synchronously. // ... diff --git a/snaps/reference/cli/subcommands.md b/snaps/reference/cli/subcommands.md index 971cc3c3d20..717dec526b2 100644 --- a/snaps/reference/cli/subcommands.md +++ b/snaps/reference/cli/subcommands.md @@ -5,8 +5,8 @@ toc_max_heading_level: 4 description: See the Snaps CLI subcommands reference. --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Snaps subcommands diff --git a/snaps/reference/entry-points.md b/snaps/reference/entry-points.md index 3e9e613de89..cd25bf0edb8 100644 --- a/snaps/reference/entry-points.md +++ b/snaps/reference/entry-points.md @@ -3,8 +3,8 @@ description: See the Snaps entry points reference. sidebar_position: 4 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Snaps entry points @@ -31,7 +31,7 @@ An object containing an RPC request specified in the `endowment:cronjob` permiss ```typescript title="index.ts" -import type { OnCronjobHandler } from "@metamask/snaps-sdk"; +import type { OnCronjobHandler } from "@metamask/snaps-sdk" export const onCronjob: OnCronjobHandler = async ({ request }) => { switch (request.method) { @@ -42,12 +42,12 @@ export const onCronjob: OnCronjobHandler = async ({ request }) => { type: "inApp", message: "Hello, world!", }, - }); + }) default: - throw new Error("Method not found."); + throw new Error("Method not found.") } -}; +} ``` @@ -63,12 +63,12 @@ module.exports.onCronjob = async ({ request }) => { type: "inApp", message: "Hello, world!", }, - }); + }) default: - throw new Error("Method not found."); + throw new Error("Method not found.") } -}; +} ``` @@ -103,8 +103,8 @@ One of the following: ```typescript title="index.ts" -import type { OnHomePageHandler } from "@metamask/snaps-sdk"; -import { panel, text, heading } from "@metamask/snaps-sdk"; +import type { OnHomePageHandler } from "@metamask/snaps-sdk" +import { panel, text, heading } from "@metamask/snaps-sdk" export const onHomePage: OnHomePageHandler = async () => { return { @@ -112,15 +112,15 @@ export const onHomePage: OnHomePageHandler = async () => { heading("Hello world!"), text("Welcome to my Snap home page!"), ]), - }; -}; + } +} ``` ```js title="index.js" -import { panel, text, heading } from "@metamask/snaps-sdk"; +import { panel, text, heading } from "@metamask/snaps-sdk" module.exports.onHomePage = async () => { return { @@ -128,8 +128,8 @@ module.exports.onHomePage = async () => { heading("Hello world!"), text("Welcome to my Snap home page!"), ]), - }; -}; + } +} ``` @@ -156,8 +156,8 @@ None. ```typescript title="index.ts" -import type { OnInstallHandler } from "@metamask/snaps-sdk"; -import { heading, panel, text } from "@metamask/snaps-sdk"; +import type { OnInstallHandler } from "@metamask/snaps-sdk" +import { heading, panel, text } from "@metamask/snaps-sdk" export const onInstall: OnInstallHandler = async () => { await snap.request({ @@ -167,19 +167,19 @@ export const onInstall: OnInstallHandler = async () => { content: panel([ heading("Thank you for installing my Snap"), text( - "To use this Snap, visit the companion dapp at [metamask.io](https://metamask.io).", + "To use this Snap, visit the companion dapp at [metamask.io](https://metamask.io)." ), ]), }, - }); -}; + }) +} ``` ```js title="index.js" -import { heading, panel, text } from "@metamask/snaps-sdk"; +import { heading, panel, text } from "@metamask/snaps-sdk" module.exports.onInstall = async () => { await snap.request({ @@ -189,12 +189,12 @@ module.exports.onInstall = async () => { content: panel([ heading("Thank you for installing my Snap"), text( - "To use this Snap, visit the companion dapp at [metamask.io](https://metamask.io).", + "To use this Snap, visit the companion dapp at [metamask.io](https://metamask.io)." ), ]), }, - }); -}; + }) +} ``` @@ -235,8 +235,8 @@ export const onKeyringRequest: OnKeyringRequestHandler = async ({ request, }) => { // Any custom logic or extra security checks here. - return handleKeyringRequest(keyring, request); -}; + return handleKeyringRequest(keyring, request) +} ``` @@ -245,8 +245,8 @@ export const onKeyringRequest: OnKeyringRequestHandler = async ({ ```js title="index.js" module.exports.onKeyringRequest = async ({ origin, request }) => { // Any custom logic or extra security checks here. - return handleKeyringRequest(keyring, request); -}; + return handleKeyringRequest(keyring, request) +} ``` @@ -280,27 +280,27 @@ An object containing: ```typescript title="index.ts" -import type { OnNameLookupHandler } from "@metamask/snaps-sdk"; +import type { OnNameLookupHandler } from "@metamask/snaps-sdk" export const onNameLookup: OnNameLookupHandler = async (request) => { - const { chainId, address, domain } = request; + const { chainId, address, domain } = request if (address) { - const shortAddress = address.substring(2, 5); - const chainIdDecimal = parseInt(chainId.split(":")[1], 10); - const resolvedDomain = `${shortAddress}.${chainIdDecimal}.test.domain`; - return { resolvedDomains: [{ resolvedDomain, protocol: "test protocol" }] }; + const shortAddress = address.substring(2, 5) + const chainIdDecimal = parseInt(chainId.split(":")[1], 10) + const resolvedDomain = `${shortAddress}.${chainIdDecimal}.test.domain` + return { resolvedDomains: [{ resolvedDomain, protocol: "test protocol" }] } } if (domain) { - const resolvedAddress = "0xc0ffee254729296a45a3885639AC7E10F9d54979"; + const resolvedAddress = "0xc0ffee254729296a45a3885639AC7E10F9d54979" return { resolvedAddresses: [{ resolvedAddress, protocol: "test protocol" }], - }; + } } - return null; -}; + return null +} ``` @@ -308,24 +308,24 @@ export const onNameLookup: OnNameLookupHandler = async (request) => { ```js title="index.js" module.exports.onNameLookup = async ({ request }) => { - const { chainId, address, domain } = request; + const { chainId, address, domain } = request if (address) { - const shortAddress = address.substring(2, 5); - const chainIdDecimal = parseInt(chainId.split(":")[1], 10); - const resolvedDomain = `${shortAddress}.${chainIdDecimal}.test.domain`; - return { resolvedDomains: [{ resolvedDomain, protocol: "test protocol" }] }; + const shortAddress = address.substring(2, 5) + const chainIdDecimal = parseInt(chainId.split(":")[1], 10) + const resolvedDomain = `${shortAddress}.${chainIdDecimal}.test.domain` + return { resolvedDomains: [{ resolvedDomain, protocol: "test protocol" }] } } if (domain) { - const resolvedAddress = "0xc0ffee254729296a45a3885639AC7E10F9d54979"; + const resolvedAddress = "0xc0ffee254729296a45a3885639AC7E10F9d54979" return { resolvedAddresses: [{ resolvedAddress, protocol: "test protocol" }], - }; + } } - return null; -}; + return null +} ``` @@ -359,7 +359,7 @@ A promise containing the return of the implemented method. ```typescript title="index.ts" -import type { OnRpcRequestHandler } from "@metamask/snaps-sdk"; +import type { OnRpcRequestHandler } from "@metamask/snaps-sdk" export const onRpcRequest: OnRpcRequestHandler = async ({ origin, @@ -367,12 +367,12 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ }) => { switch (request.method) { case "hello": - return "world!"; + return "world!" default: - throw new Error("Method not found."); + throw new Error("Method not found.") } -}; +} ``` @@ -382,12 +382,12 @@ export const onRpcRequest: OnRpcRequestHandler = async ({ module.exports.onRpcRequest = async ({ origin, request }) => { switch (request.method) { case "hello": - return "world!"; + return "world!" default: - throw new Error("Method not found."); + throw new Error("Method not found.") } -}; +} ``` @@ -563,7 +563,7 @@ module.exports.onTransaction = async ({ To implement a [lifecycle hook](../features/lifecycle-hooks.md) that runs an action upon update, a Snap must expose the `onUpdate` entry point. -MetaMask calls the `onUpdate` handler method after the Snap is updated successfully. +MetaMask calls the `onUpdate` handler method after the Snap is updated successfully. :::note For MetaMask to call the Snap's `onUpdate` method, you must request the @@ -580,8 +580,8 @@ None. ```typescript title="index.ts" -import type { OnUpdateHandler } from "@metamask/snaps-sdk"; -import { heading, panel, text } from "@metamask/snaps-sdk"; +import type { OnUpdateHandler } from "@metamask/snaps-sdk" +import { heading, panel, text } from "@metamask/snaps-sdk" export const onUpdate: OnUpdateHandler = async () => { await snap.request({ @@ -590,23 +590,19 @@ export const onUpdate: OnUpdateHandler = async () => { type: "alert", content: panel([ heading("Thank you for updating my Snap"), - text( - "New features added in this version:", - ), - text( - "Added a dialog that appears when updating." - ), + text("New features added in this version:"), + text("Added a dialog that appears when updating."), ]), }, - }); -}; + }) +} ``` ```js title="index.js" -import { heading, panel, text } from "@metamask/snaps-sdk"; +import { heading, panel, text } from "@metamask/snaps-sdk" module.exports.onUpdate = async () => { await snap.request({ @@ -615,16 +611,12 @@ module.exports.onUpdate = async () => { type: "alert", content: panel([ heading("Thank you for updating my Snap"), - text( - "New features added in this version:", - ), - text( - "Added a dialog that appears when updating." - ), + text("New features added in this version:"), + text("Added a dialog that appears when updating."), ]), }, - }); -}; + }) +} ``` @@ -654,27 +646,27 @@ To respond to [interactive UI](../features/custom-ui/interactive-ui.md) events, ```typescript title="index.ts" -import type { OnUserInputHandler } from "@metamask/snaps-sdk"; -import { UserInputEventType } from "@metamask/snaps-sdk"; +import type { OnUserInputHandler } from "@metamask/snaps-sdk" +import { UserInputEventType } from "@metamask/snaps-sdk" export const onUserInput: OnUserInputHandler = async ({ id, event }) => { if (event.type === UserInputEventType.FormSubmitEvent) { - console.log("The submitted form values are", event.value); + console.log("The submitted form values are", event.value) } -}; +} ``` ```js title="index.js" -const { UserInputEventType } = require("@metamask/snaps-sdk"); +const { UserInputEventType } = require("@metamask/snaps-sdk") module.exports.onUserInput = async ({ id, event }) => { if (event.type === UserInputEventType.FormSubmitEvent) { - console.log("The submitted form values are", event.value); + console.log("The submitted form values are", event.value) } -}; +} ``` diff --git a/snaps/reference/jest.md b/snaps/reference/jest.md index 23f85f6b71d..6e765cf096a 100644 --- a/snaps/reference/jest.md +++ b/snaps/reference/jest.md @@ -28,14 +28,14 @@ An object with functions that can be used to interact with the Snap. #### Example ```javascript -import { installSnap } from "@metamask/snaps-jest"; +import { installSnap } from "@metamask/snaps-jest" describe("MySnap", () => { it("should do something", async () => { - await installSnap(/* optional Snap ID */); + await installSnap(/* optional Snap ID */) // ... - }); -}); + }) +}) ``` ### `request` @@ -54,24 +54,24 @@ which can be checked using [Jest matchers](#jest-matchers). #### Example ```javascript -import { installSnap } from "@metamask/snaps-jest"; +import { installSnap } from "@metamask/snaps-jest" describe("MySnap", () => { it("should respond to foo with bar", async () => { - const { request } = await installSnap(/* Optional snap ID */); + const { request } = await installSnap(/* Optional snap ID */) const response = await request({ origin: "http://localhost:8080", method: "foo", params: [], - }); + }) /* Check the response using Jest matchers. Since the response is a standard JSON-RPC response, * you can use any standard Jest matchers to check it, including snapshot matchers. */ - expect(response).toRespondWith("bar"); - expect(response).not.toRespondWithError("baz"); - expect(response).toMatchSnapshot(); - }); -}); + expect(response).toRespondWith("bar") + expect(response).not.toRespondWithError("baz") + expect(response).toMatchSnapshot() + }) +}) ``` ### `onTransaction` @@ -105,12 +105,12 @@ An object with the user interface that was shown by the Snap, in the #### Example ```javascript -import { installSnap } from "@metamask/snaps-jest"; -import { panel, text } from "@metamask/snaps-sdk"; +import { installSnap } from "@metamask/snaps-jest" +import { panel, text } from "@metamask/snaps-sdk" describe("MySnap", () => { it("should return insights", async () => { - const { onTransaction } = await installSnap(/* Optional Snap ID */); + const { onTransaction } = await installSnap(/* Optional Snap ID */) const response = await onTransaction({ value: "0x0", data: "0x", @@ -118,11 +118,11 @@ describe("MySnap", () => { maxFeePerGas: "0x5208", maxPriorityFeePerGas: "0x5208", nonce: "0x0", - }); - - expect(response).toRender(panel([text("Hello, world!")])); - }); -}); + }) + + expect(response).toRender(panel([text("Hello, world!")])) + }) +}) ``` ### `onCronjob` @@ -144,21 +144,21 @@ which can be checked using [Jest matchers](#jest-matchers). #### Example ```javascript -import { installSnap } from "@metamask/snaps-jest"; +import { installSnap } from "@metamask/snaps-jest" describe("MySnap", () => { it("should end foo cronjobs with response bar", async () => { - const { onCronjob } = await installSnap(/* Optional snap ID */); + const { onCronjob } = await installSnap(/* Optional snap ID */) const response = await onCronjob({ method: "foo", params: [], - }); + }) // Check the response using Jest matchers. - expect(response).toRespondWith("bar"); - expect(response).not.toRespondWithError("baz"); - }); -}); + expect(response).toRespondWith("bar") + expect(response).not.toRespondWithError("baz") + }) +}) ``` ### `onHomePage` @@ -169,17 +169,17 @@ takes no arguments, and returns a promise that resolves to the response from the entry point. ```js -import { installSnap } from "@metamask/snaps-jest"; -import { panel, text } from "@metamask/snaps-sdk"; +import { installSnap } from "@metamask/snaps-jest" +import { panel, text } from "@metamask/snaps-sdk" describe("MySnap", () => { it("should render the home page", async () => { - const { onHomePage } = await installSnap(/* Optional snap ID */); - const response = await onHomePage(); + const { onHomePage } = await installSnap(/* Optional snap ID */) + const response = await onHomePage() - expect(response).toRender(panel([text("Hello, world!")])); - }); -}); + expect(response).toRender(panel([text("Hello, world!")])) + }) +}) ``` ### `getInterface` @@ -196,33 +196,33 @@ be used to interact with the user interface. #### Example ```javascript -import { installSnap } from "@metamask/snaps-jest"; -import { text } from "@metamask/snaps-sdk"; -import { assert } from "@metamask/utils"; +import { installSnap } from "@metamask/snaps-jest" +import { text } from "@metamask/snaps-sdk" +import { assert } from "@metamask/utils" describe("MySnap", () => { it("should render an alert with hello world", async () => { - const { request } = await installSnap(/* Optional Snap ID */); + const { request } = await installSnap(/* Optional Snap ID */) // Note: You cannot resolve the promise yet! const response = request({ method: "foo", - }); + }) - const ui = await response.getInterface(); + const ui = await response.getInterface() // This is useful if you're using TypeScript, since it infers the type of the user interface. - assert(ui.type === "alert"); - expect(ui).toRender(text("Hello, world!")); + assert(ui.type === "alert") + expect(ui).toRender(text("Hello, world!")) // Select the OK button. - await ui.ok(); + await ui.ok() // Now you can resolve the promise. - const result = await response; - expect(result).toRespondWith("bar"); - }); -}); + const result = await response + expect(result).toRespondWith("bar") + }) +}) ``` ## Jest matchers @@ -274,5 +274,5 @@ module.exports = { root: "/path/to/snap/files", }, }, -}; +} ``` diff --git a/snaps/reference/keyring-api/account-management/events.md b/snaps/reference/keyring-api/account-management/events.md index 73db7282a5a..a69b45c0260 100644 --- a/snaps/reference/keyring-api/account-management/events.md +++ b/snaps/reference/keyring-api/account-management/events.md @@ -19,7 +19,7 @@ MetaMask returns an error if the account already exists or the account object is ```typescript try { - emitSnapKeyringEvent(snap, KeyringEvent.AccountCreated, { account }); + emitSnapKeyringEvent(snap, KeyringEvent.AccountCreated, { account }) // Update your Snap's state. } catch (error) { // Handle the error. @@ -39,7 +39,7 @@ MetaMask returns an error if one of the following is true: ```typescript try { - emitSnapKeyringEvent(snap, KeyringEvent.AccountUpdated, { account }); + emitSnapKeyringEvent(snap, KeyringEvent.AccountUpdated, { account }) // Update your Snap's state. } catch (error) { // Handle the error. @@ -57,7 +57,7 @@ The delete event is idempotent, so it is safe to emit even if the account does n try { emitSnapKeyringEvent(snap, KeyringEvent.AccountDeleted, { id: account.id, - }); + }) // Update your Snap's state. } catch (error) { // Handle the error. @@ -78,7 +78,7 @@ try { emitSnapKeyringEvent(snap, KeyringEvent.RequestApproved, { id: request.id, result, - }); + }) // Update your Snap's state. } catch (error) { // Handle the error. @@ -98,7 +98,7 @@ This event only applies to Snaps that try { emitSnapKeyringEvent(snap, KeyringEvent.RequestRejected, { id: request.id, - }); + }) // Update your Snap's state. } catch (error) { // Handle the error. diff --git a/snaps/reference/keyring-api/account-management/index.md b/snaps/reference/keyring-api/account-management/index.md index 8bc84bf301c..bb55bb12a1e 100644 --- a/snaps/reference/keyring-api/account-management/index.md +++ b/snaps/reference/keyring-api/account-management/index.md @@ -4,8 +4,8 @@ tags: - Keyring API --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Account Management API @@ -183,12 +183,7 @@ An object containing: "method": "keyring_filterAccountChains", "params": { "id": "091bbc2e-6625-44d0-ac5c-658670ca649a", - "chains": [ - "eip155:W", - "eip155:X", - "eip155:Y", - "eip155:Z" - ] + "chains": ["eip155:W", "eip155:X", "eip155:Y", "eip155:Z"] } } ``` @@ -198,10 +193,7 @@ An object containing: ```json { - "chains": [ - "eip155:X", - "eip155:Y" - ] + "chains": ["eip155:X", "eip155:Y"] } ``` @@ -279,7 +271,7 @@ An array of [account objects](objects.md#keyringaccount) handled by the Snap. ```json { - "method": "keyring_listAccounts" + "method": "keyring_listAccounts" } ``` @@ -478,7 +470,7 @@ An array of pending [request objects](objects.md#keyringrequest). ```json { - "method": "keyring_listRequests" + "method": "keyring_listRequests" } ``` diff --git a/snaps/reference/keyring-api/chain-methods.md b/snaps/reference/keyring-api/chain-methods.md index 830799d35ea..7b6926f1115 100644 --- a/snaps/reference/keyring-api/chain-methods.md +++ b/snaps/reference/keyring-api/chain-methods.md @@ -4,8 +4,8 @@ tags: - Keyring API --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Chain Methods API @@ -68,21 +68,21 @@ Signs a transaction that can be submitted to the network later using An array containing: 1. Transaction object to sign, which contains: - - `type`: `string` - [Transaction type.](https://docs.infura.io/api/networks/ethereum/concepts/transaction-types) - - `nonce`: `string` - Anti-replay parameter. - - `to`: `string` - Recipient address, or `null` if this is a contract creation transaction. - - `from`: `string` - Sender address. - - `value`: `string` - Value to be transferred, in wei. - - `data`: `string` - Compiled code of a contract OR hash of the invoked method signature and - encoded parameters. - - `gasLimit`: `string` - Gas provided by the sender. - - `gasPrice`: `string` - (Optional) Gas price, in wei, provided by the sender. - - `maxPriorityFeePerGas`: `string` - (Optional) Maximum fee, in wei, the sender is willing to - pay per gas above the base fee. - - `maxFeePerGas`:`string` - (Optional) Maximum total fee (base fee + priority fee), in wei, the - sender is willing to pay per gas. - - `accessList`: `object[]` - (Optional) List of addresses and storage keys the transaction plans to access. - - `chainId`: `string` - Chain ID. + - `type`: `string` - [Transaction type.](https://docs.infura.io/api/networks/ethereum/concepts/transaction-types) + - `nonce`: `string` - Anti-replay parameter. + - `to`: `string` - Recipient address, or `null` if this is a contract creation transaction. + - `from`: `string` - Sender address. + - `value`: `string` - Value to be transferred, in wei. + - `data`: `string` - Compiled code of a contract OR hash of the invoked method signature and + encoded parameters. + - `gasLimit`: `string` - Gas provided by the sender. + - `gasPrice`: `string` - (Optional) Gas price, in wei, provided by the sender. + - `maxPriorityFeePerGas`: `string` - (Optional) Maximum fee, in wei, the sender is willing to + pay per gas above the base fee. + - `maxFeePerGas`:`string` - (Optional) Maximum total fee (base fee + priority fee), in wei, the + sender is willing to pay per gas. + - `accessList`: `object[]` - (Optional) List of addresses and storage keys the transaction plans to access. + - `chainId`: `string` - Chain ID. #### Returns @@ -166,16 +166,16 @@ An array containing: 1. Address: `string` - Address of the requested signing account. 2. Typed data: `object` - Typed data object containing: - - `types`: `object` - Types object containing: - - `EIP712Domain`: `array` - Array specifying one or more of the following domain separator values: - - `name` - User-readable name of the signing domain, i.e., name of the dapp or the protocol. - - `version` - Current major version of the signing domain. - - `chainId` - Chain ID of the network. - - `verifyingContract` - Address of the contract that will verify the signature. - - `salt` - Disambiguating salt for the protocol. - - `primaryType`: `string` - Primary type. - - `domain`: `object` - Domain separator values specified in the `EIP712Domain` type. - - `message`: `object` - Message to present to the user. + - `types`: `object` - Types object containing: + - `EIP712Domain`: `array` - Array specifying one or more of the following domain separator values: + - `name` - User-readable name of the signing domain, i.e., name of the dapp or the protocol. + - `version` - Current major version of the signing domain. + - `chainId` - Chain ID of the network. + - `verifyingContract` - Address of the contract that will verify the signature. + - `salt` - Disambiguating salt for the protocol. + - `primaryType`: `string` - Primary type. + - `domain`: `object` - Domain separator values specified in the `EIP712Domain` type. + - `message`: `object` - Message to present to the user. #### Returns @@ -263,10 +263,10 @@ Prepares a new user operation from transaction data. An array containing: 1. Transaction intents object, which contains: - - `to`: `string` - Recipient address, or `null` if this is a contract creation transaction. - - `value`: `string` - Value to be transferred, in wei. - - `data`: `string` - Compiled code of a contract OR hash of the invoked method signature and - encoded parameters. + - `to`: `string` - Recipient address, or `null` if this is a contract creation transaction. + - `value`: `string` - Value to be transferred, in wei. + - `data`: `string` - Compiled code of a contract OR hash of the invoked method signature and + encoded parameters. #### Returns @@ -339,22 +339,22 @@ Patches some allowed properties of a user operation. An array containing: 1. User operation object, which contains: - - `sender`: `string` - Account making the operation. - - `callData`: `string` - Data to pass to the sender during the main execution call. - - `initCode`: `string` - Account bytecode (needed if and only if the account is not yet on-chain - and needs to be created). - - `nonce`: `string` - Anti-replay parameter. - - `callGasLimit`: `string` - Amount of gas to allocate to the main execution call. - - `verificationGasLimit`: `string` - Amount of gas to allocate to the verification step. - - `preVerificationGas`: `string` - Amount of gas to compensate the bundler for pre-verification - execution, to pay for callData, and to account for overhead that can't be tracked on-chain. - - `maxFeePerGas`: `string` - Maximum total fee the sender is willing to pay per gas. - - `maxPriorityFeePerGas`: `string` - Maximum fee the sender is willing to pay per gas above the - base fee. - - `paymasterAndData`: `string` - Address of the paymaster sponsoring the transaction, followed - by extra data to send to the paymaster (empty for self-sponsored transactions). - - `signature`: `string` - Data passed into the account along with the nonce during the - verification step. + - `sender`: `string` - Account making the operation. + - `callData`: `string` - Data to pass to the sender during the main execution call. + - `initCode`: `string` - Account bytecode (needed if and only if the account is not yet on-chain + and needs to be created). + - `nonce`: `string` - Anti-replay parameter. + - `callGasLimit`: `string` - Amount of gas to allocate to the main execution call. + - `verificationGasLimit`: `string` - Amount of gas to allocate to the verification step. + - `preVerificationGas`: `string` - Amount of gas to compensate the bundler for pre-verification + execution, to pay for callData, and to account for overhead that can't be tracked on-chain. + - `maxFeePerGas`: `string` - Maximum total fee the sender is willing to pay per gas. + - `maxPriorityFeePerGas`: `string` - Maximum fee the sender is willing to pay per gas above the + base fee. + - `paymasterAndData`: `string` - Address of the paymaster sponsoring the transaction, followed + by extra data to send to the paymaster (empty for self-sponsored transactions). + - `signature`: `string` - Data passed into the account along with the nonce during the + verification step. #### Returns @@ -417,22 +417,22 @@ Signs a user operation. An array containing: 1. User operation object, which contains: - - `sender`: `string` - Account making the operation. - - `callData`: `string` - Data to pass to the sender during the main execution call. - - `initCode`: `string` - Account bytecode (needed if and only if the account is not yet on-chain - and needs to be created). - - `nonce`: `string` - Anti-replay parameter. - - `callGasLimit`: `string` - Amount of gas to allocate to the main execution call. - - `verificationGasLimit`: `string` - Amount of gas to allocate to the verification step. - - `preVerificationGas`: `string` - Amount of gas to compensate the bundler for pre-verification - execution, to pay for callData, and to account for overhead that can't be tracked on-chain. - - `maxFeePerGas`: `string` - Maximum total fee the sender is willing to pay per gas. - - `maxPriorityFeePerGas`: `string` - Maximum fee the sender is willing to pay per gas above the - base fee. - - `paymasterAndData`: `string` - Address of the paymaster sponsoring the transaction, followed - by extra data to send to the paymaster (empty for self-sponsored transactions). - - `signature`: `string` - Data passed into the account along with the nonce during the - verification step. + - `sender`: `string` - Account making the operation. + - `callData`: `string` - Data to pass to the sender during the main execution call. + - `initCode`: `string` - Account bytecode (needed if and only if the account is not yet on-chain + and needs to be created). + - `nonce`: `string` - Anti-replay parameter. + - `callGasLimit`: `string` - Amount of gas to allocate to the main execution call. + - `verificationGasLimit`: `string` - Amount of gas to allocate to the verification step. + - `preVerificationGas`: `string` - Amount of gas to compensate the bundler for pre-verification + execution, to pay for callData, and to account for overhead that can't be tracked on-chain. + - `maxFeePerGas`: `string` - Maximum total fee the sender is willing to pay per gas. + - `maxPriorityFeePerGas`: `string` - Maximum fee the sender is willing to pay per gas above the + base fee. + - `paymasterAndData`: `string` - Address of the paymaster sponsoring the transaction, followed + by extra data to send to the paymaster (empty for self-sponsored transactions). + - `signature`: `string` - Data passed into the account along with the nonce during the + verification step. 2. Entry point: `string` - Hash of the entry point contract. #### Returns diff --git a/snaps/reference/keyring-api/index.md b/snaps/reference/keyring-api/index.md index 441ff7a776e..021c5607cda 100644 --- a/snaps/reference/keyring-api/index.md +++ b/snaps/reference/keyring-api/index.md @@ -18,8 +18,9 @@ The Keyring API consists of: account management Snaps can choose to implement to support dapp requests from custom accounts. :::tip See also + - [Create an account management Snap](../../features/custom-evm-accounts/create-account-snap.md) - [Account management Snap security guidelines](../../features/custom-evm-accounts/security.md) - [Create an account management companion dapp](../../features/custom-evm-accounts/create-companion-dapp.md) - [Custom EVM accounts](../../features/custom-evm-accounts/index.md) -::: + ::: diff --git a/snaps/reference/known-errors.md b/snaps/reference/known-errors.md index f1f5f3c9b26..71efb9fc950 100644 --- a/snaps/reference/known-errors.md +++ b/snaps/reference/known-errors.md @@ -8,7 +8,7 @@ sidebar_position: 6 Snaps can [communicate the following errors](../how-to/communicate-errors.md) without crashing the Snap: | Error | What the error indicates | Error code | -|----------------------------|-------------------------------------------------------------|:----------:| +| -------------------------- | ----------------------------------------------------------- | :--------: | | `ChainDisconnectedError` | The provider is disconnected from the requested chain. | `4901` | | `DisconnectedError` | The provider is disconnected. | `4900` | | `InternalError` | An internal error has occurred. | `-32603` | diff --git a/snaps/reference/permissions.md b/snaps/reference/permissions.md index 7ace3335c62..7be7d39acf3 100644 --- a/snaps/reference/permissions.md +++ b/snaps/reference/permissions.md @@ -3,8 +3,8 @@ description: See the Snaps permissions reference. sidebar_position: 5 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Snaps permissions @@ -85,17 +85,17 @@ Specify this permission in the manifest file as follows: } ``` -:::note -The `ethereum` global available to Snaps has fewer capabilities than `window.ethereum` for dapps. +:::note +The `ethereum` global available to Snaps has fewer capabilities than `window.ethereum` for dapps. See the [list of methods](../learn/about-snaps/apis.md#metamask-json-rpc-api) not available to Snaps. ::: ### `endowment:page-home` To display a [home page](../features/custom-ui/home-pages.md) within MetaMask, a Snap must request -the `endowment:page-home` permission. +the `endowment:page-home` permission. This permission allows the Snap to present a dedicated UI by exposing the -[`onHomePage`](../reference/entry-points.md#onhomepage) entry point. +[`onHomePage`](../reference/entry-points.md#onhomepage) entry point. Specify this permission in the manifest file as follows: @@ -134,9 +134,9 @@ Specify this permission in the manifest file as follows: To implement a [lifecycle hook](../features/lifecycle-hooks.md) that runs an action when a user installs or updates a Snap, the Snap must request the `endowment:lifecycle-hooks` permission. -This permission allows the Snap to expose the -[`onInstall`](../reference/entry-points.md#oninstall) and -[`onUpdate`](../reference/entry-points.md#onupdate) +This permission allows the Snap to expose the +[`onInstall`](../reference/entry-points.md#oninstall) and +[`onUpdate`](../reference/entry-points.md#onupdate) entry points, which MetaMask calls after a successful installation or update, respectively. :::tip @@ -221,7 +221,6 @@ The default for both properties is `false`. You can modify the RPC API's execution limit using [Snap-defined timeouts](#snap-defined-timeouts). ::: - Specify this permission in the manifest file as follows: ```json title="snap.manifest.json" @@ -235,29 +234,29 @@ Specify this permission in the manifest file as follows: #### Allowed origins -Alternatively, you can specify the caveat `allowedOrigins` to restrict all requests to specific domains or Snap IDs. -Calls from any other origins are rejected. +Alternatively, you can specify the caveat `allowedOrigins` to restrict all requests to specific domains or Snap IDs. +Calls from any other origins are rejected. -Specify this caveat in the manifest file as follows: +Specify this caveat in the manifest file as follows: ```json title="snap.manifest.json" "initialPermissions": { - "endowment:rpc": { + "endowment:rpc": { "allowedOrigins": [ - "https://metamask.io", + "https://metamask.io", "https://consensys.io", "npm:@metamask/example-snap" - ] + ] } } ``` :::note -If you specify `allowedOrigins`, you should not specify `dapps` or `snaps`. +If you specify `allowedOrigins`, you should not specify `dapps` or `snaps`. ::: If you want to grant a dapp or Snap an automatic connection to your Snap, skipping the need for -users to confirm a connection, you can use [`initialConnections`](#initial-connections). +users to confirm a connection, you can use [`initialConnections`](#initial-connections). ### `endowment:transaction-insight` @@ -373,7 +372,7 @@ Calling `eth_requestAccounts` requires the ```js title="index.js" -await ethereum.request({ "method": "eth_requestAccounts" }); +await ethereum.request({ method: "eth_requestAccounts" }) ``` @@ -394,9 +393,7 @@ The following is an example `eth_accounts` permission: "caveats": [ { "type": "restrictReturnedAccounts", - "value": [ - "0xc403b37bf1e700cb214ea1be9de066824b420de6" - ] + "value": ["0xc403b37bf1e700cb214ea1be9de066824b420de6"] } ], "date": 1692616452846 @@ -407,7 +404,7 @@ The user can revoke this permission by going to the Snap's settings under **Snap ## Initial connections -A Snap can authorize specific dapps or Snaps to automatically connect, +A Snap can authorize specific dapps or Snaps to automatically connect, skipping the need for users to manually confirm a connection when the dapp or Snap calls [`wallet_requestSnaps`](../reference/wallet-api-for-snaps.md#wallet_requestsnaps). diff --git a/snaps/reference/snaps-api.md b/snaps/reference/snaps-api.md index 0c1a537c7ca..e6cfa2f55ea 100644 --- a/snaps/reference/snaps-api.md +++ b/snaps/reference/snaps-api.md @@ -49,7 +49,7 @@ Return value depends on the dialog `type`: #### Example ```javascript title="index.js" -import { panel, text, heading } from "@metamask/snaps-sdk"; +import { panel, text, heading } from "@metamask/snaps-sdk" const walletAddress = await snap.request({ method: "snap_dialog", @@ -61,7 +61,7 @@ const walletAddress = await snap.request({ ]), placeholder: "0x123...", }, -}); +}) // walletAddress will be a string containing the address entered by the user. ``` @@ -128,7 +128,7 @@ its corresponding key material: ```javascript title="index.js" -import { SLIP10Node } from "@metamask/key-tree"; +import { SLIP10Node } from "@metamask/key-tree" // This example uses Dogecoin, which has a derivation path starting with m/44'/3'. const dogecoinNode = await snap.request({ @@ -138,16 +138,16 @@ const dogecoinNode = await snap.request({ path: ["m", "44'", "3'"], curve: "secp256k1", }, -}); +}) // Next, create an instance of a SLIP-10 node for the Dogecoin node. -const dogecoinSlip10Node = await SLIP10Node.fromJSON(dogecoinNode); +const dogecoinSlip10Node = await SLIP10Node.fromJSON(dogecoinNode) // m/44'/3'/0' -const accountKey0 = await dogecoinSlip10Node.derive(["bip32:0'"]); +const accountKey0 = await dogecoinSlip10Node.derive(["bip32:0'"]) // m/44'/3'/1' -const accountKey1 = await dogecoinSlip10Node.derive(["bip32:1'"]); +const accountKey1 = await dogecoinSlip10Node.derive(["bip32:1'"]) // Now, you can ask the user to sign transactions, etc. ``` @@ -206,10 +206,10 @@ const dogecoinPublicKey = await snap.request({ curve: "secp256k1", compressed: false, }, -}); +}) // "0x..." -console.log(dogecoinPublicKey); +console.log(dogecoinPublicKey) ``` @@ -281,7 +281,7 @@ and containing its corresponding key material: ```javascript title="index.js" -import { getBIP44AddressKeyDeriver } from "@metamask/key-tree"; +import { getBIP44AddressKeyDeriver } from "@metamask/key-tree" // This example uses Dogecoin, which has coin_type 3. const dogecoinNode = await snap.request({ @@ -289,19 +289,19 @@ const dogecoinNode = await snap.request({ params: { coinType: 3, }, -}); +}) // Next, create an address key deriver function for the Dogecoin coin_type node. // In this case, its path is: m/44'/3'/0'/0/address_index -const deriveDogecoinAddress = await getBIP44AddressKeyDeriver(dogecoinNode); +const deriveDogecoinAddress = await getBIP44AddressKeyDeriver(dogecoinNode) // These are BIP-44 nodes containing the extended private keys for the respective derivation paths. // m/44'/3'/0'/0/0 -const addressKey0 = await deriveDogecoinAddress(0); +const addressKey0 = await deriveDogecoinAddress(0) // m/44'/3'/0'/0/1 -const addressKey1 = await deriveDogecoinAddress(1); +const addressKey1 = await deriveDogecoinAddress(1) // Now, you can ask the user to sign transactions, etc. ``` @@ -327,25 +327,25 @@ It is useful to check if MetaMask is locked in the following situations: #### Example ```typescript title="index.js" -import type { OnCronjobHandler } from "@metamask/snaps-sdk"; -import { MethodNotFoundError } from "@metamask/snaps-sdk"; +import type { OnCronjobHandler } from "@metamask/snaps-sdk" +import { MethodNotFoundError } from "@metamask/snaps-sdk" export const onCronjob: OnCronjobHandler = async ({ request }) => { switch (request.method) { case "execute": // Find out if MetaMask is locked. const { locked } = await snap.request({ - method: "snap_getClientStatus" - }); + method: "snap_getClientStatus", + }) if (!locked) { // Do something that requires MetaMask to be unlocked, such as access encrypted state. } default: - throw new MethodNotFoundError(); + throw new MethodNotFoundError() } -}; +} ``` ## `snap_getEntropy` @@ -394,10 +394,10 @@ const entropy = await snap.request({ version: 1, salt: "foo", // Optional. }, -}); +}) // "0x..." -console.log(entropy); +console.log(entropy) ``` @@ -446,10 +446,10 @@ const contents = await snap.request({ path: "./files/myfile.bin", encoding: "hex", }, -}); +}) // "0x..." -console.log(contents); +console.log(contents) ``` @@ -466,24 +466,22 @@ The user's locale setting as a [language code](https://github.com/MetaMask/metam #### Example ```javascript title="index.js" -import { panel, text } from "@metamask/snaps-sdk"; +import { panel, text } from "@metamask/snaps-sdk" -const locale = await snap.request({ method: "snap_getLocale" }); +const locale = await snap.request({ method: "snap_getLocale" }) -let greeting = "Hello"; -if(locale === "es") { - greeting = "Hola"; +let greeting = "Hello" +if (locale === "es") { + greeting = "Hola" } await snap.request({ method: "snap_dialog", params: { type: "alert", - content: panel([ - text(greeting), - ]), + content: panel([text(greeting)]), }, -}); +}) ``` ## `snap_manageAccounts` @@ -517,16 +515,15 @@ This can be done using [`snap_manageState`](#snap_managestate). #### Example ```typescript title="index.ts" -import { Keyring, KeyringAccount } from "@metamask/keyring-api"; +import { Keyring, KeyringAccount } from "@metamask/keyring-api" class MyKeyring implements Keyring { // Other methods. async createAccount( name: string, - options: Record | null = null, + options: Record | null = null ): Promise { - const account: KeyringAccount = { id: uuid(), name, @@ -544,7 +541,7 @@ class MyKeyring implements Keyring { "personal_sign", ], type: "eip155:eoa", - }; + } // Store the account in state. @@ -554,9 +551,9 @@ class MyKeyring implements Keyring { method: "createAccount", params: { account }, }, - }); + }) - return account; + return account } } ``` @@ -581,7 +578,7 @@ This can be done using [`snap_manageState`](#snap_managestate). #### Example ```typescript title="index.ts" -import { Keyring, KeyringAccount } from "@metamask/keyring-api"; +import { Keyring, KeyringAccount } from "@metamask/keyring-api" class MyKeyring implements Keyring { // Other methods. @@ -595,7 +592,7 @@ class MyKeyring implements Keyring { method: "updateAccount", params: { account }, }, - }); + }) } } ``` @@ -620,7 +617,7 @@ This can be done using [`snap_manageState`](#snap_managestate). #### Example ```typescript title="index.ts" -import { Keyring } from "@metamask/keyring-api"; +import { Keyring } from "@metamask/keyring-api" class MyKeyring implements Keyring { // Other methods. @@ -634,7 +631,7 @@ class MyKeyring implements Keyring { method: "deleteAccount", params: { id }, }, - }); + }) } } ``` @@ -692,8 +689,8 @@ This is usually called as part of the #### Example ```typescript title="index.ts" -import { Keyring } from "@metamask/keyring-api"; -import { Json } from "@metamask/utils"; +import { Keyring } from "@metamask/keyring-api" +import { Json } from "@metamask/utils" class MyKeyring implements Keyring { // Other methods. @@ -707,7 +704,7 @@ class MyKeyring implements Keyring { method: "submitResponse", params: { id, result }, }, - }); + }) } } ``` @@ -738,28 +735,28 @@ The value stored in state if the operation is `get`, and `null` otherwise. // Persist some data. await snap.request({ method: "snap_manageState", - params: { + params: { operation: "update", newState: { hello: "world" }, }, -}); +}) // At a later time, get the stored data. const persistedData = await snap.request({ method: "snap_manageState", params: { operation: "get" }, -}); +}) -console.log(persistedData); +console.log(persistedData) // { hello: "world" } // If there's no need to store data anymore, clear it out. await snap.request({ method: "snap_manageState", - params: { + params: { operation: "clear", }, -}); +}) ``` ## `snap_notify` @@ -785,7 +782,7 @@ await snap.request({ type: "inApp", message: "Hello, world!", }, -}); +}) ``` ## Interactive UI methods @@ -820,17 +817,17 @@ const interfaceId = await snap.request({ value: "Click me", name: "interactive-button", }), - ]) + ]), }, -}); +}) await snap.request({ method: "snap_dialog", params: { type: "Alert", - id: interfaceId - } -}); + id: interfaceId, + }, +}) ``` ### `snap_getInterfaceState` @@ -877,16 +874,16 @@ const interfaceId = await snap.request({ }), ]), }, -}); +}) const state = await snap.request({ method: "snap_getInterfaceState", params: { id: interfaceId, }, -}); +}) -console.log(state); +console.log(state) /* { "top-level-input": "What the user typed in that field", diff --git a/snaps/reference/wallet-api-for-snaps.md b/snaps/reference/wallet-api-for-snaps.md index fb6bd0cb00f..5bb6eff542a 100644 --- a/snaps/reference/wallet-api-for-snaps.md +++ b/snaps/reference/wallet-api-for-snaps.md @@ -4,8 +4,8 @@ sidebar_position: 2 toc_max_heading_level: 2 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Wallet API for Snaps @@ -40,9 +40,9 @@ An object mapping the IDs of permitted Snaps to their metadata: ```js await window.ethereum.request({ - "method": "wallet_getSnaps", - "params": [] -}); + method: "wallet_getSnaps", + params: [], +}) ``` @@ -104,14 +104,14 @@ An object mapping the IDs of permitted Snaps to their metadata: ```js await window.ethereum.request({ - "method": "wallet_requestSnaps", - "params": { + method: "wallet_requestSnaps", + params: { "npm:@metamask/example-snap": {}, "npm:foo-snap": { - "version": "^1.0.2" - } - } -}); + version: "^1.0.2", + }, + }, +}) ``` @@ -165,14 +165,14 @@ The result of the Snap method call. ```js await window.ethereum.request({ - "method": "wallet_snap", - "params": { - "snapId": "npm:@metamask/example-snap", - "request": { - "method": "hello" - } - } -}); + method: "wallet_snap", + params: { + snapId: "npm:@metamask/example-snap", + request: { + method: "hello", + }, + }, +}) ``` @@ -213,14 +213,14 @@ The result of the Snap method call. ```js await window.ethereum.request({ - "method": "wallet_invokeSnap", - "params": { - "snapId": "npm:@metamask/example-snap", - "request": { - "method": "hello" - } - } -}); + method: "wallet_invokeSnap", + params: { + snapId: "npm:@metamask/example-snap", + request: { + method: "hello", + }, + }, +}) ``` diff --git a/src/components/Banner/banner.module.css b/src/components/Banner/banner.module.css index 4a614c6bce8..13a4d57b8aa 100644 --- a/src/components/Banner/banner.module.css +++ b/src/components/Banner/banner.module.css @@ -1,36 +1,38 @@ -.banner { /* Change this to your preferred color */ - padding: 20px; - text-align: center; - margin-bottom: 20px; - box-shadow: - inset 0 0 10px rgb(180 179 179 / 50%); /* Light grey shading */ - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - background-color: var(--ifm-background-color); - color: var(--ifm-font-color-base); - border-bottom: 2px solid transparent; - border-right: 2px solid transparent; - transition: border-color 0.3s ease, box-shadow 0.3s ease; - border-radius: 15px; - } +.banner { + /* Change this to your preferred color */ + padding: 20px; + text-align: center; + margin-bottom: 20px; + box-shadow: inset 0 0 10px rgb(180 179 179 / 50%); /* Light grey shading */ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + background-color: var(--ifm-background-color); + color: var(--ifm-font-color-base); + border-bottom: 2px solid transparent; + border-right: 2px solid transparent; + transition: + border-color 0.3s ease, + box-shadow 0.3s ease; + border-radius: 15px; +} - .button { - display: inline-block; - padding: 10px 20px; - text-decoration: none; - transition: background-color 0.3s ease; - margin-top: 20px; - text-align: center; - color: var(--ifm-color-white); - background-color: #F8883B; - border-radius: 0.3rem; - font-weight: bold; - font-size: 0.90rem; - } - - .button:hover { - color: var(--ifm-color-white); - background-color: #FAA66C; - } \ No newline at end of file +.button { + display: inline-block; + padding: 10px 20px; + text-decoration: none; + transition: background-color 0.3s ease; + margin-top: 20px; + text-align: center; + color: var(--ifm-color-white); + background-color: #f8883b; + border-radius: 0.3rem; + font-weight: bold; + font-size: 0.9rem; +} + +.button:hover { + color: var(--ifm-color-white); + background-color: #faa66c; +} diff --git a/src/components/Banner/index.tsx b/src/components/Banner/index.tsx index 296c16609ee..83a1cb0fce4 100644 --- a/src/components/Banner/index.tsx +++ b/src/components/Banner/index.tsx @@ -13,7 +13,8 @@ const Banner: React.FC = ({ children }) => { + rel="noopener noreferrer" + >

Sign up  = ({ children }) => { height="13.5" aria-hidden="true" viewBox="0 0 24 24" - className="iconExternalLink_node_modules-@docusaurus-theme-classic-lib-theme-Icon-ExternalLink-styles-module"> + className="iconExternalLink_node_modules-@docusaurus-theme-classic-lib-theme-Icon-ExternalLink-styles-module" + > -

{title}

+
+

{title}

+
{description}
); -} \ No newline at end of file +} diff --git a/src/components/CardList/CardListItem/index.tsx b/src/components/CardList/CardListItem/index.tsx index 71b4164c47a..005cb07d69b 100644 --- a/src/components/CardList/CardListItem/index.tsx +++ b/src/components/CardList/CardListItem/index.tsx @@ -20,32 +20,23 @@ export default function CardListItem({ item }: CardListItemProps): JSX.Element { <> {item.title && (

- {item.icon && ( - - )} + {item.icon && } {item.title}

)} - {item.description && ( -

- {item.description} -

- )} + {item.description &&

{item.description}

} ); - - const rootClassName = clsx( - "card", - "padding--lg", - styles.cardContainer, - { - [styles.flaskOnly]: item.flaskOnly, - }, - ); + + const rootClassName = clsx("card", "padding--lg", styles.cardContainer, { + [styles.flaskOnly]: item.flaskOnly, + }); if (item.href) { return ( - {cardContent} + + {cardContent} + ); } diff --git a/src/components/CardList/CardListItem/styles.module.css b/src/components/CardList/CardListItem/styles.module.css index 27026e266c3..466f00d15f9 100644 --- a/src/components/CardList/CardListItem/styles.module.css +++ b/src/components/CardList/CardListItem/styles.module.css @@ -21,8 +21,8 @@ content: "Flask"; border-bottom-left-radius: var(--ifm-card-border-radius); position: absolute; - top:0; - right:0; + top: 0; + right: 0; padding: 0.1rem 0.75rem; font-weight: 500; background-color: var(--mm-flask-background-color); @@ -48,4 +48,4 @@ width: 24px; height: 24px; margin-right: 8px; -} \ No newline at end of file +} diff --git a/src/components/CardSection.tsx b/src/components/CardSection.tsx index e22b4972ae6..179a6edfbe9 100644 --- a/src/components/CardSection.tsx +++ b/src/components/CardSection.tsx @@ -5,30 +5,42 @@ const CardList: CardItem[] = [ { title: "Wallet", link: "/wallet", - description: (<> - Integrate your dapp with MetaMask using the Wallet API. You can interact with your users' Ethereum accounts from multiple dapp platforms. - ), + description: ( + <> + Integrate your dapp with MetaMask using the Wallet API. You can interact + with your users' Ethereum accounts from multiple dapp platforms. + + ), }, { title: "Snaps", link: "/snaps", - description: (<> - Extend the functionality of MetaMask using Snaps. You can create a Snap to add support for custom networks, account types, APIs, and more. - ), + description: ( + <> + Extend the functionality of MetaMask using Snaps. You can create a Snap + to add support for custom networks, account types, APIs, and more. + + ), }, { title: "Services", link: "/services", - description: (<> - Power your dapp or Snap using services provided by MetaMask and Infura. This includes APIs aimed at optimizing essential development tasks. - ), + description: ( + <> + Power your dapp or Snap using services provided by MetaMask and Infura. + This includes APIs aimed at optimizing essential development tasks. + + ), }, { title: "Infura dashboard", link: "/developer-tools/dashboard", - description: (<> - Use the Infura dashboard as a central hub for managing your Infura API keys, monitoring usage, and accessing account and billing information. - ), + description: ( + <> + Use the Infura dashboard as a central hub for managing your Infura API + keys, monitoring usage, and accessing account and billing information. + + ), }, ]; @@ -36,7 +48,9 @@ export default function CardSection(): JSX.Element { return (
- {CardList.map((props, idx) => ())} + {CardList.map((props, idx) => ( + + ))}
); diff --git a/src/components/CodeTerminal/AlertMsg.jsx b/src/components/CodeTerminal/AlertMsg.jsx index c8be69d6eda..b348112712b 100644 --- a/src/components/CodeTerminal/AlertMsg.jsx +++ b/src/components/CodeTerminal/AlertMsg.jsx @@ -28,8 +28,9 @@ export const INFO_MSG = { <> Your request has been sent to the network endpoint you selected which returned a response with the requested information. Let’s see how it - performed in stats or dive - into stats docs. + performed in stats or + dive into{" "} + stats docs. ), }, @@ -51,8 +52,8 @@ export const INFO_MSG = { description: ( <> You don’t have any API Keys yet.{" "} - Create an API key to access your - keys and send requests. + Create an API key to access + your keys and send requests. ), }, @@ -62,7 +63,8 @@ export const INFO_MSG = { title: "Access Denied", description: ( <> - The API key selected is not authorized for this specific product. To enable access, please add this product to your API key through the{" "} + The API key selected is not authorized for this specific product. To + enable access, please add this product to your API key through the{" "} Infura Dashboard ), diff --git a/src/components/CodeTerminal/CodeTerminal.jsx b/src/components/CodeTerminal/CodeTerminal.jsx index bf3efe77205..c6fe8575ed6 100644 --- a/src/components/CodeTerminal/CodeTerminal.jsx +++ b/src/components/CodeTerminal/CodeTerminal.jsx @@ -5,7 +5,7 @@ import ControlPanel from "./ControlPanel"; import { INFO_MSG } from "./AlertMsg"; import MessageBox from "@site/src/components/MessageBox/MessageBox"; import { INIT_REQ_SET } from "@site/src/lib/constants"; -import Heading from '@theme/Heading' +import Heading from "@theme/Heading"; const CodeTerminal = () => { const { user, keys, loading: keysLoading } = useUser(); @@ -24,8 +24,12 @@ const CodeTerminal = () => { const keysOptions = useMemo(() => { if (keys.length > 0) { changeSelectHandler( - { label: keys[0].name, value: keys[0].id, private: keys[0].private || "" }, - "apiKey", + { + label: keys[0].name, + value: keys[0].id, + private: keys[0].private || "", + }, + "apiKey" ); return keys.map((item) => ({ label: item.name, @@ -89,7 +93,7 @@ const CodeTerminal = () => { if (endpointUrl.isExpansionNetwork) { URL = `https://${endpointUrl.url}`; params = { - method: "GET" + method: "GET", }; } try { @@ -99,7 +103,9 @@ const CodeTerminal = () => { setMsgParams({ ...INFO_MSG.REQ_SUCCESS }); setResponseReg(JSON.stringify(response, null, 2)); } else { - res.status === 401 ? setMsgParams({ ...INFO_MSG.NO_ACCESS }) : setMsgParams({ ...INFO_MSG.REQ_ERROR }); + res.status === 401 + ? setMsgParams({ ...INFO_MSG.NO_ACCESS }) + : setMsgParams({ ...INFO_MSG.REQ_ERROR }); setResponseReg(undefined); } } catch { @@ -117,7 +123,9 @@ const CodeTerminal = () => { title={msgParams.title} description={msgParams.description} /> - Connect to a network + + Connect to a network + {keysOptions.length > 0 && ( { } if (initValues?.netName?.value === NETWORKS.PALM) { const noEthMethods = initMethods.filter( - (method) => method.value !== "eth_maxPriorityFeePerGas", + (method) => method.value !== "eth_maxPriorityFeePerGas" ); updatedOptions.methods = [...noEthMethods]; } diff --git a/src/components/CodeTerminal/TerminalViewBox.jsx b/src/components/CodeTerminal/TerminalViewBox.jsx index e599aab84e3..eda58637d5d 100644 --- a/src/components/CodeTerminal/TerminalViewBox.jsx +++ b/src/components/CodeTerminal/TerminalViewBox.jsx @@ -14,28 +14,30 @@ const TerminalViewBox = ({ response, isExpansionNetwork = false, }) => { - const exampleRequest = useMemo(() => { - const prepareParams = params.length === 0 ? "" : params.map(param => { - if ('boolean' === typeof param) return `${param}` - return `"${param}"` - }); + const prepareParams = + params.length === 0 + ? "" + : params.map((param) => { + if ("boolean" === typeof param) return `${param}`; + return `"${param}"`; + }); if (isExpansionNetwork) { return `curl -X 'GET' \\\n'https://${url}'`; } - return `curl https://${url}/v3/${id} \\\n -X POST \\\n -H "Content-Type: application/json" \\\n -d '{\n "jsonrpc": "2.0",\n "method": "${method}",\n "params": [${params.length === 0 ? "" : prepareParams}],\n "id": 1\n }'` + return `curl https://${url}/v3/${id} \\\n -X POST \\\n -H "Content-Type: application/json" \\\n -d '{\n "jsonrpc": "2.0",\n "method": "${method}",\n "params": [${params.length === 0 ? "" : prepareParams}],\n "id": 1\n }'`; }, [url, id, method, params, isExpansionNetwork]); return (
- - {exampleRequest} - + {exampleRequest} {!hideFooter && ( -
+
{logged && (
- {response &&
{response}
} + {response && ( +
{response}
+ )}
)}
@@ -55,7 +57,8 @@ const TerminalViewBox = ({ + rel="noreferrer" + > create an account {" "} and reload the page to edit real requests diff --git a/src/components/Icon/Icon.jsx b/src/components/Icon/Icon.jsx index 9d1f64ddc6c..c64dc60c0b4 100644 --- a/src/components/Icon/Icon.jsx +++ b/src/components/Icon/Icon.jsx @@ -10,7 +10,8 @@ const Icon = ({ name, classes }) => { height="16" viewBox="0 0 16 16" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > { height="16" viewBox="0 0 20 16" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > { height="14" viewBox="0 0 16 14" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > { height="14" viewBox="0 0 14 14" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > { height="13" viewBox="0 0 15 13" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > { height="25" viewBox="0 0 22 25" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > { height="24" viewBox="0 0 24 24" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > { height="24" viewBox="0 0 24 24" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > { height="15" viewBox="0 0 9 15" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > { height="13" viewBox="0 0 15 13" fill="none" - xmlns="http://www.w3.org/2000/svg"> + xmlns="http://www.w3.org/2000/svg" + > (
Install MetaMask -

Install MetaMask for your browser to enable interactive features

- Install MetaMask +

+ Install MetaMask for your browser to enable interactive features +

+ + Install MetaMask +
); -export const AuthBox = ({ metamaskProviders = [], selectedProvider, handleConnect }: AuthBoxProps) => { +export const AuthBox = ({ + metamaskProviders = [], + selectedProvider, + handleConnect, +}: AuthBoxProps) => { if (metamaskProviders.length === 0) { - return + return ; } if (metamaskProviders.length > 0) { - return null + return null; } return ( @@ -40,7 +48,9 @@ export const AuthBox = ({ metamaskProviders = [], selectedProvider, handleConnec width="30" />
{provider.info.name}
- {selectedProvider === i && } + {selectedProvider === i && ( + + )}
))} diff --git a/src/components/ParserOpenRPC/AuthBox/styles.module.css b/src/components/ParserOpenRPC/AuthBox/styles.module.css index d7d2a8e8eff..566c4efd249 100644 --- a/src/components/ParserOpenRPC/AuthBox/styles.module.css +++ b/src/components/ParserOpenRPC/AuthBox/styles.module.css @@ -2,7 +2,7 @@ text-align: center; padding: 16px; border-radius: 8px; - border: 1px solid #848C96; + border: 1px solid #848c96; margin-bottom: 24px; } diff --git a/src/components/ParserOpenRPC/CollapseBox/CollapseBox.tsx b/src/components/ParserOpenRPC/CollapseBox/CollapseBox.tsx index 0ffbb410ff6..8b06e1c5d34 100644 --- a/src/components/ParserOpenRPC/CollapseBox/CollapseBox.tsx +++ b/src/components/ParserOpenRPC/CollapseBox/CollapseBox.tsx @@ -1,5 +1,9 @@ import clsx from "clsx"; -import { useCollapsible, Collapsible, useColorMode } from "@docusaurus/theme-common"; +import { + useCollapsible, + Collapsible, + useColorMode, +} from "@docusaurus/theme-common"; import styles from "./styles.module.css"; import React, { useEffect } from "react"; @@ -8,7 +12,10 @@ interface CollapseBoxProps { isInitCollapsed?: boolean; } -export const CollapseBox = ({ children, isInitCollapsed = false }: CollapseBoxProps) => { +export const CollapseBox = ({ + children, + isInitCollapsed = false, +}: CollapseBoxProps) => { const { collapsed, toggleCollapsed } = useCollapsible({ initialState: true }); const { colorMode } = useColorMode(); useEffect(() => { @@ -17,15 +24,35 @@ export const CollapseBox = ({ children, isInitCollapsed = false }: CollapseBoxPr } }, [isInitCollapsed]); return ( -
+
- {children} + + {children} +
); }; diff --git a/src/components/ParserOpenRPC/CollapseBox/styles.module.css b/src/components/ParserOpenRPC/CollapseBox/styles.module.css index d4bf3588b08..f7dcb0bb5fa 100644 --- a/src/components/ParserOpenRPC/CollapseBox/styles.module.css +++ b/src/components/ParserOpenRPC/CollapseBox/styles.module.css @@ -5,12 +5,12 @@ } .collapsedWrapperView { - border-color: #848C96; + border-color: #848c96; } .collapseBtn { background: none; - color: #1098FC; + color: #1098fc; font-size: 14px; line-height: 1; display: inline-flex; @@ -18,7 +18,7 @@ align-items: center; min-width: 190px; border-radius: 999px; - border: 1px solid #0376C9; + border: 1px solid #0376c9; padding: 12px 22px; margin-bottom: 1px; cursor: pointer; @@ -31,20 +31,20 @@ width: 10px; height: 10px; margin: 0 0 0 5px; - border-top: 2px solid #0376C9; - border-right: 2px solid #0376C9; + border-top: 2px solid #0376c9; + border-right: 2px solid #0376c9; transform: rotate(45deg); /*transition: transform .2s ease;*/ } .collapseBtn:hover { color: #141618; - background-color: #0376C9; + background-color: #0376c9; } .collapsedBtnLightHover:hover { color: #fff; - background-color: #036AB5; + background-color: #036ab5; } .collapseBtn:hover .collapseIcon { @@ -65,18 +65,18 @@ } .collapsedBtnView:hover { - color: #0376C9; + color: #0376c9; text-decoration: underline; - background-color: #24272A; + background-color: #24272a; } .collapsedBtnView.collapsedBtnLightHover:hover { - background-color: #F2F4F6; + background-color: #f2f4f6; } .collapsedBtnView:hover .collapseIcon { - border-top-color: #0376C9; - border-right-color: #0376C9; + border-top-color: #0376c9; + border-right-color: #0376c9; } .collapsedIconView { diff --git a/src/components/ParserOpenRPC/DetailsBox/MDContent.tsx b/src/components/ParserOpenRPC/DetailsBox/MDContent.tsx index c2d51be2925..3e6e4ac52ce 100644 --- a/src/components/ParserOpenRPC/DetailsBox/MDContent.tsx +++ b/src/components/ParserOpenRPC/DetailsBox/MDContent.tsx @@ -2,7 +2,7 @@ import React from "react"; const parseMarkdown = (content: string) => { return content - .replace(/\[(.*?)\]\((.*?)\)/g, "$1") + .replace(/\[(.*?)\]\((.*?)\)/g, '$1') .replace(/`(.*?)`/g, "$1"); }; diff --git a/src/components/ParserOpenRPC/DetailsBox/RenderParams.tsx b/src/components/ParserOpenRPC/DetailsBox/RenderParams.tsx index 789160a40b6..87c8d128488 100644 --- a/src/components/ParserOpenRPC/DetailsBox/RenderParams.tsx +++ b/src/components/ParserOpenRPC/DetailsBox/RenderParams.tsx @@ -109,14 +109,21 @@ const renderSchema = (schemaItem, schemas, name) => { const match = description.match(regex); return match ? match[1] : ""; }; - const blockEnum = title && description && (title === "Block tag" || title === "subscriptionType"); + const blockEnum = + title && + description && + (title === "Block tag" || title === "subscriptionType"); return (
Possible enum values
{enumValues.map((value, index) => (
{value}
- {blockEnum &&
} + {blockEnum && ( +
+ +
+ )}
))}
@@ -130,9 +137,16 @@ const renderSchema = (schemaItem, schemas, name) => { title={name || schemaItem.schema.title} type={schemaItem.schema.enum ? "enum" : schemaItem.schema.type} required={!!schemaItem.required} - description={schemaItem.schema.description || schemaItem.schema.title || ""} + description={ + schemaItem.schema.description || schemaItem.schema.title || "" + } /> - {schemaItem.schema.enum && renderEnum(schemaItem.schema.enum, schemaItem.schema.title, schemaItem.schema.description)} + {schemaItem.schema.enum && + renderEnum( + schemaItem.schema.enum, + schemaItem.schema.title, + schemaItem.schema.description + )}
); } @@ -143,9 +157,14 @@ const renderSchema = (schemaItem, schemas, name) => { title={name || schemaItem.title} type={schemaItem.enum ? "enum" : schemaItem.type} required={!!schemaItem.required} - description={schemaItem.enum && schemaItem.title === "Block tag" ? "" : schemaItem.description || schemaItem.title} + description={ + schemaItem.enum && schemaItem.title === "Block tag" + ? "" + : schemaItem.description || schemaItem.title + } /> - {schemaItem.enum && renderEnum(schemaItem.enum, schemaItem.title, schemaItem.description)} + {schemaItem.enum && + renderEnum(schemaItem.enum, schemaItem.title, schemaItem.description)}
); }; @@ -165,9 +184,5 @@ export const renderParamSchemas = (inputSchema, schemas) => { }; export const renderResultSchemas = (inputSchema, schemas) => { - return ( - <> - {renderSchema(inputSchema, schemas, inputSchema.name)} - - ); + return <>{renderSchema(inputSchema, schemas, inputSchema.name)}; }; diff --git a/src/components/ParserOpenRPC/DetailsBox/SchemaProperty.tsx b/src/components/ParserOpenRPC/DetailsBox/SchemaProperty.tsx index 187b03f769d..0b35699b749 100644 --- a/src/components/ParserOpenRPC/DetailsBox/SchemaProperty.tsx +++ b/src/components/ParserOpenRPC/DetailsBox/SchemaProperty.tsx @@ -13,7 +13,12 @@ interface TagProps { name: string; } -export const SchemaProperty = ({ title, type, required, description }: SchemaPropertyProps) => { +export const SchemaProperty = ({ + title, + type, + required, + description, +}: SchemaPropertyProps) => { return (
{ const bgStyle = { - "MetaMask": "#4DB6AC", - "Restricted": "#FFECB3", - "Deprecated": "#7E57C2", + MetaMask: "#4DB6AC", + Restricted: "#FFECB3", + Deprecated: "#7E57C2", }; return (
{name}
diff --git a/src/components/ParserOpenRPC/DetailsBox/index.tsx b/src/components/ParserOpenRPC/DetailsBox/index.tsx index c41453a1cfc..8f2afb5dafd 100644 --- a/src/components/ParserOpenRPC/DetailsBox/index.tsx +++ b/src/components/ParserOpenRPC/DetailsBox/index.tsx @@ -4,7 +4,10 @@ import { MDContent } from "./MDContent"; import { renderParamSchemas, renderResultSchemas } from "./RenderParams"; import clsx from "clsx"; import styles from "./styles.module.css"; -import { MethodParam, SchemaComponents } from "@site/src/components/ParserOpenRPC/interfaces"; +import { + MethodParam, + SchemaComponents, +} from "@site/src/components/ParserOpenRPC/interfaces"; import { Tag } from "@site/src/components/ParserOpenRPC/DetailsBox/SchemaProperty"; interface TagItem { @@ -18,35 +21,51 @@ interface DetailsBoxProps { params: MethodParam[]; components: SchemaComponents; result: any; - tags: TagItem[] + tags: TagItem[]; } -export default function DetailsBox({ method, description, params, components, result, tags }: DetailsBoxProps) { +export default function DetailsBox({ + method, + description, + params, + components, + result, + tags, +}: DetailsBoxProps) { return ( <> {tags.length > 0 && (
- {tags.map(tag =>
)} + {tags.map((tag) => ( +
+ +
+ ))}
)} {method} Parameters {params.length === 0 ? (
This method does not accept any parameters
) : ( - <> - {params && renderParamSchemas(params, components)} - + <>{params && renderParamSchemas(params, components)} )} Returns @@ -58,4 +77,4 @@ export default function DetailsBox({ method, description, params, components, re {result && renderResultSchemas(result, components)} ); -} \ No newline at end of file +} diff --git a/src/components/ParserOpenRPC/DetailsBox/styles.module.css b/src/components/ParserOpenRPC/DetailsBox/styles.module.css index 194d0876e31..cc1a3f5c1ec 100644 --- a/src/components/ParserOpenRPC/DetailsBox/styles.module.css +++ b/src/components/ParserOpenRPC/DetailsBox/styles.module.css @@ -1,21 +1,21 @@ .paramWrapper { - border-bottom: 1px solid #848C96; + border-bottom: 1px solid #848c96; padding-bottom: 1.5rem; margin-bottom: 1rem; } .borderWrapper { - border-bottom: 1px solid #848C96; + border-bottom: 1px solid #848c96; padding-top: 2rem; padding-bottom: 1rem; } .textAltColor { - color: #6A737D; + color: #6a737d; } .textErrorColor { - color: #D73847; + color: #d73847; } .paramItemWrapper { @@ -27,21 +27,21 @@ } .borderTopLine { - border-top: 1px solid #848C96; + border-top: 1px solid #848c96; } .borderBottomLine { - border-bottom: 1px solid #848C96; + border-bottom: 1px solid #848c96; } .enumWrapper { - border: 1px solid #848C96; + border: 1px solid #848c96; border-radius: 8px; margin-bottom: 2rem; } .enumItem { - border-top: 1px solid #848C96; + border-top: 1px solid #848c96; padding: 16px; } @@ -50,7 +50,7 @@ font-size: 12px; line-height: 1; padding: 4px; - border: 1px solid #BBC0C5; + border: 1px solid #bbc0c5; border-radius: 4px; } @@ -72,5 +72,5 @@ color: #141618; padding: 4px 8px; border-radius: 6px; - background-color: #FFCDD2; + background-color: #ffcdd2; } diff --git a/src/components/ParserOpenRPC/ErrorsBox/index.tsx b/src/components/ParserOpenRPC/ErrorsBox/index.tsx index dce3db24eca..e38c73430af 100644 --- a/src/components/ParserOpenRPC/ErrorsBox/index.tsx +++ b/src/components/ParserOpenRPC/ErrorsBox/index.tsx @@ -14,17 +14,27 @@ interface ErrorsBoxProps { errors: ErrorItem[]; } -export default function ErrorsBox ({ errors }: ErrorsBoxProps) { +export default function ErrorsBox({ errors }: ErrorsBoxProps) { const { colorMode } = useColorMode(); if (errors.length === 0) return null; return ( <> - + Errors
-
+
Code
Message
diff --git a/src/components/ParserOpenRPC/ErrorsBox/styles.module.css b/src/components/ParserOpenRPC/ErrorsBox/styles.module.css index 0bcddc3d240..4225ef6fcd9 100644 --- a/src/components/ParserOpenRPC/ErrorsBox/styles.module.css +++ b/src/components/ParserOpenRPC/ErrorsBox/styles.module.css @@ -1,27 +1,27 @@ .errWrapper { - border: 1px solid #848C96; + border: 1px solid #848c96; border-radius: 8px; overflow: hidden; } .errRow { display: flex; - border-bottom: 1px solid #848C96; + border-bottom: 1px solid #848c96; } .errRowHeading { display: flex; - border-bottom: 1px solid #848C96; + border-bottom: 1px solid #848c96; font-size: 18px; font-weight: 700; } .errRowHeadingDarkView { - background-color: #24272A; + background-color: #24272a; } .errRowHeadingLightView { - background-color: #F2F4F6; + background-color: #f2f4f6; } .secondaryHeading { @@ -39,7 +39,7 @@ justify-content: center; width: 80px; min-height: 48px; - border-right: 1px solid #848C96; + border-right: 1px solid #848c96; } .errColMsg { diff --git a/src/components/ParserOpenRPC/InteractiveBox/fields/ConditionalField.tsx b/src/components/ParserOpenRPC/InteractiveBox/fields/ConditionalField.tsx index b008d7c4151..8730c23cd85 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/fields/ConditionalField.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/fields/ConditionalField.tsx @@ -10,7 +10,12 @@ export const ConditionalField = (props: FieldTemplateProps) => { const [isOpened, setIsOpened] = useState(false); const [selectedTypeSchema, setSelectedTypeSchema] = useState(null); const [isEditView, setIsEditView] = useState(false); - const { setIsDrawerContentFixed, setDrawerLabel, isComplexTypeView, setIsComplexTypeView } = useContext(ParserOpenRPCContext); + const { + setIsDrawerContentFixed, + setDrawerLabel, + isComplexTypeView, + setIsComplexTypeView, + } = useContext(ParserOpenRPCContext); const { formData, schema, name, onChange } = props; const listItems = schema?.anyOf ? schema?.anyOf : schema?.oneOf; const checkForNullTypeSchema = (type) => type === "null"; @@ -19,40 +24,47 @@ export const ConditionalField = (props: FieldTemplateProps) => { setIsDrawerContentFixed(true); setIsEditView(true); setIsComplexTypeView(true); - } + }; const onDropdownOptionClick = (e) => { - const selectedSchema = listItems.find(({ title }) => title === e.target.dataset.value); + const selectedSchema = listItems.find( + ({ title }) => title === e.target.dataset.value + ); const isNullTypeSchema = checkForNullTypeSchema(selectedSchema?.type); if (isNullTypeSchema) { onChange(null); } else { - setSelectedTypeSchema(listItems.find(({ title }) => title === e.target.dataset.value)); + setSelectedTypeSchema( + listItems.find(({ title }) => title === e.target.dataset.value) + ); showComplexTypeView(); } setIsOpened(false); - } + }; const selectWidgetProps = { ...props, schema: selectedTypeSchema, label: name, value: formData, ...(selectedTypeSchema?.enum && { - options:{ - enumOptions: selectedTypeSchema?.enum.map(item => ({ label: item, value: item })) - } - }) - } + options: { + enumOptions: selectedTypeSchema?.enum.map((item) => ({ + label: item, + value: item, + })), + }, + }), + }; const baseInputProps = { ...props, - schema: selectedTypeSchema - } + schema: selectedTypeSchema, + }; useEffect(() => { - if(!isComplexTypeView) { + if (!isComplexTypeView) { setIsEditView(false); setSelectedTypeSchema(null); } - }, [isComplexTypeView]) + }, [isComplexTypeView]); return listItems?.length > 0 ? ( <> @@ -61,15 +73,43 @@ export const ConditionalField = (props: FieldTemplateProps) => {
-
+
{formData === undefined ? "" : String(formData)} - { setIsOpened(!isOpened); }}> + { + setIsOpened(!isOpened); + }} + > {schema?.anyOf ? "anyOf" : "oneOf"} - - + + -
    +
      {listItems?.map((listItem, index) => (
    • {
- {isComplexTypeView && isEditView && selectedTypeSchema && selectedTypeSchema.type !== "null" ? + {isComplexTypeView && + isEditView && + selectedTypeSchema && + selectedTypeSchema.type !== "null" ? (
- {selectedTypeSchema?.enum ? : } + {selectedTypeSchema?.enum ? ( + + ) : ( + + )}
- : null - } + ) : null} ) : null; -} +}; diff --git a/src/components/ParserOpenRPC/InteractiveBox/index.tsx b/src/components/ParserOpenRPC/InteractiveBox/index.tsx index 3236bb53404..65a85bb9bec 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/index.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/index.tsx @@ -1,10 +1,19 @@ import React, { useContext, useEffect, useRef, useState } from "react"; import Form from "@rjsf/core"; import clsx from "clsx"; -import {RJSFSchema, UiSchema, RegistryWidgetsType, RegistryFieldsType} from "@rjsf/utils"; +import { + RJSFSchema, + UiSchema, + RegistryWidgetsType, + RegistryFieldsType, +} from "@rjsf/utils"; import validator from "@rjsf/validator-ajv8"; import $RefParser from "@apidevtools/json-schema-ref-parser"; -import { MethodExample, MethodParam, SchemaComponents } from "@site/src/components/ParserOpenRPC/interfaces"; +import { + MethodExample, + MethodParam, + SchemaComponents, +} from "@site/src/components/ParserOpenRPC/interfaces"; import styles from "./styles.module.css"; import global from "../global.module.css"; import { BaseInputTemplate } from "@site/src/components/ParserOpenRPC/InteractiveBox/templates/BaseInputTemplate"; @@ -21,18 +30,18 @@ interface InteractiveBoxProps { components: SchemaComponents; examples: MethodExample[]; onParamChange: (data) => void; - drawerLabel?: string | null + drawerLabel?: string | null; closeComplexTypeView?: () => void; } export default function InteractiveBox({ - params, - components, - examples, - onParamChange, - drawerLabel, - closeComplexTypeView -}:InteractiveBoxProps) { + params, + components, + examples, + onParamChange, + drawerLabel, + closeComplexTypeView, +}: InteractiveBoxProps) { const [parsedSchema, setParsedSchema] = useState(null); const [defaultFormData, setDefaultFormData] = useState({}); const [isFormReseted, setIsFormReseted] = useState(false); @@ -40,13 +49,19 @@ export default function InteractiveBox({ const { colorMode } = useColorMode(); const { isComplexTypeView } = useContext(ParserOpenRPCContext); - const defaultExampleFormData = examples ? Object.fromEntries(examples[0].params.map(({ name, value }) => [name, value])) : {}; + const defaultExampleFormData = examples + ? Object.fromEntries( + examples[0].params.map(({ name, value }) => [name, value]) + ) + : {}; const schema: RJSFSchema = { - "components": { - "schemas": components, + components: { + schemas: components, }, - "type": "object", - "properties": Object.fromEntries(params.map(({ name, schema }) => [name, schema])), + type: "object", + properties: Object.fromEntries( + params.map(({ name, schema }) => [name, schema]) + ), }; const uiSchema: UiSchema = { "ui:globalOptions": { @@ -59,7 +74,7 @@ export default function InteractiveBox({ ArrayFieldTemplate, FieldErrorTemplate: () => null, ErrorListTemplate: () => null, - } + }; const widgets: RegistryWidgetsType = { CheckboxWidget: DropdownWidget, SelectWidget: SelectWidget, @@ -79,13 +94,13 @@ export default function InteractiveBox({ formRef?.current?.reset(); } }; - const isLightTheme = colorMode === "light" + const isLightTheme = colorMode === "light"; useEffect(() => { const dereferenceSchema = async () => { try { if (schema) { - setParsedSchema(await $RefParser.dereference(schema) as RJSFSchema); + setParsedSchema((await $RefParser.dereference(schema)) as RJSFSchema); } } catch (error) { console.error("Error of parsing schema:", error); @@ -104,13 +119,13 @@ export default function InteractiveBox({ }; const cloneAndSetNullIfExists = (obj, key) => { - if (typeof obj !== 'object' || obj === null) return obj; + if (typeof obj !== "object" || obj === null) return obj; const newObj = Array.isArray(obj) ? [] : {}; - for (let prop in obj) { + for (const prop in obj) { if (obj.hasOwnProperty(prop)) { if (prop === key) { newObj[prop] = []; - } else if (typeof obj[prop] === 'object' && obj[prop] !== null) { + } else if (typeof obj[prop] === "object" && obj[prop] !== null) { newObj[prop] = cloneAndSetNullIfExists(obj[prop], key); } else { newObj[prop] = obj[prop]; @@ -118,25 +133,21 @@ export default function InteractiveBox({ } } return newObj; - } + }; const handleCancelClick = () => { if (drawerLabel) { const upData = cloneAndSetNullIfExists(defaultFormData, drawerLabel); - setDefaultFormData(upData) + setDefaultFormData(upData); } closeComplexTypeView(); - } + }; return parsedSchema ? ( <>
-
- Parameter -
-
- Value -
+
Parameter
+
Value
{ onChangeHandler(data.formData); }} + onChange={(data) => { + onChangeHandler(data.formData); + }} templates={templates} uiSchema={uiSchema} widgets={widgets} ref={formRef} fields={fields} > -
+
- @@ -164,21 +190,33 @@ export default function InteractiveBox({ className={styles.footerButtonLeft} onClick={handleClearForm} > - +
- {isComplexTypeView ? + {isComplexTypeView ? (
- - -
: - null - } +
+ ) : null}
diff --git a/src/components/ParserOpenRPC/InteractiveBox/styles.module.css b/src/components/ParserOpenRPC/InteractiveBox/styles.module.css index 10db77046b6..3ad7ea4669d 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/styles.module.css +++ b/src/components/ParserOpenRPC/InteractiveBox/styles.module.css @@ -6,8 +6,8 @@ width: 50%; padding: 16px; line-height: 1.5; - background-color: #292A36; - color: #FFFFFF; + background-color: #292a36; + color: #ffffff; } .tableRow { display: flex; @@ -17,8 +17,8 @@ .tableColumn { width: 50%; line-height: 24px; - background-color: #292A36; - color: #FFFFFF; + background-color: #292a36; + color: #ffffff; } .tableColumnParam { display: flex; @@ -149,7 +149,7 @@ width: 100%; padding: 16px; background-color: rgba(36, 39, 42, 1); - color: #FFFFFF; + color: #ffffff; white-space: nowrap; } .dropdownItem:hover { @@ -168,10 +168,10 @@ bottom: 0; } .tableFooterRowDark { - background-color: #24272A; + background-color: #24272a; } .tableFooterRowLight { - background-color: #F2F4F6; + background-color: #f2f4f6; } .tableButton { display: flex; @@ -193,7 +193,7 @@ top: 0; width: 100%; height: 332px; - background-color: #292A36; + background-color: #292a36; overflow-y: scroll; z-index: 1; } @@ -205,7 +205,7 @@ padding: 12px 72px 12px 16px; font-size: 14px; line-height: 24px; - color: #FFFFFF; + color: #ffffff; border-radius: 0; border: 2px solid transparent; text-overflow: ellipsis; @@ -216,8 +216,8 @@ border: 2px solid rgba(16, 152, 252, 1); outline: none; } -.formControl[type=number]::-webkit-inner-spin-button, -.formControl[type=number]::-webkit-outer-spin-button { +.formControl[type="number"]::-webkit-inner-spin-button, +.formControl[type="number"]::-webkit-outer-spin-button { opacity: 0; } .formControlNumberUp { @@ -249,7 +249,7 @@ border-radius: 0; } .footerButtonRight { - padding: 5px 16px!important; + padding: 5px 16px !important; } .footerButtonRightOutline { margin-right: 16px; @@ -297,7 +297,7 @@ padding: 0; border: 0; outline: none; - color: #BBC0C5; + color: #bbc0c5; font-size: 14px; line-height: 1; cursor: pointer; @@ -309,8 +309,8 @@ width: 20px; height: 20px; border-radius: 50%; - background-color: #BBC0C5; - color: #292A36; + background-color: #bbc0c5; + color: #292a36; font-size: 20px; line-height: 1; margin-right: 10px; @@ -327,5 +327,5 @@ .arrayItemRowWrap { position: relative; padding-left: 40px; - border-bottom: 1px dashed #848C96; + border-bottom: 1px dashed #848c96; } diff --git a/src/components/ParserOpenRPC/InteractiveBox/templates/ArrayFieldTemplate.tsx b/src/components/ParserOpenRPC/InteractiveBox/templates/ArrayFieldTemplate.tsx index 7d5d37b739f..008985110dd 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/templates/ArrayFieldTemplate.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/templates/ArrayFieldTemplate.tsx @@ -6,33 +6,49 @@ import styles from "@site/src/components/ParserOpenRPC/InteractiveBox/styles.mod import clsx from "clsx"; import { ParserOpenRPCContext } from "@site/src/components/ParserOpenRPC"; -export const ArrayFieldTemplate = ({ items, canAdd, onAddClick, title, schema, formData }: ArrayFieldTemplateProps) => { +export const ArrayFieldTemplate = ({ + items, + canAdd, + onAddClick, + title, + schema, + formData, +}: ArrayFieldTemplateProps) => { const [isComplexArrayEditView, setIsComplexArrayEditView] = useState(false); - const { setIsDrawerContentFixed, setDrawerLabel, isComplexTypeView, setIsComplexTypeView } = useContext(ParserOpenRPCContext); + const { + setIsDrawerContentFixed, + setDrawerLabel, + isComplexTypeView, + setIsComplexTypeView, + } = useContext(ParserOpenRPCContext); const { collapsed, toggleCollapsed } = useCollapsible({ initialState: true }); const itemsType = schema?.items?.type; - const isSimpleArray = itemsType === "string" || itemsType === "boolean" || itemsType === "number" || itemsType === "integer"; + const isSimpleArray = + itemsType === "string" || + itemsType === "boolean" || + itemsType === "number" || + itemsType === "integer"; const addComplexArray = () => { - if(formData?.length === 0) { + if (formData?.length === 0) { onAddClick(); } setDrawerLabel(title); setIsDrawerContentFixed(true); setIsComplexArrayEditView(true); setIsComplexTypeView(true); - } + }; const addSimpleArray = () => { toggleCollapsed(); - if(collapsed && formData?.length === 0) { + if (collapsed && formData?.length === 0) { onAddClick(); } - } + }; useEffect(() => { if (!isComplexTypeView) { setIsComplexArrayEditView(false); } - }, [isComplexTypeView]) + }, [isComplexTypeView]); return (
@@ -41,51 +57,82 @@ export const ArrayFieldTemplate = ({ items, canAdd, onAddClick, title, schema, f
-
+
{JSON.stringify(formData, null, " ")}
+ className={clsx( + styles.tableColumnType, + styles.tableColumnTypeDropdown + )} + onClick={isSimpleArray ? addSimpleArray : addComplexArray} + > {schema.type} - + isSimpleArray + ? collapsed && styles.chevronIconDown + : styles.chevronIconRight + )} + />
- {isComplexTypeView && isComplexArrayEditView && !isSimpleArray ? + {isComplexTypeView && isComplexArrayEditView && !isSimpleArray ? (
{items.map(({ children, index, onDropIndexClick, hasRemove }) => (
- {hasRemove ? - : - null - } + {hasRemove ? ( + + ) : null} {children}
))} - {canAdd ? - : - null - } -
: + {canAdd ? ( + + ) : null} +
+ ) : ( <> {items.map((el, i) => { @@ -93,22 +140,33 @@ export const ArrayFieldTemplate = ({ items, canAdd, onAddClick, title, schema, f ...el.children.props, isArray: true, value: formData, - } + }; const { index, hasRemove, onDropIndexClick, schema } = el; - const isNumber = schema.type === "number" || schema.type === "integer"; + const isNumber = + schema.type === "number" || schema.type === "integer"; return ( -
- {i+1} +
+ + {i + 1} + {hasRemove && ( - + className={clsx( + styles.deleteIcon, + styles.deleteIconCentered + )} + > )}
- ) + ); })} {canAdd && (
@@ -124,7 +182,7 @@ export const ArrayFieldTemplate = ({ items, canAdd, onAddClick, title, schema, f )} - } + )}
); -} +}; diff --git a/src/components/ParserOpenRPC/InteractiveBox/templates/BaseInputTemplate.tsx b/src/components/ParserOpenRPC/InteractiveBox/templates/BaseInputTemplate.tsx index b1da31440a9..48e9923c11a 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/templates/BaseInputTemplate.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/templates/BaseInputTemplate.tsx @@ -6,31 +6,34 @@ import { Tooltip } from "@site/src/components/ParserOpenRPC/Tooltip"; import debounce from "lodash.debounce"; interface ExtendedInputProps extends BaseInputTemplateProps { - isArray?: boolean + isArray?: boolean; } export const BaseInputTemplate = ({ - schema, - id, - name, - value = "", - disabled, - onChange, - rawErrors, - hideError, - required, - formContext, - isArray - }: ExtendedInputProps) => { + schema, + id, + name, + value = "", + disabled, + onChange, + rawErrors, + hideError, + required, + formContext, + isArray, +}: ExtendedInputProps) => { const isNumber = schema.type === "number" || schema.type === "integer"; const [isFocused, setIsFocused] = useState(false); const [inputValue, setInputValue] = useState(isNumber ? 0 : ""); const { isFormReseted } = formContext; const hasErrors = rawErrors?.length > 0 && !hideError && value !== ""; - const debouncedOnChange = useCallback(debounce((e, isInputNumber = false) => { - onChange(isInputNumber ? e : e?.target?.value); - }, 300), []); + const debouncedOnChange = useCallback( + debounce((e, isInputNumber = false) => { + onChange(isInputNumber ? e : e?.target?.value); + }, 300), + [] + ); const onInputChange = (e) => { setInputValue(e?.target?.value); debouncedOnChange(e); @@ -52,37 +55,69 @@ export const BaseInputTemplate = ({
{!isArray && (
-
)}
- {hasErrors && !isNumber ? : null} + {hasErrors && !isNumber ? ( + + ) : null} { setIsFocused(true); }} - onBlur={() => { setIsFocused(false); }} + onFocus={() => { + setIsFocused(true); + }} + onBlur={() => { + setIsFocused(false); + }} /> {schema.type} {isNumber ? ( <> { onInputNumberChange(Number((+inputValue || 0) + 1)); }} + className={clsx( + styles.tableColumnIcon, + styles.chevronIcon, + styles.formControlNumberUp + )} + onClick={() => { + onInputNumberChange(Number((+inputValue || 0) + 1)); + }} /> { inputValue >= 1 && onInputNumberChange(Number((+inputValue || 0) - 1)); }} + className={clsx( + styles.tableColumnIcon, + styles.chevronIcon, + styles.chevronIconDown, + styles.formControlNumberDown + )} + onClick={() => { + inputValue >= 1 && + onInputNumberChange(Number((+inputValue || 0) - 1)); + }} /> ) : null} diff --git a/src/components/ParserOpenRPC/InteractiveBox/widgets/DropdownWidget.tsx b/src/components/ParserOpenRPC/InteractiveBox/widgets/DropdownWidget.tsx index c59974c6951..62c132dd593 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/widgets/DropdownWidget.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/widgets/DropdownWidget.tsx @@ -3,26 +3,60 @@ import { WidgetProps } from "@rjsf/utils"; import clsx from "clsx"; import styles from "@site/src/components/ParserOpenRPC/InteractiveBox/styles.module.css"; -export const DropdownWidget = ({ name, value, onChange, schema, options }: WidgetProps) => { +export const DropdownWidget = ({ + name, + value, + onChange, + schema, + options, +}: WidgetProps) => { const [isOpened, setIsOpened] = useState(false); - + return (
-
+
{value === undefined ? "" : String(value)} - { setIsOpened(!isOpened); }}> + { + setIsOpened(!isOpened); + }} + > {schema.type} - - + + -
    +
      {options.enumOptions.map(({ value }, index) => ( -
    • { @@ -39,4 +73,4 @@ export const DropdownWidget = ({ name, value, onChange, schema, options }: Widge
); -}; \ No newline at end of file +}; diff --git a/src/components/ParserOpenRPC/InteractiveBox/widgets/SelectWidget.tsx b/src/components/ParserOpenRPC/InteractiveBox/widgets/SelectWidget.tsx index 7ce49d2f520..29e115da4f9 100644 --- a/src/components/ParserOpenRPC/InteractiveBox/widgets/SelectWidget.tsx +++ b/src/components/ParserOpenRPC/InteractiveBox/widgets/SelectWidget.tsx @@ -3,27 +3,63 @@ import { WidgetProps } from "@rjsf/utils"; import clsx from "clsx"; import styles from "@site/src/components/ParserOpenRPC/InteractiveBox/styles.module.css"; -export const SelectWidget = ({ value, onChange, schema, options, label }: WidgetProps) => { +export const SelectWidget = ({ + value, + onChange, + schema, + options, + label, +}: WidgetProps) => { const [isOpened, setIsOpened] = useState(false); - const emptyValue = value === undefined || !options?.enumOptions.some(({ label }) => label === value); - + const emptyValue = + value === undefined || + !options?.enumOptions.some(({ label }) => label === value); + return (
-
+
{emptyValue ? "" : String(value)} - { setIsOpened(!isOpened); }}> + { + setIsOpened(!isOpened); + }} + > - {schema?.enum ? 'enum' : schema?.type} - - + {schema?.enum ? "enum" : schema?.type} + + -
    +
      {options?.enumOptions?.map(({ label, value }, index) => ( -
    • { diff --git a/src/components/ParserOpenRPC/ModalDrawer/index.tsx b/src/components/ParserOpenRPC/ModalDrawer/index.tsx index 16208dab86a..e380a7ec50e 100644 --- a/src/components/ParserOpenRPC/ModalDrawer/index.tsx +++ b/src/components/ParserOpenRPC/ModalDrawer/index.tsx @@ -1,4 +1,4 @@ -import React, {useState, useEffect, useRef} from "react"; +import React, { useState, useEffect, useRef } from "react"; import clsx from "clsx"; import { useColorMode } from "@docusaurus/theme-common"; import styles from "./styles.module.css"; @@ -12,7 +12,14 @@ interface ModalDrawerProps { headerLabel?: string | null; } -export const ModalDrawer = ({ title, isOpen, onClose, children, isContentFixed = false, headerLabel }: ModalDrawerProps) => { +export const ModalDrawer = ({ + title, + isOpen, + onClose, + children, + isContentFixed = false, + headerLabel, +}: ModalDrawerProps) => { const [showModal, setShowModal] = useState(isOpen); const contentRef = useRef(null); const { colorMode } = useColorMode(); @@ -28,16 +35,35 @@ export const ModalDrawer = ({ title, isOpen, onClose, children, isContentFixed = }, [isContentFixed]); return ( -
      -
      +
      +
      {title} - {headerLabel ? {headerLabel} : null} + {headerLabel ? ( + {headerLabel} + ) : null}
      - +
      {children} diff --git a/src/components/ParserOpenRPC/ModalDrawer/styles.module.css b/src/components/ParserOpenRPC/ModalDrawer/styles.module.css index 6453f9c8355..5c9af9526cc 100644 --- a/src/components/ParserOpenRPC/ModalDrawer/styles.module.css +++ b/src/components/ParserOpenRPC/ModalDrawer/styles.module.css @@ -1,5 +1,5 @@ .modalContainer { - border: 1px solid #848C96; + border: 1px solid #848c96; border-radius: 8px 8px 0 0; position: absolute; z-index: 10; @@ -9,11 +9,11 @@ min-height: 512px; opacity: 0; transform: translate(0, 100%); - transition-property: 'transform', 'opacity'; - transition-duration: .4s; + transition-property: "transform", "opacity"; + transition-duration: 0.4s; transition-timing-function: ease; overflow: hidden; - background-color: #292A36; + background-color: #292a36; } .modalContainerOpen { @@ -27,11 +27,11 @@ align-items: center; justify-content: space-between; min-height: 56px; - background-color: #24272A; + background-color: #24272a; } .modalHeaderLight { - background-color: #F2F4F6 !important; + background-color: #f2f4f6 !important; } .modalTitle { @@ -68,7 +68,7 @@ justify-content: center; margin-left: 8px; padding: 2px 8px; - border: 1px solid #848C96; + border: 1px solid #848c96; border-radius: 999px; font-size: 12px; line-height: 18px; diff --git a/src/components/ParserOpenRPC/RequestBox/index.tsx b/src/components/ParserOpenRPC/RequestBox/index.tsx index d5a92b4d8d7..81c44591acd 100644 --- a/src/components/ParserOpenRPC/RequestBox/index.tsx +++ b/src/components/ParserOpenRPC/RequestBox/index.tsx @@ -5,7 +5,6 @@ import { MethodParam } from "@site/src/components/ParserOpenRPC/interfaces"; import styles from "./styles.module.css"; import global from "../global.module.css"; - interface RequestBoxProps { isMetamaskInstalled: boolean; method: string; @@ -16,14 +15,22 @@ interface RequestBoxProps { submitRequest: () => void; } -export default function RequestBox({ isMetamaskInstalled, method, params, response, paramsData, openModal, submitRequest }: RequestBoxProps) { +export default function RequestBox({ + isMetamaskInstalled, + method, + params, + response, + paramsData, + openModal, + submitRequest, +}: RequestBoxProps) { const exampleRequest = useMemo(() => { const preparedParams = JSON.stringify(paramsData, null, 2); return `await window.ethereum.request({\n "method": "${method}",\n "params": ${preparedParams},\n});`; }, [method, paramsData]); const exampleResponse = useMemo(() => { - if (!response || response === null) return false + if (!response || response === null) return false; return JSON.stringify(response, null, 2); }, [response]); @@ -71,4 +78,4 @@ export default function RequestBox({ isMetamaskInstalled, method, params, respon )} ); -} \ No newline at end of file +} diff --git a/src/components/ParserOpenRPC/RequestBox/styles.module.css b/src/components/ParserOpenRPC/RequestBox/styles.module.css index ffca9f28b9c..c45bc42d05e 100644 --- a/src/components/ParserOpenRPC/RequestBox/styles.module.css +++ b/src/components/ParserOpenRPC/RequestBox/styles.module.css @@ -1,13 +1,13 @@ .cardWrapper { border-radius: 8px; - border: 1px solid #848C96; - background-color: #292A36; + border: 1px solid #848c96; + background-color: #292a36; margin-bottom: 24px; overflow: hidden; } .cardHeader { - border-bottom: 1px solid #848C96; + border-bottom: 1px solid #848c96; padding: 16px; } @@ -18,6 +18,6 @@ .cardFooter { display: flex; justify-content: flex-end; - border-top: 1px solid #848C96; + border-top: 1px solid #848c96; padding: 16px; } diff --git a/src/components/ParserOpenRPC/Tooltip/Tooltip.module.css b/src/components/ParserOpenRPC/Tooltip/Tooltip.module.css index f899638b910..d4094efc55c 100644 --- a/src/components/ParserOpenRPC/Tooltip/Tooltip.module.css +++ b/src/components/ParserOpenRPC/Tooltip/Tooltip.module.css @@ -1,7 +1,7 @@ .tooltipContainer { - max-width: 180px; - font-size: 16px; + max-width: 180px; + font-size: 16px; } .tooltipContainer:first-letter { - text-transform: capitalize; + text-transform: capitalize; } diff --git a/src/components/ParserOpenRPC/Tooltip/index.tsx b/src/components/ParserOpenRPC/Tooltip/index.tsx index 40348046f92..af50008bdcb 100644 --- a/src/components/ParserOpenRPC/Tooltip/index.tsx +++ b/src/components/ParserOpenRPC/Tooltip/index.tsx @@ -13,12 +13,10 @@ export const Tooltip = ({ children, message, disabled }: TooltipProps) => ( {message}
      - )} + html={
      {message}
      } position="top" interactive={true} > {children} -) +); diff --git a/src/components/ParserOpenRPC/global.module.css b/src/components/ParserOpenRPC/global.module.css index a64fbcc95b7..bf91492a98c 100644 --- a/src/components/ParserOpenRPC/global.module.css +++ b/src/components/ParserOpenRPC/global.module.css @@ -1,9 +1,9 @@ .root { - --font-family-sans: 'Euclid Circular B', 'Roboto', sans-serif; + --font-family-sans: "Euclid Circular B", "Roboto", sans-serif; } .primaryBtn { - background: #1098FC; + background: #1098fc; color: #141618; font-size: 14px; line-height: 1; @@ -15,23 +15,23 @@ padding: 12px 16px; cursor: pointer; font-family: var(--font-family-sans); - transition-property: 'box-shadow', 'background-color'; - transition-duration: .2s; + transition-property: "box-shadow", "background-color"; + transition-duration: 0.2s; transition-timing-function: ease; } .primaryBtn:hover { text-decoration: none; color: #141618; - background-color: #26A2FC; - box-shadow: 0 2px 8px 0 rgba(16, 152, 252, 0.40); + background-color: #26a2fc; + box-shadow: 0 2px 8px 0 rgba(16, 152, 252, 0.4); } .primaryBtn:disabled { cursor: not-allowed; text-decoration: none; color: #141618; - background-color: #0376C9; + background-color: #0376c9; box-shadow: none; } @@ -49,8 +49,8 @@ .secondaryBtn:hover { text-decoration: none; color: #141618; - background-color: #26A2FC; - box-shadow: 0 2px 8px 0 rgba(16, 152, 252, 0.40); + background-color: #26a2fc; + box-shadow: 0 2px 8px 0 rgba(16, 152, 252, 0.4); } .secondaryBtn:disabled { @@ -63,7 +63,7 @@ .linkBtn { background: none; border: 0; - color: #1098FC; + color: #1098fc; font-size: 14px; line-height: 1; font-weight: 500; diff --git a/src/components/ParserOpenRPC/index.tsx b/src/components/ParserOpenRPC/index.tsx index 49d336e367e..37d820aec23 100644 --- a/src/components/ParserOpenRPC/index.tsx +++ b/src/components/ParserOpenRPC/index.tsx @@ -1,4 +1,4 @@ -import React, { createContext, useMemo, useState } from 'react' +import React, { createContext, useMemo, useState } from "react"; import { usePluginData } from "@docusaurus/useGlobalData"; import { ResponseItem, NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc"; import DetailsBox from "@site/src/components/ParserOpenRPC/DetailsBox"; @@ -11,9 +11,12 @@ import global from "./global.module.css"; import modalDrawerStyles from "./ModalDrawer/styles.module.css"; import clsx from "clsx"; import { useColorMode } from "@docusaurus/theme-common"; -import { trackClickForSegment, trackInputChangeForSegment } from "@site/src/lib/segmentAnalytics"; +import { + trackClickForSegment, + trackInputChangeForSegment, +} from "@site/src/lib/segmentAnalytics"; import { useLocation } from "@docusaurus/router"; -import { useSyncProviders } from "@site/src/hooks/useSyncProviders.ts" +import { useSyncProviders } from "@site/src/hooks/useSyncProviders.ts"; interface ParserProps { network: NETWORK_NAMES; @@ -21,13 +24,14 @@ interface ParserProps { } interface ParserOpenRPCContextProps { - setIsDrawerContentFixed?: (isFixed: boolean) => void + setIsDrawerContentFixed?: (isFixed: boolean) => void; setDrawerLabel?: (label: string) => void; isComplexTypeView: boolean; setIsComplexTypeView: (isComplexTypeView: boolean) => void; } -export const ParserOpenRPCContext = createContext(null) +export const ParserOpenRPCContext = + createContext(null); export default function ParserOpenRPC({ network, method }: ParserProps) { if (!method || !network) return null; @@ -43,33 +47,49 @@ export default function ParserOpenRPC({ network, method }: ParserProps) { trackClickForSegment({ eventName: "Customize Request", clickType: "Customize Request", - userExperience: "B" - }) + userExperience: "B", + }); }; const closeModal = () => setModalOpen(false); - const { netData } = usePluginData("plugin-json-rpc") as { netData?: ResponseItem[] }; - const currentNetwork = netData?.find(net => net.name === network); + const { netData } = usePluginData("plugin-json-rpc") as { + netData?: ResponseItem[]; + }; + const currentNetwork = netData?.find((net) => net.name === network); if (!currentNetwork && currentNetwork.error) return null; const currentMethodData = useMemo(() => { const findReferencedItem = (items, refPath, componentType) => { - return items?.map(item => { - if (item?.name || (item?.code && item?.message)) return item; - if (item?.$ref) { - const ref = item.$ref.replace(refPath, ""); - return currentNetwork.data.components[componentType][ref]; - } - return null; - }).filter(Boolean) || []; + return ( + items + ?.map((item) => { + if (item?.name || (item?.code && item?.message)) return item; + if (item?.$ref) { + const ref = item.$ref.replace(refPath, ""); + return currentNetwork.data.components[componentType][ref]; + } + return null; + }) + .filter(Boolean) || [] + ); }; - const currentMethod = currentNetwork.data.methods?.find(met => met.name === method); + const currentMethod = currentNetwork.data.methods?.find( + (met) => met.name === method + ); if (!currentMethod) return null; - const errors = findReferencedItem(currentMethod.errors, "#/components/errors/", "errors"); - const tags = findReferencedItem(currentMethod.tags, "#/components/tags/", "tags"); + const errors = findReferencedItem( + currentMethod.errors, + "#/components/errors/", + "errors" + ); + const tags = findReferencedItem( + currentMethod.tags, + "#/components/tags/", + "tags" + ); return { description: currentMethod.summary || currentMethod.description || null, @@ -89,44 +109,54 @@ export default function ParserOpenRPC({ network, method }: ParserProps) { const [selectedWallet, setSelectedWallet] = useState(0); const providers = useSyncProviders(); - const handleConnect = (i:number) => { + const handleConnect = (i: number) => { setSelectedWallet(i); - } + }; const metamaskProviders = useMemo(() => { - const isMetamasks = providers.filter(pr => pr?.info?.name?.includes("MetaMask")); + const isMetamasks = providers.filter((pr) => + pr?.info?.name?.includes("MetaMask") + ); if (isMetamasks.length > 1) { - const indexWallet = isMetamasks.findIndex(item => item.info.name === "MetaMask"); + const indexWallet = isMetamasks.findIndex( + (item) => item.info.name === "MetaMask" + ); setSelectedWallet(indexWallet); } return isMetamasks; }, [providers]); const onParamsChangeHandle = (data) => { - if (typeof data !== 'object' || data === null || Object.keys(data).length === 0) { + if ( + typeof data !== "object" || + data === null || + Object.keys(data).length === 0 + ) { setParamsData([]); } setParamsData(Object.values(data)); trackInputChangeForSegment({ eventName: "Request Configuration Started", - userExperience: "B" - }) - } + userExperience: "B", + }); + }; const onSubmitRequestHandle = async () => { - if (metamaskProviders.length === 0) return + if (metamaskProviders.length === 0) return; try { - const response = await metamaskProviders[selectedWallet].provider.request({ - method: method, - params: paramsData - }) + const response = await metamaskProviders[selectedWallet].provider.request( + { + method: method, + params: paramsData, + } + ); setReqResult(response); trackClickForSegment({ eventName: "Request Sent", clickType: "Request Sent", userExperience: "B", - ...(response?.code && { responseStatus: response.code }) - }) + ...(response?.code && { responseStatus: response.code }), + }); } catch (e) { setReqResult(e); } @@ -136,16 +166,21 @@ export default function ParserOpenRPC({ network, method }: ParserProps) { setIsComplexTypeView(false); setIsDrawerContentFixed(false); setDrawerLabel(null); - } + }; const onModalClose = () => { closeModal(); closeComplexTypeView(); - } + }; return (
      @@ -162,18 +197,29 @@ export default function ParserOpenRPC({ network, method }: ParserProps) {
      Editing Param - : - "Customize request"} + ) : ( + "Customize request" + ) + } isOpen={isModalOpen} onClose={onModalClose} isContentFixed={isDrawerContentFixed} @@ -210,4 +256,4 @@ export default function ParserOpenRPC({ network, method }: ParserProps) {
      ); -} \ No newline at end of file +} diff --git a/src/components/ParserOpenRPC/interfaces.ts b/src/components/ParserOpenRPC/interfaces.ts index a2452623273..9c63a5c7881 100644 --- a/src/components/ParserOpenRPC/interfaces.ts +++ b/src/components/ParserOpenRPC/interfaces.ts @@ -53,4 +53,4 @@ export interface MethodExample { name: string; params: MethodExampleParam[]; result: MethodExampleResult; -} \ No newline at end of file +} diff --git a/src/components/Pill/index.tsx b/src/components/Pill/index.tsx index d82b6298975..16412ce180e 100644 --- a/src/components/Pill/index.tsx +++ b/src/components/Pill/index.tsx @@ -4,14 +4,15 @@ import styles from "./styles.module.css"; const colors = new Set(["green", "red", "yellow", "blue"]); - type PillProps = PropsWithChildren<{ color: "green" | "red" | "yellow" | "blue"; }>; export default function Pill({ color, children }: PillProps) { if (!colors.has(color)) { - throw new Error(`Invalid color: ${color}. Available colors are: ${Array.from(colors).join(", ")}`); + throw new Error( + `Invalid color: ${color}. Available colors are: ${Array.from(colors).join(", ")}` + ); } return ( diff --git a/src/components/Pill/styles.module.css b/src/components/Pill/styles.module.css index 032039eafb7..e674b801670 100644 --- a/src/components/Pill/styles.module.css +++ b/src/components/Pill/styles.module.css @@ -21,4 +21,4 @@ .pill--yellow { color: var(--brand-colors-yellow-yellow700); background: var(--brand-colors-yellow-yellow300); -} \ No newline at end of file +} diff --git a/src/components/Sections/SectionAPIs.jsx b/src/components/Sections/SectionAPIs.jsx index 82869c4b937..d0aa79fe1ae 100644 --- a/src/components/Sections/SectionAPIs.jsx +++ b/src/components/Sections/SectionAPIs.jsx @@ -1,13 +1,15 @@ import React from "react"; import { API_LINKS } from "@site/src/lib/data"; import Link from "@docusaurus/Link"; -import Heading from '@theme/Heading' +import Heading from "@theme/Heading"; const SectionAPIs = () => { return (
      - Blockchain APIs + + Blockchain APIs +
        {API_LINKS.blockchain.map((item) => (
      • @@ -17,7 +19,9 @@ const SectionAPIs = () => {
      - Decentralize storage APIs + + Decentralize storage APIs +
        {API_LINKS.storage.map((item) => (
      • @@ -30,4 +34,4 @@ const SectionAPIs = () => { ); }; -export default SectionAPIs; \ No newline at end of file +export default SectionAPIs; diff --git a/src/components/Sections/SectionNetworks.jsx b/src/components/Sections/SectionNetworks.jsx index 52f50304d42..9c518b38d08 100644 --- a/src/components/Sections/SectionNetworks.jsx +++ b/src/components/Sections/SectionNetworks.jsx @@ -31,12 +31,13 @@ const SectionNetworks = () => { ? index === 4 ? "opacity-30" : index === 3 - ? "opacity-60" - : "" + ? "opacity-60" + : "" : "" }`} key={name} - to={href}> + to={href} + >
        {`${name}
        @@ -56,7 +57,7 @@ const SectionNetworks = () => { ? index <= 4 || !isNetworksListCollapsed ? renderNetworkCard(item, index) : null - : renderNetworkCard(item, index), + : renderNetworkCard(item, index) )}
      {isMobile && ( @@ -71,4 +72,4 @@ const SectionNetworks = () => { ); }; -export default SectionNetworks; \ No newline at end of file +export default SectionNetworks; diff --git a/src/components/SnapsSection.tsx b/src/components/SnapsSection.tsx new file mode 100644 index 00000000000..17ae956fac9 --- /dev/null +++ b/src/components/SnapsSection.tsx @@ -0,0 +1,54 @@ +import React from "react"; +import Card, { type CardItem } from "@site/src/components/Card"; + +const CardList: CardItem[] = [ + { + title: "🏁 Snaps quickstart", + link: "/snaps/get-started/quickstart", + description: ( + <> + Get started quickly by creating and customizing a simple Snap, using the + Snaps template built with React and TypeScript. + + ), + }, + { + title: "⚙️ Snaps tutorials", + link: "/snaps/learn/tutorials", + description: ( + <> + Follow the step-by-step tutorials to create Snaps that estimate gas + fees, provide transaction insights with custom UI, and more. + + ), + }, + { + title: "🌐 Snaps API", + link: "/snaps/reference/snaps-api", + description: ( + <> + Use the Snaps API to modify the functionality of MetaMask and + communicate between dapps and Snaps. + + ), + }, +]; + +export default function SnapsSection(): JSX.Element { + return ( +
      +

      Extend the functionality of MetaMask using Snaps

      +

      + A Snap is a JavaScript program run in an isolated environment that + customizes the MetaMask wallet experience. You can create a Snap that + adds new API methods, adds support for different blockchain protocols, + or modifies existing functionalities. +

      +
      + {CardList.map((props, idx) => ( + + ))} +
      +
      + ); +} diff --git a/src/components/WalletSection.tsx b/src/components/WalletSection.tsx new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/components/YoutubeEmbed.module.css b/src/components/YoutubeEmbed.module.css index 7fcb2ebbc65..6d3a8712288 100644 --- a/src/components/YoutubeEmbed.module.css +++ b/src/components/YoutubeEmbed.module.css @@ -11,4 +11,4 @@ width: 100%; height: 100%; border-radius: 8px; -} \ No newline at end of file +} diff --git a/src/components/YoutubeEmbed.tsx b/src/components/YoutubeEmbed.tsx index 9cb11dc6ba9..15715101346 100644 --- a/src/components/YoutubeEmbed.tsx +++ b/src/components/YoutubeEmbed.tsx @@ -1,16 +1,16 @@ import React from "react"; -import styles from "./YoutubeEmbed.module.css"; +import styles from "./YoutubeEmbed.module.css"; interface YoutubeEmbedProps { - url: string; + url: string; } const YoutubeEmbed: React.FC = ({ url }) => { return ( -
      { - } - +
      + {" "} + {} +
      ); }; diff --git a/src/css/custom.css b/src/css/custom.css index e38636458df..ed7f5313ae8 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -37,7 +37,7 @@ --mm-flask-border-color: hsl(280, 45%, 45%); } -[data-theme='light'] .DocSearch { +[data-theme="light"] .DocSearch { /* --docsearch-primary-color: var(--ifm-color-primary); */ /* --docsearch-text-color: var(--ifm-font-color-base); */ --docsearch-muted-color: var(--ifm-color-secondary-darkest); @@ -55,7 +55,7 @@ --docsearch-footer-background: var(--ifm-color-white); } -[data-theme='dark'] .DocSearch { +[data-theme="dark"] .DocSearch { --docsearch-text-color: var(--ifm-font-color-base); --docsearch-muted-color: var(--ifm-color-secondary-darkest); --docsearch-container-background: rgba(47, 55, 69, 0.7); @@ -97,11 +97,13 @@ h4 { font-weight: 500; } -.navbar__brand:hover, .navbar__brand:active { +.navbar__brand:hover, +.navbar__brand:active { color: var(--ifm-navbar-link-color); } -[data-theme="dark"] .navbar__brand:hover, .navbar__brand:active { +[data-theme="dark"] .navbar__brand:hover, +.navbar__brand:active { color: var(--ifm-navbar-link-color); } @@ -150,8 +152,10 @@ svg { background-color: unset; cursor: pointer; padding: 0; - transition: color var(--ifm-transition-fast) var(--ifm-transition-timing-default); - font: var(--ifm-font-size-base) / var(--ifm-line-height-base) var(--ifm-font-family-base); + transition: color var(--ifm-transition-fast) + var(--ifm-transition-timing-default); + font: var(--ifm-font-size-base) / var(--ifm-line-height-base) + var(--ifm-font-family-base); line-height: 2; } @@ -165,13 +169,13 @@ svg { } p > .ReactPlayer { - border-radius: 3px; - overflow: hidden; + border-radius: 3px; + overflow: hidden; } p > video { border-radius: 8px; - overflow: hidden; + overflow: hidden; } .menu__link { @@ -262,11 +266,11 @@ code { } html[data-theme="light"] .api-card { - border-color: #E5E5E5; + border-color: #e5e5e5; } html[data-theme="light"] .api-card .logo-wrap { - background-color: #F1F1F1; + background-color: #f1f1f1; } html[data-theme="light"] .api-card:hover { @@ -274,11 +278,11 @@ html[data-theme="light"] .api-card:hover { } .w-lg-50 { - width: 50% + width: 50%; } .w-lg-25 { - width: 25% + width: 25%; } .opacity-30 { @@ -316,8 +320,8 @@ button:hover { background-color: rgba(20, 22, 24, 1); } -[data-theme="light"] .tippy-popper[x-placement^=top] [x-arrow] { - border-top-color: rgba(20, 22, 24, 1); +[data-theme="light"] .tippy-popper[x-placement^="top"] [x-arrow] { + border-top-color: rgba(20, 22, 24, 1); } [data-theme="light"] .tippy-popper[x-placement^=bottom] [x-arrow] { @@ -329,7 +333,7 @@ button:hover { color: rgba(20, 22, 24, 1); } -[data-theme="dark"] .tippy-popper[x-placement^=top] [x-arrow] { +[data-theme="dark"] .tippy-popper[x-placement^="top"] [x-arrow] { border-top-color: rgba(255, 255, 255, 1); } diff --git a/src/hooks/store.ts b/src/hooks/store.ts index 2556b9d107b..1c4e59f87a4 100644 --- a/src/hooks/store.ts +++ b/src/hooks/store.ts @@ -1,6 +1,6 @@ -declare global{ +declare global { interface WindowEventMap { - "eip6963:announceProvider": CustomEvent + "eip6963:announceProvider": CustomEvent; } } @@ -15,9 +15,18 @@ export interface EIP1193Provider { isStatus?: boolean; host?: string; path?: string; - sendAsync?: (request: { method: string, params?: Array }, callback: (error: Error | null, response: unknown) => void) => void; - send?: (request: { method: string, params?: Array }, callback: (error: Error | null, response: unknown) => void) => void; - request: (request: { method: string, params?: Array }) => Promise; + sendAsync?: ( + request: { method: string; params?: Array }, + callback: (error: Error | null, response: unknown) => void + ) => void; + send?: ( + request: { method: string; params?: Array }, + callback: (error: Error | null, response: unknown) => void + ) => void; + request: (request: { + method: string; + params?: Array; + }) => Promise; } export interface EIP6963ProviderDetail { @@ -29,21 +38,23 @@ type EIP6963AnnounceProviderEvent = { detail: { info: EIP6963ProviderInfo; provider: EIP1193Provider; - } -} + }; +}; -let providers: EIP6963ProviderDetail[] = [] +let providers: EIP6963ProviderDetail[] = []; export const store = { - value: ()=> providers, - subscribe: (callback: ()=> void) => { - function onAnnouncement(event: EIP6963AnnounceProviderEvent){ - if(providers.map(p => p.info.uuid).includes(event.detail.info.uuid)) return - providers = [...providers, event.detail] - callback() + value: () => providers, + subscribe: (callback: () => void) => { + function onAnnouncement(event: EIP6963AnnounceProviderEvent) { + if (providers.map((p) => p.info.uuid).includes(event.detail.info.uuid)) + return; + providers = [...providers, event.detail]; + callback(); } window.addEventListener("eip6963:announceProvider", onAnnouncement); window.dispatchEvent(new Event("eip6963:requestProvider")); - return () => window.removeEventListener("eip6963:announceProvider", onAnnouncement) - } -} \ No newline at end of file + return () => + window.removeEventListener("eip6963:announceProvider", onAnnouncement); + }, +}; diff --git a/src/hooks/useSyncProviders.ts b/src/hooks/useSyncProviders.ts index b9db3eff98f..d3493d5543b 100644 --- a/src/hooks/useSyncProviders.ts +++ b/src/hooks/useSyncProviders.ts @@ -1,4 +1,5 @@ import { useSyncExternalStore } from "react"; import { store } from "./store"; -export const useSyncProviders = ()=> useSyncExternalStore(store.subscribe, store.value, store.value) \ No newline at end of file +export const useSyncProviders = () => + useSyncExternalStore(store.subscribe, store.value, store.value); diff --git a/src/hooks/useUser.js b/src/hooks/useUser.js index 1dc80ce3c36..c205f2ce4c7 100644 --- a/src/hooks/useUser.js +++ b/src/hooks/useUser.js @@ -13,7 +13,10 @@ export default function useUser() { if (response?.data) { setUser(response.data); const userId = response.data.id; - const upData = await fetch(`${API_URL}/api/v1/users/${userId}/projects`, GET_OPTIONS); + const upData = await fetch( + `${API_URL}/api/v1/users/${userId}/projects`, + GET_OPTIONS + ); if (upData.ok) { const upProjects = await upData.json(); const keysArr = upProjects?.result?.projects; @@ -29,16 +32,16 @@ export default function useUser() { if (response?.error) { setUser(undefined); setKeys([]); - } + } } catch (e) { setUser(undefined); setKeys([]); } finally { setLoading(false); } - } + }; useEffect(() => { - getUserInfo() + getUserInfo(); }, []); return { user, diff --git a/src/lib/constants.js b/src/lib/constants.js index 0a7fe4eabd0..3b0319a7c76 100644 --- a/src/lib/constants.js +++ b/src/lib/constants.js @@ -357,10 +357,7 @@ export const NETWORKS_NAMES = [ label: "Ethereum", value: NETWORKS.ETHEREUM, complexEndpoint: false, - networksTypes: [ - NETWORKS_TYPES.mainnet, - NETWORKS_TYPES.sepolia, - ], + networksTypes: [NETWORKS_TYPES.mainnet, NETWORKS_TYPES.sepolia], }, { label: "Linea", @@ -451,4 +448,4 @@ export const GET_OPTIONS = { mode: "cors", cache: "no-cache", headers: NO_CACHE, -} +}; diff --git a/src/lib/segmentAnalytics.js b/src/lib/segmentAnalytics.js index fc47a9323e9..1a02339bd56 100644 --- a/src/lib/segmentAnalytics.js +++ b/src/lib/segmentAnalytics.js @@ -1,12 +1,8 @@ -export const trackPageViewForSegment = ({ - name, - path, - userExperience -}) => { +export const trackPageViewForSegment = ({ name, path, userExperience }) => { if (window.analytics) { window.analytics.page("Page viewed", name, { ...(path && { path: path }), - ...(userExperience && { user_experience: userExperience }) + ...(userExperience && { user_experience: userExperience }), }); } }; @@ -36,10 +32,10 @@ export const trackInputChangeForSegment = ({ timestamp, }) => { if (window.analytics) { - window.analytics.track(`Input changed`, { + window.analytics.track("Input changed", { ...(eventName && { event_name: eventName }), ...(userExperience && { user_experience: userExperience }), ...(timestamp && { timestamp: timestamp }), }); } -}; \ No newline at end of file +}; diff --git a/src/pages/index.module.css b/src/pages/index.module.css index 4ad03f86dbf..10887ff1ed7 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -29,12 +29,12 @@ html[data-theme="dark"] .forceColor { } .homepageButton { - background-color: #1098FC; + background-color: #1098fc; border-radius: 0.3rem; } .homepageButton:hover { - background-color: #43AEFC; + background-color: #43aefc; } .devBannerButton { @@ -46,16 +46,16 @@ html[data-theme="dark"] .forceColor { .devBannerButton:hover { background-color: #1c1e21; - color: #FFF; + color: #fff; } html[data-theme="dark"] .devBannerButton { - border-color: #FFF; + border-color: #fff; border-width: 1px; } html[data-theme="dark"] .devBannerButton:hover { - background-color: #FFF; + background-color: #fff; color: #1c1e21; } diff --git a/src/pages/index.tsx b/src/pages/index.tsx index cec632cbd8b..18fa0f2b055 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -14,10 +14,16 @@ function HomepageHeader() {

      {siteConfig.title}

      -

      - Integrate with and extend upon the world's leading self-custodial crypto wallet. +

      + Integrate with and extend upon the world's leading self-custodial + crypto wallet.

      - + Get started
      @@ -29,15 +35,45 @@ function DevBanner() { return (
      -

      +

      {"Contribute to MetaMask"}

      -

      - Join the MetaMask developer community and learn how to contribute to the MetaMask project itself. +

      + Join the MetaMask developer community and learn how to contribute to + the MetaMask project itself.

      - + Contribute  - +
      @@ -46,8 +82,7 @@ function DevBanner() { export default function Home(): JSX.Element { return ( - +
      diff --git a/src/plugins/launchdarkly/index.ts b/src/plugins/launchdarkly/index.ts index f3e424e81e6..6cf02f5dd13 100644 --- a/src/plugins/launchdarkly/index.ts +++ b/src/plugins/launchdarkly/index.ts @@ -18,4 +18,4 @@ const LDPlugin = () => { }; }; -export default LDPlugin \ No newline at end of file +export default LDPlugin; diff --git a/src/plugins/launchdarkly/ldClient.ts b/src/plugins/launchdarkly/ldClient.ts index 502fd39bf8f..7f40e4b2eec 100644 --- a/src/plugins/launchdarkly/ldClient.ts +++ b/src/plugins/launchdarkly/ldClient.ts @@ -2,7 +2,6 @@ import { initialize } from "launchdarkly-js-client-sdk"; import ExecutionEnvironment from "@docusaurus/ExecutionEnvironment"; import siteConfig from "@generated/docusaurus.config"; - export default (function () { if (!ExecutionEnvironment.canUseDOM) { return null; @@ -15,7 +14,7 @@ export default (function () { anonymous: true, key: "ld-anonymous-user-key", }; - + const ldClient = initialize(LD_CLIENT_ID as string, context, { allAttributesPrivate: true, bootstrap: "localStorage", @@ -23,7 +22,7 @@ export default (function () { ldClient.on("ready", () => { console.log("LaunchDarkly client ready"); - }); + }); return ldClient; })(); diff --git a/src/plugins/plugin-json-rpc.ts b/src/plugins/plugin-json-rpc.ts index d8ef1e415b3..2cb8574fab2 100644 --- a/src/plugins/plugin-json-rpc.ts +++ b/src/plugins/plugin-json-rpc.ts @@ -14,7 +14,9 @@ async function fetchData(url: string, name: string): Promise { } } -async function fetchMultipleData(requests: {url: string; name: string}[]): Promise { +async function fetchMultipleData( + requests: { url: string; name: string }[] +): Promise { const promises = requests.map(({ url, name }) => fetchData(url, name)); const responses = await Promise.all(promises); return responses; @@ -24,12 +26,18 @@ const RPC_NETWORK_URL = "https://sot-network-methods.vercel.app/specs"; export enum NETWORK_NAMES { linea = "linea", - metamask = "metamask" + metamask = "metamask", } const requests = [ - { url: `${RPC_NETWORK_URL}/${NETWORK_NAMES.linea}`, name: NETWORK_NAMES.linea }, - { url: "https://metamask.github.io/api-specs/0.9.3/openrpc.json", name: NETWORK_NAMES.metamask }, + { + url: `${RPC_NETWORK_URL}/${NETWORK_NAMES.linea}`, + name: NETWORK_NAMES.linea, + }, + { + url: "https://metamask.github.io/api-specs/0.9.3/openrpc.json", + name: NETWORK_NAMES.metamask, + }, ]; export default function useNetworksMethodPlugin() { @@ -38,7 +46,7 @@ export default function useNetworksMethodPlugin() { async contentLoaded({ actions }) { const { setGlobalData } = actions; await fetchMultipleData(requests) - .then(responseArray => { + .then((responseArray) => { setGlobalData({ netData: responseArray }); }) .catch(() => { @@ -46,4 +54,4 @@ export default function useNetworksMethodPlugin() { }); }, }; -} \ No newline at end of file +} diff --git a/src/theme/Admonition/index.tsx b/src/theme/Admonition/index.tsx index 4f7ebbd85fc..71a4255cde9 100644 --- a/src/theme/Admonition/index.tsx +++ b/src/theme/Admonition/index.tsx @@ -8,7 +8,7 @@ import "./index.css"; type AdmonitionProps = Omit & { type: AdmonitionPropsRaw["type"] | "flaskOnly"; -} +}; declare function AdmonitionComponent(props: AdmonitionProps): JSX.Element; @@ -17,12 +17,12 @@ type Props = WrapperProps; export default function AdmonitionWrapper(props: Props): JSX.Element { if (props.type === "flaskOnly") { return ( - } - title="Flask Only" - > - This feature is experimental and only available in MetaMask Flask, the canary distribution of MetaMask. + } title="Flask Only"> + This feature is experimental and only available in{" "} + + MetaMask Flask + + , the canary distribution of MetaMask. ); } diff --git a/src/theme/DocCard/index.tsx b/src/theme/DocCard/index.tsx index 2eca88a9af2..37791c5337d 100644 --- a/src/theme/DocCard/index.tsx +++ b/src/theme/DocCard/index.tsx @@ -1,7 +1,10 @@ import React, { type ReactNode } from "react"; import clsx from "clsx"; import Link from "@docusaurus/Link"; -import { useDocById, findFirstSidebarItemLink } from "@docusaurus/theme-common/internal"; +import { + useDocById, + findFirstSidebarItemLink, +} from "@docusaurus/theme-common/internal"; import isInternalUrl from "@docusaurus/isInternalUrl"; import { translate } from "@docusaurus/Translate"; import type { Props } from "@theme/DocCard"; @@ -10,7 +13,6 @@ import cardListItemStyles from "@site/src/components/CardList/CardListItem/style import styles from "./styles.module.css"; - import type { PropSidebarItemCategory, PropSidebarItemLink, @@ -28,13 +30,9 @@ function CardContainer({ return ( {children} @@ -62,7 +60,8 @@ function CardLayout({ {description && (

      + title={description} + > {description}

      )} @@ -97,14 +96,14 @@ function CardCategory({ description: "The default description for a category card in the generated index about how many items this category includes", }, - { count: item.items.length }, + { count: item.items.length } ) } /> ); } -function CardLink({ item }: {item: PropSidebarItemLink}): JSX.Element { +function CardLink({ item }: { item: PropSidebarItemLink }): JSX.Element { const icon = isInternalUrl(item.href) ? "📄️" : "🔗"; const doc = useDocById(item.docId ?? undefined); return ( @@ -120,11 +119,11 @@ function CardLink({ item }: {item: PropSidebarItemLink}): JSX.Element { export default function DocCard({ item }: Props): JSX.Element { switch (item.type) { - case "link": - return ; - case "category": - return ; - default: - throw new Error(`unknown item type ${JSON.stringify(item)}`); + case "link": + return ; + case "category": + return ; + default: + throw new Error(`unknown item type ${JSON.stringify(item)}`); } } diff --git a/src/theme/DocItem/Footer/index.jsx b/src/theme/DocItem/Footer/index.jsx index e36894d137c..ea8e638cd16 100644 --- a/src/theme/DocItem/Footer/index.jsx +++ b/src/theme/DocItem/Footer/index.jsx @@ -38,7 +38,8 @@ export default function DocItemFooter() { } return (
      + className={clsx(ThemeClassNames.docs.docFooter, "docusaurus-mt-lg")} + > {canDisplayEditMetaRow && ( + "row margin-bottom--sm" + )} + >
      @@ -27,8 +28,9 @@ export default function DocItemTags() { className={clsx( ThemeClassNames.docs.docFooter, "docusaurus-mt-lg", - "margin-top--sm", - )}> + "margin-top--sm" + )} + > {canDisplayTagsRow && }
      ); diff --git a/src/theme/DocPaginator/index.js b/src/theme/DocPaginator/index.js index 56ba8a99723..1b272cf6808 100644 --- a/src/theme/DocPaginator/index.js +++ b/src/theme/DocPaginator/index.js @@ -1,7 +1,5 @@ - function DocPaginator() { return null; } export default DocPaginator; - diff --git a/src/theme/DocSidebarItem/index.module.css b/src/theme/DocSidebarItem/index.module.css index 83f7bc1e7fc..7f839d545e3 100644 --- a/src/theme/DocSidebarItem/index.module.css +++ b/src/theme/DocSidebarItem/index.module.css @@ -1,5 +1,7 @@ .flaskOnly > :global(a.menu__link::after), -.flaskOnly > :global(.menu__list-item-collapsible) > :global(a.menu__link::after) { +.flaskOnly + > :global(.menu__list-item-collapsible) + > :global(a.menu__link::after) { content: "Flask"; margin-left: 0.5em; background-color: var(--mm-flask-background-color); diff --git a/src/theme/DocSidebarItem/index.tsx b/src/theme/DocSidebarItem/index.tsx index 9dd1e52def2..83316893636 100644 --- a/src/theme/DocSidebarItem/index.tsx +++ b/src/theme/DocSidebarItem/index.tsx @@ -18,12 +18,9 @@ export default function DocSidebarItemWrapper(props: Props): JSX.Element { {...props} item={{ ...itemProps, - className: clsx( - className, - { - [styles.flaskOnly]: itemProps.customProps?.flask_only, - }, - ), + className: clsx(className, { + [styles.flaskOnly]: itemProps.customProps?.flask_only, + }), }} /> diff --git a/src/theme/Layout/index.tsx b/src/theme/Layout/index.tsx index 10714da4a0c..e2e1d196728 100644 --- a/src/theme/Layout/index.tsx +++ b/src/theme/Layout/index.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useMemo } from "react"; -import BrowserOnly from '@docusaurus/BrowserOnly'; +import BrowserOnly from "@docusaurus/BrowserOnly"; import { usePluginData } from "@docusaurus/useGlobalData"; import ldClient from "launchdarkly"; import { useLocation } from "@docusaurus/router"; @@ -13,23 +13,31 @@ const REF_PATH = "/wallet/reference/"; const EXEPT_METHODS = [ "wallet_requestPermissions", "wallet_revokePermissions", - "eth_signTypedData_v4" + "eth_signTypedData_v4", ]; export default function LayoutWrapper({ children }) { const location = useLocation(); - const { netData } = usePluginData("plugin-json-rpc") as { netData?: ResponseItem[] }; + const { netData } = usePluginData("plugin-json-rpc") as { + netData?: ResponseItem[]; + }; const [ldReady, setLdReady] = useState(false); const [newReferenceEnabled, setNewReferenceEnabled] = useState(false); - const metamaskNetwork = netData?.find(net => net.name === NETWORK_NAMES.metamask); - const metamaskMethods = metamaskNetwork?.data?.methods?.map((item) => item.name) || []; + const metamaskNetwork = netData?.find( + (net) => net.name === NETWORK_NAMES.metamask + ); + const metamaskMethods = + metamaskNetwork?.data?.methods?.map((item) => item.name) || []; const referencePageName = useMemo(() => { const currentPath = location.pathname; if (currentPath.includes(REF_PATH) && metamaskMethods.length > 0) { const methodPath = currentPath.replace(REF_PATH, "").replace("/", ""); - const page = metamaskMethods.find(name => name.toLowerCase() === methodPath && !EXEPT_METHODS.includes(name)); + const page = metamaskMethods.find( + (name) => + name.toLowerCase() === methodPath && !EXEPT_METHODS.includes(name) + ); return page; } return false; @@ -51,30 +59,31 @@ export default function LayoutWrapper({ children }) { return ( - { - () => { - return ( - <> - {newReferenceEnabled && ldReady && referencePageName ? ( - -
      - {children?.props?.children[0]?.type === "aside" && ( - <>{children.props.children[0]} - )} -
      -
      - -
      + {() => { + return ( + <> + {newReferenceEnabled && ldReady && referencePageName ? ( + +
      + {children?.props?.children[0]?.type === "aside" && ( + <>{children.props.children[0]} + )} +
      +
      +
      - - ) : ( - {children} - )} - - ) - } - } +
      +
      + ) : ( + {children} + )} + + ); + }} ); } diff --git a/src/theme/MDXComponents.tsx b/src/theme/MDXComponents.tsx index 54f2fa20829..dc8f8efd564 100644 --- a/src/theme/MDXComponents.tsx +++ b/src/theme/MDXComponents.tsx @@ -2,9 +2,8 @@ import Pill from "@site/src/components/Pill"; import MDXComponents from "@theme-original/MDXComponents"; - export default { // Re-use the default mapping ...MDXComponents, Pill, -}; \ No newline at end of file +}; diff --git a/static/js/getfeedback.js b/static/js/getfeedback.js index 5b0d6a9849b..0db90a5597e 100644 --- a/static/js/getfeedback.js +++ b/static/js/getfeedback.js @@ -46,7 +46,7 @@ window.usabilla || "", - ].join(""), + ].join("") ); l.close(); } catch (m) { diff --git a/tsconfig.json b/tsconfig.json index 60773147be6..16408830682 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,13 +4,11 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "launchdarkly": ["./node_modules/launchdarkly-js-client-sdk/dist/ldclient.es.js"] + "launchdarkly": [ + "./node_modules/launchdarkly-js-client-sdk/dist/ldclient.es.js" + ] } }, - "include": [ - "./**/*" - ], - "exclude": [ - "node_modules" - ], + "include": ["./**/*"], + "exclude": ["node_modules"] } diff --git a/vercel.json b/vercel.json index 2d6684b8aaf..3a4b3624c0d 100644 --- a/vercel.json +++ b/vercel.json @@ -475,4 +475,4 @@ "destination": "/snaps/reference/entry-points" } ] -} \ No newline at end of file +} diff --git a/wallet/concepts/sdk/android.md b/wallet/concepts/sdk/android.md index d6ed5282fb9..022adbd8e90 100644 --- a/wallet/concepts/sdk/android.md +++ b/wallet/concepts/sdk/android.md @@ -13,10 +13,11 @@ The [architecture](#architecture) and [connection flow](#connection-flow) of the Android SDK differs from the other SDK platforms. :::tip Get started + - Get started by [setting up the SDK in your Android dapp](../../how-to/use-sdk/mobile/android.md). - See the [example Android dapp](https://github.com/MetaMask/metamask-android-sdk/tree/main/app) in the Android SDK GitHub repository for advanced use cases. -::: + ::: ## Architecture @@ -52,8 +53,7 @@ The following diagram outlines the communication flow between the Android client The flow is as follows: 1. The dapp, with the SDK installed, initiates communication when a user connects to MetaMask. - The dapp deeplinks to MetaMask, and MetaMask sets up the Android Native Module to receive client requests. + The dapp deeplinks to MetaMask, and MetaMask sets up the Android Native Module to receive client requests. 2. The dapp generates an ECIES public/private key pair. - The dapp and MetaMask exchange public keys over IPC. + The dapp and MetaMask exchange public keys over IPC. 3. The dapp and MetaMask perform end-to-end encrypted JSON-RPC calls. - diff --git a/wallet/concepts/sdk/connections.md b/wallet/concepts/sdk/connections.md index efc5a59c2ba..5367e5faac0 100644 --- a/wallet/concepts/sdk/connections.md +++ b/wallet/concepts/sdk/connections.md @@ -40,17 +40,16 @@ The path first depends on whether the dapp is on a desktop or mobile platform: - If the dapp is on a desktop platform (for example, a desktop web dapp), the dapp shows a modal asking the user to select if they want to connect to MetaMask using the browser extension or MetaMask Mobile. - + - If the user selects extension: - If the extension is not installed, the user is taken to the Chrome extension store to - install it. + install it. - If the extension is installed, the user connects to their MetaMask extension. - - If the user selects MetaMask Mobile: - If MetaMask Mobile is not installed, the user is taken to the app store to install it. - If MetaMask Mobile is installed, [an encrypted connection from the dapp to MetaMask Mobile](#metamask-mobile-connection) is established. - + :::note The choice between the extension and MetaMask Mobile persists until the user or dapp disconnects. At that point, the dapp displays the modal again. @@ -104,11 +103,11 @@ The flow is as follows: 1. The dapp generates a UUID v4 ([Socket.io](https://socket.io/) room ID) and ECIES key pair. 2. The dapp connects to the Socket.io server using the room ID. 3. The dapp sends a deeplink to MetaMask Mobile (either directly, if on mobile, or through a QR - code, if on desktop) containing its ECIES public key and the Socket.io room ID. + code, if on desktop) containing its ECIES public key and the Socket.io room ID. 4. MetaMask Mobile opens the QR code or deeplink and connects to the Socket.io server using the room ID. 5. MetaMask Mobile generates an ECIES key pair. 6. MetaMask Mobile sends its ECIES public key to the dapp using the Socket.io channel, and the two - parties generate a shared secret. + parties generate a shared secret. 7. The dapp and MetaMask Mobile establish an encrypted connection to send JSON-RPC API methods. :::note diff --git a/wallet/concepts/sdk/index.md b/wallet/concepts/sdk/index.md index c09bd303bdc..4222d2fcba0 100644 --- a/wallet/concepts/sdk/index.md +++ b/wallet/concepts/sdk/index.md @@ -8,8 +8,8 @@ tags: - Unity SDK --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # About MetaMask SDK @@ -33,15 +33,15 @@ MetaMask using the SDK. Most of these features are not available if you only integrate your dapp directly using the [Wallet API](../wallet-api.md). -| Feature | Wallet API only | MetaMask SDK | -|-----------------------------------------------------------------------------------------------|:---------------:|:------------:| -| Connect from a web dapp to the MetaMask extension | ✅ | ✅ | -| Connect from a web dapp to MetaMask Mobile | ❌ | ✅ | -| Connect from desktop, mobile, and gaming dapps to MetaMask Mobile | ❌ | ✅ | -| Use custom RPC methods such as [`connectAndSign`](../../how-to/use-sdk/javascript/connect-and-sign.md) | ❌ | ✅ | -| [Display custom modals](../../how-to/use-sdk/javascript/display-custom-modals.md) in MetaMask | ❌ | ✅ | -| [Make read-only requests](../../how-to/use-sdk/javascript/make-read-only-requests.md) using the Infura API | ❌ | ✅ | -| [Batch multiple RPC requests](../../how-to/use-sdk/javascript/batch-json-rpc-requests.md) | ❌ | ✅ | +| Feature | Wallet API only | MetaMask SDK | +| ---------------------------------------------------------------------------------------------------------- | :-------------: | :----------: | +| Connect from a web dapp to the MetaMask extension | ✅ | ✅ | +| Connect from a web dapp to MetaMask Mobile | ❌ | ✅ | +| Connect from desktop, mobile, and gaming dapps to MetaMask Mobile | ❌ | ✅ | +| Use custom RPC methods such as [`connectAndSign`](../../how-to/use-sdk/javascript/connect-and-sign.md) | ❌ | ✅ | +| [Display custom modals](../../how-to/use-sdk/javascript/display-custom-modals.md) in MetaMask | ❌ | ✅ | +| [Make read-only requests](../../how-to/use-sdk/javascript/make-read-only-requests.md) using the Infura API | ❌ | ✅ | +| [Batch multiple RPC requests](../../how-to/use-sdk/javascript/batch-json-rpc-requests.md) | ❌ | ✅ | ## User experience @@ -61,10 +61,11 @@ to MetaMask Mobile using a QR code.

      :::tip Get started + - Get started by [setting up the SDK in your web dapp](../../how-to/use-sdk/javascript/index.md). - See the [example JavaScript dapps](https://github.com/MetaMask/metamask-sdk/tree/main/packages/examples) in the JavaScript SDK GitHub repository for advanced use cases. -::: + ::: @@ -81,10 +82,11 @@ This happens for all actions that need user approval.

      :::tip Get started + - Get started by [setting up the SDK in your web dapp](../../how-to/use-sdk/javascript/index.md). - See the [example JavaScript dapps](https://github.com/MetaMask/metamask-sdk/tree/main/packages/examples) in the JavaScript SDK GitHub repository for advanced use cases. -::: + :::
      @@ -101,10 +103,11 @@ This happens for all actions that need user approval.

      :::tip Get started + - Get started by [setting up the SDK in your iOS dapp](../../how-to/use-sdk/mobile/ios.md). - See the [example iOS dapp](https://github.com/MetaMask/metamask-ios-sdk) in the iOS SDK GitHub repository for advanced use cases. -::: + :::
      @@ -121,10 +124,11 @@ This happens for all actions that need user approval.

      :::tip Get started + - Get started by [setting up the SDK in your Android dapp](../../how-to/use-sdk/mobile/android.md). - See the [example Android dapp](https://github.com/MetaMask/metamask-android-sdk/tree/main/app) in the Android SDK GitHub repository and the [Android SDK architecture](android.md) for more information. -::: + :::
      @@ -139,10 +143,11 @@ scan with their MetaMask Mobile app.

      :::tip Get started + - Get started by [setting up the SDK in your Node.js dapp](../../how-to/use-sdk/javascript/nodejs.md). - See the [example Node.js dapp](https://github.com/MetaMask/metamask-sdk/tree/main/packages/examples/nodejs) in the Node.js SDK GitHub repository for advanced use cases. -::: + :::
      @@ -158,10 +163,11 @@ It also supports deeplinking on mobile platforms, as demonstrated in the followi

      :::tip Get started + - Get started by [setting up the SDK in your Unity game](../../how-to/use-sdk/gaming/unity/index.md). - See the [Unity demo game with the SDK installed](https://assetstore.unity.com/packages/decentralization/demo-game-dragon-crasher-with-metamask-sdk-infura-and-truffle-249789) for advanced use cases. -::: + :::
      diff --git a/wallet/concepts/smart-contracts.md b/wallet/concepts/smart-contracts.md index 12b153922a7..ac431e636ef 100644 --- a/wallet/concepts/smart-contracts.md +++ b/wallet/concepts/smart-contracts.md @@ -31,7 +31,7 @@ the user to add a chain that you suggest, and switch to it using a confirmation ## Contract address Every account in Ethereum has an address, whether it's an external key-pair account or a smart contract. -For any smart contract library to communicate with your contracts, a smart contract must know the exact address. +For any smart contract library to communicate with your contracts, a smart contract must know the exact address. Read about [how to find a token contact address](https://metamask.zendesk.com/hc/en-us/articles/360059683451-How-to-view-or-add-custom-token-contract-address). diff --git a/wallet/concepts/wallet-api.md b/wallet/concepts/wallet-api.md index 396ca662d92..eb83e5f72bf 100644 --- a/wallet/concepts/wallet-api.md +++ b/wallet/concepts/wallet-api.md @@ -13,7 +13,7 @@ The API methods are documented in the following references: - [Ethereum provider API reference](../reference/provider-api.md) - [JSON-RPC API reference](/wallet/reference/json-rpc-api) -::: + ::: ## Ethereum provider API @@ -63,13 +63,13 @@ Make sure to handle errors for every call to The RPC methods are divided into the following: -- [Restricted methods](#restricted-methods) - Require user consent for actions that impact assets or data (for example, initiating a transaction). +- [Restricted methods](#restricted-methods) - Require user consent for actions that impact assets or data (for example, initiating a transaction). - [Unrestricted methods](#unrestricted-methods) - Allow dapps to perform basic actions without permission (for example, retrieving a public address). ### Restricted methods -MetaMask implements permissions based on [EIP-2255](https://eips.ethereum.org/EIPS/eip-2255) to enhance security for when users interact with dapps. -This requires that dapps obtain user consent before accessing certain features. +MetaMask implements permissions based on [EIP-2255](https://eips.ethereum.org/EIPS/eip-2255) to enhance security for when users interact with dapps. +This requires that dapps obtain user consent before accessing certain features. Under the hood, permissions are plain, JSON-compatible objects, with fields that are mostly used internally by MetaMask. @@ -79,7 +79,7 @@ Restricted methods are methods that cannot be called unless you have permission The following methods are restricted: -- [`eth_accounts`](/wallet/reference/eth_accounts) - Gaining permission requires calling `wallet_requestPermissions`. +- [`eth_accounts`](/wallet/reference/eth_accounts) - Gaining permission requires calling `wallet_requestPermissions`. Granting permission for `eth_accounts` also grants permissions for the following methods: - [`eth_sendTransaction`](/wallet/reference/eth_sendTransaction) diff --git a/wallet/concepts/wallet-interoperability.md b/wallet/concepts/wallet-interoperability.md index a4e50ca4bad..51d4781f715 100644 --- a/wallet/concepts/wallet-interoperability.md +++ b/wallet/concepts/wallet-interoperability.md @@ -11,11 +11,11 @@ mechanism to the [`window.ethereum`](wallet-api.md#ethereum-provider-api) inject This mechanism is enabled by using the standardized interfaces defined by EIP-6963. :::info Why EIP-6963? -[EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) standardizes the interface for wallet providers, +[EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) standardizes the interface for wallet providers, but it results in conflicts when users have multiple wallets installed, due to how the provider -object is injected. -This can cause issues with wallet discovery, user onboarding, and connecting. -The wallet discovery mechanism introduced by EIP-6963 solves these issues. +object is injected. +This can cause issues with wallet discovery, user onboarding, and connecting. +The wallet discovery mechanism introduced by EIP-6963 solves these issues. ::: The following is a demo of the user experience of detecting multiple wallets, showing the data @@ -62,8 +62,8 @@ interface announces an event dispatched by the wallet: ```typescript interface EIP6963AnnounceProviderEvent extends CustomEvent { - type: "eip6963:announceProvider"; - detail: EIP6963ProviderDetail; + type: "eip6963:announceProvider" + detail: EIP6963ProviderDetail } ``` @@ -72,7 +72,7 @@ interface requests an event dispatched by a dapp: ```typescript interface EIP6963RequestProviderEvent extends Event { - type: "eip6963:requestProvider"; + type: "eip6963:requestProvider" } ``` @@ -112,7 +112,7 @@ MetaMask, resolving potential conflicts that might arise with other wallet exten more stable and reliable interaction for users. The SDK is also being integrated into [Wagmi 2+](https://wagmi.sh/), which supports EIP-6963. -The SDK on its own supports connecting *only* to MetaMask via EIP-6963, so if you intend to support +The SDK on its own supports connecting _only_ to MetaMask via EIP-6963, so if you intend to support discovery of other wallets, we recommend using other methods of adding EIP-6963 support, such as Wagmi 2+. diff --git a/wallet/how-to/connect/access-accounts.md b/wallet/how-to/connect/access-accounts.md index ecacf82935e..e071a9ed516 100644 --- a/wallet/how-to/connect/access-accounts.md +++ b/wallet/how-to/connect/access-accounts.md @@ -42,12 +42,12 @@ button: // You should only attempt to request the user's account in response to user interaction, such as // selecting a button. Otherwise, you pop-up spam the user like it's 1999. If you fail to retrieve // the user's account, you should encourage the user to initiate the attempt. -const ethereumButton = document.querySelector(".enableEthereumButton"); -const showAccount = document.querySelector(".showAccount"); +const ethereumButton = document.querySelector(".enableEthereumButton") +const showAccount = document.querySelector(".showAccount") ethereumButton.addEventListener("click", () => { - getAccount(); -}); + getAccount() +}) // While awaiting the call to eth_requestAccounts, you should disable any buttons the user can // select to initiate the request. MetaMask rejects any additional requests while the first is still @@ -55,17 +55,17 @@ ethereumButton.addEventListener("click", () => { async function getAccount() { const accounts = await provider // Or window.ethereum if you don't support EIP-6963. .request({ method: "eth_requestAccounts" }) - .catch((err) => { - if (err.code === 4001) { - // EIP-1193 userRejectedRequest error. - // If this happens, the user rejected the connection request. - console.log("Please connect to MetaMask."); - } else { - console.error(err); - } - }); - const account = accounts[0]; - showAccount.innerHTML = account; + .catch((err) => { + if (err.code === 4001) { + // EIP-1193 userRejectedRequest error. + // If this happens, the user rejected the connection request. + console.log("Please connect to MetaMask.") + } else { + console.error(err) + } + }) + const account = accounts[0] + showAccount.innerHTML = account } ``` @@ -87,7 +87,7 @@ be notified when the user changes accounts. The following code handles user accounts and detects when the user changes accounts: ```javascript title="index.js" -let currentAccount = null; +let currentAccount = null provider // Or window.ethereum if you don't support EIP-6963. .request({ method: "eth_accounts" }) .then(handleAccountsChanged) @@ -95,24 +95,24 @@ provider // Or window.ethereum if you don't support EIP-6963. // Some unexpected error. // For backwards compatibility reasons, if no accounts are available, eth_accounts returns an // empty array. - console.error(err); - }); + console.error(err) + }) // Note that this event is emitted on page load. If the array of accounts is non-empty, you're // already connected. provider // Or window.ethereum if you don't support EIP-6963. - .on("accountsChanged", handleAccountsChanged); + .on("accountsChanged", handleAccountsChanged) // eth_accounts always returns an array. function handleAccountsChanged(accounts) { if (accounts.length === 0) { // MetaMask is locked or the user has not connected any accounts. - console.log("Please connect to MetaMask."); + console.log("Please connect to MetaMask.") } else if (accounts[0] !== currentAccount) { // Reload your interface with accounts[0]. - currentAccount = accounts[0]; + currentAccount = accounts[0] // Update the account displayed (see the HTML for the connect button) - showAccount.innerHTML = currentAccount; + showAccount.innerHTML = currentAccount } } ``` diff --git a/wallet/how-to/connect/index.md b/wallet/how-to/connect/index.md index 078d4355525..93f555dcca4 100644 --- a/wallet/how-to/connect/index.md +++ b/wallet/how-to/connect/index.md @@ -17,7 +17,7 @@ Learn more about EIP-6963 in [Wallet interoperability](../../concepts/wallet-int ::: :::tip -To connect to MetaMask without using EIP-6963, see the [Create a simple dapp](../../tutorials/javascript-dapp-simple.md) tutorial. +To connect to MetaMask without using EIP-6963, see the [Create a simple dapp](../../tutorials/javascript-dapp-simple.md) tutorial. ::: You can connect to MetaMask [using third-party libraries](#connect-to-metamask-using-third-party-libraries) @@ -74,8 +74,8 @@ interface EIP6963ProviderDetail { type EIP6963AnnounceProviderEvent = { detail: { - info: EIP6963ProviderInfo, - provider: Readonly, + info: EIP6963ProviderInfo + provider: Readonly } } @@ -83,9 +83,18 @@ interface EIP1193Provider { isStatus?: boolean host?: string path?: string - sendAsync?: (request: { method: string, params?: Array }, callback: (error: Error | null, response: unknown) => void) => void - send?: (request: { method: string, params?: Array }, callback: (error: Error | null, response: unknown) => void) => void - request: (request: { method: string, params?: Array }) => Promise + sendAsync?: ( + request: { method: string; params?: Array }, + callback: (error: Error | null, response: unknown) => void + ) => void + send?: ( + request: { method: string; params?: Array }, + callback: (error: Error | null, response: unknown) => void + ) => void + request: (request: { + method: string + params?: Array + }) => Promise } ``` @@ -104,7 +113,7 @@ Update `src/main.ts` with the following code: import "./style.css" import { listProviders } from "./providers.ts" -document.querySelector('#app')!.innerHTML = ` +document.querySelector("#app")!.innerHTML = `
      @@ -133,10 +142,11 @@ declare global { } // Connect to the selected provider using eth_requestAccounts. -const connectWithProvider = async (wallet: EIP6963AnnounceProviderEvent["detail"]) => { +const connectWithProvider = async ( + wallet: EIP6963AnnounceProviderEvent["detail"] +) => { try { - await wallet.provider - .request({ method: "eth_requestAccounts" }) + await wallet.provider.request({ method: "eth_requestAccounts" }) } catch (error) { console.error("Failed to connect to provider:", error) } @@ -144,15 +154,16 @@ const connectWithProvider = async (wallet: EIP6963AnnounceProviderEvent["detail" // Display detected providers as connect buttons. export function listProviders(element: HTMLDivElement) { - window.addEventListener("eip6963:announceProvider", + window.addEventListener( + "eip6963:announceProvider", (event: EIP6963AnnounceProviderEvent) => { const button = document.createElement("button") - + button.innerHTML = ` ${event.detail.info.name}
      ${event.detail.info.name}
      ` - + // Call connectWithProvider when a user selects the button. button.onclick = () => connectWithProvider(event.detail) element.appendChild(button) @@ -220,8 +231,8 @@ interface EIP6963ProviderDetail { type EIP6963AnnounceProviderEvent = { detail: { - info: EIP6963ProviderInfo, - provider: Readonly, + info: EIP6963ProviderInfo + provider: Readonly } } @@ -229,9 +240,18 @@ interface EIP1193Provider { isStatus?: boolean host?: string path?: string - sendAsync?: (request: { method: string, params?: Array }, callback: (error: Error | null, response: unknown) => void) => void - send?: (request: { method: string, params?: Array }, callback: (error: Error | null, response: unknown) => void) => void - request: (request: { method: string, params?: Array }) => Promise + sendAsync?: ( + request: { method: string; params?: Array }, + callback: (error: Error | null, response: unknown) => void + ) => void + send?: ( + request: { method: string; params?: Array }, + callback: (error: Error | null, response: unknown) => void + ) => void + request: (request: { + method: string + params?: Array + }) => Promise } ``` @@ -280,7 +300,7 @@ export const DiscoverWalletProviders = () => { // Connect to the selected provider using eth_requestAccounts. const handleConnect = async (providerWithInfo: EIP6963ProviderDetail) => { try { - const accounts = await providerWithInfo.provider.request({ + const accounts = await providerWithInfo.provider.request({ method: "eth_requestAccounts" }) @@ -329,7 +349,7 @@ In this code: - `selectedWallet` is a state variable that holds the user's most recently selected wallet. - `userAccount` is a state variable that holds the user's connected wallet's address. - `useSyncProviders` is a custom hook that returns the providers array (wallets installed in the browser). - + The `handleConnect` function takes a `providerWithInfo`, which is an `EIP6963ProviderDetail` object. That object is used to request the user's accounts from the provider using [`eth_requestAccounts`](/wallet/reference/eth_requestaccounts). @@ -356,23 +376,25 @@ declare global { let providers: EIP6963ProviderDetail[] = [] export const store = { - value: ()=> providers, - subscribe: (callback: ()=> void) => { - function onAnnouncement(event: EIP6963AnnounceProviderEvent){ - if(providers.map(p => p.info.uuid).includes(event.detail.info.uuid)) return + value: () => providers, + subscribe: (callback: () => void) => { + function onAnnouncement(event: EIP6963AnnounceProviderEvent) { + if (providers.map((p) => p.info.uuid).includes(event.detail.info.uuid)) + return providers = [...providers, event.detail] callback() } // Listen for eip6963:announceProvider and call onAnnouncement when the event is triggered. window.addEventListener("eip6963:announceProvider", onAnnouncement) - + // Dispatch the event, which triggers the event listener in the MetaMask wallet. window.dispatchEvent(new Event("eip6963:requestProvider")) - + // Return a function that removes the event listern. - return () => window.removeEventListener("eip6963:announceProvider", onAnnouncement) - } + return () => + window.removeEventListener("eip6963:announceProvider", onAnnouncement) + }, } ``` @@ -382,7 +404,8 @@ Also, add a file `useSyncProviders.ts` with the following code to the `hooks` di import { useSyncExternalStore } from "react" import { store } from "./store" -export const useSyncProviders = ()=> useSyncExternalStore(store.subscribe, store.value, store.value) +export const useSyncProviders = () => + useSyncExternalStore(store.subscribe, store.value, store.value) ``` This hook allows you to subscribe to MetaMask events, read updated values, and update components. @@ -404,7 +427,7 @@ export const formatChainAsNum = (chainIdHex: string) => { } export const formatAddress = (addr: string) => { - const upperAfterLastTwo = addr.slice(0,2) + addr.slice(2) + const upperAfterLastTwo = addr.slice(0, 2) + addr.slice(2) return `${upperAfterLastTwo.substring(0, 5)}...${upperAfterLastTwo.substring(39)}` } ``` diff --git a/wallet/how-to/display/tokens.md b/wallet/how-to/display/tokens.md index 2fc29aae741..372cc22a2bc 100644 --- a/wallet/how-to/display/tokens.md +++ b/wallet/how-to/display/tokens.md @@ -39,10 +39,10 @@ extension (not on mobile). To prompt users to add an ERC-20 token, you can add something like the following to your project script: ```javascript -const tokenAddress = "0xd00981105e61274c8a5cd5a88fe7e037d935b513"; -const tokenSymbol = "TUT"; -const tokenDecimals = 18; -const tokenImage = "http://placekitten.com/200/300"; +const tokenAddress = "0xd00981105e61274c8a5cd5a88fe7e037d935b513" +const tokenSymbol = "TUT" +const tokenDecimals = 18 +const tokenImage = "http://placekitten.com/200/300" try { // 'wasAdded' is a boolean. Like any RPC method, an error can be thrown. @@ -62,15 +62,15 @@ try { image: tokenImage, }, }, - }); + }) if (wasAdded) { - console.log("Thanks for your interest!"); + console.log("Thanks for your interest!") } else { - console.log("Your loss!"); + console.log("Your loss!") } } catch (error) { - console.log(error); + console.log(error) } ``` @@ -128,15 +128,15 @@ try { tokenId: "1", }, }, - }); + }) if (wasAdded) { - console.log("User successfully added the token!"); + console.log("User successfully added the token!") } else { - console.log("User did not add the token."); + console.log("User did not add the token.") } } catch (error) { - console.log(error); + console.log(error) } ``` diff --git a/wallet/how-to/manage-networks/add-network.md b/wallet/how-to/manage-networks/add-network.md index fc364023aa1..06daa7b7349 100644 --- a/wallet/how-to/manage-networks/add-network.md +++ b/wallet/how-to/manage-networks/add-network.md @@ -47,7 +47,7 @@ try { .request({ method: "wallet_switchEthereumChain", params: [{ chainId: "0xf00" }], - }); + }) } catch (switchError) { // This error code indicates that the chain has not been added to MetaMask. if (switchError.code === 4902) { @@ -62,7 +62,7 @@ try { rpcUrls: ["https://..."] /* ... */, }, ], - }); + }) } catch (addError) { // Handle "add" error. } diff --git a/wallet/how-to/manage-networks/detect-network.md b/wallet/how-to/manage-networks/detect-network.md index c60f6a4a448..03873a7e896 100644 --- a/wallet/how-to/manage-networks/detect-network.md +++ b/wallet/how-to/manage-networks/detect-network.md @@ -17,13 +17,13 @@ For example, the following code detects a user's network and when the user chang ```javascript title="index.js" const chainId = await provider // Or window.ethereum if you don't support EIP-6963. - .request({ method: "eth_chainId" }); + .request({ method: "eth_chainId" }) provider // Or window.ethereum if you don't support EIP-6963. - .on("chainChanged", handleChainChanged); + .on("chainChanged", handleChainChanged) function handleChainChanged(chainId) { // We recommend reloading the page, unless you must do otherwise. - window.location.reload(); + window.location.reload() } ``` diff --git a/wallet/how-to/manage-permissions.md b/wallet/how-to/manage-permissions.md index 318281f7d22..e962c89851c 100644 --- a/wallet/how-to/manage-permissions.md +++ b/wallet/how-to/manage-permissions.md @@ -31,9 +31,9 @@ the restricted method [`eth_accounts`](/wallet/reference/eth_accounts): :::info note To access accounts, we recommend using [`eth_requestAccounts`](/wallet/reference/eth_requestAccounts), which automatically asks for permission to use `eth_accounts` by calling `wallet_requestPermissions` -internally. +internally. See [how to access a user's accounts](../connect/access-accounts) for more information. -Granting permission for `eth_accounts` also grants access to [`eth_sendTransaction`](/wallet/reference/eth_sendTransaction), [`personal_sign`](/wallet/reference/personal_sign), and [`eth_signTypedData_v4`](/wallet/reference/eth_signTypedData_v4). +Granting permission for `eth_accounts` also grants access to [`eth_sendTransaction`](/wallet/reference/eth_sendTransaction), [`personal_sign`](/wallet/reference/personal_sign), and [`eth_signTypedData_v4`](/wallet/reference/eth_signTypedData_v4). ::: ## Request permissions example @@ -41,7 +41,7 @@ Granting permission for `eth_accounts` also grants access to [`eth_sendTransacti The following example uses `wallet_requestPermissions` to request permission from the user to call `eth_accounts`: ```javascript -document.getElementById("requestPermissionsButton", requestPermissions); +document.getElementById("requestPermissionsButton", requestPermissions) function requestPermissions() { provider // Or window.ethereum if you don't support EIP-6963. @@ -52,19 +52,19 @@ function requestPermissions() { .then((permissions) => { const accountsPermission = permissions.find( (permission) => permission.parentCapability === "eth_accounts" - ); + ) if (accountsPermission) { - console.log("eth_accounts permission successfully requested!"); + console.log("eth_accounts permission successfully requested!") } }) .catch((error) => { if (error.code === 4001) { // EIP-1193 userRejectedRequest error - console.log("Permissions needed to continue."); + console.log("Permissions needed to continue.") } else { - console.error(error); + console.error(error) } - }); + }) } ``` @@ -81,5 +81,5 @@ await provider // Or window.ethereum if you don't support EIP-6963. eth_accounts: {}, }, ], - }); -``` \ No newline at end of file + }) +``` diff --git a/wallet/how-to/onboard-users.md b/wallet/how-to/onboard-users.md index 264618b421d..c89b227073a 100644 --- a/wallet/how-to/onboard-users.md +++ b/wallet/how-to/onboard-users.md @@ -4,8 +4,8 @@ description: Simplify the MetaMask onboarding experience for your users. sidebar_position: 8 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Use the MetaMask onboarding library @@ -32,30 +32,30 @@ You don't need to set up the onboarding library if you use the SDK. 1. Install [@metamask/onboarding](https://github.com/MetaMask/metamask-onboarding). 1. Import the library or include it in your page: - ```javascript - // As an ES6 module - import MetaMaskOnboarding from "@metamask/onboarding"; - // Or as an ES5 module - const MetaMaskOnboarding = require("@metamask/onboarding"); - ``` + ```javascript + // As an ES6 module + import MetaMaskOnboarding from "@metamask/onboarding" + // Or as an ES5 module + const MetaMaskOnboarding = require("@metamask/onboarding") + ``` - Alternatively, you can include the prebuilt ES5 bundle that ships with the library: + Alternatively, you can include the prebuilt ES5 bundle that ships with the library: - ```html - - ``` + ```html + + ``` 1. Create a new instance of the onboarding library: - ```javascript - const onboarding = new MetaMaskOnboarding(); - ``` + ```javascript + const onboarding = new MetaMaskOnboarding() + ``` 1. Start the onboarding process in response to a user event (for example, a button click): - ```javascript - onboarding.startOnboarding(); - ``` + ```javascript + onboarding.startOnboarding() + ``` ## Example @@ -65,72 +65,69 @@ The following are example ways to use the onboarding library in various framewor ```jsx -import MetaMaskOnboarding from "@metamask/onboarding"; -import React from "react"; +import MetaMaskOnboarding from "@metamask/onboarding" +import React from "react" -const ONBOARD_TEXT = "Click here to install MetaMask!"; -const CONNECT_TEXT = "Connect"; -const CONNECTED_TEXT = "Connected"; +const ONBOARD_TEXT = "Click here to install MetaMask!" +const CONNECT_TEXT = "Connect" +const CONNECTED_TEXT = "Connected" export function OnboardingButton() { - const [buttonText, setButtonText] = React.useState(ONBOARD_TEXT); - const [isDisabled, setDisabled] = React.useState(false); - const [accounts, setAccounts] = React.useState([]); - const onboarding = React.useRef(); + const [buttonText, setButtonText] = React.useState(ONBOARD_TEXT) + const [isDisabled, setDisabled] = React.useState(false) + const [accounts, setAccounts] = React.useState([]) + const onboarding = React.useRef() React.useEffect(() => { if (!onboarding.current) { - onboarding.current = new MetaMaskOnboarding(); + onboarding.current = new MetaMaskOnboarding() } - }, []); + }, []) React.useEffect(() => { if (MetaMaskOnboarding.isMetaMaskInstalled()) { if (accounts.length > 0) { - setButtonText(CONNECTED_TEXT); - setDisabled(true); - onboarding.current.stopOnboarding(); + setButtonText(CONNECTED_TEXT) + setDisabled(true) + onboarding.current.stopOnboarding() } else { - setButtonText(CONNECT_TEXT); - setDisabled(false); + setButtonText(CONNECT_TEXT) + setDisabled(false) } } - }, [accounts]); + }, [accounts]) React.useEffect(() => { function handleNewAccounts(newAccounts) { - setAccounts(newAccounts); + setAccounts(newAccounts) } if (MetaMaskOnboarding.isMetaMaskInstalled()) { provider // Or window.ethereum if you don't support EIP-6963. .request({ method: "eth_requestAccounts" }) - .then(handleNewAccounts); + .then(handleNewAccounts) provider // Or window.ethereum if you don't support EIP-6963. - .on("accountsChanged", handleNewAccounts); + .on("accountsChanged", handleNewAccounts) return () => { provider // Or window.ethereum if you don't support EIP-6963. - .removeListener( - "accountsChanged", - handleNewAccounts - ); - }; + .removeListener("accountsChanged", handleNewAccounts) + } } - }, []); + }, []) const onClick = () => { if (MetaMaskOnboarding.isMetaMaskInstalled()) { provider // Or window.ethereum if you don't support EIP-6963. .request({ method: "eth_requestAccounts" }) - .then((newAccounts) => setAccounts(newAccounts)); + .then((newAccounts) => setAccounts(newAccounts)) } else { - onboarding.current.startOnboarding(); + onboarding.current.startOnboarding() } - }; + } return ( - ); + ) } ``` @@ -156,55 +153,54 @@ helpful documentation: ```html - - MetaMask Onboarding Example - - - -

      Sample Dapp

      - - - - + + MetaMask Onboarding Example + + + +

      Sample Dapp

      + + + + ``` diff --git a/wallet/how-to/run-devnet.md b/wallet/how-to/run-devnet.md index e6d1e54c5fa..23ff9301665 100644 --- a/wallet/how-to/run-devnet.md +++ b/wallet/how-to/run-devnet.md @@ -21,56 +21,56 @@ Follow these steps to connect MetaMask to Hardhat Network. 1. [Set up a Hardhat project.](https://hardhat.org/hardhat-runner/docs/guides/project-setup) 2. Create a new - [MetaMask seed phrase](https://support.metamask.io/hc/en-us/articles/360060826432-What-is-a-Secret-Recovery-Phrase-and-how-to-keep-your-crypto-wallet-secure#:~:text=Your%20Secret%20Recovery%20Phrase%20(SRP,are%20connected%20to%20that%20phrase.)) - specifically for development. - - :::caution important - Your seed phrase controls all your accounts, so we recommend keeping at least one seed phrase for - development, separate from any used to store real value. - You can manage multiple seed phrases by using multiple browser profiles, each with its own - MetaMask installation. - ::: + [MetaMask seed phrase]() + specifically for development. + + :::caution important + Your seed phrase controls all your accounts, so we recommend keeping at least one seed phrase for + development, separate from any used to store real value. + You can manage multiple seed phrases by using multiple browser profiles, each with its own + MetaMask installation. + ::: 3. In your `hardhat.config.js` file, specify a - [`networks` configuration](https://hardhat.org/hardhat-runner/docs/config#networks-configuration) - with a `hardhat` network. - In this `networks.hardhat` configuration: - - - Specify your MetaMask seed phrase in the - [`accounts.mnemonic`](https://hardhat.org/hardhat-network/docs/reference#accounts) field. - - :::tip - Alternatively, to prevent committing your seed phrase, we recommend adding your seed phrase to a - [`.env` file](https://docs.infura.io/tutorials/developer-tools/javascript-dotenv) and using the - `process.env` global variable in `hardhat.config.js`. - ::: - - - Specify the [chain ID `1337`](https://hardhat.org/hardhat-network/docs/metamask-issue) in the - [`chainId`](https://hardhat.org/hardhat-network/docs/reference#chainid) field. - - For example: - - ```js title="hardhat.config.js" - module.exports = { - networks: { - hardhat: { - accounts: { - mnemonic: process.env.SEED_PHRASE, - }, - chainId: 1337, - }, - }, - }; - ``` - - Hardhat automatically gives each of your first 20 accounts 10000 test ether (you can modify - these numbers in the [`accounts`](https://hardhat.org/hardhat-network/docs/reference#accounts) - configuration), which makes it easy to start development. + [`networks` configuration](https://hardhat.org/hardhat-runner/docs/config#networks-configuration) + with a `hardhat` network. + In this `networks.hardhat` configuration: + + - Specify your MetaMask seed phrase in the + [`accounts.mnemonic`](https://hardhat.org/hardhat-network/docs/reference#accounts) field. + + :::tip + Alternatively, to prevent committing your seed phrase, we recommend adding your seed phrase to a + [`.env` file](https://docs.infura.io/tutorials/developer-tools/javascript-dotenv) and using the + `process.env` global variable in `hardhat.config.js`. + ::: + + - Specify the [chain ID `1337`](https://hardhat.org/hardhat-network/docs/metamask-issue) in the + [`chainId`](https://hardhat.org/hardhat-network/docs/reference#chainid) field. + + For example: + + ```js title="hardhat.config.js" + module.exports = { + networks: { + hardhat: { + accounts: { + mnemonic: process.env.SEED_PHRASE, + }, + chainId: 1337, + }, + }, + } + ``` + + Hardhat automatically gives each of your first 20 accounts 10000 test ether (you can modify + these numbers in the [`accounts`](https://hardhat.org/hardhat-network/docs/reference#accounts) + configuration), which makes it easy to start development. 4. Run `npx hardhat node` to run Hardhat Network and expose a JSON-RPC interface. 5. You can now connect MetaMask to your Hardhat Network RPC URL, `http://127.0.0.1:8545/`. - In the MetaMask extension: + In the MetaMask extension: 1. In the upper left corner, select the network you're currently connected to. @@ -92,7 +92,7 @@ Follow these steps to connect MetaMask to Hardhat Network. If you restart your development network, you can accidentally confuse MetaMask because it calculates the next [nonce](send-transactions.md#nonce) based on both the -network state *and* the known sent transactions. +network state _and_ the known sent transactions. To clear MetaMask's transaction queue and reset its nonce calculation, go to **Settings > Advanced** and select **Reset account**. diff --git a/wallet/how-to/secure-dapp.md b/wallet/how-to/secure-dapp.md index 004c6e2674b..a1f403b6807 100644 --- a/wallet/how-to/secure-dapp.md +++ b/wallet/how-to/secure-dapp.md @@ -48,9 +48,9 @@ app.use((req, res, next) => { res.setHeader( "Content-Security-Policy", "default-src 'self'; frame-ancestors 'none'" - ); - next(); -}); + ) + next() +}) ``` In a header, this looks like the following: diff --git a/wallet/how-to/sign-data/index.md b/wallet/how-to/sign-data/index.md index 0cdf13aeea3..1e6cb7233ce 100644 --- a/wallet/how-to/sign-data/index.md +++ b/wallet/how-to/sign-data/index.md @@ -64,7 +64,7 @@ The following is an example of using `eth_signTypedData_v4` with MetaMask: ```javascript title="index.js" signTypedDataV4Button.addEventListener("click", async function (event) { - event.preventDefault(); + event.preventDefault() // eth_signTypedData_v4 parameters. All of these parameters affect the resulting signature. const msgParams = JSON.stringify({ @@ -130,12 +130,12 @@ signTypedDataV4Button.addEventListener("click", async function (event) { { name: "wallets", type: "address[]" }, ], }, - }); + }) - var from = await web3.eth.getAccounts(); + var from = await web3.eth.getAccounts() - var params = [from[0], msgParams]; - var method = "eth_signTypedData_v4"; + var params = [from[0], msgParams] + var method = "eth_signTypedData_v4" provider // Or window.ethereum if you don't support EIP-6963. .sendAsync( @@ -145,26 +145,31 @@ signTypedDataV4Button.addEventListener("click", async function (event) { from: from[0], }, function (err, result) { - if (err) return console.dir(err); + if (err) return console.dir(err) if (result.error) { - alert(result.error.message); + alert(result.error.message) } - if (result.error) return console.error("ERROR", result); - console.log("TYPED SIGNED:" + JSON.stringify(result.result)); + if (result.error) return console.error("ERROR", result) + console.log("TYPED SIGNED:" + JSON.stringify(result.result)) const recovered = sigUtil.recoverTypedSignature_v4({ data: JSON.parse(msgParams), sig: result.result, - }); + }) - if (ethUtil.toChecksumAddress(recovered) === ethUtil.toChecksumAddress(from)) { - alert("Successfully recovered signer as " + from); + if ( + ethUtil.toChecksumAddress(recovered) === + ethUtil.toChecksumAddress(from) + ) { + alert("Successfully recovered signer as " + from) } else { - alert("Failed to verify signer when comparing " + result + " to " + from); + alert( + "Failed to verify signer when comparing " + result + " to " + from + ) } } - ); -}); + ) +}) ``` The following HTML displays a sign button: @@ -196,13 +201,14 @@ Because MetaMask supports existing applications, MetaMask implements both `perso You might need to check what method your supported signers use for a given implementation. :::caution important + - Don't use this method to display binary data, because the user wouldn't be able to understand what they're agreeing to. - If using this method for a signature challenge, think about what would prevent a phisher from reusing the same challenge and impersonating your site. Add text referring to your domain, or the current time, so the user can easily verify if this challenge is legitimate. -::: + ::: ### Example @@ -210,24 +216,24 @@ The following is an example of using `personal_sign` with MetaMask: ```javascript title="index.js" personalSignButton.addEventListener("click", async function (event) { - event.preventDefault(); - const exampleMessage = "Example `personal_sign` message."; + event.preventDefault() + const exampleMessage = "Example `personal_sign` message." try { - const from = accounts[0]; + const from = accounts[0] // For historical reasons, you must submit the message to sign in hex-encoded UTF-8. // This uses a Node.js-style buffer shim in the browser. - const msg = `0x${Buffer.from(exampleMessage, "utf8").toString("hex")}`; + const msg = `0x${Buffer.from(exampleMessage, "utf8").toString("hex")}` const sign = await ethereum.request({ method: "personal_sign", params: [msg, from], - }); - personalSignResult.innerHTML = sign; - personalSignVerify.disabled = false; + }) + personalSignResult.innerHTML = sign + personalSignVerify.disabled = false } catch (err) { - console.error(err); - personalSign.innerHTML = `Error: ${err.message}`; + console.error(err) + personalSign.innerHTML = `Error: ${err.message}` } -}); +}) ``` The following HTML displays a sign button: diff --git a/wallet/how-to/sign-data/siwe.md b/wallet/how-to/sign-data/siwe.md index 9ecec3b0a2a..2d424140af6 100644 --- a/wallet/how-to/sign-data/siwe.md +++ b/wallet/how-to/sign-data/siwe.md @@ -47,26 +47,26 @@ The following is an example of setting up SIWE with MetaMask using ```javascript title="index.js" const siweSign = async (siweMessage) => { try { - const from = accounts[0]; - const msg = `0x${Buffer.from(siweMessage, "utf8").toString("hex")}`; + const from = accounts[0] + const msg = `0x${Buffer.from(siweMessage, "utf8").toString("hex")}` const sign = await provider // Or window.ethereum if you don't support EIP-6963. .request({ method: "personal_sign", params: [msg, from], - }); - siweResult.innerHTML = sign; + }) + siweResult.innerHTML = sign } catch (err) { - console.error(err); - siweResult.innerHTML = `Error: ${err.message}`; + console.error(err) + siweResult.innerHTML = `Error: ${err.message}` } -}; +} siwe.onclick = async () => { - const domain = window.location.host; - const from = accounts[0]; - const siweMessage = `${domain} wants you to sign in with your Ethereum account:\n${from}\n\nI accept the MetaMask Terms of Service: https://community.metamask.io/tos\n\nURI: https://${domain}\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z`; - siweSign(siweMessage); -}; + const domain = window.location.host + const from = accounts[0] + const siweMessage = `${domain} wants you to sign in with your Ethereum account:\n${from}\n\nI accept the MetaMask Terms of Service: https://community.metamask.io/tos\n\nURI: https://${domain}\nVersion: 1\nChain ID: 1\nNonce: 32891757\nIssued At: 2021-09-30T16:25:24.000Z` + siweSign(siweMessage) +} ``` The following HTML displays the SIWE button: diff --git a/wallet/how-to/use-sdk/3rd-party-libraries/wagmi.md b/wallet/how-to/use-sdk/3rd-party-libraries/wagmi.md index f171122a71e..9446a81a5de 100644 --- a/wallet/how-to/use-sdk/3rd-party-libraries/wagmi.md +++ b/wallet/how-to/use-sdk/3rd-party-libraries/wagmi.md @@ -34,7 +34,7 @@ const MetaMaskOptions = { }, infuraAPIKey: "YOUR-API-KEY", // Other options. -}; +} ``` #### Dapp metadata @@ -63,9 +63,9 @@ Use the `MetaMaskOptions` you created in the previous step when adding the `meta For example: ```javascript -import { createConfig, http } from "wagmi"; -import { mainnet, sepolia } from "wagmi/chains"; -import { metaMask } from "wagmi/connectors"; +import { createConfig, http } from "wagmi" +import { mainnet, sepolia } from "wagmi/chains" +import { metaMask } from "wagmi/connectors" const MetaMaskOptions = { dappMetadata: { @@ -73,7 +73,7 @@ const MetaMaskOptions = { }, infuraAPIKey: "YOUR-API-KEY", // Other options. -}; +} export const config = createConfig({ chains: [mainnet, sepolia], @@ -85,7 +85,7 @@ export const config = createConfig({ [mainnet.id]: http(), [sepolia.id]: http(), }, -}); +}) ``` ### 3. Implement contract interaction using `usePrepareContractWrite` @@ -97,18 +97,18 @@ This approach ensures smooth transactions by preparing the contract write operat actual execution. ```javascript -import { usePrepareContractWrite, useContractWrite } from "wagmi"; +import { usePrepareContractWrite, useContractWrite } from "wagmi" const { config } = usePrepareContractWrite({ address: "0xContractAddress", abi: contractABI, functionName: "functionToCall", args: [arg1, arg2], -}); +}) -const { write } = useContractWrite(config); +const { write } = useContractWrite(config) -write(); +write() ``` ## Benefits of using the Infura API with Wagmi diff --git a/wallet/how-to/use-sdk/3rd-party-libraries/web3-onboard.md b/wallet/how-to/use-sdk/3rd-party-libraries/web3-onboard.md index 8e9ab797577..fec5a61065c 100644 --- a/wallet/how-to/use-sdk/3rd-party-libraries/web3-onboard.md +++ b/wallet/how-to/use-sdk/3rd-party-libraries/web3-onboard.md @@ -36,7 +36,7 @@ npm i @web3-onboard/metamask In your project script, add the following to import the module: ```javascript -import metamaskSDK from "@web3-onboard/metamask"; +import metamaskSDK from "@web3-onboard/metamask" ``` ### 3. Instantiate the module @@ -52,7 +52,7 @@ const metamaskSDKWallet = metamaskSDK({ name: "Example Web3-Onboard Dapp", }, }, -}); +}) ``` ### 4. Use the module @@ -66,10 +66,10 @@ const onboard = Onboard({ metamaskSDKWallet, // Other wallets. ], -}); +}) -const connectedWallets = await onboard.connectWallet(); -console.log(connectedWallets); +const connectedWallets = await onboard.connectWallet() +console.log(connectedWallets) ``` ## Example diff --git a/wallet/how-to/use-sdk/gaming/unity/connect-and-sign.md b/wallet/how-to/use-sdk/gaming/unity/connect-and-sign.md index 7af278f9165..e2e5633abcb 100644 --- a/wallet/how-to/use-sdk/gaming/unity/connect-and-sign.md +++ b/wallet/how-to/use-sdk/gaming/unity/connect-and-sign.md @@ -23,28 +23,28 @@ You can [connect and sign](../../javascript/connect-and-sign.md) in a single int 2. In your script, create a new function named `ConnectAndSign`: - ```csharp - public void ConnectAndSign() - { - MetaMaskUnity.Instance.ConnectAndSign("This is a test message"); - } - ``` - - Replace the test message with any string message you want to sign. - - :::caution important - Make sure you initialize [`MetaMaskUnity.Instance`](../../../../reference/sdk-unity-api.md#instance) - before using this function. - To do so, enable **Initialize On Awake** in the **MetaMask Unity** script inspector, or run - [`MetaMask.Instance.Initialize()`](../../../../reference/sdk-unity-api.md#initialize). - ::: + ```csharp + public void ConnectAndSign() + { + MetaMaskUnity.Instance.ConnectAndSign("This is a test message"); + } + ``` + + Replace the test message with any string message you want to sign. + + :::caution important + Make sure you initialize [`MetaMaskUnity.Instance`](../../../../reference/sdk-unity-api.md#instance) + before using this function. + To do so, enable **Initialize On Awake** in the **MetaMask Unity** script inspector, or run + [`MetaMask.Instance.Initialize()`](../../../../reference/sdk-unity-api.md#initialize). + ::: 3. Call the `ConnectAndSign` function whenever you want to establish a connection and sign a message. - For example, you can call this function when a button is clicked: - - ```csharp - public void OnButtonClick() - { - ConnectAndSign(); - } - ``` + For example, you can call this function when a button is clicked: + + ```csharp + public void OnButtonClick() + { + ConnectAndSign(); + } + ``` diff --git a/wallet/how-to/use-sdk/gaming/unity/dweb.md b/wallet/how-to/use-sdk/gaming/unity/dweb.md index 6da71a62ab9..2f95a91c9dd 100644 --- a/wallet/how-to/use-sdk/gaming/unity/dweb.md +++ b/wallet/how-to/use-sdk/gaming/unity/dweb.md @@ -6,8 +6,8 @@ tags: - Unity SDK --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Enable human-readable addresses in Unity diff --git a/wallet/how-to/use-sdk/gaming/unity/index.md b/wallet/how-to/use-sdk/gaming/unity/index.md index e1983502793..105ab1b2774 100644 --- a/wallet/how-to/use-sdk/gaming/unity/index.md +++ b/wallet/how-to/use-sdk/gaming/unity/index.md @@ -62,7 +62,7 @@ If you don't have TextMeshPro installed, the Unity editor automatically prompts

      | File or directory | Contents | -|--------------------------|----------------------------------------------------------------------------------------------------------------------------------| +| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------- | | `Documentation` | Documentation and link to online documentation | | `Editor` | Editor-only code such as Setup GUI windows, data persistence for SDK settings | | `Plugins` | Plugins needed by the package (the ECIES Platform runtime libraries and core SDK Codebase) | @@ -71,7 +71,6 @@ If you don't have TextMeshPro installed, the Unity editor automatically prompts | `LICENSE.md` | Package license | | `Third Party Notices.md` | Third party notices | -

      @@ -91,9 +90,9 @@ You first must initialize by doing one of the following: - Manually call `Initialize()`: - ```csharp - MetaMaskUnity.Instance.Initialize(); - ``` + ```csharp + MetaMaskUnity.Instance.Initialize(); + ``` - Check **Initialize On Start** on the component within the editor. @@ -207,7 +206,7 @@ To update the SDK to the latest version available on the Unity Asset Store: 1. Update and import the latest package using the Unity Package Manager. 2. Go to **Tools > MetaMask > Install in Unity**. 3. Select the **Already Installed** button. - This updates the SDK in your project. + This updates the SDK in your project. Alternatively, you can delete the existing MetaMask folder in your project and re-import it from the Package Manager or Asset Store. diff --git a/wallet/how-to/use-sdk/gaming/unity/infura.md b/wallet/how-to/use-sdk/gaming/unity/infura.md index 0742aa7c839..f6ad72663a6 100644 --- a/wallet/how-to/use-sdk/gaming/unity/infura.md +++ b/wallet/how-to/use-sdk/gaming/unity/infura.md @@ -37,13 +37,13 @@ your Unity game. 1. Open your Unity project with the SDK installed. 2. Navigate to the game object in your scene (or the Prefab instance) that currently stores the - `MetaMask Unity` script. - In the `Demo` scene, this is the `MetaMaskUnitySDK` game object. + `MetaMask Unity` script. + In the `Demo` scene, this is the `MetaMaskUnitySDK` game object. -3. Select the `MetaMaskUnitySDK` Prefab to view its properties in the **Inspector** window. +3. Select the `MetaMaskUnitySDK` Prefab to view its properties in the **Inspector** window. 4. In the **MetaMask Unity (Script)** section, enter your Infura API key into the **Infura Project - Id** field. + Id** field.

      @@ -52,4 +52,4 @@ your Unity game.

      5. Save your changes. - This automatically configures all RPC URLs that Infura supports. + This automatically configures all RPC URLs that Infura supports. diff --git a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-interface.md b/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-interface.md index 9cd9eaf27bc..2a7dc02c2a7 100644 --- a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-interface.md +++ b/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-interface.md @@ -19,10 +19,10 @@ To manually create a new contract interface, define a new interface that inherit Optionally, declare the [`BackedType` attribute](contract-factory.md#backed-type-contract-factory). ```csharp -#if UNITY_EDITOR || !ENABLE_MONO -[BackedType(typeof(ERC20Backing))] -#endif -public interface ERC20 : IContract +#if UNITY_EDITOR || !ENABLE_MONO +[BackedType(typeof(ERC20Backing))] +#endif +public interface ERC20 : IContract { // Declare functions. } @@ -34,10 +34,10 @@ To declare a `view` or `pure` function of the contract, first set the return typ (may differ from the actual name), and all parameters the function takes in a Task: ```csharp -#if UNITY_EDITOR || !ENABLE_MONO -[BackedType(typeof(ERC20Backing))] -#endif -public interface ERC20 : IContract +#if UNITY_EDITOR || !ENABLE_MONO +[BackedType(typeof(ERC20Backing))] +#endif +public interface ERC20 : IContract { Task BalanceOf(EvmAddress account); } @@ -48,10 +48,10 @@ declare the metadata about the contract function. This includes the `Name` and whether it's a `View` function: ```csharp -#if UNITY_EDITOR || !ENABLE_MONO -[BackedType(typeof(ERC20Backing))] -#endif -public interface ERC20 : IContract +#if UNITY_EDITOR || !ENABLE_MONO +[BackedType(typeof(ERC20Backing))] +#endif +public interface ERC20 : IContract { [EvmMethodInfo(Name = "balanceOf", View = true)] Task BalanceOf(EvmAddress account); @@ -63,10 +63,10 @@ However, this usually isn't needed, because the `Contract` class automatically i types, such as `EvmAddress` to be `address` and `string` to be `string`. ```csharp -#if UNITY_EDITOR || !ENABLE_MONO -[BackedType(typeof(ERC20Backing))] -#endif -public interface ERC20 : IContract +#if UNITY_EDITOR || !ENABLE_MONO +[BackedType(typeof(ERC20Backing))] +#endif +public interface ERC20 : IContract { [EvmMethodInfo(Name = "balanceOf", View = true)] Task BalanceOf([EvmParameterInfo(Type = "address")] string account); @@ -76,16 +76,16 @@ public interface ERC20 : IContract To define the EVM return type for the function, you can use `EvmParamterInfo` on the return type: ```csharp -#if UNITY_EDITOR || !ENABLE_MONO -[BackedType(typeof(ERC20Backing))] -#endif -public interface ERC20 : IContract +#if UNITY_EDITOR || !ENABLE_MONO +[BackedType(typeof(ERC20Backing))] +#endif +public interface ERC20 : IContract { [EvmMethodInfo(Name = "balanceOf", View = true)] Task BalanceOf(EvmAddress account); - - [EvmMethodInfo(Name = "decimals", View = true)] - [return: EvmParameterInfo(Type = "uint8")] + + [EvmMethodInfo(Name = "decimals", View = true)] + [return: EvmParameterInfo(Type = "uint8")] Task Decimals(); } ``` @@ -110,44 +110,44 @@ Also, do one of the following: - Declare a `static readonly string Bytecode` in the interface that has the bytecode. - ```csharp - #if UNITY_EDITOR || !ENABLE_MONO - [BackedType(typeof(ERC20Backing))] - #endif - public interface ERC20 : IContract - { - public static readonly string Bytecode = "0x6080604052348015620000115760008...."; - - [EvmConstructorMethod] - Task DeployNew(String name_, String symbol_); - - [EvmMethodInfo(Name = "balanceOf", View = true)] - Task BalanceOf(EvmAddress account); - - [EvmMethodInfo(Name = "decimals", View = true)] - [return: EvmParameterInfo(Type = "uint8")] - Task Decimals(); - } - ``` + ```csharp + #if UNITY_EDITOR || !ENABLE_MONO + [BackedType(typeof(ERC20Backing))] + #endif + public interface ERC20 : IContract + { + public static readonly string Bytecode = "0x6080604052348015620000115760008...."; + + [EvmConstructorMethod] + Task DeployNew(String name_, String symbol_); + + [EvmMethodInfo(Name = "balanceOf", View = true)] + Task BalanceOf(EvmAddress account); + + [EvmMethodInfo(Name = "decimals", View = true)] + [return: EvmParameterInfo(Type = "uint8")] + Task Decimals(); + } + ``` - Set the `Bytecode` field in the `EvmConstructorMethod` attribute. - ```csharp - #if UNITY_EDITOR || !ENABLE_MONO - [BackedType(typeof(ERC20Backing))] - #endif - public interface ERC20 : IContract - { - [EvmConstructorMethod(Bytecode = "0x608060405238....")] - Task DeployNew(String name_, String symbol_); - - [EvmMethodInfo(Name = "balanceOf", View = true)] - Task BalanceOf(EvmAddress account); - - [EvmMethodInfo(Name = "decimals", View = true)] - [return: EvmParameterInfo(Type = "uint8")] - Task Decimals(); - } - ``` + ```csharp + #if UNITY_EDITOR || !ENABLE_MONO + [BackedType(typeof(ERC20Backing))] + #endif + public interface ERC20 : IContract + { + [EvmConstructorMethod(Bytecode = "0x608060405238....")] + Task DeployNew(String name_, String symbol_); + + [EvmMethodInfo(Name = "balanceOf", View = true)] + Task BalanceOf(EvmAddress account); + + [EvmMethodInfo(Name = "decimals", View = true)] + [return: EvmParameterInfo(Type = "uint8")] + Task Decimals(); + } + ``` By default, the [contract code generator](index.md#generate-contract-code) uses the second option. diff --git a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-proxy-class.md b/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-proxy-class.md index 5ace52517d9..aafa9fe280a 100644 --- a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-proxy-class.md +++ b/wallet/how-to/use-sdk/gaming/unity/smart-contracts/contract-proxy-class.md @@ -29,5 +29,5 @@ You should never need to inherit the `Contract` class, unless you're using the However, the [contract code generator](index.md#generate-contract-code) already generates these classes for you. -You only need to use `Contract.Attach(string address, IProvider provider)`. +You only need to use `Contract.Attach(string address, IProvider provider)`. ::: diff --git a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/index.md b/wallet/how-to/use-sdk/gaming/unity/smart-contracts/index.md index 9c20f80663b..c70649b04e3 100644 --- a/wallet/how-to/use-sdk/gaming/unity/smart-contracts/index.md +++ b/wallet/how-to/use-sdk/gaming/unity/smart-contracts/index.md @@ -60,7 +60,7 @@ public async void Start() { var metaMask = MetaMaskUnity.Instance.Wallet; var address = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"; - + ERC20 usdc = Contract.Attach(address, metaMask); } ``` diff --git a/wallet/how-to/use-sdk/gaming/unreal-engine.md b/wallet/how-to/use-sdk/gaming/unreal-engine.md index 3acea2c7965..8d965fd2c09 100644 --- a/wallet/how-to/use-sdk/gaming/unreal-engine.md +++ b/wallet/how-to/use-sdk/gaming/unreal-engine.md @@ -7,4 +7,4 @@ sidebar_position: 2 [MetaMask SDK](../../../concepts/sdk/index.md) support for Unreal Engine games is coming soon. The SDK currently supports [Unity](unity/index.md) gaming dapps, -[JavaScript-based](../javascript/index.md) dapps, and [mobile](../mobile/index.md) dapps. \ No newline at end of file +[JavaScript-based](../javascript/index.md) dapps, and [mobile](../mobile/index.md) dapps. diff --git a/wallet/how-to/use-sdk/javascript/batch-json-rpc-requests.md b/wallet/how-to/use-sdk/javascript/batch-json-rpc-requests.md index 1ac3f8f83d8..14c770714fd 100644 --- a/wallet/how-to/use-sdk/javascript/batch-json-rpc-requests.md +++ b/wallet/how-to/use-sdk/javascript/batch-json-rpc-requests.md @@ -50,7 +50,7 @@ The following is an example of using `metamask_batch` to batch [`eth_sendTransaction`](/wallet/reference/eth_sendtransaction) in React, Next.js, or React Native/Expo: ```javascript title="index.js" -import { metamask_batch } from "metamask-sdk"; +import { metamask_batch } from "metamask-sdk" function MyComponent() { const handleBatchRequest = async () => { @@ -64,17 +64,17 @@ function MyComponent() { }, ], }, - ]; + ] try { - const results = await metamask_batch(batchRequests); - console.log(results); // Process results. + const results = await metamask_batch(batchRequests) + console.log(results) // Process results. } catch (error) { - console.error("Batch request failed", error); + console.error("Batch request failed", error) } - }; + } - return ; + return } ``` diff --git a/wallet/how-to/use-sdk/javascript/connect-and-sign.md b/wallet/how-to/use-sdk/javascript/connect-and-sign.md index 7dcfb64c4e9..99732ab2e28 100644 --- a/wallet/how-to/use-sdk/javascript/connect-and-sign.md +++ b/wallet/how-to/use-sdk/javascript/connect-and-sign.md @@ -47,12 +47,12 @@ const connectAndSign = async () => { try { const signResult = await sdk?.connectAndSign({ msg: "Connect + Sign message", - }); - setResponse(signResult); + }) + setResponse(signResult) } catch (err) { - console.warn("failed to connect..", err); + console.warn("failed to connect..", err) } -}; +} ``` To invoke `connectAndSign`: @@ -67,29 +67,29 @@ The following is an example of using the `connectAndSign` method in a React dapp into a functional component: ```javascript -import React, { useState } from "react"; -import { useSDK } from "@metamask/sdk-react"; +import React, { useState } from "react" +import { useSDK } from "@metamask/sdk-react" function MyComponent() { - const { sdk } = useSDK(); - const [signedMessage, setSignedMessage] = useState(""); + const { sdk } = useSDK() + const [signedMessage, setSignedMessage] = useState("") const handleConnectAndSign = async () => { try { - const message = "Your message here"; - const signature = await sdk.connectAndSign({ msg: message }); - setSignedMessage(signature); + const message = "Your message here" + const signature = await sdk.connectAndSign({ msg: message }) + setSignedMessage(signature) } catch (error) { - console.error("Error in signing:", error); + console.error("Error in signing:", error) } - }; + } return (
      {signedMessage &&

      Signed Message: {signedMessage}

      }
      - ); + ) } ``` @@ -105,4 +105,4 @@ in the JavaScript SDK GitHub repository. [`eth_requestAccounts`]: /wallet/reference/eth_requestAccounts -[`personal_sign`]: /wallet/reference/personal_sign \ No newline at end of file +[`personal_sign`]: /wallet/reference/personal_sign diff --git a/wallet/how-to/use-sdk/javascript/display-custom-modals.md b/wallet/how-to/use-sdk/javascript/display-custom-modals.md index 2793a0f8087..ee09ce8484a 100644 --- a/wallet/how-to/use-sdk/javascript/display-custom-modals.md +++ b/wallet/how-to/use-sdk/javascript/display-custom-modals.md @@ -27,15 +27,15 @@ This example uses the [MetaMask React SDK](react/index.md). Create a custom modal component that aligns with your dapp's design and functionality requirements. ```javascript title="App.js" -import React from "react"; +import React from "react" const CustomModal = ({ onClose }) => (
      -); +) -export default CustomModal; +export default CustomModal ``` ### 2. Implement custom modal logic @@ -46,47 +46,48 @@ for scenarios such as when MetaMask isn't installed. For example: ```javascript title="index.js" -import { MetaMaskProvider } from "@metamask/sdk-react"; -import CustomModal from "./CustomModal"; -import ReactDOM from "react-dom"; +import { MetaMaskProvider } from "@metamask/sdk-react" +import CustomModal from "./CustomModal" +import ReactDOM from "react-dom" const App = () => ( { - let modalContainer = null; + let modalContainer = null return { mount: () => { - modalContainer = document.createElement("div"); - document.body.appendChild(modalContainer); + modalContainer = document.createElement("div") + document.body.appendChild(modalContainer) ReactDOM.render( - { - ReactDOM.unmountComponentAtNode(modalContainer); - modalContainer.remove(); + { + ReactDOM.unmountComponentAtNode(modalContainer) + modalContainer.remove() }} />, modalContainer - ); + ) }, unmount: () => { if (modalContainer) { - ReactDOM.unmountComponentAtNode(modalContainer); - modalContainer.remove(); + ReactDOM.unmountComponentAtNode(modalContainer) + modalContainer.remove() } }, - }; + } }, }, }} > {/* Other components */} -); +) -export default App; +export default App ``` ### 3. Test your custom modal diff --git a/wallet/how-to/use-sdk/javascript/index.md b/wallet/how-to/use-sdk/javascript/index.md index 4cae2ada789..100f2a6466d 100644 --- a/wallet/how-to/use-sdk/javascript/index.md +++ b/wallet/how-to/use-sdk/javascript/index.md @@ -49,7 +49,7 @@ npm i @metamask/sdk In your project script, add the following to import the SDK: ```javascript title="index.js" -import { MetaMaskSDK } from "@metamask/sdk"; +import { MetaMaskSDK } from "@metamask/sdk" ``` ### 3. Instantiate the SDK @@ -64,10 +64,10 @@ const MMSDK = new MetaMaskSDK({ }, infuraAPIKey: process.env.INFURA_API_KEY, // Other options. -}); +}) // You can also access via window.ethereum. -const ethereum = MMSDK.getProvider(); +const ethereum = MMSDK.getProvider() ``` - Use [`dappMetadata`](../../../reference/sdk-js-options.md#dappmetadata) to display information @@ -85,7 +85,7 @@ Always call [`eth_requestAccounts`](/wallet/reference/eth_requestaccounts) using prompts the installation or connection popup to appear. ```javascript -ethereum.request({ method: "eth_requestAccounts", params: [] }); +ethereum.request({ method: "eth_requestAccounts", params: [] }) ``` You can also call the SDK's [`connectAndSign`](connect-and-sign.md) method, and @@ -96,7 +96,7 @@ You can also call the SDK's [`connectAndSign`](connect-and-sign.md) method, and You can copy the full JavaScript example to get started: ```javascript title="index.js" -import { MetaMaskSDK } from "@metamask/sdk"; +import { MetaMaskSDK } from "@metamask/sdk" const MMSDK = new MetaMaskSDK({ dappMetadata: { @@ -105,12 +105,12 @@ const MMSDK = new MetaMaskSDK({ }, infuraAPIKey: process.env.INFURA_API_KEY, // Other options. -}); +}) // You can also access via window.ethereum. -const ethereum = MMSDK.getProvider(); +const ethereum = MMSDK.getProvider() -ethereum.request({ method: "eth_requestAccounts", params: [] }); +ethereum.request({ method: "eth_requestAccounts", params: [] }) ``` See the [example JavaScript dapps](https://github.com/MetaMask/metamask-sdk/tree/main/packages/examples) diff --git a/wallet/how-to/use-sdk/javascript/make-read-only-requests.md b/wallet/how-to/use-sdk/javascript/make-read-only-requests.md index 7d6f0336c26..bb6208a4480 100644 --- a/wallet/how-to/use-sdk/javascript/make-read-only-requests.md +++ b/wallet/how-to/use-sdk/javascript/make-read-only-requests.md @@ -27,7 +27,7 @@ Your dapp cannot directly call the following RPC methods, which require user wal - `wallet_watchAsset` - `wallet_addEthereumChain` - `wallet_switchEthereumChain` -::: + ::: Configure your dapp to make read-only requests using the [Infura API](#use-the-infura-api), [custom nodes](#use-custom-nodes), or [both](#use-the-infura-api-and-custom-nodes). diff --git a/wallet/how-to/use-sdk/javascript/nodejs.md b/wallet/how-to/use-sdk/javascript/nodejs.md index ede4133a897..6cde07e5852 100644 --- a/wallet/how-to/use-sdk/javascript/nodejs.md +++ b/wallet/how-to/use-sdk/javascript/nodejs.md @@ -33,7 +33,7 @@ npm i @metamask/sdk In your project script, add the following to import the SDK: ```javascript title="index.js" -import { MetaMaskSDK } from "@metamask/sdk"; +import { MetaMaskSDK } from "@metamask/sdk" ``` ### 3. Instantiate the SDK @@ -48,10 +48,10 @@ const MMSDK = new MetaMaskSDK({ }, infuraAPIKey: process.env.INFURA_API_KEY, // Other options. -}); +}) // You can also access via window.ethereum -const ethereum = MMSDK.getProvider(); +const ethereum = MMSDK.getProvider() ``` - Use [`dappMetadata`](../../../reference/sdk-js-options.md#dappmetadata) to display information @@ -69,7 +69,7 @@ Always call [`eth_requestAccounts`](/wallet/reference/eth_requestaccounts) using prompts the installation or connection popup to appear. ```javascript -ethereum.request({ method: "eth_requestAccounts", params: [] }); +ethereum.request({ method: "eth_requestAccounts", params: [] }) ``` You can also call the SDK's [`connectAndSign`](connect-and-sign.md) method, and @@ -80,7 +80,7 @@ You can also call the SDK's [`connectAndSign`](connect-and-sign.md) method, and You can copy the full Node.js example to get started: ```javascript title="index.js" -import { MetaMaskSDK } from "@metamask/sdk"; +import { MetaMaskSDK } from "@metamask/sdk" const MMSDK = new MetaMaskSDK({ dappMetadata: { @@ -89,12 +89,12 @@ const MMSDK = new MetaMaskSDK({ }, infuraAPIKey: process.env.INFURA_API_KEY, // Other options. -}); +}) // You can also access via window.ethereum -const ethereum = MMSDK.getProvider(); +const ethereum = MMSDK.getProvider() -ethereum.request({ method: "eth_requestAccounts", params: [] }); +ethereum.request({ method: "eth_requestAccounts", params: [] }) ``` See the [example Node.js dapp](https://github.com/MetaMask/metamask-sdk/tree/main/packages/examples/nodejs) diff --git a/wallet/how-to/use-sdk/javascript/other-web-frameworks.md b/wallet/how-to/use-sdk/javascript/other-web-frameworks.md index 7c75ba74c5a..13b72f32031 100644 --- a/wallet/how-to/use-sdk/javascript/other-web-frameworks.md +++ b/wallet/how-to/use-sdk/javascript/other-web-frameworks.md @@ -34,7 +34,7 @@ npm i @metamask/sdk In your project script, add the following to import the SDK: ```javascript title="index.js" -import { MetaMaskSDK } from "@metamask/sdk"; +import { MetaMaskSDK } from "@metamask/sdk" ``` ### 3. Instantiate the SDK @@ -70,7 +70,7 @@ Always call [`eth_requestAccounts`](/wallet/reference/eth_requestaccounts) using prompts the installation or connection popup to appear. ```javascript -ethereum.request({ method: "eth_requestAccounts", params: [] }); +ethereum.request({ method: "eth_requestAccounts", params: [] }) ``` You can also call the SDK's [`connectAndSign`](connect-and-sign.md) method, and diff --git a/wallet/how-to/use-sdk/javascript/react-native.md b/wallet/how-to/use-sdk/javascript/react-native.md index 06543c5a3c3..795ecc51f0b 100644 --- a/wallet/how-to/use-sdk/javascript/react-native.md +++ b/wallet/how-to/use-sdk/javascript/react-native.md @@ -6,8 +6,8 @@ tags: - JavaScript SDK --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Use MetaMask SDK with React Native and Expo @@ -28,16 +28,16 @@ Create a new React Native or Expo project using the following commands: - ```bash - npx react-native@latest init MyProject - ``` +```bash +npx react-native@latest init MyProject +``` - ```bash - npx create-expo-app devexpo --template - ``` +```bash +npx create-expo-app devexpo --template +``` @@ -49,16 +49,16 @@ Install the SDK and its dependencies using the following commands: - ```bash - npm install eciesjs @metamask/sdk-react ethers@5.7.2 @react-native-async-storage/async-storage node-libs-react-native react-native-background-timer react-native-randombytes react-native-url-polyfill react-native-get-random-values - ``` +```bash +npm install eciesjs @metamask/sdk-react ethers@5.7.2 @react-native-async-storage/async-storage node-libs-react-native react-native-background-timer react-native-randombytes react-native-url-polyfill react-native-get-random-values +``` - ```bash - npx expo install expo-crypto @metamask/sdk-react ethers@5.7.2 @react-native-async-storage/async-storage node-libs-expo react-native-background-timer react-native-randombytes react-native-url-polyfill react-native-get-random-values@1.8.0 - ``` +```bash +npx expo install expo-crypto @metamask/sdk-react ethers@5.7.2 @react-native-async-storage/async-storage node-libs-expo react-native-background-timer react-native-randombytes react-native-url-polyfill react-native-get-random-values@1.8.0 +``` @@ -76,49 +76,49 @@ In React Native or Expo, update the default Metro configuration file to the foll - ```javascript title="metro.config.js" - const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config"); +```javascript title="metro.config.js" +const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config") - const defaultConfig = getDefaultConfig(__dirname); +const defaultConfig = getDefaultConfig(__dirname) - const config = { - transformer: { - getTransformOptions: async () => ({ - transform: { - experimentalImportSupport: false, - inlineRequires: true, - }, - }), - }, - resolver: { - extraNodeModules: { - ...require("node-libs-react-native"), +const config = { + transformer: { + getTransformOptions: async () => ({ + transform: { + experimentalImportSupport: false, + inlineRequires: true, }, + }), + }, + resolver: { + extraNodeModules: { + ...require("node-libs-react-native"), }, - }; + }, +} - module.exports = mergeConfig(defaultConfig, config); - ``` +module.exports = mergeConfig(defaultConfig, config) +``` - ```javascript title="metro.config.js" - const config = getDefaultConfig(__dirname); +```javascript title="metro.config.js" +const config = getDefaultConfig(__dirname) - config.resolver.extraNodeModules = { - ...require("node-libs-expo"), - }; +config.resolver.extraNodeModules = { + ...require("node-libs-expo"), +} - config.transformer.getTransformOptions = async () => ({ - transform: { - experimentalImportSupport: false, - inlineRequires: true, - }, - }); +config.transformer.getTransformOptions = async () => ({ + transform: { + experimentalImportSupport: false, + inlineRequires: true, + }, +}) - module.exports = config; - ``` +module.exports = config +``` @@ -130,20 +130,20 @@ Add the following import statements to the React Native or Expo entry file: - ```javascript title="index.js or App.tsx" - import "node-libs-react-native/globals"; - import "react-native-url-polyfill/auto"; - import "react-native-get-random-values"; - ``` +```javascript title="index.js or App.tsx" +import "node-libs-react-native/globals" +import "react-native-url-polyfill/auto" +import "react-native-get-random-values" +``` - ```javascript title="App.tsx" - import "node-libs-expo/globals"; - import "react-native-url-polyfill/auto"; - import "react-native-get-random-values"; - ``` +```javascript title="App.tsx" +import "node-libs-expo/globals" +import "react-native-url-polyfill/auto" +import "react-native-get-random-values" +``` @@ -165,18 +165,18 @@ Run the React Native or Expo project on Android or iOS using the following comma - ```bash - npx react-native run-android - npx react-native run-ios - ``` +```bash +npx react-native run-android +npx react-native run-ios +``` - ```bash - npx expo run:android - npx expo run:ios - ``` +```bash +npx expo run:android +npx expo run:ios +``` @@ -189,13 +189,13 @@ The following code snippets demonstrate how to use the hook. Import the hook: ```javascript -import { useSDK } from "@metamask/sdk-react"; +import { useSDK } from "@metamask/sdk-react" ``` Initialize the SDK in your main component: ```javascript -const { connect, disconnect, account, chainId, ethereum } = useSDK(); +const { connect, disconnect, account, chainId, ethereum } = useSDK() ``` Connect to MetaMask: @@ -203,11 +203,11 @@ Connect to MetaMask: ```javascript const connectWallet = async () => { try { - await connect(); + await connect() } catch (error) { - console.error("Failed to connect wallet:", error); + console.error("Failed to connect wallet:", error) } -}; +} ``` Handle your dapp's state: @@ -218,15 +218,15 @@ useEffect(() => { if (account && chainId) { // Handle account and network changes. } -}, [account, chainId]); +}, [account, chainId]) ``` Disconnect from MetaMask: ```javascript const disconnectWallet = async () => { - await disconnect(); -}; + await disconnect() +} ``` ## Examples diff --git a/wallet/how-to/use-sdk/javascript/react/index.md b/wallet/how-to/use-sdk/javascript/react/index.md index c04da19c9ec..715650c1681 100644 --- a/wallet/how-to/use-sdk/javascript/react/index.md +++ b/wallet/how-to/use-sdk/javascript/react/index.md @@ -6,8 +6,8 @@ tags: - JavaScript SDK --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Use MetaMask SDK with React @@ -42,7 +42,7 @@ npm i @metamask/sdk-react In your project script, add the following to import the SDK: ```typescript title="index.tsx" -import { MetaMaskProvider } from "@metamask/sdk-react"; +import { MetaMaskProvider } from "@metamask/sdk-react" ``` ### 3. Wrap your project with `MetaMaskProvider` @@ -155,12 +155,12 @@ const connectAndSign = async () => { try { const signResult = await sdk?.connectAndSign({ msg: "Connect + Sign message", - }); - setResponse(signResult); + }) + setResponse(signResult) } catch (err) { - console.warn("failed to connect..", err); + console.warn("failed to connect..", err) } -}; +} ``` You can also [batch multiple JSON-RPC requests](../batch-json-rpc-requests.md) using the diff --git a/wallet/how-to/use-sdk/javascript/react/react-ui.md b/wallet/how-to/use-sdk/javascript/react/react-ui.md index b64709fb610..5baab2357d6 100644 --- a/wallet/how-to/use-sdk/javascript/react/react-ui.md +++ b/wallet/how-to/use-sdk/javascript/react/react-ui.md @@ -6,8 +6,8 @@ tags: - JavaScript SDK --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Use MetaMask SDK with React UI @@ -44,7 +44,7 @@ npm i @metamask/sdk-react-ui In your project script, add the following to import the SDK: ```javascript title="index.js" -import { MetaMaskUIProvider } from "@metamask/sdk-react-ui"; +import { MetaMaskUIProvider } from "@metamask/sdk-react-ui" ``` ### 3. Wrap your project with `MetaMaskUIProvider` @@ -103,16 +103,16 @@ connection to MetaMask. You can use it as follows: ```js title="App.js" -import { MetaMaskButton } from "@metamask/sdk-react-ui"; -import React, { useState } from "react"; +import { MetaMaskButton } from "@metamask/sdk-react-ui" +import React, { useState } from "react" export const App = () => { return (
      - ); -}; + ) +} ```
      @@ -169,8 +169,8 @@ import { useAccount, useSDK, useSignMessage, -} from "@metamask/sdk-react-ui"; -import "./App.css"; +} from "@metamask/sdk-react-ui" +import "./App.css" function AppReady() { const { @@ -181,9 +181,9 @@ function AppReady() { signMessage, } = useSignMessage({ message: "gm wagmi frens", - }); + }) - const { isConnected } = useAccount(); + const { isConnected } = useAccount() return (
      @@ -192,10 +192,7 @@ function AppReady() { {isConnected && ( <>
      - {isSignSuccess &&
      Signature: {signData}
      } @@ -205,20 +202,20 @@ function AppReady() { )}
      - ); + ) } function App() { - const { ready } = useSDK(); + const { ready } = useSDK() if (!ready) { - return
      Loading...
      ; + return
      Loading...
      } - return ; + return } -export default App; +export default App ``` diff --git a/wallet/how-to/use-sdk/mobile/android.md b/wallet/how-to/use-sdk/mobile/android.md index 5d3108f1086..7c603e33c2e 100644 --- a/wallet/how-to/use-sdk/mobile/android.md +++ b/wallet/how-to/use-sdk/mobile/android.md @@ -13,8 +13,9 @@ Import [MetaMask SDK](../../../concepts/sdk/index.md) into your native Android d your users to easily connect with their MetaMask Mobile wallet. :::tip See also + - [Android SDK architecture](../../../concepts/sdk/android.md) -::: + ::: ## Prerequisites @@ -55,10 +56,10 @@ import io.metamask.androidsdk.Ethereum You can connect your dapp to MetaMask in one of two ways: 1. [Use the `ethereum` provider object directly](#31-use-the-provider-object-directly). - We recommend using this method in a pure model layer. + We recommend using this method in a pure model layer. 2. [Use a ViewModel](#32-use-a-viewmodel) that injects the `ethereum` provider object. - We recommend using this method at the app level, because it provides a single instance that - survives configuration changes and can be shared across all views. + We recommend using this method at the app level, because it provides a single instance that + survives configuration changes and can be shared across all views. :::note Logging By default, MetaMask logs three SDK events: `connection_request`, `connected`, and `disconnected`. diff --git a/wallet/how-to/use-sdk/mobile/ios.md b/wallet/how-to/use-sdk/mobile/ios.md index 9056939572e..7d57c21e5c3 100644 --- a/wallet/how-to/use-sdk/mobile/ios.md +++ b/wallet/how-to/use-sdk/mobile/ios.md @@ -7,8 +7,8 @@ tags: - iOS SDK --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Use MetaMask SDK with iOS diff --git a/wallet/index.mdx b/wallet/index.mdx index 07cf3ac6d16..0e1878e5574 100644 --- a/wallet/index.mdx +++ b/wallet/index.mdx @@ -2,7 +2,7 @@ title: Introduction --- -import CardList from '@site/src/components/CardList' +import CardList from "@site/src/components/CardList" # Integrate your dapp with the MetaMask wallet @@ -14,12 +14,14 @@ You can interact with your users' Ethereum accounts, performing tasks such as th { href: "how-to/connect", title: "↔️ Connect to MetaMask", - description: "Connect to MetaMask and other wallets in your users' browsers.", + description: + "Connect to MetaMask and other wallets in your users' browsers.", }, { href: "how-to/sign-data", title: "🖊️ Sign data", - description: "Request signatures from users, and allow them to sign in with Ethereum.", + description: + "Request signatures from users, and allow them to sign in with Ethereum.", }, { href: "how-to/display", @@ -29,8 +31,9 @@ You can interact with your users' Ethereum accounts, performing tasks such as th { href: "how-to/use-sdk", title: "📱 Connect to extension & mobile", - description: "Connect to the MetaMask extension and mobile app using MetaMask SDK.", - } + description: + "Connect to the MetaMask extension and mobile app using MetaMask SDK.", + }, ]} /> @@ -53,18 +56,21 @@ If you're new to integrating dapps with MetaMask, check out the following topics { href: "concepts/sdk", title: "📱 About MetaMask SDK", - description: "Learn about the benefits of the SDK and how the SDK connects to MetaMask.", + description: + "Learn about the benefits of the SDK and how the SDK connects to MetaMask.", }, { href: "tutorials/react-dapp-local-state", title: "🛠️ Create a React dapp tutorial", - description: "Follow the tutorial to create a React dapp and integrate it with MetaMask.", + description: + "Follow the tutorial to create a React dapp and integrate it with MetaMask.", }, { href: "tutorials/javascript-dapp-simple", title: "🛠️ Create a simple dapp tutorial", - description: "Follow the tutorial to create a simple dapp and integrate it with MetaMask.", - } + description: + "Follow the tutorial to create a simple dapp and integrate it with MetaMask.", + }, ]} /> diff --git a/wallet/reference/new-reference.mdx b/wallet/reference/new-reference.mdx index 5d209868a06..c7ac519c3d1 100644 --- a/wallet/reference/new-reference.mdx +++ b/wallet/reference/new-reference.mdx @@ -5,7 +5,7 @@ hide_table_of_contents: true sidebar_class_name: "hidden" --- -import ParserOpenRPC from "@site/src/components/ParserOpenRPC"; -import { NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc"; +import ParserOpenRPC from "@site/src/components/ParserOpenRPC" +import { NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc" - \ No newline at end of file + diff --git a/wallet/reference/provider-api.md b/wallet/reference/provider-api.md index f503b28c168..aa6b7220c10 100644 --- a/wallet/reference/provider-api.md +++ b/wallet/reference/provider-api.md @@ -34,7 +34,7 @@ Non-MetaMask providers may also set this property to `true`. #### Example ```typescript -provider.isMetaMask; // Or window.ethereum.isMetaMask if you don't support EIP-6963. +provider.isMetaMask // Or window.ethereum.isMetaMask if you don't support EIP-6963. ``` ## Methods @@ -62,7 +62,7 @@ None. #### Example ```typescript -provider.isConnected(); // Or window.ethereum.isConnected() if you don't support EIP-6963. +provider.isConnected() // Or window.ethereum.isConnected() if you don't support EIP-6963. ``` ### `request()` @@ -100,7 +100,7 @@ provider // Or window.ethereum if you don't support EIP-6963. value: "0x9184e72a", // 2441406250 data: "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675", }, - ] + ], }) .then((result) => { // The result varies by RPC method. @@ -108,7 +108,7 @@ provider // Or window.ethereum if you don't support EIP-6963. }) .catch((error) => { // If the request fails, the Promise rejects with an error. - }); + }) ``` ### `_metamask.isUnlocked()` @@ -133,7 +133,7 @@ A promise that resolves to `true` if MetaMask is unlocked by the user, and `fals #### Example ```typescript -provider._metamask.isUnlocked(); // Or window.ethereum._metamask.isUnlocked() if you don't support EIP-6963. +provider._metamask.isUnlocked() // Or window.ethereum._metamask.isUnlocked() if you don't support EIP-6963. ``` ## Events @@ -151,12 +151,12 @@ function handleAccountsChanged(accounts) { } provider // Or window.ethereum if you don't support EIP-6963. - .on("accountsChanged", handleAccountsChanged); + .on("accountsChanged", handleAccountsChanged) // Later provider // Or window.ethereum if you don't support EIP-6963. - .removeListener("accountsChanged", handleAccountsChanged); + .removeListener("accountsChanged", handleAccountsChanged) ``` ### `accountsChanged` @@ -193,7 +193,7 @@ We strongly recommend reloading the page upon chain changes, unless you have a g ```typescript provider // Or window.ethereum if you don't support EIP-6963. - .on("chainChanged", (chainId) => window.location.reload()); + .on("chainChanged", (chainId) => window.location.reload()) ``` ::: @@ -253,22 +253,22 @@ subscription update is emitted as a `message` event with a `type` of `eth_subscr #### `removeListener` -Use the `removeListener` method to remove specific event listeners from an `EventEmitter` object. +Use the `removeListener` method to remove specific event listeners from an `EventEmitter` object. In the following example `removeListener` is used to remove the `connect` and `accountsChanged` events: ```javascript // Use window.ethereum instead of provider if EIP-6963 is not supported. // Add listeners -provider.on("_initialized", updateWalletAndAccounts); -provider.on("connect", updateWalletAndAccounts); -provider.on("accountsChanged", updateWallet); -provider.on("chainChanged", updateWalletAndAccounts); -provider.on("disconnect", disconnectWallet); +provider.on("_initialized", updateWalletAndAccounts) +provider.on("connect", updateWalletAndAccounts) +provider.on("accountsChanged", updateWallet) +provider.on("chainChanged", updateWalletAndAccounts) +provider.on("disconnect", disconnectWallet) // Remove individual listeners -provider.removeListener("connect", updateWalletAndAccounts); -provider.removeListener("accountsChanged", updateWallet); +provider.removeListener("connect", updateWalletAndAccounts) +provider.removeListener("accountsChanged", updateWallet) ``` The first argument of `removeListener` is the event name, and the second argument is @@ -276,12 +276,12 @@ a reference to the function passed to `on` for the event. #### `removeAllListeners` -You can use `removeAllListeners` to remove all listeners from the event emitter at once. This method is helpful when you need to clean up all listeners simultaneously. +You can use `removeAllListeners` to remove all listeners from the event emitter at once. This method is helpful when you need to clean up all listeners simultaneously. :::caution Use `removeAllListeners` with caution. -This method clears all event listeners associated with the emitter, not only the listeners set up by the application code. +This method clears all event listeners associated with the emitter, not only the listeners set up by the application code. Using this method can unexpectedly clear important event handlers, interfere with scripts, and make debugging more complex. You can use the `removeListener` method to safely remove specific listeners. @@ -291,11 +291,11 @@ You can use the `removeListener` method to safely remove specific listeners. // Use window.ethereum instead of provider if EIP-6963 is not supported. // Add listeners -provider.on("_initialized", updateWalletAndAccounts); -provider.on("connect", updateWalletAndAccounts); -provider.on("accountsChanged", updateWallet); -provider.on("chainChanged", updateWalletAndAccounts); -provider.on("disconnect", disconnectWallet); +provider.on("_initialized", updateWalletAndAccounts) +provider.on("connect", updateWalletAndAccounts) +provider.on("accountsChanged", updateWallet) +provider.on("chainChanged", updateWalletAndAccounts) +provider.on("disconnect", disconnectWallet) // Remove all listeners provider.removeAllListeners() @@ -309,9 +309,9 @@ All errors returned by the MetaMask provider follow this interface: ```typescript interface ProviderRpcError extends Error { - message: string; - code: number; - data?: unknown; + message: string + code: number + data?: unknown } ``` diff --git a/wallet/reference/sdk-js-options.md b/wallet/reference/sdk-js-options.md index 99c770cbf1f..ea41c197743 100644 --- a/wallet/reference/sdk-js-options.md +++ b/wallet/reference/sdk-js-options.md @@ -5,8 +5,8 @@ tags: - JavaScript SDK --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # JavaScript SDK options @@ -474,4 +474,4 @@ wakeLockType: Temporary The type of wake lock to use when the SDK is running in the background. -Options are `Disabled`, `Temporary`, and `UntilResponse`. \ No newline at end of file +Options are `Disabled`, `Temporary`, and `UntilResponse`. diff --git a/wallet/tutorials/javascript-dapp-simple.md b/wallet/tutorials/javascript-dapp-simple.md index 550fe9edbdf..9299393ddf6 100644 --- a/wallet/tutorials/javascript-dapp-simple.md +++ b/wallet/tutorials/javascript-dapp-simple.md @@ -3,14 +3,14 @@ description: Create a simple dapp to integrate with MetaMask. sidebar_position: 3 --- -# Create a simple dapp +# Create a simple dapp -This tutorial walks you through creating a simple JavaScript dapp and integrating it with MetaMask. +This tutorial walks you through creating a simple JavaScript dapp and integrating it with MetaMask. It demonstrates the basics of connecting to MetaMask: detecting the MetaMask provider, detecting the user's network, and accessing the user's accounts. :::caution Learning tutorial This tutorial is for educational purposes and connects to MetaMask using the legacy provider object, `window.ethereum`, for the sake of simplicity. -For deployment in a production environment, we recommend [connecting to MetaMask using EIP-6963](../how-to/connect/index.md) instead. +For deployment in a production environment, we recommend [connecting to MetaMask using EIP-6963](../how-to/connect/index.md) instead. [EIP-6963](https://eips.ethereum.org/EIPS/eip-6963) introduces an alternative wallet detection mechanism to the `window.ethereum` provider, and enables dapps to support [wallet interoperability](../concepts/wallet-interoperability.md). @@ -62,7 +62,7 @@ import "./style.css" document.querySelector("#app").innerHTML = ` -

      Account:

      `; +

      Account:

      ` ``` Update `index.html` to include the script: @@ -105,26 +105,26 @@ mkdir src && touch src/detect.js In a text editor, add the following code to `src/detect.js` to detect the MetaMask provider using `@metamask/detect-provider`: ```js title="detect.js" -import detectEthereumProvider from "@metamask/detect-provider"; +import detectEthereumProvider from "@metamask/detect-provider" async function setup() { - const provider = await detectEthereumProvider(); + const provider = await detectEthereumProvider() if (provider && provider === window.ethereum) { - console.log("MetaMask is available!"); - startApp(provider); // Initialize your dapp with MetaMask. + console.log("MetaMask is available!") + startApp(provider) // Initialize your dapp with MetaMask. } else { - console.log("Please install MetaMask!"); + console.log("Please install MetaMask!") } } function startApp(provider) { if (provider !== window.ethereum) { - console.error("Do you have multiple wallets installed?"); + console.error("Do you have multiple wallets installed?") } } -window.addEventListener("load", setup); +window.addEventListener("load", setup) ``` ### 4. Detect a user's network @@ -137,15 +137,13 @@ RPC method to detect the chain ID of the user's current network, and listens to user changes networks: ```js title="detect.js" -const chainId = await window.ethereum - .request({ method: "eth_chainId" }); +const chainId = await window.ethereum.request({ method: "eth_chainId" }) -window.ethereum - .on("chainChanged", handleChainChanged); +window.ethereum.on("chainChanged", handleChainChanged) function handleChainChanged(chainId) { // We recommend reloading the page, unless you must do otherwise. - window.location.reload(); + window.location.reload() } ``` @@ -163,12 +161,12 @@ Selecting the button activates the call to `eth_requestAccounts`, allowing you t // You should only attempt to request the user's account in response to user interaction, such as // selecting a button. Otherwise, you risk spamming the user. If you fail to retrieve // the user's account, you should encourage the user to initiate the attempt. -const ethereumButton = document.querySelector(".enableEthereumButton"); -const showAccount = document.querySelector(".showAccount"); +const ethereumButton = document.querySelector(".enableEthereumButton") +const showAccount = document.querySelector(".showAccount") ethereumButton.addEventListener("click", () => { - getAccount(); -}); + getAccount() +}) // While awaiting the call to eth_requestAccounts, you should disable any buttons the user can // select to initiate the request. MetaMask rejects any additional requests while the first is still @@ -176,17 +174,17 @@ ethereumButton.addEventListener("click", () => { async function getAccount() { const accounts = await window.ethereum .request({ method: "eth_requestAccounts" }) - .catch((err) => { - if (err.code === 4001) { - // EIP-1193 userRejectedRequest error. - // If this happens, the user rejected the connection request. - console.log("Please connect to MetaMask."); - } else { - console.error(err); - } - }); - const account = accounts[0]; - showAccount.innerHTML = account; + .catch((err) => { + if (err.code === 4001) { + // EIP-1193 userRejectedRequest error. + // If this happens, the user rejected the connection request. + console.log("Please connect to MetaMask.") + } else { + console.error(err) + } + }) + const account = accounts[0] + showAccount.innerHTML = account } ``` @@ -237,7 +235,7 @@ After connecting, your connected account displays: ## Example -The following code samples contain the full simple dapp JavaScript and HTML code that this tutorial walks through. +The following code samples contain the full simple dapp JavaScript and HTML code that this tutorial walks through. You can copy the following full examples to get started quickly. ### JavaScript @@ -247,64 +245,62 @@ You can copy the following full examples to get started quickly. /* Detect the MetaMask Ethereum provider */ /*****************************************/ -import detectEthereumProvider from "@metamask/detect-provider"; +import detectEthereumProvider from "@metamask/detect-provider" async function setup() { - const provider = await detectEthereumProvider(); + const provider = await detectEthereumProvider() if (provider && provider === window.ethereum) { - console.log("MetaMask is available!"); - startApp(provider); + console.log("MetaMask is available!") + startApp(provider) } else { - console.log("Please install MetaMask!"); + console.log("Please install MetaMask!") } } function startApp(provider) { if (provider !== window.ethereum) { - console.error("Do you have multiple wallets installed?"); + console.error("Do you have multiple wallets installed?") } } -window.addEventListener("load", setup); +window.addEventListener("load", setup) /**********************************************************/ /* Handle chain (network) and chainChanged (per EIP-1193) */ /**********************************************************/ -const chainId = await window.ethereum - .request({ method: "eth_chainId" }); +const chainId = await window.ethereum.request({ method: "eth_chainId" }) -window.ethereum - .on("chainChanged", handleChainChanged); +window.ethereum.on("chainChanged", handleChainChanged) function handleChainChanged(chainId) { - window.location.reload(); + window.location.reload() } /*********************************************/ /* Access the user's accounts (per EIP-1102) */ /*********************************************/ -const ethereumButton = document.querySelector(".enableEthereumButton"); -const showAccount = document.querySelector(".showAccount"); +const ethereumButton = document.querySelector(".enableEthereumButton") +const showAccount = document.querySelector(".showAccount") ethereumButton.addEventListener("click", () => { - getAccount(); -}); + getAccount() +}) async function getAccount() { const accounts = await window.ethereum .request({ method: "eth_requestAccounts" }) - .catch((err) => { - if (err.code === 4001) { - console.log("Please connect to MetaMask."); - } else { - console.error(err); - } - }); - const account = accounts[0]; - showAccount.innerHTML = account; + .catch((err) => { + if (err.code === 4001) { + console.log("Please connect to MetaMask.") + } else { + console.error(err) + } + }) + const account = accounts[0] + showAccount.innerHTML = account } ``` @@ -333,6 +329,6 @@ async function getAccount() { You've successfully created a simple dapp and connected it to MetaMask using JavaScript, Vite, and the `window.ethereum` provider. With this setup, your dapp can interact with MetaMask and allow users to securely access accounts and send transactions on the Ethereum blockchain. -As a next step, you can create a [React dapp with local state](react-dapp-local-state.md). +As a next step, you can create a [React dapp with local state](react-dapp-local-state.md). This follow-up tutorial walks you through integrating a simple React dapp with MetaMask using a single JSX component for managing local state, and the Vite build tool with React and TypeScript to create the dapp. diff --git a/wallet/tutorials/react-dapp-global-state.md b/wallet/tutorials/react-dapp-global-state.md index f4f3d2f0933..72a6a7a4f19 100644 --- a/wallet/tutorials/react-dapp-global-state.md +++ b/wallet/tutorials/react-dapp-global-state.md @@ -4,8 +4,8 @@ toc_max_heading_level: 4 sidebar_position: 2 --- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; # Create a React dapp with global state @@ -22,7 +22,7 @@ The final state of the dapp will look like the following: In this tutorial, you'll put the state into a [React Context](https://react.dev/reference/react/useContext) component, creating a [global state](https://react.dev/learn/reusing-logic-with-custom-hooks#custom-hooks-sharing-logic-between-components) -that allows other components and UI elements to benefit from its data and functions. +that allows other components and UI elements to benefit from its data and functions. You'll use `localStorage` to persist the selected wallet, ensuring the last connected wallet state remains intact even after a page refresh. @@ -157,7 +157,7 @@ Add the following CSS code to `WalletError.module.css`: border-radius: 0.5em; height: 36px; padding: 16px; - color: #EFEFEF; + color: #efefef; background-color: transparent; user-select: none; } @@ -276,9 +276,18 @@ interface EIP1193Provider { isStatus?: boolean host?: string path?: string - sendAsync?: (request: { method: string, params?: Array }, callback: (error: Error | null, response: unknown) => void) => void - send?: (request: { method: string, params?: Array }, callback: (error: Error | null, response: unknown) => void) => void - request: (request: { method: string, params?: Array }) => Promise + sendAsync?: ( + request: { method: string; params?: Array }, + callback: (error: Error | null, response: unknown) => void + ) => void + send?: ( + request: { method: string; params?: Array }, + callback: (error: Error | null, response: unknown) => void + ) => void + request: (request: { + method: string + params?: Array + }) => Promise } // Combines the provider's metadata with an actual provider object, creating a complete picture of a @@ -290,10 +299,10 @@ interface EIP6963ProviderDetail { // Represents the structure of an event dispatched by a wallet to announce its presence based on EIP-6963. type EIP6963AnnounceProviderEvent = { - detail:{ - info: EIP6963ProviderInfo, + detail: { + info: EIP6963ProviderInfo provider: Readonly - } + } } // An error object with optional properties, commonly encountered when handling eth_requestAccounts errors. @@ -313,7 +322,13 @@ Add the following code to `src/hooks/WalletProvider.tsx` to import the context, type alias, and define the context interface for the EIP-6963 provider: ```tsx title="WalletProvider.tsx" -import { PropsWithChildren, createContext, useCallback, useEffect, useState } from "react" +import { + PropsWithChildren, + createContext, + useCallback, + useEffect, + useState, +} from "react" // Type alias for a record where the keys are wallet identifiers and the values are account // addresses or null. @@ -335,7 +350,7 @@ Add the following code to `src/hooks/WalletProvider.tsx` to extend the global `W interface with the custom `eip6963:announceProvider` event: ```tsx title="WalletProvider.tsx" -declare global{ +declare global { interface WindowEventMap { "eip6963:announceProvider": CustomEvent } @@ -384,15 +399,15 @@ export const WalletProvider: React.FC = ({ children }) => { window.addEventListener("eip6963:announceProvider", onAnnouncement) window.dispatchEvent(new Event("eip6963:requestProvider")) - + return () => window.removeEventListener("eip6963:announceProvider", onAnnouncement) }, []) ``` -In this code sample, lines 6–12 are state definitions: +In this code sample, lines 6–12 are state definitions: -- `wallets` - State to hold detected wallets. -- `selectedWalletRdns` - State to hold the Reverse Domain Name System (RDNS) of the selected wallet. +- `wallets` - State to hold detected wallets. +- `selectedWalletRdns` - State to hold the Reverse Domain Name System (RDNS) of the selected wallet. - `selectedAccountByWalletRdns` - State to hold accounts associated with each wallet. - `errorMessage` - State to hold the error message when a wallet throws an error on connection. - `clearError` - Function to clear the state in `errorMessage`. @@ -401,7 +416,7 @@ In this code sample, lines 6–12 are state definitions: Line 14 is the `useEffect` hook and it handles the following: - Local storage retrieval - On mount, it retrieves the saved selected wallet and accounts from local storage. -- Event listener - It adds an event listener for the custom `eip6963:announceProvider` event. +- Event listener - It adds an event listener for the custom `eip6963:announceProvider` event. - State update - When the provider announces itself, it updates the state. - Provider request - It dispatches an event to request existing providers. - Cleanup - It removes the event listener on unmount. @@ -409,30 +424,40 @@ Line 14 is the `useEffect` hook and it handles the following: Add the following code to `src/hooks/WalletProvider.tsx` to connect a wallet and update the component's state: ```tsx title="WalletProvider.tsx" -const connectWallet = useCallback(async (walletRdns: string) => { - try { - const wallet = wallets[walletRdns] - const accounts = await wallet.provider.request({method:"eth_requestAccounts"}) as string[] - - if(accounts?.[0]) { - setSelectedWalletRdns(wallet.info.rdns) - setSelectedAccountByWalletRdns((currentAccounts) => ({ - ...currentAccounts, - [wallet.info.rdns]: accounts[0], - })) - - localStorage.setItem("selectedWalletRdns", wallet.info.rdns) - localStorage.setItem("selectedAccountByWalletRdns", JSON.stringify({ - ...selectedAccountByWalletRdns, - [wallet.info.rdns]: accounts[0], - })) +const connectWallet = useCallback( + async (walletRdns: string) => { + try { + const wallet = wallets[walletRdns] + const accounts = (await wallet.provider.request({ + method: "eth_requestAccounts", + })) as string[] + + if (accounts?.[0]) { + setSelectedWalletRdns(wallet.info.rdns) + setSelectedAccountByWalletRdns((currentAccounts) => ({ + ...currentAccounts, + [wallet.info.rdns]: accounts[0], + })) + + localStorage.setItem("selectedWalletRdns", wallet.info.rdns) + localStorage.setItem( + "selectedAccountByWalletRdns", + JSON.stringify({ + ...selectedAccountByWalletRdns, + [wallet.info.rdns]: accounts[0], + }) + ) + } + } catch (error) { + console.error("Failed to connect to provider:", error) + const walletError: WalletError = error as WalletError + setError( + `Code: ${walletError.code} \nError Message: ${walletError.message}` + ) } - } catch (error) { - console.error("Failed to connect to provider:", error) - const walletError: WalletError = error as WalletError - setError(`Code: ${walletError.code} \nError Message: ${walletError.message}`) - } -}, [wallets, selectedAccountByWalletRdns]) + }, + [wallets, selectedAccountByWalletRdns] +) ``` This code uses the `walletRdns` parameter to identify the wallet's RDNS for connecting. @@ -449,17 +474,17 @@ const disconnectWallet = useCallback(async () => { [selectedWalletRdns]: null, })) - const wallet = wallets[selectedWalletRdns]; + const wallet = wallets[selectedWalletRdns] setSelectedWalletRdns(null) localStorage.removeItem("selectedWalletRdns") try { await wallet.provider.request({ method: "wallet_revokePermissions", - params: [{ "eth_accounts": {} }] - }); + params: [{ eth_accounts: {} }], + }) } catch (error) { - console.error("Failed to revoke permissions:", error); + console.error("Failed to revoke permissions:", error) } } }, [selectedWalletRdns, wallets]) @@ -478,7 +503,7 @@ will still execute.

      Both of the previous functions use `useCallback`. It is used to memoize the `connectWallet` function, optimize performance, and prevent unnecessary re-renders. -It ensures the function instance remains consistent between renders if its dependencies are changed. +It ensures the function instance remains consistent between renders if its dependencies are changed. For example, when using `disconnectWallet`, each time the `WalletProvider` component re-renders without `useCallback`, a new instance of `disconnectWallet` is created. @@ -490,6 +515,7 @@ re-renders of child components. Although `useCallback` is not strictly necessary, it demonstrates best practices. Predicting how a context provider will be used or how the dapp might change or scale is difficult. Using `useCallback` can improve performance in some cases by reducing unnecessary re-renders. +

      @@ -498,8 +524,12 @@ Add the following code to `src/hooks/WalletProvider.tsx` to bundle the state and ```tsx title="WalletProvider.tsx" const contextValue: WalletProviderContext = { wallets, - selectedWallet: selectedWalletRdns === null ? null : wallets[selectedWalletRdns], - selectedAccount: selectedWalletRdns === null ? null : selectedAccountByWalletRdns[selectedWalletRdns], + selectedWallet: + selectedWalletRdns === null ? null : wallets[selectedWalletRdns], + selectedAccount: + selectedWalletRdns === null + ? null + : selectedAccountByWalletRdns[selectedWalletRdns], errorMessage, connectWallet, disconnectWallet, @@ -507,16 +537,16 @@ const contextValue: WalletProviderContext = { } return ( - - {children} - + + {children} + ) ``` In the return statement, the `contextValue` object is constructed with all necessary state and functions related to wallet management. It is passed to the `WalletProviderContext.Provider`, making wallet-related data and functions -available to all descendant components. +available to all descendant components. The context provider wraps the children components, allowing them to access the context values. Add the following code to `src/hooks/useWalletProvider.tsx` to provide a custom hook that simplifies @@ -549,7 +579,7 @@ export const formatChainAsNum = (chainIdHex: string) => { } export const formatAddress = (addr: string) => { - const upperAfterLastTwo = addr.slice(0,2) + addr.slice(2) + const upperAfterLastTwo = addr.slice(0, 2) + addr.slice(2) return `${upperAfterLastTwo.substring(0, 5)}...${upperAfterLastTwo.substring(39)}` } ``` @@ -578,14 +608,14 @@ import { WalletProvider } from "~/hooks/WalletProvider" function App() { return ( - {/* + {/*
      */}
      - ) + ) } export default App @@ -608,19 +638,22 @@ export const WalletList = () => { <>

      Wallets Detected:

      - { - Object.keys(wallets).length > 0 - ? Object.values(wallets).map((provider: EIP6963ProviderDetail) => ( - - )) - :
      there are no Announced Providers
      - } + {Object.keys(wallets).length > 0 ? ( + Object.values(wallets).map((provider: EIP6963ProviderDetail) => ( + + )) + ) : ( +
      there are no Announced Providers
      + )}
      - ) + ) } ``` @@ -648,31 +681,41 @@ import { formatAddress } from "~/utils" import styles from "./SelectedWallet.module.css" export const SelectedWallet = () => { - const { selectedWallet, selectedAccount, disconnectWallet } = useWalletProvider() + const { selectedWallet, selectedAccount, disconnectWallet } = + useWalletProvider() return ( <> -

      {selectedAccount ? "" : "No "}Wallet Selected

      - {selectedAccount && +

      + {selectedAccount ? "" : "No "}Wallet Selected +

      + {selectedAccount && ( <>
      - {selectedWallet.info.name} + {selectedWallet.info.name}
      {selectedWallet.info.name}
      ({formatAddress(selectedAccount)})
      -
      uuid: {selectedWallet.info.uuid}
      -
      rdns: {selectedWallet.info.rdns}
      +
      + uuid: {selectedWallet.info.uuid} +
      +
      + rdns: {selectedWallet.info.rdns} +
      - } + )} - ) + ) } ``` The code in lines 11-22 have conditional rendering, ensuring that the content inside is only displayed if `selectedAccount` is true. This ensures that detailed information about the selected wallet is only displayed when an active -wallet is connected. +wallet is connected. You can display information about the wallet, and conditionally render anything related to the following: @@ -699,14 +742,17 @@ export const WalletError = () => { const isError = !!errorMessage return ( -
      - {isError && +
      + {isError && (
      Error: {errorMessage}
      - } + )}
      - ) + ) } ``` @@ -741,7 +787,7 @@ function App() { - ) + ) } export default App diff --git a/wallet/tutorials/react-dapp-local-state.md b/wallet/tutorials/react-dapp-local-state.md index 53fe0587ae0..9f8766ca131 100644 --- a/wallet/tutorials/react-dapp-local-state.md +++ b/wallet/tutorials/react-dapp-local-state.md @@ -108,9 +108,18 @@ interface EIP1193Provider { isStatus?: boolean host?: string path?: string - sendAsync?: (request: { method: string, params?: Array }, callback: (error: Error | null, response: unknown) => void) => void - send?: (request: { method: string, params?: Array }, callback: (error: Error | null, response: unknown) => void) => void - request: (request: { method: string, params?: Array }) => Promise + sendAsync?: ( + request: { method: string; params?: Array }, + callback: (error: Error | null, response: unknown) => void + ) => void + send?: ( + request: { method: string; params?: Array }, + callback: (error: Error | null, response: unknown) => void + ) => void + request: (request: { + method: string + params?: Array + }) => Promise } // Combines the provider's metadata with an actual provider object, creating a complete picture of a @@ -122,7 +131,7 @@ interface EIP6963ProviderDetail { // Represents the structure of an event dispatched by a wallet to announce its presence based on EIP-6963. type EIP6963AnnounceProviderEvent = { - detail:{ + detail: { info: EIP6963ProviderInfo provider: EIP1193Provider } @@ -145,7 +154,7 @@ Create a `src/hooks` directory, and create a file `store.ts` in that directory w ```ts title="store.ts" // Extends WindowEventMap interface, including a custom event eip6963:announceProvider. -declare global{ +declare global { interface WindowEventMap { "eip6963:announceProvider": CustomEvent } @@ -159,21 +168,23 @@ let providers: EIP6963ProviderDetail[] = [] // across the dapp. export const store = { // Returns the current state of providers. - value: ()=> providers, + value: () => providers, // Subscribes to provider announcements and updates the store accordingly. // Takes a callback function to be invoked on each store update, returning a function to // unsubscribe from the event. - subscribe: (callback: ()=> void) => { - function onAnnouncement(event: EIP6963AnnounceProviderEvent){ - if(providers.map(p => p.info.uuid).includes(event.detail.info.uuid)) return + subscribe: (callback: () => void) => { + function onAnnouncement(event: EIP6963AnnounceProviderEvent) { + if (providers.map((p) => p.info.uuid).includes(event.detail.info.uuid)) + return providers = [...providers, event.detail] callback() } - window.addEventListener("eip6963:announceProvider", onAnnouncement); - window.dispatchEvent(new Event("eip6963:requestProvider")); + window.addEventListener("eip6963:announceProvider", onAnnouncement) + window.dispatchEvent(new Event("eip6963:requestProvider")) - return () => window.removeEventListener("eip6963:announceProvider", onAnnouncement) - } + return () => + window.removeEventListener("eip6963:announceProvider", onAnnouncement) + }, } ``` @@ -187,10 +198,11 @@ the store updates. Create a file `useSyncProviders.ts` in the `hooks` directory with the following code: ```tsx title="useSyncProviders.ts" -import { useSyncExternalStore } from "react"; -import { store } from "./store"; +import { useSyncExternalStore } from "react" +import { store } from "./store" -export const useSyncProviders = ()=> useSyncExternalStore(store.subscribe, store.value, store.value) +export const useSyncProviders = () => + useSyncExternalStore(store.subscribe, store.value, store.value) ``` `useSyncExternalStore` takes three arguments: @@ -210,7 +222,7 @@ when the component unmounts. ### 5. Create connect buttons Create an array of buttons that the user can select to connect to the EIP-6963 wallet providers that -you detect. +you detect. Update `src/App.tsx` to the following: @@ -223,12 +235,11 @@ const App = () => { const handleConnect = async (providerWithInfo: EIP6963ProviderDetail) => { try { - const accounts = await providerWithInfo.provider.request({ - method: "eth_requestAccounts" - }) as string[] - + const accounts = (await providerWithInfo.provider.request({ + method: "eth_requestAccounts", + })) as string[] } catch (error) { - console.error(error); + console.error(error) } } @@ -236,17 +247,19 @@ const App = () => {

      Wallets Detected:

      - { - providers.length > 0 ? providers?.map((provider: EIP6963ProviderDetail) => ( - - )) : -
      - No Announced Wallet Providers -
      - } + )) + ) : ( +
      No Announced Wallet Providers
      + )}
      ) @@ -386,7 +399,7 @@ Add the following CSS to `src/App.css` to style the error message: .mmError { height: 36px; padding: 16px; - color: #EFEFEF; + color: #efefef; background-color: transparent; } ```