# Ankr — Full Documentation
Generated at build time. Pages: 682. Source URLs are absolute under https://www.ankr.com/docs/.
---
url: https://www.ankr.com/docs/
title: Ankr Docs
description: Ankr is the open Web3 infrastructure layer. Build with public RPC, Premium endpoints, Advanced API, AppChains, and staking — all from one place.
source: docs/index.mdx
---
---
url: https://www.ankr.com/docs/info-map/
title: Information Map
description: This section aims at navigating your ship fast and easy through the vast ocean of our docs. Here you can find the sections we have and the info they contain.
source: docs/info-map.mdx
---
# Information Map
This section aims at navigating your ship fast and easy through the vast ocean of our docs. Here you can find the sections we have and the info they contain.
## Node API
* [**Getting Started**](/rpc-service/getting-started/intro/)
Basics on Web3 API platform functionality; intro into UI; common user actions (signing in, depositing funds, using endpoints); creation of business-specific accounts, using multiple projects, and performing duties under different access rights.
* [**Overview**](/rpc-service/overview/)
Basics on what a Web3 API platform is, its architecture, technologies, and user-service interaction safeguards.
* [**Service Plans**](/rpc-service/service-plans/)
Service plans available to empower your Web3 projects with blockchain interaction capabilities, along with their feature list, rate limits, and charging models.
* [**Pricing**](/rpc-service/pricing/)
Pay-as-you-go (PAYG) / Deal models definition and pricing per request info.
* [**Supported Chains**](/rpc-service/chains/chains-list/)
The list of chains we can empower your project to interact with along with the API Reference docs for those chains.
## Advanced API
* [**Overview**](/advanced-api/overview/)
Advanced API basics; chains and methods supported; pricing per methods.
* [**Pricing**](/advanced-api/pricing/)
Advanced API charging model and pricing per method.
* [**Full API Reference**](/api-reference/)
Advanced API Reference docs with dynamic request/response samples.
* [**Ankr.js SDK**](/advanced-api/javascript-sdk/)
Docs on a JavaScript library for interaction with Advanced API.
* [**Ankr.py SDK**](/advanced-api/python-sdk/)
Docs on a Python library for interaction with Advanced API.
* [**Ankr React Hooks**](/advanced-api/react-hooks/)
React Hooks for fetching data from Advanced API.
* [**Quickstart Guide**](/advanced-api/quickstart/overview/)
Basic tutorials for Advanced API interaction.
## Blockchain Node Snapshots
* [**Blockchain Node Snapshots**](/node-snapshot/)
Node Snapshots used in nodes syncing by our Infrastructure engineering teams.
## Contract Automation
* [**Overview**](/automation/overview/)
Contract automation basics; types of triggers; supported networks.
* [**Time-based Automation**](/automation/time-based-automation/)
Automate calls to a contract on a custom schedule.
* [**Custom Logic Automation**](/automation/custom-logic-automation/)
Automate calls to a contract on an event of your choice.
* [**Manage Automation Tasks**](/automation/manage-tasks/)
Manage your automation tasks from a single dashboard.
## Tutorials
* [**Basic Tutorials**](/basic-tutorials/dapp-on-ethereum-using-nocode/)
Basic tutorials to start learning when new to Web3.
* [**Smart Contract Development**](/smart-contract-tutorials/erc-721-smart-contract-on-avalanche/)
Step-by-step instructions on how to create and deploy smart contracts.
* [**Advanced Tutorials**](/advanced-tutorials/donation-based-crowdfunding-dapp-on-polygon-with-ankr/)
Advanced tutorials for building complex dApps.
## Scaling Services
* [**Overview**](/scaling-services-overview/)
Ankr Scaling Services basics; what they are, rollup stacks, the data availability and interoperability layers supported.
* [**Rollups**](/scaling-services-rollups/overview/)
A RaaS service to configure and deploy your own rollup.
* [**Sidechains**](/scaling-services-sidechains/overview/)
A SaaS service to create your own fast and reliable network.
## Staking
* [**For Developers**](/staking-for-developers/overview/)
Staking implementation details, smart contract and RESTful API, SDK reference, price and APR oracles, flash loans, and referral program.
* [**Delegated Staking**](/delegated-staking/ankr/overview/)
Delegated staking how-tos; ANKR and GNO stake, unstake, FAQ, general information.
* [**Liquid Staking**](/liquid-staking/overview/)
Liquid staking how-tos; AVAX, BNB, DOT, ETH, FTM, KSM, POL stake, unstake, FAQ, general information, audit reports.
* [**Liquid Crowdloan**](/liquid-crowdloan/overview/)
Liquid Crowdloan basics; general information.
* [**DeFi**](/defi/overview/)
Ankr DeFi basics; Liquidity Pools, Yield Farming, Vaults, how to use them.
* [**Bridge**](/bridge/overview/)
Bridge basics; general information, how to bridge tokens between networks.
* [**Switch**](/switch/overview/)
Switch basics; general information, how to switch one Liquid Staking Token for another.
* [**Extra**](/staking-extra/audit-reports/)
Extra information; list of all audit reports, technical service fees, validators, smart contract addresses, compatible wallets, specific fixes, types of Liquid Staking Tokens, ANKR tokenomics and governance.
## Support
* [**Request Support**](https://ankrnetwork.atlassian.net/servicedesk/customer/portal/10)
Open a ticket and request support for your problem; we will find a solution to resolve it.
* [**Knowledge Base**](https://ankrnetwork.atlassian.net/wiki/spaces/EUSKB/overview)
Knowledge base with questions and answers to some topics not covered by this documentation.
---
url: https://www.ankr.com/docs/node-snapshot/
title: Blockchain Node Snapshots
description: Ankr has partnered with Storj to provide the community with easy access to the blockchain state snapshots used in nodes syncing by our Infrastructure enginee.
source: docs/node-snapshot.mdx
---
# Blockchain Node Snapshots
Ankr has partnered with [Storj](https://www.storj.io/) to provide the community with easy access to the blockchain state snapshots used in nodes syncing by our Infrastructure engineering teams.
**Chains supported**:
* Ethereum
* Polygon
* BNB Smart Chain
Find the full list of available snapshots [here](https://www.chainsnap.io/).
## Snapshot download
**Prerequisites**:
* Uplink CLI (for downloading from Storj)
* Tar (for inline decompression)
**Download and install Uplink**:
* AMD64 see below, for other OS — see [here](https://docs.storj.io/dcs/downloads/download-uplink-cli):
```shell
curl -L https://github.com/storj/storj/releases/latest/download/uplink_linux_amd64.zip -o uplink_linux_amd64.zip
unzip -o uplink_linux_amd64.zip
sudo install uplink /usr/local/bin/uplink
```
**Download a chain snapshot**:
1. At [chainsnap.io](https://www.chainsnap.io/), scroll down to the **Available Snapshots** list.
From here, there are two flows currently at work:
* **Buy Now** — click to proceed to payment that ends up by receiving an access token from Storj.
* **Request Download** — click to submit a request filling in your email that will be used to send you the payment link.
2. Pay through the Storj portal to receive the access token required to download a snapshot.
3. Use the inline multithread download that unTARs to your target directory (does not require double the hard drive space):
```shell
uplink cp --parallelism 16 --access '' sj://chains/snapshot.tar.zst - | tar -xv --use-compress-program=zstd -C ~/chain/data
```
---
url: https://www.ankr.com/docs/privacy/
title: Privacy Policy
description: At Ankr, we treat our user's privacy with the utmost respect. We cherish the credit of trust you put in us. And we stand guard keeping your information secur.
source: docs/privacy.mdx
---
# Privacy Policy
At Ankr, we treat our user's privacy with the utmost respect. We cherish the credit of trust you put in us. And we stand guard keeping your information secure and confidential.
> **"Let us be clear – we do not rent, sell, or trade any Personal Information."** — *Stanley Wu, CTO*.
**Quick links**:
* Our complete [Privacy Policy](https://www.ankr.com/privacy-policy/) page.
* Our complete [Terms of Use Agreement](https://www.ankr.com/terms/) page.
This section is an attempt to distill and simplify the complete Privacy Policy page to provide you with the concise essentials of our policies and practices regarding your Personal Information and the way we treat it.
This section is just the way to facilitate understanding of our Privacy Policy and can't be regarded as the substitute for the complete Privacy Policy page.
## General terms FAQ
Let's proceed with investigating the Privacy Policy, the roles we play under it, the interaction we have as the parties, the Personal Information you might share with us, and our treatment of that information:
### What is it all about?
The Ankr [Privacy Policy](https://www.ankr.com/privacy-policy/) describes how we collect, utilize, disclose, share, and protect your Personal Information upon interacting with Ankr. This Privacy Policy forms a part of our [Terms of Use Agreement](https://www.ankr.com/terms/), which governs the use of the Platform.
### Who's Ankr?
Ankr is a close group of like-minded people from all over the World united by the goal of helping anyone build products using top-notch Web3 infrastructure and technology. From the legal standpoint, we refer to Ankr Inc., its subsidiaries, affiliates, employees, officers, and agents collectively as “Ankr” (or "Company", or "we", or “us”).
### Who's our user?
We consider anyone who visits our Platform, uses our products and services or becomes our official client to be our user. We don't differentiate: you've come to us — we respect your privacy!
### How user interacts with Ankr?
By the user interaction with Ankr, we imply the use of the Platform.
### What is the Platform?
The term "Platform" encompasses the [website](https://www.ankr.com), the applications, products, and services (Public or Premium) provided by Ankr Inc., as well as any other websites or services where this Privacy Policy is linked or referenced.
### What are Public Services?
Public Services consist of publicly available Web3 infrastructure accessed on a free, permissionless, basis. It requires no registration with us or on the Platform, which means less information collected to provide such services.
### What are Premium Services?
Premium Services are the paid services accessible on a permissioned basis. Your subscription to any Premium Services will be subject to a separate written agreement, which requires us to collect certain information that helps facilitate payment for and communication about your Premium Services, fulfill our contract with you, and otherwise support our provision of the paid-for Premium Services.
### What is Personal Information?
“Personal Information” means information that identifies, relates to, or describes, directly or indirectly, an individual or household. This Privacy Policy applies to Personal Information we collect through the following means:
* On the Platform.
* In email, text, or other electronic messages between you and us.
* Through the apps downloaded from the Platform.
It does not apply to Personal Information collected by:
* Us offline or through any other means or websites operated by Company or any third party (including our affiliates and subsidiaries) that is not a part of the Platform.
* Any third party through any application or content that may link to or be accessible from or on the Platform.
## Collected info FAQ
Here, we continue investigating all the questions that might arise information-wise: what info we collect or you provide us with, how we use your info, how you can edit it, is it safe with us, and under what circumstances can we disclose it.
### What non-technical info you might provide us with?
Depending on whether you are purchasing a Premium Service or using a free Public Service offering, you may choose to provide some or all of the following types of Personal Information:
* Email address or organization name.
* Filling in forms on the Platform (upon registering to use the Platform or subscribing to our service). Also refers to the information we may ask you to provide when you report a problem with the Platform.
* Records and copies of correspondence and other communications you choose to direct to us.
* Payment information you use to pay for a Premium Service.
### What's the technical info collected from all users?
The following technical information, some of which may be capable of association with individual users or devices (“Ephemeral Activity Data”) may be collected from any user:
* IP address (used to infer general location (city or zip code) on an anonymous basis), and other unique identifiers associated with your devices or browsers.
* Device and system information, such as your operating system version and network information.
* Information about transactions you conduct through or on the Platform (associated API key information, etc.).
* Usage activity about how you view and interact with the Platform.
### How we use your info?
We use information collected from you or provided to us, including any Personal Information, in the following ways:
* To present the Platform and our products or services to you.
* In the case of Ephemeral Activity Data, solely to facilitate improvement or optimization of the Platform (to optimize latency and quality of service, to anonymously monitor web traffic patterns and generate related, non-identifiable data used to improve quality of service, to prevent DDoS or other malicious attacks on the Platform, to respond to customer-service requests by applicable Premium Service customers, etc.).
* To carry out our obligations and enforce our rights arising from any contracts entered into between you and us (including for billing and collection).
* To notify you about changes to the Platform, our Website, or any products or services we offer or provide though it.
* For any other purpose with your express consent.
### Can I edit, delete, or update my info?
> **Sure you can. Email a request at privacy@ankr.com**
Where applicable, you can review and change your Personal Information by logging into the Website and visiting your account profile page.
You may also email us at privacy@ankr.com to request access to, correct, or delete any Personal Information that you have provided to us. But note that we can delete your Personal Information only by deleting your user account.
We may not accommodate a request to change information if we believe the change would violate any law or legal requirement or cause the information to be incorrect.
### Is my data secure with you?
> **We are doing our best for it to be safe.**
We have implemented measures designed to secure your Personal Information from accidental loss and unauthorized access, use, alteration, and disclosure. The information you provide is stored on our secure servers behind firewalls.
The safety and security of your information also depend on you. You are responsible for keeping your Platform's password or other private data secure and confidential. We urge you to be careful about sharing any such information with anyone.
### Can we disclose your info?
> **We may — in certain cases.**
We may disclose Personal Information that we collect, or that you provide, as described in this Privacy Policy:
* To fulfill the purpose for which you provide it.
* For any other purpose disclosed by us when you provide the information.
* With your consent.
We may also disclose such information:
* To comply with any court order, applicable law, or enforceable legal process, including to respond to any government or regulatory request.
* In connection with the sale or contemplated sale of the company, its assets, or a portion thereof.
* If we believe disclosure is necessary or appropriate to protect the rights, property, or safety of Ankr, our customers, or others.
## Ephemeral Activity Data FAQ
Here, we continue investigating the Privacy Policy regarding the Ephemeral Activity Data we collect: how we treat such info and what's our retention policy for it.
### How we treat the Ephemeral Activity Data?
> **We will not correlate or associate Ephemeral Activity Data for the purpose of identifying or tracking you.**
At no time during our collection or use of provided information do we link, correlate, or otherwise cause to be associated any non-technical identifying information you provide with any Ephemeral Activity Data that we automatically collect upon your interaction with the Platform.
That is also true for any piece of Ephemeral Activity Data (for example, Internet Protocol (IP) addresses) — at no time do we link, correlate, or otherwise cause to be associated such data with any other piece of Ephemeral Activity Data for purposes of identifying, tracking, or profiling you.
Ephemeral Activity Data is “anonymized” as soon as is practicable upon receiving it — to further prevent any such association.
### What about retention of Ephemeral Activity Data?
> **We automatically delete Ephemeral Activity Data within thirty (30) days of its collection.**
Unless we notify you on the need to retain certain data, we will automatically delete any and all Ephemeral Activity Data within thirty (30) days of its collection. This practice reflects the fact that Ankr only uses Ephemeral Activity Data to facilitate and optimize users’ access to the Platform and to generate anonymized web traffic analysis that we use to improve the performance of the services we provide the users with.
## Particular groups FAQ
Here, we continue investigating our privacy practices regarding particular groups of people: children under age 13, residents of California, and non-U.S. residents.
### Can children under 13 access the Platform?
> **The Platform is not intended for children under 13 years of age.**
No one under age 13 may access or provide any information to or on the Platform.
We do not knowingly collect Personal Information from children under 13. If we learn we have collected or received Personal Information from a child under 13 without verification of parental consent, we will delete that information.
If you are the parent or guardian of a child under 13 and believe we have inadvertently collected information about your child, please contact us immediately at: privacy@ankr.com.
### Anything important for California residents?
> **Residents of California can obtain certain info about the types of personal information shared with third parties for direct marketing purposes.**
Under California Civil Code Section 1798.83, California residents have the right to obtain certain information about the types of personal information that companies with whom they have an established business relationship (and that are not otherwise exempt) have shared with third parties for direct marketing purposes during the preceding calendar year, including the names and addresses of those third parties, and examples of the types of services or products marketed by those third parties.
If you are a California resident, and you wish to opt out; or you wish to request certain information regarding our disclosure of your Personal Information to third parties for the direct marketing purposes, please send an e-mail to privacy@ankr.com.
However, please note that we do not currently sell data, nor do we share information with third parties in any way that would trigger the statute’s opt-out requirements.
### Anything important for non-U.S. residents?
> **The applicable privacy laws may vary from your local ones.**
The servers used in connection with the operation and use of the Platform are operated in the United States and elsewhere.
Please be aware that certain information may be transferred to, processed, maintained, and used on computers, servers, and systems located outside your state, province, country, or other governmental jurisdiction where the privacy laws may not be as protective as those in your jurisdiction.
If you are located outside the United States and choose to use the Platform, you hereby consent to such transfer, processing, and use in the United States and elsewhere.
## Miscellaneous FAQ
Here is the closing abstract dealing with the questions on changes in the Privacy Policy or the contacts we have for you if you'd like to share your thoughts or concerns regarding it.
### What about changes to the Privacy Policy?
> **If we make substantial changes to how we treat our users' Personal Information for purposes you've not consented to, we will notify you by email specified in your account.**
It is our policy to post any changes we make to this Privacy Policy on this page. If we make material changes to how we treat our users' Personal Information such that we are using Personal Information for purposes of sharing data with third parties that you have not consented to, we will notify you by email to the primary email address specified in your account.
The Privacy Policy's last revision date is identified at the top of the page. You are responsible for ensuring we have your up-to-date active and deliverable email address. And you are responsible for periodically visiting the Platform and the Privacy Policy to check for any changes.
### Where can I ask questions about the Privacy Policy?
> **To question or comment on the Privacy Policy and our privacy practices, contact us at: privacy@ankr.com.**
If you have any complaints or concerns regarding our compliance with the Privacy Policy, please contact us first. We will investigate and attempt to resolve complaints and disputes regarding the use and disclosure of Personal Information in accordance with the Privacy Policy and applicable law.
---
url: https://www.ankr.com/docs/scaling-services-bsi/
title: Bitcoin Secured Infrastructure
description: Bitcoin Secured Infrastructure is a supplementary framework or protocol built on top of the Bitcoin blockchain to improve its functionality, particularly in.
source: docs/scaling-services-bsi.mdx
---
# Bitcoin Secured Infrastructure
Bitcoin Secured Infrastructure is a supplementary framework or protocol built on top of the Bitcoin blockchain to improve its functionality, particularly in terms of scalability, transaction speed, cost, and security.
As a first step, Asphere forms a strategic alliance with [Babylon](https://babylonlabs.io/) and offers launching your custom Bitcoin chain that natively integrates with Babylon's network and Bitcoin Staking protocol that enhances the crypto-economic security of you chain, makes it a participant of the healthy economics, and provides a highly-scalable chain with fast finality for transactions.
Asphere's Bitcoin Secured Infrastructure provide the following security benefits to chains with Babylon's Bitcoin Timestamping protocol:
* **Solves long-range attacks**: Bitcoin's immutability ensures that finalized PoS blocks cannot be tampered with after they are anchored to the Bitcoin blockchain. This significantly reduces the risk of long-range attacks, where an attacker tries to rewrite the blockchain’s history by manipulating old blocks, as Bitcoin’s Proof-of-Work (PoW) makes such attacks extremely costly and unlikely.
* **No weak subjectivity**: Bitcoin timestamps are objective. It can thus eliminate the dependency of PoS chains on social consensus and weak subjectivity.
* **Shorter unbonding time**: By replacing social consensus, BTC timestamping can reduce the stake unbonding time of PoS chains from weeks to one day.
* **New chain bootstrapping**: New PoS chains with low valuation are more vulnerable to forking attacks. BTC timestamping can help safeguard the chain alone its growth.
* **Verification of state sync and snapshots**: The objective truth about a PoS chain provided by BTC allows the users of the PoS chain to verify the chain state or snapshot it has downloaded from the P2P network.
* **Protecting important transactions**: BTC timestamps can be used to further confirm important PoS transactions at the cost of longer confirmation latency.
* **Censorship Resistance**: BTC timestamping could also be used to fight against transaction censorship in PoS chains via posting censored transactions to BTC.
## Bitcoin Secured Infrastructure tech solution
Asphere offers a comprehensive suite of technical solutions designed to accelerate launching your custom Bitcoin PoS chain:
* **Cosmos SDK Template**: We offer a fully customizable template built on the Cosmos SDK, allowing developers to launch their own blockchain network quickly and start using it with an RPC URL.
* **Babylon Integration**: Native integration with Babylon’s network and Bitcoin staking protocol via the Inter-Blockchain Communication (IBC) protocol ensures that your PoS chain benefits from Bitcoin’s robust security. This integration provides fast finality for transactions and allows seamless interoperability with other blockchains, enhancing the overall security and scalability of your network.
* **VM Flexibility**: Developers can choose between various Virtual Machine (VM) environments, such as Ethereum Virtual Machine (EVM) or WebAssembly (WASM), based on the specific requirements of their project. This flexibility allows you to deploy smart contracts and other decentralized dApps with ease.
* **Modules**: Asphere also offers optional modules like bridges and block explorers to enhance the capabilities of your network. Besides those common items, you have the vast list of modules to choose from:
* **Auth**: Authentication of accounts and transactions for Cosmos SDK applications.
* **Authz**: Authorization for accounts to perform actions on behalf of other accounts.
* **Bank**: Token transfer functionalities.
* **Bank v2**: Token transfer functionalities, enhanced.
* **Circuit**: Circuit breaker module for pausing messages.
* **Consensus** Consensus module for modifying CometBFT's ABCI consensus params.
* **Distribution**: Fee distribution, and staking token provision distribution.
* **Epochs**: Allow other modules to set that they would like to be signaled once every period.
* **Evidence**: Evidence handling for double signing, misbehaviour, etc.
* **Feegrant**: Grant fee allowances for executing transactions.
* **Genutil**: Genesis utilities for the Cosmos SDK.
* **Governance**: On-chain proposals and voting.
* **Mint**: Creation of new units of staking token.
* **NFT**: NFT module implemented based on ADR43.
* **Params**: Globally available parameter store.
* **Protocolpool**: Functionalities handling community pool funds.
* **Slashing**: Validator punishment mechanisms.
* **Staking**: Proof-of-Stake layer for public blockchains.
* **Tx**: Tx utilities for the Cosmos SDK.
* **Upgrade**: Software upgrades handling and coordination.
* **Validate**: Global ante/post handlers and tx validator setup.
---
url: https://www.ankr.com/docs/scaling-services-nocode-deployer/
title: No-Code Deployer
description: No-code Deployer is a Rollup-as-a-Service (RaaS) platform that offers the infrastructure and tools required to implement and manage rollup solutions, elimina.
source: docs/scaling-services-nocode-deployer.mdx
---
# No-Code Deployer
No-code Deployer is a Rollup-as-a-Service (RaaS) platform that offers the infrastructure and tools required to implement and manage rollup solutions, eliminating the need for deep expertise in the underlying technology.
## Asphere Rollup Deployment
A rollup deployment process consists of the following parts:
> [`Sign in`](/scaling-services-nocode-deployer/#sign-in) —> [`Deploy Rollup`](/scaling-services-nocode-deployer/#deploy-testnet-rollup)
* **Sign in**: Authenticate on the platform to start using its functionality.
* **Deploy Rollup**: Define your rollup settings, and then deploy it.
### Sign in
First things first, sign in to use the platform's functionality:
1. Go to the [**Scaling Services**](https://rollup.asphere.xyz/) platform.
2. Click **Sign in > Continue with Google**, and then select an account you'd like to use.
Congrats — you've just signed in to the Scaling Services platform!
For those signing in for the first time, please enter your basic company information so that we know our customers.
---
### Deploy Testnet Rollup
To deploy a rollup using a Testnet network, follow these steps:
1. [Sign in](/scaling-services-nocode-deployer/#sign-in) on the [**Scaling Services**](https://rollup.asphere.xyz/) platform.
2. In **Navigation**, click **Deploy Rollup** to start a rollup configuration process.
3. On the **Essentials** tab, select the following rollup parameters, and then click **Next**:
* **Stack**:
* **Instant**: [Arbitrum Orbit](/scaling-services-overview/#arbitrum-orbit), [OP Stack](/scaling-services-overview/#op-stack), [Polkadot](/scaling-services-overview/#polkadot) — deploy instantly upon completing all the steps.
* **Assisted** (no label): [Base](/scaling-services-overview/#base), [Agglayer CDK](/scaling-services-overview/#agglayer-cdk), [ZKsync's ZK Stack](/scaling-services-overview/#zk-stack) — provide your rollup requirements, and we will generate a Slack or Telegram group to finalize all the aspects of your deployment specification.
* **Network**: Select your **Testnet** option:
* **Trial**: Explore the rollup functionality for free (48 hours).
* **Persistent**: Use a permanent testing environment to experiment with your dapps before deploying them to Mainnet.
* **Settlement Layer**: Select a blockchain responsible for proof verification and dispute resolution:
* **Sepolia**: EVM-compatible testnet.
* **Holesky**: EVM-compatible testnet.
* **Base Sepolia**: a Testnet for Base.
* **Kusama**: a scalable, multichain network, serving as the experimental, community-focused canary network for Polkadot.
* **Westend**: a testnet for Polkadot, designed for testing features and deployments before moving to Kusama or Polkadot.
* **Paseo**: a testnet in the Polkadot ecosystem for validating new features in a safe environment before mainnet deployment.
* **Parachain template** (for the Polkadot stack only): Select an **EVM** or **Generic** template for you parachain.
* **Coretime** (for the Polkadot stack only): Select whether a Bulk, Interlacing, or No coretime required for your rollup.
* **Data Availability Layer**:
* **Instant**: [Ethereum](/scaling-services-overview/#ethereum), [Arbitrum AnyTrust](/scaling-services-overview/#arbitrum-anytrust) — deploy instantly upon completing all the steps.
* **Assisted** (no label): [Celestia](/scaling-services-overview/#celestia), [Eigen Layer](/scaling-services-overview/#eigen-layer), [Avail DA](/scaling-services-overview/#avail-da), [NEAR DA](/scaling-services-overview/#near) — provide your rollup requirements, and we will generate a Slack or Telegram group to finalize all the aspects of your deployment specification.
4. On the **Configuration** tab, specify the following parameters, and then click **Next**:
* **Chain ID**
* **Rollup Name**
* **Gas Token**:
* **ETH**: Use ETH to pay your network's gas fees.
* **Custom Gas Token**: For gas fees, use your [custom ERC-20 token](/scaling-services-nocode-deployer/#custom-gas-token) created and deployed on the network.
* **USDC**: Use USDC to pay your network's gas fees.
* **ANKR**: Use ANKR to pay your network's gas fees.
* **KUS/WND/PAS**: Use KUS/WND/PAS to pay for your network's gas fees.
* **Create a Token**: Get help setting up a custom gas token.
5. On the **Infrastructure** tab, check the components included in your package, and then click **Confirm**.
6. In the **Summary** dialog, check your complete rollup specification, and then click **Confirm**.
7. As an anti-abuse measure, to deploy a rollup on a Testnet, you must have `1 ankrETH` in your wallet.
In the **Prove ankrETH** dialog, perform the following actions to start your rollup deployment:
* Click **Connect MetaMask and prove address**.
* In MetaMask, select the Ethereum address to associate with your account.
* Sign with MetaMask wallet.
Congrats — you've just configured and deployed your Testnet rollup!
---
### Deploy Mainnet Rollup
To deploy a rollup using a Mainnet network, follow these steps:
1. [Sign in](/scaling-services-nocode-deployer/#sign-in) on the [**Scaling Services**](https://rollup.asphere.xyz/) platform.
2. In **Navigation**, click **Deploy Rollup** to start a rollup configuration process.
3. On the **Essentials** tab, select the following rollup parameters, and then click **Next**:
* **Stack**:
* **Instant**: [Arbitrum Orbit](/scaling-services-overview/#arbitrum-orbit), [OP Stack](/scaling-services-overview/#op-stack), [Polkadot](/scaling-services-overview/#polkadot) — deploy instantly upon completing all the steps.
* **Assisted** (no label): [Base](/scaling-services-overview/#base), [Agglayer CDK](/scaling-services-overview/#agglayer-cdk), [ZKsync's ZK Stack](/scaling-services-overview/#zk-stack) — provide your rollup requirements, and we will generate a Slack or Telegram group to finalize all the aspects of your deployment specification.
* **Network**: Select **Mainnet** — to deploy your rollup on a fully operational blockchain network.
* **Infrastructure Package**: Upon selecting Mainnet, you have to select the Infrastructure to be used for your rollup solution:
* **Starter Package**: Block Explorer, Starter RPC Package, Aggregator, Synchronizer, Bridge.
* **Advanced Package**: Block Explorer, Pro RPC Package, Aggregator, Synchronizer, Bridge, Feature prioritization, Dedicated customer support, Advanced customization.
* **Parachain template** (for the Polkadot stack only): Select an **EVM** or **Generic** template for you parachain.
* **Coretime** (for the Polkadot stack only): Select whether a Bulk, Interlacing, or No coretime required for your rollup.
* **Data Availability Layer**:
* **Instant**: [Ethereum](/scaling-services-overview/#ethereum), [Arbitrum AnyTrust](/scaling-services-overview/#arbitrum-anytrust) — deploy instantly upon completing all the steps.
* **Assisted** (no label): [Celestia](/scaling-services-overview/#celestia), [Eigen Layer](/scaling-services-overview/#eigen-layer), [Avail DA](/scaling-services-overview/#avail-da), [NEAR DA](/scaling-services-overview/#near) — provide your rollup requirements, and we will generate a Slack or Telegram group to finalize all the aspects of your deployment specification.
4. On the **Sequencer** tab, select whether you'd like to have an Asphere-managed sequencer or a self-managed sequencer.
5. On the **Configuration** tab, specify the following parameters, and then click **Next**:
* **Chain ID**
* **Rollup Name**
* **Gas Token**:
* **ETH**: Use ETH to pay your network's gas fees.
* **Custom Gas Token**: For gas fees, use your [custom ERC-20 token](/scaling-services-nocode-deployer/#custom-gas-token) created and deployed on the network.
* **USDC**: Use USDC to pay your network's gas fees.
* **ANKR**: Use ANKR to pay your network's gas fees.
* **DOT**: Use DOT to pay your network's gas fees.
* **Create a Token**: Get help setting up a custom gas token.
6. On the **Infrastructure** tab, check the components included in your package, and then click **Confirm**.
7. In the **Summary** dialog, check your complete rollup specification, and then click **Confirm and Pay**. Make sure you have `0.9 ETH` and `0.2 Custom Gas Token` (if using such an option) in your wallet to deploy your rollup on a Mainnet.
8. On the Stripe / Loop Crypto checkout page, follow the instructions to pay for and deploy the configured rollup.
Congrats — you've just configured and deployed your Mainnet rollup!
---
## Solana SPE Deployment
An [SPE](https://solana.com/solutions/solana-permissioned-environments) deployment process consists of the following parts:
> [`Sign in`](/scaling-services-nocode-deployer/#sign-in-2) —> [`Deploy Rollup`](/scaling-services-nocode-deployer/#deploy-testnet-rollup-2)
* **Sign in**: Authenticate on the platform to start using its functionality.
* **Deploy Rollup**: Define your SPE settings, and we will generate a Slack/Telegram group to finalize all the aspects of your deployment specification.
### Sign in
First things first, sign in to use the platform's functionality:
1. Go to the [**Solana No-code Deployer**](https://solana.asphere.xyz/) platform.
2. Click **Sign in > Continue with Google**, and then select an account you'd like to use.
Congrats — you've just signed in to the Solana SPE deployment platform!
For those signing in for the first time, please enter your basic company information so that we know our customers.
---
### Deploy SPE
To define an SPE deployment configuration, follow these steps:
1. [Sign in](/scaling-services-nocode-deployer/#sign-in-2) on the [**Solana No-code Deployer**](https://solana.asphere.xyz/) platform.
2. In **Navigation**, click **Deploy Chain** to start an SPE configuration process.
3. On the **Essentials** tab, select the following SPE parameters, and then click **Next**:
* **Stack**: SVM.
* **Network**: Select either a **Testnet** or production-ready **Mainnet** option for your SPE:
* **Infrastructure Package**:
* **For Testnet**:
* **Trial**: Explore the SPE functionality for free (48 hours).
* **Persistent**: Use a permanent testing environment to experiment with your dapps before deploying them to Mainnet.
* **For Mainnet**:
* **Starter package**: Block Explorer, Starter RPC Package.
* **Advanced package**: Block Explorer, Pro RPC Package.
* **Network access type**:
* **Private**: a restricted network — access, validation, and governance limited to approved participants.
* **Public**: an open network — access, validation, and governance available to all participants.
4. On the **Configuration** tab, specify the following parameters, and then click **Next**:
* **Chain Name**
* **Gas Token**:
* **SOL**: Use [SOL](https://solana.com/docs/core/fees) to pay your network's transaction fees.
* **Gasless**: Transactions require no SOL from the sender.
5. On the **Infrastructure** tab, check the components included in your package, and then click **Confirm**.
6. In the **Summary** dialog, check your complete SPE specification, click **Confirm via Telegram/Slack**, and then enter your **Telagram Username / Slack Email** so that we can generate a Slack/Telegram group to finalize all the aspects of your deployment specification.
Congrats — you've just defined your SPE configuration and our specialist will reach out to you shortly via the preferred communication channel to finalize all the aspects of your deployment specification!
---
## Custom Gas Token
Deploying your AnyTrust Orbit chain or OP Stack chain, you have the option of using a custom gas token, other than ETH, for gas payments on the network. When choosing this option, there are certain requirements that the token needs to comply with.
### AnyTrust Orbit chain
**Requirements**
A custom gas token must meet the following requirements:
* **ERC-20 Compliance**: The token must conform to the ERC-20 standard.
* **Native Deployment**: The token must be natively deployed on the parent chain.
* **Native Bridging and Proper Configuration**: During chain deployment, the gas token must be "natively bridged" and configured as the native gas token on the Orbit chain.
**Custom gas token restrictions for ERC-20**:
* The token must be configured with 18 decimals.
* The token can't be rebasing or have a transfer fee.
* The token must only be transferable via direct calls to the token address.
* The token must only be able to set allowances via direct calls to the token address.
* The token must not have a callback on transfer.
* Users must not be able to make a transfer to themselves that results in a revert.
### OP Stack chain
**Requirements**
The custom gas token must adhere to the following constraints:
* Must be a valid ERC-20 token.
* The number of decimals on the token MUST be exactly 18.
* The name of the token MUST be less than or equal to 32 bytes.
* Symbol MUST be less than or equal to 32 bytes.
* Must not be yield-bearing.
* Cannot be rebasing or have a transfer fee.
* Must be transferrable only via a call to the token address itself.
* Must only be able to set allowance via a call to the token address itself.
* Must not have a callback on transfer, and more generally a user must not be able to make a transfer to themselves revert.
* A user must not be able to make a transfer have unexpected side effects.
## Arbitrum Bridge Setup
You might be interested in how-tos for the following scenarios:
* [Add Testnet to Arbitrum bridge](/scaling-services-nocode-deployer/#add-testnet-to-arbitrum-bridge)
* [Add Mainnet to Arbitrum bridge](/scaling-services-nocode-deployer/#add-mainnet-to-arbitrum-bridge)
### Add Testnet to Arbitrum Bridge
Currently, adding a Testnet Orbit chain to the Arbitrum bridge must be done locally. This means that you will configure the bridge UI to display the desired chain, but this change will only apply to you and be accessible from localhost.
To add a Testnet chain to Arbitrum bridge, follow these steps:
1. Navigate to https://bridge.arbitrum.io/.
2. Connect to the bridge UI using your Ethereum wallet.
3. In the bridge UI, click your **Wallet address > Settings > Turn on testnet mode** to activate a Testnet mode.
4. In **Settings > Add Testnet Orbit Chain**, add a JSON configuration, and then click **Add Chain**. The JSON configuration must contain the following data:
* A transaction output from bridge deployment
* Bridge setup data from `OrbitSetupScript.json`
```json
{
"chainInfo": {
"minL2BaseFee": 100000000,
"networkFeeReceiver": "0x72efD0dA4E05E1db05eB4Cd34e736Ee892437065",
"infrastructureFeeCollector": "0x72efD0dA4E05E1db05eB4Cd34e736Ee892437065",
"batchPoster": "0x11CF25037F5E7e789D4cF3D0AEF22bE84220BF68",
"staker": "0xB9a52331D21c0b4F26b48c57A4d56C7725bCBa29",
"chainOwner": "0x72efD0dA4E05E1db05eB4Cd34e736Ee892437065",
"chainName": "REGEN",
"chainId": 749,
"parentChainId": 17000,
"rpcUrl": "https://rpc-nitro.testnet-social-network.raas.ankr.com",
"explorerUrl": "http://localhost",
"nativeToken": "0x4c007cDcC5355f53cfD61B29cEa68174170745F8"
},
"coreContracts": {
"rollup": "0x27F339cfe4e43DF353370fcA6Bbd0cF2DF0F74d5",
"inbox": "0x9C71868E01A91298aD3DbF9EF64C932aeC08aEb4",
"outbox": "0x865A8Ab91FA987B3D5A4ED5d74932Bf1b24e75F7",
"adminProxy": "0x114439795524e011944a0E69F087a497cE681e41",
"sequencerInbox": "0x39eDedfaaC0EF97ffE8FD189fA18E7D8Bf2B24b7",
"bridge": "0x7caDa6Efc126d59afCAeEd763E51c8A15d57269B",
"utils": "0x0D5CbCc8D2c97F1dEB94f6f4dd3a36A7C01c01EE",
"validatorWalletCreator": "0x653A6F645b680bF0E3c57d1eE0c0fcD1e01470F3"
},
"tokenBridgeContracts": {
"l2Contracts": {
"customGateway": "0xA004f196Aa2c00a6743ca6850862fDAAc20FAA54",
"multicall": "0xF3cA368BeF5252476E84de2A835167c90262D3C1",
"proxyAdmin": "0x114439795524e011944a0E69F087a497cE681e41",
"router": "0xfFbFdAd733822485b88bA1AfDB42dF76f07F802a",
"standardGateway": "0xe762bED1C0fA4F49bac04580D42E2D3570E9357c",
"weth": "0x0000000000000000000000000000000000000000",
"wethGateway": "0x0000000000000000000000000000000000000000"
},
"l3Contracts": {
"customGateway": "0x850d2501E6Da6B105aFb689529497B7024776E78",
"multicall": "0xc5DD7Dab959Eb221911a58dC469d769270C2De2F",
"proxyAdmin": "0xe762728C1022dAe5D2d0f4a0317944B9d70B309C",
"router": "0x9A2e67eE268cE392A2D91D8fF87bac1D45980B98",
"standardGateway": "0xe17851222aba0821EAfc4F0AE8fDf4d8827124fa",
"weth": "0x0000000000000000000000000000000000000000",
"wethGateway": "0x0000000000000000000000000000000000000000"
}
}
}
```
Congrats — you've just added a Testnet chain to the bridge UI for local use!
---
### Add Mainnet to Arbitrum Bridge
To have a Mainnet chain added to the Arbitrum bridge, there are two options available:
* Request adding a Mainnet chain by filling out the [form](https://docs.google.com/forms/d/e/1FAIpQLSeHusW27KPta53XMD2HAIfgzubQbIxW1ghqOCuXfg-ocWpMeQ/viewform).
* Fork and host the bridge UI, modifying it to add mainnet chains. The bridge UI can be found on [OffchainLabs' GitHib](https://github.com/OffchainLabs/arbitrum-token-bridge).
---
## OP Stack: Bridging
The OP Stack is designed to build Layer 2 systems that are deeply integrated with Ethereum. While OP Mainnet handles transaction execution off-chain, developers need the ability to transfer data and tokens between OP Mainnet and Ethereum. This process is known as bridging.
For more information, refer to the [Bridging Basics](https://docs.optimism.io/builders/app-developers/bridging/basics) section in the official Optimism documentation.
---
url: https://www.ankr.com/docs/scaling-services-overview/
title: Scaling Services Overview
description: Ankr Scaling Services is a suite of layer 2 and modularity solutions aimed at bringing Web3 to a new paradigm of blockchain performance. Our particular focus.
source: docs/scaling-services-overview.mdx
---
# Scaling Services Overview
Ankr Scaling Services is a suite of layer 2 and modularity solutions aimed at bringing Web3 to a new paradigm of blockchain performance.
Our particular focus on providing the Web3 space with a comprehensive Rollup-as-a-Service (RaaS) offering is driven by the fact that Rollups have become a recognized solution in addressing critical blockchain issues of scalability, efficiency, security, and user experience.
> **"Our goal for RaaS is to make the user experience of launching a layer 2 as seamless as publishing a new website at the mature stages of the dot-com industry."** — Kev Silk, Senior Product Manager of Ankr Scaling Services.
## Ankr's Rollup-as-a-Service
Ankr's RaaS, a key part of its Scaling Services, equips developers with fast, secure tools for building Rollups and other scaling solutions like Sidechains across blockchain ecosystems. Merging decentralized infrastructure with financial incentives via Liquid Staking, Ankr offers a comprehensive and sustainable development experience, catering to the demand for scalable, Ethereum-secure projects, and establishing itself as a RaaS leader.
### What we offer
Ankr distinguishes itself as the sole RaaS provider blending top-tier DePIN-status rollup infrastructure with developer incentives via ankrETH, and a dual token strategy. This mix ensures a sustainable, all-encompassing development setting, backed by a decentralized, superior infrastructure network.
* **Infrastructure and Scalability**: As a DePIN provider, Ankr leverages not only their own world-class globally-distributed bare-metal and cloud infrastructure of nodes, but also a worldwide network of elite node providers, including IoTex, Mind Heart Soul, and Tencent. This decentralized, secure, and robust infrastructure guarantees having all the necessary means to cater to the scalability requirements of various Rollup-centric projects. Serving two trillion annual transactions on its own, Ankr has the proven capability to handle and scale to the demands that RaaS requires.
* **End-to-End Support and Customization**: With your specific project requirements in mind, Ankr offers end-to-end design, engineering, customization, and maintenance services. This includes everything from design and deployment to infrastructure operations and financial incentives.
* **Architecture Flexibility**: By collaborating with blockchain entities like Optimism, zkSync, Arbitrum, and Polygon, Ankr has become an approved implementation partner, enabling it to provide specialized solutions tailored to different blockchain ecosystems. This helps in creating a more interconnected and versatile Web3 environment where developers can leverage both ZK and Optimistic rollup architectures for creating dedicated Rollups.
* **Liquid Staking and Financial Incentives**: Ankr integrates its liquid staking tech into RaaS offerings, allowing developers to use ankrETH as gas fees while providing staking rewards for token holders. This introduces financial incentives directly into the development process, benefiting both the platform and its users by reducing operational costs and enabling new revenue streams.
* **Comprehensive Developer Tools**: Ankr's RaaS solution is designed to reduce development time and allow teams to focus on their unique use cases. By providing blockchain engineering, rollup infrastructure, development tools, and security auditing, Ankr ensures that projects can be launched with the necessary support and resources.
Overall, Ankr offers a robust, scalable, and customizable RaaS solution that meets the evolving needs of Web3 developers and enterprises. This aids in the development of more efficient, secure, and user-friendly blockchain applications, accelerating the adoption and growth of the Web3 ecosystem.
### Benefits of Dual Token Economics
Ankr’s RaaS gives clients the opportunity to create and use innovative new tokens as their native currency. Imagine every token on your Ethereum-based rollup offers constant rewards for holders. This is the power of using Ankr’s Ethereum liquid staking token, ankrETH, as your optional gas token.
**Key benefits**:
* **Share Security**: Unlock the massive capital base of staked ETH to be utilized again in securing your rollup with Ankr’s liquid staking assets.
* **Collect 24/7 Rewards**: Using ankrETH as your rollup token means a constant stream of ETH staking rewards is delivered to all holders.
* **Put TVL on Autopilot**: Multiply the TVL potential of your rollup as the value of tokens on the network grows daily to support every financial function.
* **Achieve Gasless UX**: Use the ankrETH liquid staking token as your gas token to cover operational costs or subsidize gas fees.
## Supported Technology
### Rollup Stacks
A Rollup stack is a set of technologies and protocols used to bundle or "roll up" multiple transactions into a single transaction. This approach allows for more efficient processing and significantly reduces the burden on the main blockchain, enhancing scalability and transaction speed while maintaining security and decentralization.
#### Fluent
Using Fluent as a Rollup stack offers several benefits including the ability to build and deploy scalable applications in a variety of programming languages through WebAssembly (Wasm), ensuring compatibility with the Ethereum Virtual Machine (EVM), and providing flexible app deployment models. These features collectively enhance developer freedom, interoperability, and efficiency in the Ethereum ecosystem.
#### OP Stack
The use of the OP Stack offers a distinctive approach focused on enhancing scalability and developer experience within the Ethereum ecosystem.
Key aspects of using the OP Stack include:
* **Scalability**: The OP Stack helps scale the Ethereum network by handling transactions off-chain and submitting condensed transaction data to the mainnet, significantly reducing gas costs and increasing transaction throughput.
* **Developer Friendliness**: It provides a smooth and familiar environment for developers, leveraging existing Ethereum tooling and smart contract languages, which reduces the learning curve and accelerates dApp development.
* **Security**: While prioritizing scalability and developer experience, the OP Stack also maintains high security standards, relying on the underlying security of the Ethereum blockchain and additional fraud-proof mechanisms inherent to Optimistic Rollups.
* **Compatibility**: The stack is designed to be highly compatible with Ethereum, meaning that it supports EVM-compatible smart contracts and assets, facilitating easy migration of dApps from Ethereum to Ankr's Rollup-as-a-Service.
* **Finality and Cost-efficiency**: Transactions processed through the OP Stack have a longer finality time compared to other solutions like ZK-Rollups, but they offer a balance between cost and speed, making it a practical choice for a variety of applications.
In essence, the OP Stack provides a scalable, cost-effective, and developer-friendly platform for building and deploying decentralized applications, all while leveraging the security and interoperability of the Ethereum ecosystem.
#### ZK Stack
Using a ZK (Zero-Knowledge) Stack has several key differentiators:
* **Enhanced Privacy**: The ZK Stack leverages zero-knowledge proofs, which allow for transaction validation without revealing the actual information contained within those transactions. This enhances privacy and security, making it ideal for applications that handle sensitive data.
* **Scalability and Efficiency**: ZK-Rollups bundle hundreds or even thousands of off-chain transactions into a single transaction. The ZK Stack compresses this data and generates a cryptographic proof, known as a SNARK (Succinct Non-Interactive Argument of Knowledge), which is then posted to the Ethereum blockchain. This process significantly reduces the data stored on the blockchain, leading to higher transaction throughput and lower costs compared to traditional blockchain transactions.
* **Finality and Security**: Transactions processed through a ZK Stack achieve finality quickly once posted to the mainnet, as the zero-knowledge proof ensures the correctness of all transactions in the batch without the need for multiple confirmations. This not only speeds up transactions but also leverages the underlying security of the Ethereum network.
* **Developer Friendliness**: Despite the complex technology underlying ZK-Rollups, Ankr's ZK Stack is designed to be accessible for developers. It provides tools and frameworks that help in building and deploying scalable dApps with an emphasis on ease of use and integration with existing Ethereum development workflows.
* **Compatibility and Interoperability**: ZK Stack is built to ensure compatibility with Ethereum standards, facilitating ease of integration with the broader Ethereum ecosystem and interoperability with other chains and layer 2 solutions.
* **Economic Incentives**: The ZK Stack is designed to optimize transaction fees and token economics to ensure that validators and participants are fairly compensated, promoting a healthy and sustainable network ecosystem.
In summary, the key advantages of using a ZK Stack include enhanced privacy and security through zero-knowledge proofs, improved scalability and efficiency, fast finality, developer friendliness, and strong compatibility and interoperability with the Ethereum ecosystem.
#### Agglayer CDK
Using Agglayer CDK (formerly Polygon CDK) as a Rollup stack offers unique advantages such as enhanced scalability, flexibility, and developer‑friendly tools. It supports various types of rollups, catering to different needs and security models, thereby providing a versatile environment for building and deploying scalable blockchain applications. The integration with Agglayer also offers a seamless connection to a broader ecosystem, facilitating easier access to users and assets within the Agglayer network.
#### Arbitrum Orbit
The Arbitrum Orbit stack is a customizable framework that enables the creation of personalized Layer 2 (L2) or Layer 3 (L3) blockchains based on the Arbitrum Nitro technology, offering a scalable and flexible solution for deploying decentralized applications with the potential for enhanced control over performance and cost.
The main advantages of the Arbitrum Orbit stack are the following:
* **Protocol Customization**: The Orbit framework enables the deployment of custom chains, allowing for tailored configurations that suit specific project needs. This includes customization at any layer of the stack, including the sequencer, state transition function, throughput, privacy settings, gas token, governance mechanisms, custom precompiles, data availability, and more.
* **Flexible Technology Options**: Orbit lets you choose between Rollup, AnyTrust, or custom technology stacks. This makes Ethereum and Arbitrum technologies more adaptable by allowing you to incorporate only the elements of the technologies that you need.
* **Enhanced Security and Cost-Effectiveness**: Arbitrum technology powers the most secure L2s, and you can use this same mature technology stack for your Orbit chain. By leveraging Arbitrum's Nitro core, Orbit chains can either opt for Ethereum-level security with Arbitrum One's Rollup technology or minimal trust assumptions with the Arbitrum Nova's AnyTrust technology, catering to different levels of security and cost-effectiveness requirements.
* **Fraud Proofs**: Arbitrum Orbit's fraud proofs are a cornerstone of its security features, ensuring the integrity and correctness of transactions within the Arbitrum ecosystem. Arbitrum employs an innovative multi-stage anti-fraud protection mechanism, which is designed to be more gas-efficient compared to other L2 optimistic rollups. This system utilizes multi-round interactive fraud proofs, which is a battle-tested solution that allows any observer to challenge a posted transaction and guarantees resolving disputes and safeguarding against incorrect or malicious transactions.
* **Custom Gas Token**: Orbit chains offer the flexibility to use alternative ERC-20 tokens as the native gas token on the network for gas fees, which can facilitate seamless integration with an application's ecosystem.
* **Native Data Availability**: Arbitrum AnyTrust is a natively supported DA layer that relies on an external Data Availability Committee (DAC) to store data and provide it on-demand instead of using its parent chain as the Data Availability (DA) layer. This provides for high throughput and sub-cent transaction fees.
* **EVM+ Compatibility**: Orbit chains benefit from the same EVM+ compatibility introduced in Arbitrum Nitro, allowing for the deployment of EVM-compatible smart contracts using not only Solidity but other various programming languages — C, C++, Rust, and many more — without the need to migrate away from your existing toolchain.
#### Polkadot
The Polkadot stack enables the creation of custom parachains that leverage the shared security and interoperability of the Polkadot network. It provides a scalable and flexible environment for deploying specialized blockchains while benefiting from Polkadot’s relay chain security and native cross-chain communication.
The main advantages of the Polkadot stack are the following:
* **Shared Security and Interoperability**: Parachains built on Polkadot are secured by the relay chain’s validator set, removing the need for projects to bootstrap their own consensus mechanism. They also gain seamless cross-chain communication through the Cross-Chain Message Passing (XCMP) protocol, enabling easy integration with other parachains.
* **Customizable Chain Logic**: Projects can define their own runtime logic, governance, economic models, and consensus parameters, creating highly specialized chains for specific use cases such as DeFi, identity, gaming, or supply chain.
* **Modular Architecture**: The Polkadot stack supports a modular approach to blockchain design, allowing developers to use existing components or add custom ones to meet unique requirements.
* **Forkless Upgrades**: Parachains can implement on-chain, forkless upgrades, allowing them to evolve rapidly without disruptive hard forks, ensuring continuous innovation and security improvements.
* **Ecosystem Connectivity**: Connecting as a parachain provides access to Polkadot’s growing ecosystem of applications, users, and liquidity, giving projects an immediate network effect and interoperability from day one.
#### Base
The Base stack enables the creation of scalable Layer 2 (L2) blockchains built on top of Ethereum using the OP Stack, the same open-source technology powering Optimism. It provides a developer-friendly and cost-effective platform for deploying decentralized applications, combining Ethereum’s security with enhanced throughput and lower transaction costs.
The main advantages of the Base stack are the following:
* **Ethereum Security**: Base inherits Ethereum’s security model through its rollup architecture, ensuring robust protection of assets and transactions while reducing reliance on separate validator sets.
* **OP Stack Foundation**: Built on the open-source OP Stack, Base benefits from a modular architecture, standardized infrastructure, and ongoing improvements from a growing ecosystem of contributors and partner chains.
* **Low Fees and High Throughput**: By batching and compressing transactions before posting them to Ethereum, Base achieves significantly lower transaction fees and improved scalability, making it ideal for user-facing applications.
* **Seamless Ethereum Compatibility**: Base offers full EVM compatibility, enabling developers to deploy existing Ethereum smart contracts and tooling with minimal modifications. This compatibility streamlines migration and integration with the broader Ethereum ecosystem.
* **Ecosystem Access**: Base provides access to Coinbase’s ecosystem and liquidity, enhancing visibility and adoption opportunities for applications built on its infrastructure, while also enabling interoperability with other OP Stack-based networks.
### Data Availability Layers
Data Availability (DA) layer is specifically concerned with ensuring that the data necessary to reconstruct the state of the blockchain is available to all nodes. This is crucial because, in a decentralized network, if data becomes unavailable, it can lead to problems like censorship, loss of funds, or network splits. The Data Availability layer aims to ensure that data is spread throughout the network in a manner that makes it recoverable even if some nodes go offline or act maliciously.
#### Ethereum
Ethereum serves as a data availability layer for Rollups by ensuring that transaction data is accessible for verification, which is crucial for maintaining the integrity and security of the network.
* **Data Availability for Light Nodes and Rollups**: Ethereum addresses the data availability problem by enabling light nodes and Layer 2 rollups to operate effectively without needing to download all transaction data. Solutions like Data Availability Sampling (DAS) and Data Availability Committees (DACs) ensure that all network participants, especially those with limited resources, have assurances that full transaction data has been made available for verification.
* **ZK-Rollups Interaction with Ethereum**: ZK-rollups operate as off-chain protocols that periodically commit transaction batches to Ethereum's Mainnet. These transactions are recorded on-chain, maintaining immutability and allowing anyone to reconstruct the rollup's state independently. Data availability is crucial for ZK-rollups since it enables permissionless verification of the Layer 2 chain's state and ensures that operations such as user withdrawals are based on accurate and up-to-date information. Ethereum's role is to ensure the availability of data behind every update to the rollup's state, thereby maintaining the security and integrity of transactions executed off-chain.
In essence, Ethereum's structure and consensus mechanisms provide a secure and transparent foundation for rollups by ensuring that data needed to validate transactions is available to all participants, which helps prevent fraudulent activities and enhances the overall security of the network. This system enables Ethereum to support various scaling solutions, including both optimistic and ZK-rollups, by providing a reliable layer for data availability and transaction finality.
#### Arbitrum AnyTrust
AnyTrust is an Arbitrum protocol that manages data availability with a permissioned set of parties known as the Data Availability Committee (DAC). AnyTrust settles transactions securely on the parent chain, relying on a DAC to store and verify data, which requires only two honest parties independent of the committee size. Arbitrum chains that implement the AnyTrust protocol are referred to as Arbitrum AnyTrust chains.
**Key features of AnyTrust**:
* **Data Availability Committee (DAC)**: The AnyTrust model uses a committee-based approach, where a group of validators, known as the Data Availability Committee (DAC), is responsible for storing and providing access to transaction data. The DAC ensures that the data for each rollup batch is available and can be retrieved by any party who needs to verify or interact with the rollup.
* **Trust Assumptions:**: AnyTrust’s security model relies on the assumption that at least one committee member will behave honestly and make the data available. This is a less stringent requirement compared to other models that assume a majority of participants are honest. This model allows for faster and more efficient data availability without compromising on security.
* **Efficiency and Cost Reduction**: By offloading the data availability responsibility to the DAC, Arbitrum significantly reduces the amount of data that needs to be stored and processed on the Ethereum mainnet. This reduction in data load translates to lower gas fees for users and increased throughput for the network.
* **Fallback Mechanism**: In the unlikely event that the DAC fails to make the data available, Arbitrum includes a fallback mechanism that leverages Ethereum’s mainnet for data storage. This ensures that the system remains secure and operational even in cases of DAC malfunction or collusion.
AnyTrust protocol provides a scalable, efficient, and secure solution to the data availability challenge, making it a cornerstone of Arbitrum’s ability to scale Ethereum effectively.
#### Eigen Layer
EigenDA serves Rollups as their data availability layer by storing rollup transactions until they are finalized. It scales linearly with the number of operators, ensuring security and decentralization. EigenDA operates without a separate token, reducing risks and complexity for Ethereum Layer 2 solutions. It integrates with rollups through a process involving operators, a disperser, and retrievers, facilitating efficient data storage and retrieval within the Ethereum ecosystem
#### Near
NEAR DA serves Rollups as their data availability layer by offering a secure and cost-effective solution for Ethereum rollups and developers. It provides an infrastructure where 100kB of calldata costs significantly less compared to Ethereum L1, making data storage for rollups vastly cheaper and more reliable while maintaining Ethereum's security. This service is part of NEAR's broader efforts to support modular blockchain development and help developers reduce costs and enhance the reliability of their rollups.
The architecture of NEAR DA leverages the unique aspects of NEAR’s consensus mechanism, Nightshade, which utilizes sharding to improve scalability and cost-efficiency. This allows for a more decentralized system, increasing the available block space without overwhelming the network with excess data. NEAR DA ensures that data is available for a sufficient amount of time, making it especially useful for rollups with high transaction volumes, such as gaming chains. This structure supports an easy-to-use environment for developers, offering out-of-the-box solutions for integrating with Ethereum rollups.
NEAR DA offers tools like the Blob Store Contract for storing arbitrary data, the Light Client for accessing transaction and receipt data trustlessly, and the RPC Client for submitting data blobs to NEAR, all aimed at lowering data availability fees for rollups. These components facilitate the integration of NEAR's data availability services with layer-2 rollups, making it an attractive option for developers looking to enhance the performance and cost-efficiency of their platforms.
#### Celestia
Celestia is a modular data availability (DA) network that securely scales with the number of users, making it easy for anyone to launch their own blockchain.
Rollups and L2s use Celestia as a network for publishing and making transaction data available for anyone to download. For them, Celestia provides high-throughput DA that can be verified easily with a light node.
Using Celestia as a data availability layer for Rollups presents several advantages:
* **Decoupling of Consensus and Execution**: Celestia provides a platform where the consensus mechanism is responsible only for ordering transactions and ensuring their availability, not for transaction execution. This separation improves scalability and efficiency.
* **Enhanced Scalability**: Celestia utilizes data availability proofs and erasure coding, which helps in scaling block verification similarly to sharded blockchains but without the complexity of managing multiple shards. This makes it possible for systems built atop Celestia to achieve very high transaction throughput.
* **Flexibility and Modularity**: Celestia's approach is modular, allowing different blockchain components to be optimized and scaled independently. This modularization leads to reduced costs and increased rates of innovation, as it allows builders to swap modules as per their requirements.
* **Sovereignty for Rollups**: Rollups on Celestia can operate independently without enshrining a settlement layer, providing them more control and autonomy over their operations while still leveraging Celestia for data availability.
* **Cost-Effectiveness**: By focusing solely on data availability and ordering, and not on execution, Celestia provides a more cost-effective solution for rollups compared to using traditional, monolithic chains.
* **Increased Transaction Throughput and Reduced Costs**: The architecture designed by Celestia allows for increased transaction throughput while also reducing the costs associated with transactions, beneficial for applications needing high on-chain data throughput.
#### Avail DA
Avail DA is a cutting-edge data availability layer designed to support the next generation of trust-minimized applications and sovereign rollups. It enables light clients to verify data availability efficiently via peer-to-peer sampling, simplifies blockchain integration for developers by removing complexities related to validator sets and tokenomics, and supports multiple execution environments.
Avail DA is a data availability layer that combines validity proofs with data availability sampling to enhance scalability, security, and interoperability for entire networks of blockchains built on top.
Avail DA's technology:
* **KZG Commitments**: A type of validity proof that makes it simple for even a light client to independently generate their own mathematically verified data availability guarantees.
* **Light Clients**: Lightweight nodes that enable users to access blockchain data by downloading only essential information, making them ideal for low-resource devices while maintaining security levels close to full nodes.
* **Data Availability Sampling (DAS)**: Data Availability Sampling is a technique used by light clients to verify the availability of block data without having to download the entire block. This method allows clients to confirm with high certainty (99.99%) that the data is available by sampling only a small fraction (~1%) of it.
* **Erasure Coding**: A redundancy method that splits data into multiple chunks and extends them, ensuring that the original data can be reconstructed even if some chunks are missing, making it difficult for malicious actors to hide data parts.
* **Multiple Execution Environments**: It is designed to be data-agnostic, supporting a variety of execution environments including EVM, WASM, and custom runtimes, which provides a versatile foundation for a broad range of blockchain applications.
See more on Avail DA's [transaction life cycle](/scaling-services-rollups/data-availability/avail-da/#how-avail-da-works).
### Interoperability Layers
Interoperability layers refer to frameworks or systems that enable different blockchain networks to communicate and interact with each other. These layers are crucial because they allow for the transfer of data, assets, and value between otherwise isolated blockchain ecosystems, facilitating a more integrated and functional global blockchain infrastructure.
Interoperability layers are essential for the practical and widespread adoption of blockchain technology, as they allow for a more connected and efficient ecosystem where different platforms can share information and value seamlessly.
#### Celer
The Celer interoperability protocol is designed to connect siloed blockchain environments, offering several benefits that can significantly enhance the functionality, efficiency, and user experience across different blockchain networks. Here are some of the key benefits:
* **Enhanced Scalability and Efficiency**: Celer's interoperability protocol utilizes state channel technology and other layer-2 scaling solutions to facilitate high-speed, low-cost transactions across different blockchains. This can significantly reduce the congestion and high fees associated with traditional on-chain transactions, leading to more efficient cross-chain interactions.
* **Seamless Asset Transfer**: Celer enables seamless asset transfers between different blockchain networks. This interoperability allows users to move assets such as tokens or NFTs across blockchains without the need for complex and costly bridge mechanisms, promoting liquidity and asset utilization across the ecosystem.
* **Generalized Inter-chain Communication**: Beyond simple asset transfers, Celer supports generalized inter-chain communication. This means that beyond transferring assets, it can also facilitate the execution of complex smart contracts and cross-chain dApps interactions, broadening the scope of possible applications and use cases.
* **Enhanced Security**: Celer's approach to interoperability emphasizes security, aiming to provide secure and trust-minimized communication between different blockchains. This is achieved through innovative cryptographic methods and secure multi-party computation, reducing the risk of hacks and malicious activities associated with cross-chain operations.
* **Decentralization and Trust Minimization**: By enabling direct communication between blockchains without relying heavily on centralized intermediaries, Celer promotes a more decentralized blockchain ecosystem. This minimizes trust and reduces potential points of failure, aligning with the foundational principles of blockchain technology.
* **Developer and User Friendliness**: Celer provides tools and frameworks that are designed to be accessible to developers, lowering the barrier to entry for creating and deploying cross-chain applications. For users, this translates to a smoother and more integrated user experience when interacting with applications that operate across multiple blockchains.
* **Network Effects and Ecosystem Growth**: By facilitating interoperability between different blockchains, Celer can help foster a more interconnected and collaborative blockchain environment. This can lead to network effects where the value and utility of each connected blockchain are enhanced, contributing to the overall growth and development of the blockchain ecosystem.
#### Axelar
Axelar delivers secure cross-chain communication for Web3, enabling you to build Interchain dApps that grow beyond a single chain. Secure means Axelar is built on proof-of-stake, the battle-tested approach used by Ethereum, Polygon, Cosmos, and more. Cross-chain communication means you can build a complete experience for your users that lets them interact with any asset, any application, on any chain with one click.
Key benefits:
* **Universal Interoperability**: Axelar is designed to provide universal interoperability, meaning it can connect any blockchain, regardless of its underlying technology or consensus mechanism. This inclusivity ensures that a wide range of blockchains, from major platforms like Ethereum and Bitcoin to newer or less common networks, can communicate and share resources.
* **Decentralized Security**: Axelar employs a decentralized network of validators to secure cross-chain communication. This approach ensures that the system is not reliant on a single point of failure and aligns with the decentralized ethos of blockchain technology. The security model is designed to be robust against attacks, providing a trustworthy environment for cross-chain interactions.
* **Simplicity for Developers**: Axelar is designed with a focus on developer experience, providing APIs and SDKs that abstract away the complexities of cross-chain communication. This makes it easier for developers to build and deploy decentralized applications (dApps) that can interact with multiple blockchain ecosystems, without needing to understand the intricate details of each connected network.
* **Seamless Asset Transfers**: The protocol facilitates the seamless transfer of assets across different blockchains, enabling users to move cryptocurrencies, tokens, and other digital assets between networks effortlessly. This can significantly enhance liquidity across the blockchain ecosystem and open up new opportunities for users and developers alike.
* **Interoperable Smart Contracts**: Axelar extends beyond simple asset transfers, enabling smart contracts on different blockchains to interact with each other. This capability allows for complex, cross-chain decentralized applications and services that can leverage the unique features of various blockchains, creating more versatile and powerful applications.
* **Scalability**: The Axelar network is designed to be scalable, handling a growing volume of cross-chain transactions without significant increases in costs or delays. This scalability ensures that the network can accommodate the needs of a growing ecosystem without compromising performance.
* **Ecosystem Growth and Integration**: By connecting different blockchains, Axelar facilitates a more integrated and cooperative blockchain ecosystem. This can lead to new types of applications and services, increased user adoption, and a more vibrant and diverse blockchain landscape.
* **Governance and Upgradeability**: Axelar includes mechanisms for governance and network upgrades, allowing the community to propose and vote on changes to the protocol. This ensures that the network can evolve in response to new developments and challenges in the blockchain space.
In summary, Axelar offers a comprehensive solution for blockchain interoperability, providing security, simplicity, and scalability. By enabling different blockchains to communicate and interact, Axelar aims to foster a more connected, efficient, and innovative blockchain ecosystem.
#### Hyperlane
Hyperlane is another notable player in the blockchain interoperability space, designed to enable secure and efficient communication between different blockchain networks. Its architecture and approach offer unique benefits for the interconnected blockchain ecosystem:
* **Secure Messaging**: Hyperlane provides a robust infrastructure for secure, inter-chain messaging. This allows blockchains to share information and execute transactions across different networks securely, ensuring data integrity and preventing unauthorized access.
* **Modularity and Flexibility**: One of the standout features of Hyperlane is its modular design, which offers significant flexibility in how it can be used. This modularity allows for the customization of security models, messaging formats, and other key components to meet the specific needs of different blockchain applications and ecosystems.
* **Cross-Chain Applications**: With Hyperlane, developers can build sophisticated cross-chain applications (xApps) that can operate seamlessly across multiple blockchains. This opens up new possibilities for dApps, allowing them to leverage the unique strengths and features of various blockchains, enhancing their functionality and user experience.
* **Decentralized and Trustless Operation**: Hyperlane operates in a decentralized manner, reducing reliance on central authorities or single points of failure. This aligns with the trustless nature of blockchain technology, providing a more secure and resilient framework for cross-chain interactions.
* **Efficiency and Scalability**: The protocol is designed for efficiency, with a focus on minimizing transaction costs and improving throughput. This makes it more viable for applications that require high volumes of cross-chain transactions and ensures that the system can scale as the number of interconnected blockchains grows.
* **Interoperability with Sovereignty**: Hyperlane respects the sovereignty of individual blockchains, allowing them to maintain their own governance and operational models while still participating in the broader interconnected ecosystem. This ensures that blockchains can remain independent and true to their original design principles while benefiting from cross-chain capabilities.
* **Ecosystem Collaboration**: By facilitating easier and more secure cross-chain interactions, Hyperlane encourages collaboration between different blockchain projects and communities. This can lead to the development of new partnerships, integrations, and innovations within the blockchain space.
* **User Experience**: For end-users, Hyperlane can provide a more seamless and integrated experience when interacting with applications that span multiple blockchains. This can include simpler asset transfers, unified application interfaces, and more cohesive overall interactions with blockchain-based systems.
---
url: https://www.ankr.com/docs/staking-overview/
title: Ankr Staking
description: Ankr Staking aims to bring the benefits of DeFi to the masses with Liquid Staking, Delegated Staking, DeFi, Bridge, Switch, and Parachain Crowdloan.
source: docs/staking-overview.mdx
---
# Ankr Staking
:::tip
If you're a developer, or a company looking to integrate Staking into your project, visit [For Developers](/staking-for-developers/overview/).
:::
Ankr Staking aims to bring the benefits of DeFi to the masses with Liquid Staking, Delegated Staking, DeFi, Bridge, Switch, and Parachain Crowdloan.
## Liquid Staking
[Liquid Staking](/liquid-staking/overview/) extends the Staking experience to solve the problem of loss of liquidity and capital inefficiency.
When assets are staked, they are usually locked up on-chain helping to maintain the network.
However, Liquid Staking provides instant access to Liquid Staking tokens that are equivalent in value to the stake in a 1:1 ratio.
These portable Liquid Staking tokens, such as ankrPOL, ankrETH, and more, can be utilized on additional DeFi platforms to earn further rewards or instantly swap them for other assets.
The clear benefits of Ankr Liquid Staking are:
* Minimum commitment costs
* Immediate access to liquidity
* Transfer of risks to Ankr experts
## Delegated Staking
[Delegated Staking](/delegated-staking/ankr/overview/) extends the Liquid Staking experience to make it more decentralized and transparent.
Instead of relying solely on a limited subset of validators, users will be able to choose from a larger range of validators to stake with, and validators will be able to choose incentives and their amount to stimulate users to stake with them.
This is a next step towards Ankr 2.0.
## DeFi
[Ankr DeFi](/defi/overview/) features a cross-chain dashboard with trading and yield opportunities for Liquid Staking tokens and assets on different platforms.
## Bridge
[Ankr Bridge](/bridge/overview/) enables bridging assets between networks for users to bring their Liquid Staking Tokens somewhere where they may get exciting yield opportunities.
Ankr Bridge is secured with ECDSA cryptography and a multi-party computation based Threshold Signature Scheme. This ensures that private keys are never exposed whilst mitigating against any single point of failure.
## Switch
[Ankr Switch](/switch/overview/) enables the exchange of Liquid Staking tokens: between reward earning tokens and reward bearing tokens for the same asset.
## Parachain Liquid Crowdloan
[Parachain Liquid Crowdloan](/liquid-crowdloan/overview/) provides benefits similar to Staking and allows users to:
1. Bond DOT/KSM: users bond DOT or KSM to a Polkadot project during a Parachain Slot Auction.
2. Locked Liquidity: if the project wins a slot, the bonded DOT or KSM is inaccessible.
3. Attain Instant Liquidity: however, Parachain Liquid Staking tokens can be instantly obtained. These are portable and usable elsewhere.
Token rewards from the winning project are distributed to Parachain Liquid Crowdloan token holders automatically.
---
url: https://www.ankr.com/docs/whats-new/
title: What's New
description: As part of our ongoing infrastructure optimization, a number of chains are transitioning from the Public to the Freemium service plan. To interact with these.
source: docs/whats-new.mdx
---
# What's New
## Free APIs via sign in
As part of our ongoing infrastructure optimization, a number of chains are transitioning from the Public to the Freemium service plan. To interact with these chains, you will need to sign in on the Web3 API platform. This change will help us ensure a higher level of security, prevent abuse, and improve the overall quality of service. It is designed to maintain a reliable platform for all users, ensuring fair and secure usage of our API endpoints.
**The list of chains**:
`Aptos`, `Arbitrum`, `Arbitrum Nova`, `Avalanche`, `Base`, `BNB Smart Chain`, `Bitcoin`, `Ethereum`, `Gnosis`, `Harmony`, `IoTeX`, `Moonbeam`, `Nervos`, `Polygon`, `Rollux`, `Sei`, `Solana`, `Sui`, `Syscoin`, `TON`, `Optimism`.
**Chains availability on various service plans**:
With the latest updates, we have differentiated API access for different audiences, labeling the corresponding chain groups for quick reference.
* **Premium Only**: As the label suggests, these chains are available only to Premium users. Sign-in is required to use them, and blockchain interactions are served under the corresponding [Pricing](/rpc-service/pricing/).
* **Freemium/Premium**: With the chains labeled this way, you can sign in and start interacting with blockchains for free, with limited Freemium functionality. Alternatively, you can always opt in to use superior rate limits and other robust features available for [Premium users](/rpc-service/service-plans/#feature-list).
* **No label**: These chains can be interacted with immediately by Public users and do not require signing in, as long as your rate limit and feature requirements are within [Public limits](/rpc-service/service-plans/#feature-list). Nevertheless, they can also serve both Freemium and Premium traffic, which will require sign in or corresponding [Premium plan options](/rpc-service/service-plans/#charging-models).
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/0g/
title: 0G
description: 0G Chain is a highly scalable, AI-optimized L1 blockchain designed to meet the needs of data-heavy applications. 30 methods on Ankr RPC with a free demo key.
source: docs/rpc-service/chains/chains-api/0g/index.mdx
---
# 0G
> 0G API is available on [Web3 API platform](https://www.ankr.com/rpc/0g).
0G Chain is a highly scalable, AI-optimized L1 blockchain designed to meet the needs of data-heavy applications. Built with a modular architecture, it allows for the independent optimization of key components like consensus, execution, and storage — making it ideal for AI-driven workflows. 0G is fully EVM-compatible, so decentralized applications (dApps) already deployed on other L1 or L2 chains (such as Ethereum or rollups) can easily leverage 0G's products without needing to migrate entirely.
0G Chain supports a data availability network, distributed storage network, and AI compute network. All of these networks integrate with 0G Chain's highly scalable consensus network, built to handle massive data volumes suitable for AI.
In order for your Web3 application to interact with 0G — either by reading blockchain data or sending transactions to the network — it must connect to an 0G node. Developers interact with the blockchain using the methods provided by the API.
We support the following networks and protocols for 0G:
* [EVM JSON-RPC API](/rpc-service/chains/chains-api/0g/#evm-json-rpc-methods)
* [Tendermint JSON-RPC/REST API](/rpc-service/chains/chains-api/0g/#tendermint-json-rpcrest-methods)
* [Beaconkit REST API](/rpc-service/chains/chains-api/0g/#beaconkit-rest-methods)
Responses come in [JSON format](https://www.json.org/json-en.html).
## EVM JSON-RPC methods
* [`web3_clientVersion`](/rpc-service/chains/chains-api/0g/methods/#web3_clientversion) — returns the current client version.
* [`web3_sha3`](/rpc-service/chains/chains-api/0g/methods/#web3_sha3) — returns Keccak-256 (not the standardized SHA3-256) of the given data.
* [`net_version`](/rpc-service/chains/chains-api/0g/methods/#net_version) — returns the current network ID.
* [`net_listening`](/rpc-service/chains/chains-api/0g/methods/#net_listening) — returns true if client is actively listening for network connections.
* [`eth_syncing`](/rpc-service/chains/chains-api/0g/methods/#eth_syncing) — returns data on the sync status or false.
* [`eth_gasPrice`](/rpc-service/chains/chains-api/0g/methods/#eth_gasprice) — returns the current price per gas in wei.
* [`eth_accounts`](/rpc-service/chains/chains-api/0g/methods/#eth_accounts) — returns a list of addresses owned by client.
* [`eth_blockNumber`](/rpc-service/chains/chains-api/0g/methods/#eth_blocknumber) — returns the number of most recent block.
* [`eth_getBalance`](/rpc-service/chains/chains-api/0g/methods/#eth_getbalance) — returns the balance of the account specified by address.
* [`eth_getStorageAt`](/rpc-service/chains/chains-api/0g/methods/#eth_getstorageat) — returns the value from a storage position at an address specified.
* [`eth_getTransactionCount`](/rpc-service/chains/chains-api/0g/methods/#eth_gettransactioncount) — returns the number of transactions sent from an address.
* [`eth_getBlockTransactionCountByHash`](/rpc-service/chains/chains-api/0g/methods/#eth_getblocktransactioncountbyhash) — returns the number of transactions in a block specified by block hash.
* [`eth_getBlockTransactionCountByNumber`](/rpc-service/chains/chains-api/0g/methods/#eth_getblocktransactioncountbynumber) — returns the number of transactions in the block specified by number.
* [`eth_getUncleCountByBlockHash`](/rpc-service/chains/chains-api/0g/methods/#eth_getunclecountbyblockhash) — returns the number of uncles in a block specified by block hash.
* [`eth_getUncleCountByBlockNumber`](/rpc-service/chains/chains-api/0g/methods/#eth_getunclecountbyblocknumber) — returns the number of uncles in a block specified by block number.
* [`eth_getCode`](/rpc-service/chains/chains-api/0g/methods/#eth_getcode) — returns code at an address specified.
* [`eth_sendRawTransaction`](/rpc-service/chains/chains-api/0g/methods/#eth_sendrawtransaction) — creates a new message call transaction or a contract creation for signed transactions.
* [`eth_call`](/rpc-service/chains/chains-api/0g/methods/#eth_call) — executes a new message call immediately without creating a transaction on the blockchain.
* [`eth_estimateGas`](/rpc-service/chains/chains-api/0g/methods-p2/#eth_estimategas) — generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
* [`eth_getBlockByHash`](/rpc-service/chains/chains-api/0g/methods-p2/#eth_getblockbyhash) — returns information for the block specified by block hash.
* [`eth_getBlockByNumber`](/rpc-service/chains/chains-api/0g/methods-p2/#eth_getblockbynumber) — returns information for the block specified by block number.
* [`eth_getTransactionByHash`](/rpc-service/chains/chains-api/0g/methods-p2/#eth_gettransactionbyhash) — returns information on a transaction specified by transaction hash.
* [`eth_getTransactionByBlockHashAndIndex`](/rpc-service/chains/chains-api/0g/methods-p2/#eth_gettransactionbyblockhashandindex) — returns information on a transaction specified by block hash and transaction index position.
* [`eth_getTransactionByBlockNumberAndIndex`](/rpc-service/chains/chains-api/0g/methods-p2/#eth_gettransactionbyblocknumberandindex) — returns information on a transaction by block number and transaction index position.
* [`eth_getTransactionReceipt`](/rpc-service/chains/chains-api/0g/methods-p3/#eth_gettransactionreceipt) — returns the receipt of a transaction by transaction hash.
* [`eth_getUncleByBlockHashAndIndex`](/rpc-service/chains/chains-api/0g/methods-p3/#eth_getunclebyblockhashandindex) — returns information about an uncle of a block by hash and uncle index position.
* [`eth_getUncleByBlockNumberAndIndex`](/rpc-service/chains/chains-api/0g/methods-p3/#eth_getunclebyblocknumberandindex) — returns information about an uncle of a block by number and uncle index position.
* [`eth_getLogs`](/rpc-service/chains/chains-api/0g/methods-p3/#eth_getlogs) — returns logs matching the parameters specified.
---
## Tendermint JSON-RPC/REST methods
**Info — node information**:
* [`blockchain`](/rpc-service/chains/chains-api/0g/information/#blockchain) — retrieves block headers (max: 20) for `minHeight <= height <= maxHeight`.
* [`block`](/rpc-service/chains/chains-api/0g/information/#block) — retrieves a block at a specified height.
* [`block_by_hash`](/rpc-service/chains/chains-api/0g/information/#block_by_hash) — retrieves a block by hash.
* [`block_results`](/rpc-service/chains/chains-api/0g/information/#block_results) — retrieves block results at a specified height.
* [`commit`](/rpc-service/chains/chains-api/0g/information/#commit) — retrieves commit results at a specified height.
* [`validators`](/rpc-service/chains/chains-api/0g/information/#validators) — retrieves a validator set at a specified height.
* [`genesis_chunked`](/rpc-service/chains/chains-api/0g/information/#genesis_chunked) — retrieves the Genesis in multiple chunks.
* [`dump_consensus_state`](/rpc-service/chains/chains-api/0g/information-p2/#dump_consensus_state) — retrieves consensus state.
* [`consensus_state`](/rpc-service/chains/chains-api/0g/information-p2/#consensus_state) — retrieves consensus state.
* [`consensus_params`](/rpc-service/chains/chains-api/0g/information-p2/#consensus_params) — retrieves consensus parameters.
* [`unconfirmed_txs`](/rpc-service/chains/chains-api/0g/information-p2/#unconfirmed_txs) — retrieves the list of unconfirmed transactions.
* [`num_unconfirmed_txs`](/rpc-service/chains/chains-api/0g/information-p2/#num_unconfirmed_txs) — retrieves data about unconfirmed transactions.
* [`tx_search`](/rpc-service/chains/chains-api/0g/information-p2/#tx_search) — searches for transactions.
* [`block_search`](/rpc-service/chains/chains-api/0g/information-p2/#block_search) — searches for blocks by `BeginBlock` and `EndBlock` events.
* [`tx`](/rpc-service/chains/chains-api/0g/information-p2/#tx) — retrieves transactions by hash.
**Tx — transactions broadcast information**:
* [`broadcast_tx_sync`](/rpc-service/chains/chains-api/0g/information-p3/#broadcast_tx_sync) — returns with the response from `CheckTx`. Does not wait for `DeliverTx` result.
* [`broadcast_tx_async`](/rpc-service/chains/chains-api/0g/information-p3/#broadcast_tx_async) — returns right away, with no response. Does not wait for `CheckTx` nor `DeliverTx` results.
* [`broadcast_tx_commit`](/rpc-service/chains/chains-api/0g/information-p3/#broadcast_tx_commit) — returns with the responses from `CheckTx` and `DeliverTx`.
* [`check_tx`](/rpc-service/chains/chains-api/0g/information-p3/#check_tx) — checks the transaction without executing it.
**ABCI — ABCI info**:
* [`abci_info`](/rpc-service/chains/chains-api/0g/information-p3/#abci_info) — retrieves info about the application.
* [`abci_query`](/rpc-service/chains/chains-api/0g/information-p3/#abci_query) — queries the application for some information.
---
## Beaconkit REST methods
* [`GET /eth/v1/node/version`](/rpc-service/chains/chains-api/0g/information-p3/#get-ethv1nodeversion) — retrieves node version info.
* [`GET /eth/v2/debug/beacon/states/{state_id}`](/rpc-service/chains/chains-api/0g/information-p3/#get-ethv2debugbeaconstatesstate_id) — retrieves debug info.
## Methods
### Methods
- [`web3_clientVersion`](/rpc-service/chains/chains-api/0g/methods/#web3_clientversion)
- [`web3_sha3`](/rpc-service/chains/chains-api/0g/methods/#web3_sha3)
- [`net_version`](/rpc-service/chains/chains-api/0g/methods/#net_version)
- [`net_listening`](/rpc-service/chains/chains-api/0g/methods/#net_listening)
- [`eth_syncing`](/rpc-service/chains/chains-api/0g/methods/#eth_syncing)
- [`eth_gasPrice`](/rpc-service/chains/chains-api/0g/methods/#eth_gasprice)
- [`eth_accounts`](/rpc-service/chains/chains-api/0g/methods/#eth_accounts)
- [`eth_blockNumber`](/rpc-service/chains/chains-api/0g/methods/#eth_blocknumber)
- [`eth_getBalance`](/rpc-service/chains/chains-api/0g/methods/#eth_getbalance)
- [`eth_getStorageAt`](/rpc-service/chains/chains-api/0g/methods/#eth_getstorageat)
- [`eth_getTransactionCount`](/rpc-service/chains/chains-api/0g/methods/#eth_gettransactioncount)
- [`eth_getBlockTransactionCountByHash`](/rpc-service/chains/chains-api/0g/methods/#eth_getblocktransactioncountbyhash)
- [`eth_getBlockTransactionCountByNumber`](/rpc-service/chains/chains-api/0g/methods/#eth_getblocktransactioncountbynumber)
- [`eth_getUncleCountByBlockHash`](/rpc-service/chains/chains-api/0g/methods/#eth_getunclecountbyblockhash)
- [`eth_getUncleCountByBlockNumber`](/rpc-service/chains/chains-api/0g/methods/#eth_getunclecountbyblocknumber)
- [`eth_getCode`](/rpc-service/chains/chains-api/0g/methods/#eth_getcode)
- [`eth_sendRawTransaction`](/rpc-service/chains/chains-api/0g/methods/#eth_sendrawtransaction)
- [`eth_call`](/rpc-service/chains/chains-api/0g/methods/#eth_call)
- [`eth_estimateGas`](/rpc-service/chains/chains-api/0g/methods-p2/#eth_estimategas)
- [`eth_getBlockByHash`](/rpc-service/chains/chains-api/0g/methods-p2/#eth_getblockbyhash)
- [`eth_getBlockByNumber`](/rpc-service/chains/chains-api/0g/methods-p2/#eth_getblockbynumber)
- [`eth_getTransactionByHash`](/rpc-service/chains/chains-api/0g/methods-p2/#eth_gettransactionbyhash)
- [`eth_getTransactionByBlockHashAndIndex`](/rpc-service/chains/chains-api/0g/methods-p2/#eth_gettransactionbyblockhashandindex)
- [`eth_getTransactionByBlockNumberAndIndex`](/rpc-service/chains/chains-api/0g/methods-p2/#eth_gettransactionbyblocknumberandindex)
- [`eth_getTransactionReceipt`](/rpc-service/chains/chains-api/0g/methods-p3/#eth_gettransactionreceipt)
- [`eth_getUncleByBlockHashAndIndex`](/rpc-service/chains/chains-api/0g/methods-p3/#eth_getunclebyblockhashandindex)
- [`eth_getUncleByBlockNumberAndIndex`](/rpc-service/chains/chains-api/0g/methods-p3/#eth_getunclebyblocknumberandindex)
- [`eth_getLogs`](/rpc-service/chains/chains-api/0g/methods-p3/#eth_getlogs)
### Information, Transactions, ABCI, Methods
- [`blockchain`](/rpc-service/chains/chains-api/0g/information/#blockchain)
- [`block`](/rpc-service/chains/chains-api/0g/information/#block)
- [`block_by_hash`](/rpc-service/chains/chains-api/0g/information/#block_by_hash)
- [`block_results`](/rpc-service/chains/chains-api/0g/information/#block_results)
- [`commit`](/rpc-service/chains/chains-api/0g/information/#commit)
- [`validators`](/rpc-service/chains/chains-api/0g/information/#validators)
- [`genesis_chunked`](/rpc-service/chains/chains-api/0g/information/#genesis_chunked)
- [`dump_consensus_state`](/rpc-service/chains/chains-api/0g/information-p2/#dump_consensus_state)
- [`consensus_state`](/rpc-service/chains/chains-api/0g/information-p2/#consensus_state)
- [`consensus_params`](/rpc-service/chains/chains-api/0g/information-p2/#consensus_params)
- [`unconfirmed_txs`](/rpc-service/chains/chains-api/0g/information-p2/#unconfirmed_txs)
- [`num_unconfirmed_txs`](/rpc-service/chains/chains-api/0g/information-p2/#num_unconfirmed_txs)
- [`tx_search`](/rpc-service/chains/chains-api/0g/information-p2/#tx_search)
- [`block_search`](/rpc-service/chains/chains-api/0g/information-p2/#block_search)
- [`tx`](/rpc-service/chains/chains-api/0g/information-p2/#tx)
- [`broadcast_tx_sync`](/rpc-service/chains/chains-api/0g/information-p3/#broadcast_tx_sync)
- [`Parameters`](/rpc-service/chains/chains-api/0g/methods/#parameters)
- [`broadcast_tx_async`](/rpc-service/chains/chains-api/0g/information-p3/#broadcast_tx_async)
- [`broadcast_tx_commit`](/rpc-service/chains/chains-api/0g/information-p3/#broadcast_tx_commit)
- [`check_tx`](/rpc-service/chains/chains-api/0g/information-p3/#check_tx)
- [`abci_info`](/rpc-service/chains/chains-api/0g/information-p3/#abci_info)
- [`abci_query`](/rpc-service/chains/chains-api/0g/information-p3/#abci_query)
- [`GET /eth/v1/node/version`](/rpc-service/chains/chains-api/0g/information-p3/#get-ethv1nodeversion)
- [`GET /eth/v2/debug/beacon/states/{state_id}`](/rpc-service/chains/chains-api/0g/information-p3/#get-ethv2debugbeaconstatesstate_id)
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/0g/information-p2/
title: 0G — Information, Transactions, ABCI, Methods (2/3)
source: docs/rpc-service/chains/chains-api/0g/information-p2.mdx
---
# 0G — Information, Transactions, ABCI, Methods (2/3)
> API reference for [0G](/rpc-service/chains/chains-api/0g/). [All methods ->](/rpc-service/chains/chains-api/0g/#methods)
>
> Part 2 of 3: [1](/rpc-service/chains/chains-api/0g/information/) · 2 · [3](/rpc-service/chains/chains-api/0g/information-p3/)
## Information
### `dump_consensus_state`
> Retrieves consensus state.
Not safe to call from inside the ABCI application during a block execution.
#### Parameters
None.
#### Returns
A complete consensus state. See the [Vote string description](https://pkg.go.dev/github.com/tendermint/tendermint/types?tab=doc#Vote.String).
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "dump_consensus_state",
"params": [],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/dump_consensus_state
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"round_state": {
"height": "13211550",
"round": 0,
"step": 1,
"start_time": "2024-12-23T13:24:44.738595111Z",
"commit_time": "2024-12-23T13:24:39.738595111Z",
"validators": {
"validators": [
{
"address": "279EAD5DD43F82490C6B3CFB41EEF4E9A1A49D07",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "GFeC1pZ7fslcucbIsx44x9c0MPeJlLRb+WGG/wGflbw="
},
"voting_power": "21656144",
"proposer_priority": "-52387076"
}
],
"proposer": {
"address": "279EAD5DD43F82490C6B3CFB41EEF4E9A1A49D07",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "GFeC1pZ7fslcucbIsx44x9c0MPeJlLRb+WGG/wGflbw="
},
"voting_power": "21656144",
"proposer_priority": "-52387076"
}
},
"proposal": null,
"proposal_block": null,
"proposal_block_parts": null,
"locked_round": -1,
"locked_block": null,
"locked_block_parts": null,
"valid_round": -1,
"valid_block": null,
"valid_block_parts": null,
"votes": [
{
"round": 0,
"prevotes": [
"nil-Vote",
"nil-Vote"
],
"prevotes_bit_array": "BA{88:________________________________________________________________________________________} 0/117388861 = 0.00",
"precommits": [
"nil-Vote",
"nil-Vote"
],
"precommits_bit_array": "BA{88:________________________________________________________________________________________} 0/117388861 = 0.00"
}
],
"commit_round": -1,
"last_commit": {
"votes": [
"Vote{0:279EAD5DD43F 13211549/00/SIGNED_MSG_TYPE_PRECOMMIT(Precommit) 2F31A8E1F581 8B6CEAA65010 @ 2024-12-23T13:24:39.500074271Z}",
"Vote{1:BD417EAD7FF9 13211549/00/SIGNED_MSG_TYPE_PRECOMMIT(Precommit) 2F31A8E1F581 31E4D1FFA299 @ 2024-12-23T13:24:39.553047425Z}"
],
"votes_bit_array": "BA{88:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} 117388861/117388861 = 1.00",
"peer_maj_23s": {}
},
"last_validators": {
"validators": [
{
"address": "279EAD5DD43F82490C6B3CFB41EEF4E9A1A49D07",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "GFeC1pZ7fslcucbIsx44x9c0MPeJlLRb+WGG/wGflbw="
},
"voting_power": "21656144",
"proposer_priority": "43345641"
}
],
"proposer": {
"address": "5AA4440350230D5BB8CDFE6A5726656B4FC7DC6E",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "BM16Wru6ELaZXCyKZAH5WGxg5YiMYw2WlcpBnfdbnQg="
},
"voting_power": "162210",
"proposer_priority": "-63939004"
}
},
"triggered_timeout_precommit": false
},
"peers": [
{
"node_address": "f8d5e677f1f68f8bd798752595371817f61dc532@178.128.156.131:26656",
"peer_state": {
"round_state": {
"height": "13211550",
"round": 0,
"step": 1,
"start_time": "2024-12-23T13:24:43.982077345Z",
"proposal": false,
"proposal_block_part_set_header": {
"total": 0,
"hash": ""
},
"proposal_block_parts": null,
"proposal_pol_round": -1,
"proposal_pol": "________________________________________________________________________________________",
"prevotes": "________________________________________________________________________________________",
"precommits": "________________________________________________________________________________________",
"last_commit_round": 0,
"last_commit": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"catchup_commit_round": -1,
"catchup_commit": "________________________________________________________________________________________"
},
"stats": {
"votes": "14173",
"block_parts": "45"
}
}
}
]
}
}
```
---
### `consensus_state`
> Retrieves consensus state.
Not safe to call from inside the ABCI application during a block execution.
#### Parameters
None.
#### Returns
Consensus state results.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "consensus_state",
"params": [],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/consensus_state
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"round_state": {
"height/round/step": "13213043/0/6",
"start_time": "2024-12-23T15:53:01.989949876Z",
"proposal_block_hash": "78CB001605FE99454B82944CB47D65D093629DDD38454260E7B7980874A6A5D7",
"locked_block_hash": "78CB001605FE99454B82944CB47D65D093629DDD38454260E7B7980874A6A5D7",
"valid_block_hash": "78CB001605FE99454B82944CB47D65D093629DDD38454260E7B7980874A6A5D7",
"height_vote_set": [
{
"round": 0,
"prevotes": [
"Vote{0:279EAD5DD43F 13213043/00/SIGNED_MSG_TYPE_PREVOTE(Prevote) 78CB001605FE 619E4C697B2C @ 2024-12-23T15:53:02.160332603Z}",
"Vote{1:BD417EAD7FF9 13213043/00/SIGNED_MSG_TYPE_PREVOTE(Prevote) 78CB001605FE 82F0E2036082 @ 2024-12-23T15:53:02.374084828Z}"
],
"prevotes_bit_array": "BA{88:xxxxxxxxxx__xxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxx_xxxxxxxxxxxxxxx} 110520639/117416870 = 0.94",
"precommits": [
"Vote{0:279EAD5DD43F 13213043/00/SIGNED_MSG_TYPE_PRECOMMIT(Precommit) 78CB001605FE 92F18B4F01EA @ 2024-12-23T15:53:02.551832113Z}",
"nil-Vote",
"Vote{2:BFA6235D9556 13213043/00/SIGNED_MSG_TYPE_PRECOMMIT(Precommit) 78CB001605FE 0FB040BC54A6 @ 2024-12-23T15:53:02.563127503Z}",
"nil-Vote"
],
"precommits_bit_array": "BA{88:x_x_x________x_x__x_xx____x__xxxx___x_xx_xx_xxx_xxx__x___xxx__xx_xxx__x___x___xx___xxxx_} 52462972/117416870 = 0.45"
},
{
"round": 1,
"prevotes": [
"nil-Vote",
"nil-Vote"
],
"prevotes_bit_array": "BA{88:________________________________________________________________________________________} 0/117416870 = 0.00",
"precommits": [
"nil-Vote",
"nil-Vote"
],
"precommits_bit_array": "BA{88:________________________________________________________________________________________} 0/117416870 = 0.00"
}
],
"proposer": {
"address": "026D3C349592A1A1D6534744106D7B0453E3C565",
"index": 29
}
}
}
}
```
---
### `consensus_params`
> Retrieves consensus parameters.
#### Parameters
* `height` (integer; default: 0): the height to return. If no height is provided, the latest block commit info is to be returned.
#### Returns
Consensus parameters results.
#### Request parameters
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "consensus_params",
"params": ["1"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/consensus_params?height=1
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"block_height": "1",
"consensus_params": {
"block": {
"max_bytes": "200000",
"max_gas": "20000000"
},
"evidence": {
"max_age_num_blocks": "1000000",
"max_age_duration": "6000000000000000",
"max_bytes": "50000"
},
"validator": {
"pub_key_types": [
"ed25519"
]
},
"version": {
"app": "0"
}
}
}
}
```
---
### `unconfirmed_txs`
> Retrieves the list of unconfirmed transactions.
#### Parameters
* `limit` (integer; default: 30; max: 100): the maximum number of unconfirmed transactions to return.
#### Returns
The list of unconfirmed transactions.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "unconfirmed_txs",
"params": ["1"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/unconfirmed_txs?limit=1
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"n_txs": "2",
"total": "4",
"total_bytes": "2012",
"txs": [
"CoYBCoMBCiQva2F2YS5wcmljZWZlZWQudjFiZXRhMS5Nc2dQb3N0UHJpY2USWwora2F2YTE5cmprNXFtbXd5d256ZmNjd3p5bjAyanl3Z3B3anFmNjBhZmo5MhILdXNkeDp1c2Q6MzAaEjcxODkzMDAwMDAwMDAwMDA2OSILCPHVsLsGEMCO5TcSagpSCkYKHy9jb3Ntb3MuY3J5cHRvLnNlY3AyNTZrMS5QdWJLZXkSIwohA31VSgUTeXh1kcCYwNrx04+4ItSC8M6wuKV96JLq9G0pEgQKAggBGJHBFxIUCg4KBXVrYXZhEgU1MDAwMBDwkwkaQKvIEvEmlpm5Xuw9on+NLx53kPmvw3QI2Fic1/IDowITWeN8bbGHdomSC1cdnrtZ8rxaBUnfpLM7Yisnk4cqcl4=",
"CoQBCoEBCiQva2F2YS5wcmljZWZlZWQudjFiZXRhMS5Nc2dQb3N0UHJpY2USWQora2F2YTF1ZWFrN256ZXNtM3BuZXY2bG5ncDZsZ2swcnkwMmRqejhwanBjZxIIdXNkeDp1c2QaEjczMzg5OTk5OTk5OTk5OTk5NyIMCLSAp7sGEMCR+NQCEmkKUgpGCh8vY29zbW9zLmNyeXB0by5zZWNwMjU2azEuUHViS2V5EiMKIQJh+Rd6tFqIDMHzDY2LUqIfd6iQjaxEk7kCf/PggVVILxIECgIIARj78XASEwoNCgV1a2F2YRIENTAwMBDwkwkaQNH1d9rV6P0l8EktESQ6pSg1htx5I8FNNit3kfg/bOXqJ0c5PxTgBfeitv167yLxWxyXBWaJueQGMVh8KOHi1W0="
]
}
}
```
---
### `num_unconfirmed_txs`
> Retrieves data on unconfirmed transactions.
#### Parameters
None.
#### Returns
The status of unconfirmed transactions.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "num_unconfirmed_txs",
"params": [],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/num_unconfirmed_txs
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"n_txs": "0",
"total": "0",
"total_bytes": "0",
"txs": null
}
}
```
---
### `tx_search`
> Searches for transactions with their results.
#### Parameters
* `query` (string; required): query is a string, which has a form: "condition AND condition ..." (no OR at the moment). condition has a form: "key operation operand". key is a string with a restricted set of possible symbols ( \t\n\r\()"'=>< are not allowed). operation can be `=`, `<`, `<=`, `>`, `>=`, `CONTAINS`. An operand can be a string (escaped with single quotes), number, date, or time.
* `prove` (boolean; default: false): adds proofs of the transactions inclusion in the block.
* `page` (integer; default: 1): a page number (1-based).
* `per_page` (integer; default: 30, max: 100): a number of entries per page.
* `order_by` (string; default: asc): the order in which transactions are sorted (`asc` or `desc`), by height & index. If empty, default sorting still applies.
* `match_events` (boolean; default: false): match attributes in query within events, in addition to the height and txhash.
#### Returns
The list of unconfirmed transactions.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "tx_search",
"params": {
"query": "tx.height=13225811",
"prove": true,
"page": "1",
"per_page": "5",
"order_by": "desc"
},
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/tx_search?query=tx.height%3D13225811&prove=true&page=1&per_page=5&order_by=desc
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"txs": [],
"total_count": "0"
}
}
```
---
### `block_search`
> Searches for blocks by `BeginBlock` and `EndBlock` events.
#### Parameters
* `query` (string; required): query is a string, which has a form: "condition AND condition ..." (no OR at the moment). condition has a form: "key operation operand". key is a string with a restricted set of possible symbols ( \t\n\r\()"'=>< are not allowed). operation can be `=`, `<`, `<=`, `>`, `>=`, `CONTAINS`. An operand can be a string (escaped with single quotes), number, date, or time.
* `page` (integer; default: 1): a page number (1-based).
* `per_page` (integer; default: 30, max: 100): a number of entries per page.
* `order_by` (string; default: asc): the order in which transactions are sorted (`asc` or `desc`), by height & index. If empty, default sorting still applies.
* `match_events` (boolean; default: false): match attributes in query within events, in addition to the height.
#### Returns
The list of paginated blocks matching the search criteria.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block_search",
"params": {
"query": "block.height=13225811",
"page": "1",
"per_page": "10",
"order_by": "desc"
},
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/block_search?query=block.height%3D13225811&page=1&per_page=10&order_by=desc
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blocks": [
{
"block_id": {
"hash": "F054E236608C0E65DFE9231F9332D7F54F1A282D4C2C3DA6B35FAED5D4EE9169",
"parts": {
"total": 1,
"hash": "4F02FC67A8503D1D5428EE6D1209FC5BC1BB67382DBDB53F38C3FD0783B2FC8A"
}
},
"block": {
"header": {
"version": {
"block": "11"
},
"chain_id": "0g_2222-10",
"height": "13225811",
"time": "2024-12-24T12:58:00.512093988Z",
"last_block_id": {
"hash": "304F208093FA799825FA221EB9B517B73A0879E6D9B971DD28FDF96F564EEC7C",
"parts": {
"total": 1,
"hash": "4158FCF92A13A2A5F8D466BD0189EB466DDD5D1FCA7ACF0E40069A8A0B775792"
}
},
"last_commit_hash": "CCFD88F120E554844A8DED71E1DAF3FA8089B1D7CFDC276917C8A5E34FDE6DBD",
"data_hash": "2E1EC915F83863741270A49157E2787F5F34F3B0E2E67BB1527368F8BA05D1CD",
"validators_hash": "7C3AABDFAA6A53BF1C63DC025201337CA9CB3F7DE8A51EA0C54B2CEBDCEF6E39",
"next_validators_hash": "7C3AABDFAA6A53BF1C63DC025201337CA9CB3F7DE8A51EA0C54B2CEBDCEF6E39",
"consensus_hash": "AD82B220C509602720D74FD75BCE7CFE9B148039958F236D8894E00EB1599E04",
"app_hash": "2AA5FE48061351DF5DD4F79C25A902466C31975199BEE286FE294273DB4FBF4A",
"last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "279EAD5DD43F82490C6B3CFB41EEF4E9A1A49D07"
},
"data": {
"txs": [
"CrIHCv4GCh8vZXRoZXJtaW50LmV2bS52MS5Nc2dFdGhlcmV1bVR4EtoGCpMGChovZXRoZXJtaW50LmV2bS52MS5MZWdhY3lUeBL0BQiXvhMSDDEwMTAwMDAwMDAwMBjJ9hgiKjB4ODE1ZjI3QTU2MTcxMUE2QjA0YmNFM0FhNjVjNUQ5QTE5NDVBNWVFQioBMDLkBHgmYbwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGdqr9oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA..."
]
},
"evidence": {
"evidence": []
},
"last_commit": {
"height": "13225810",
"round": 0,
"block_id": {
"hash": "304F208093FA799825FA221EB9B517B73A0879E6D9B971DD28FDF96F564EEC7C",
"parts": {
"total": 1,
"hash": "4158FCF92A13A2A5F8D466BD0189EB466DDD5D1FCA7ACF0E40069A8A0B775792"
}
},
"signatures": [
{
"block_id_flag": 2,
"validator_address": "279EAD5DD43F82490C6B3CFB41EEF4E9A1A49D07",
"timestamp": "2024-12-24T12:58:00.458392974Z",
"signature": "LU+rS0/HPXczwL9jxzAWYHSck0ORgzD9MGLXx6POcKO2XpNnHRG8/QsxDSs4Ouy3hO9AAiG0RNUWBrVlgjlpBg=="
}
]
}
}
}
],
"total_count": "1"
}
}
```
---
### `tx`
> Retrieves a transaction by hash.
#### Parameters
* `hash` (string; required): a hash of a transaction to retrieve.
* `prove` (boolean; default: false): adds proofs of the transaction's inclusion in the block.
#### Returns
Transaction info.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "tx",
"params": ["4B6D8FEA3786BFC6152EAEA791C4DAF00C41E93DAD56A7230B565179CD29CAA1", true],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/tx?hash=4B6D8FEA3786BFC6152EAEA791C4DAF00C41E93DAD56A7230B565179CD29CAA1&prove=true
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"hash": "4B6D8FEA3786BFC6152EAEA791C4DAF00C41E93DAD56A7230B565179CD29CAA1",
"height": "12345",
"index": 2,
"tx_result": {
"code": 0,
"log": "Success",
"events": [
{
"type": "transfer",
"attributes": [
{ "key": "sender", "value": "0g1xyz..." },
{ "key": "recipient", "value": "0g1abc..." },
{ "key": "amount", "value": "10000u0g" }
]
}
]
},
"tx": "BASE64_ENCODED_TX", // The transaction itself in Base64 format
"proof": {
"root_hash": "0xABC123...",
"data": "BASE64_ENCODED_PROOF",
"proof": { /* Detailed proof structure */ }
}
}
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/0g/information-p3/
title: 0G — Information, Transactions, ABCI, Methods (3/3)
source: docs/rpc-service/chains/chains-api/0g/information-p3.mdx
---
# 0G — Information, Transactions, ABCI, Methods (3/3)
> API reference for [0G](/rpc-service/chains/chains-api/0g/). [All methods ->](/rpc-service/chains/chains-api/0g/#methods)
>
> Part 3 of 3: [1](/rpc-service/chains/chains-api/0g/information/) · [2](/rpc-service/chains/chains-api/0g/information-p2/) · 3
## Transactions
### `broadcast_tx_sync`
> Returns with the response from `CheckTx`. Does not wait for `DeliverTx` result.
If you want to be sure that the transaction is included in a block, you can subscribe for the result using JSON-RPC via a websocket. See https://docs.cometbft.com/v0.34/core/subscription.html If you haven't received anything after a couple of blocks, resend it. If the same happens again, send it to some other node. A few reasons why it could happen:
1. A malicious node drops or pretends it has committed your tx.
2. A malicious proposer (not necessary the one you're communicating with) drops transactions, which might become valid in the future (https://github.com/tendermint/tendermint/issues/3322).
Please refer to [Tendermint docs](https://docs.tendermint.com/v0.34/tendermint-core/using-tendermint.html#formatting) for formatting/encoding rules.
### Parameters
* `tx` (string; required): the signed transaction, encoded as Base64.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_sync",
"params": [""],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/broadcast_tx_sync?tx=
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"code": 0,
"data": "",
"log": "transaction successfully broadcasted",
"hash": "0xABC123..." // The transaction hash
}
}
```
---
### `broadcast_tx_async`
> Returns right away, with no response. Does not wait for `CheckTx` nor `DeliverTx` results.
If you want to be sure that the transaction is included in a block, you can subscribe for the result using JSON-RPC via a websocket. See https://docs.cometbft.com/v0.34/core/subscription.html If you haven't received anything after a couple of blocks, resend it. If the same happens again, send it to some other node. A few reasons why it could happen:
1. A malicious node drops or pretends it has committed your tx.
2. A malicious proposer (not necessary the one you're communicating with) drops transactions, which might become valid in the future (https://github.com/tendermint/tendermint/issues/3322).
3. A node is offline.
Please refer to [CometBFT docs](https://docs.cometbft.com/v0.34/core/using-cometbft.html#formatting) for formatting/encoding rules.
#### Parameters
* `tx` (string; required): the Base64-encoded signed transaction.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_async",
"params": [""],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/broadcast_tx_async?tx=
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"code": 0,
"data": "",
"log": "",
"hash": "0xABC123..." // Transaction hash
}
}
```
---
### `broadcast_tx_commit`
> Returns with the responses from `CheckTx` and `DeliverTx`.
:::warning
Use only for testing and development. In production, use `BroadcastTxSync` or `BroadcastTxAsync`. You can subscribe for the transaction result using JSON-RPC via a websocket (see [CometBFT docs](https://docs.cometbft.com/v0.34/core/subscription.html)).
:::
:::tip
CONTRACT: only returns error if `mempool.CheckTx()` errs or if we timeout waiting for tx to commit.
If `CheckTx` or `DeliverTx` fails, no error will be returned, but the result will contain a non-OK ABCI code.
Please refer to [CometBFT docs](https://docs.cometbft.com/v0.34/core/using-cometbft.html#formatting) for formatting/encoding rules.
:::
#### Parameters
* `tx` (string; required): the Base64-encoded signed transaction.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_commit",
"params": [""],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/broadcast_tx_commit?tx=
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"check_tx": {
"code": 0,
"data": "",
"log": "Transaction checked successfully"
},
"deliver_tx": {
"code": 0,
"data": "",
"log": "Transaction delivered successfully",
"events": [
{
"type": "transfer",
"attributes": [
{ "key": "sender", "value": "0g1xyz..." },
{ "key": "recipient", "value": "0g1abc..." },
{ "key": "amount", "value": "10000u0g" }
]
}
]
},
"hash": "0xABC123...",
"height": "12345"
}
}
```
---
### `check_tx`
> Checks the transaction without executing it.
The transaction won't be added to the mempool.
Please refer to [CometBFT docs](https://docs.cometbft.com/v0.34/core/using-cometbft.html#formatting) for formatting/encoding rules.
#### Parameters
* `tx` (string; required): the Base64-encoded signed transaction.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "check_tx",
"params": [""],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/check_tx?tx=
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"code": 0,
"data": "",
"log": "Transaction is valid",
"events": [
{
"type": "transfer",
"attributes": [
{ "key": "sender", "value": "0g1xyz..." },
{ "key": "recipient", "value": "0g1abc..." },
{ "key": "amount", "value": "10000u0g" }
]
}
]
}
}
```
---
## ABCI
### `abci_info`
> Retrieves application info.
#### Parameters
None.
#### Returns
Application info.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "abci_info",
"params": [],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/abci_info
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"response": {
"data": "0g",
"version": "0.27.0",
"app_version": "8",
"last_block_height": "13239641",
"last_block_app_hash": "wLirVXfBEeq0jZcrshBGWS7AGN19N7p8aQqMAiaIl+I="
}
}
}
```
---
### `abci_query`
> Queries the application for particular information.
#### Parameters
* `path` (string; required): a path to the data ("/a/b/c").
* `data` (string; required): the hex-encoded data.
* `height` (integer; default: 0): the height (0 means latest).
* `prove` (boolean; default: false): adds proofs of the transactions inclusion in the block.
#### Returns
Particular info according to the query submitted.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "abci_query",
"params": ["a/b/c", "the_data", "1", true],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/blockchain?path=%2Fa%2Fb%2Fc&data=the_data&height=1&prove=true
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"response": {
"code": 0,
"log": "",
"info": "",
"index": -1,
"key": "0x6b61766131387879377a...",
"value": "0x123456789abcdef", // Hex-encoded value
"proofOps": null,
"height": "12345",
"codespace": ""
}
}
}
```
---
## `GET /eth/v1/node/version`
> Retrieves node version info.
### Parameters
None.
### Request example
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_beaconkit/eth/v1/node/version
```
### Response example
```json
{
"data": {
"version": "1.1.0"
}
}
```
---
## `GET /eth/v2/debug/beacon/states/{state_id}`
> Retrieves debug info.
Returns a quantity of debug information, including the following:
* Validator root.
* Latest beacon and execution chain block headers.
* Various root hashes.
* The node's understanding of the validator set voting power, slashing status.
### Parameters
* `state_id` (string, hex; path): ID for the state to query. Can be one of the following:
* A block root (32-byte hex string, e.g., 0xabc123...).
* A state root (32-byte hex string).
* A block ID alias such as:
* `head` – the latest known state.
* `genesis` – the genesis state.
* `finalized` – the latest finalized state.
* `justified` – the latest justified state.
### Request example
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_beaconkit/eth/v2/debug/beacon/states/head
```
### Response example
```json
{
"version": "electra",
"execution_optimistic": false,
"finalized": true,
"data": {
"genesis_validators_root": "0xc22d6f6c6672c738e5696fa0e43c0aa0acf25ec09bd301b68036d61eb79c2daf",
"slot": "0x1c3b08",
"fork": {
"previous_version": "0x05000000",
"current_version": "0x05000000",
"epoch": "0x0"
},
"latest_block_header": {
"slot": "0x1c3b08",
"proposer_index": "0x0",
"parent_block_root": "0x7ce89c85094fa830a5cf6649621000400d3a882240fa222ddd0f021f0bcbb42a",
"state_root": "0x0000000000000000000000000000000000000000000000000000000000000000",
"body_root": "0xa8e552f88c09ff0f7394b82041ab25a712cbe73d9e646190ac5330d50073d21f"
},
"block_roots": [
"0x2f3a417b224d5262596c7d4dfa696abaf3800ccf7593cc749952f88e3948c7cd",
"0x7f40aa67f38b9eb7dc36a9dd5f6cdf6a3e9a94a206084240f81345100708290f",
"0xa703243bff9736a2154d4fbb158bfc0317a8c52af58516ae6844a17d497d739d",
"0x0d9701998fbf960cebe13cdb89647595334db848c2a326bd39cce67815e42adb",
"0x6a705f37d7fccfe3b7ae202bd22840c3c70f7138a366f3506fa533da4f26dea7",
"0x7bc0ea29114f8a334cf28eb1de33443de5214810fbe5c5b49a07d4878c5342ff",
"0xf3875ec20169e7f48c576a7076ab04a4dac25c15a7c80c721defcc10851af802",
"0x7ce89c85094fa830a5cf6649621000400d3a882240fa222ddd0f021f0bcbb42a"
],
"state_roots": [
"0xde5cf944fec524820e3d4d9174ca5b42855ebb9ad89104d92bc5001c4a9b9e32",
"0xac2e45403552d2b2372950fea027f0c826b4d09b8af1bafba14be45347b1e69a",
"0x5a5663ca9e37572174e5957e1260c221aca96384a3b441de8491de58afd6e44f",
"0x593206fbb5b8f1ae140c4041d8ab865cb5afb7fccc7da019ce2834ce9f11bb0a",
"0x39262683ed866217509ec6bd75b655c8380b42874d8b1d1eb5c40ead206ef700",
"0x5dc2e2b8c9f04cea3e5574aefca4365d2a920d90c9cdad3eb4d5adee26fec217",
"0x8a048f206b906dddb5c0144e2d6248b32ed5e593ef1494f9d0e9141a19cc5862",
"0x6cede03f993b5ee611cea35969a54f655693f8004fba4ab7e3740ffd5d1b9cbc"
],
"eth1_data": {
"depositRoot": "0xa14b8fd2b3468db5bc151c63cf07b85bf774bfa94cc45e4bd4c7d5f450888a79",
"depositCount": "0x0",
"blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
},
"eth1_deposit_index": 7,
"latest_execution_payload_header": {
"parentHash": "0x812d076cc7ea828fbb4a93a23db0b68e0e952ced2e56eaaadff43a48e1ca2337",
"feeRecipient": "0x0000000000000000000000000000000000000001",
"stateRoot": "0x115cfcd4e912feb47ca34a490b02f1a71fea4dd402893ed62385bc0688d1f26a",
"receiptsRoot": "0xc1e4e11c4d71733acebe11c2ea4c179267e56838eefbec0cd2609500010f66bd",
"logsBloom": "0x1201000014800000100006808228400420c010020100800102000110400020104300c0004008010000100004010000092010691000202040020140000028800000002040080000094888010804000800400040800400050002080000000000c030022800024100020800000020040c0200080100000c8008010880308408002000000010000420020020040b02840000900080021100040a00041110200004000e001210009026000b0a100000040004113020200801000944220000440440100408200640000401200004000200000004000002f4100200922000080101280080d80c0880048400000000001c00000020a0200008280040002000084000c001",
"prevRandao": "0x73ca1a22bd4c673a6a320736f17e462c01f024303d6b74bd7dadd78296500348",
"blockNumber": "0x1c3b08",
"gasLimit": "0x2255100",
"gasUsed": "0x4f71d5",
"timestamp": "0x6848429c",
"extraData": "0xd883010f0b846765746888676f312e32332e38856c696e7578",
"baseFeePerGas": "9",
"blockHash": "0xf43ec3c5eb64cb5c205af34fc90675117f6ad9ed1b8453220e77d7d424a2952e",
"transactionsRoot": "0xb6577e8b117a399b7ef1a8b25080c4601f01cd9ccc5bd2fc02388ef4deb37d73",
"withdrawalsRoot": "0x0145cc91e1ba724070abab6da58080fc905c13e071e17882988043e70efe0988",
"blobGasUsed": "0x0",
"excessBlobGas": "0x0"
},
"validators": [
{
"pubkey": "0xa21978649e2dca81ff5b5a9c1206ff28d86f55debf3cf0e47ed0354a168ffcdbf14ed556ad4e9260b9bdd6b0f01907a9",
"withdrawalCredentials": "0x01000000000000000000000063df5c411aa90b9866e7e6082230ffbf61aeda8c",
"effectiveBalance": "0x1fe5d61a000",
"slashed": false,
"activationEligibilityEpoch": "0x0",
"activationEpoch": "0x0",
"exitEpoch": "0xffffffffffffffff",
"withdrawableEpoch": "0xffffffffffffffff"
},
{
"pubkey": "0xa68a786ea4c5b0d5b327a91d7eab6c07e69c58d301f86bc3e39991d124c7d7638efa1964089ac5d81f9f7f151a86eebf",
"withdrawalCredentials": "0x01000000000000000000000063df5c411aa90b9866e7e6082230ffbf61aeda8c",
"effectiveBalance": "0x773594000",
"slashed": false,
"activationEligibilityEpoch": "0x0",
"activationEpoch": "0x0",
"exitEpoch": "0xffffffffffffffff",
"withdrawableEpoch": "0xffffffffffffffff"
},
{
"pubkey": "0x975d7a0569f6dd5560fa5054690d87f48fd99026f2336f9666f47d2c74a22611d1158d0ec3feb3511331ec4ef714f608",
"withdrawalCredentials": "0x01000000000000000000000063df5c411aa90b9866e7e6082230ffbf61aeda8c",
"effectiveBalance": "0x773594000",
"slashed": false,
"activationEligibilityEpoch": "0x0",
"activationEpoch": "0x0",
"exitEpoch": "0xffffffffffffffff",
"withdrawableEpoch": "0xffffffffffffffff"
},
{
"pubkey": "0x94f8722acefe3b6d2de811a64cb4f93209bba50bb3613eaeab1d720ae09c7313c29f7de71a8718d351983c9c0c48ad09",
"withdrawalCredentials": "0x010000000000000000000000565e66aa2bcb27116937983f2f208efabf620ab2",
"effectiveBalance": "0xee6b28000",
"slashed": false,
"activationEligibilityEpoch": "0x4308",
"activationEpoch": "0x4309",
"exitEpoch": "0xffffffffffffffff",
"withdrawableEpoch": "0xffffffffffffffff"
}
],
"balances": [
2192000000000,
32000000000,
32000000000,
64000000000
],
"randao_mixes": [
"0xf3dadd64aafe134e583f639ab5b9fc650a7f0d008789b867ecb05b68e0037e2a",
"0x0570972fa2cb1548eb6d3b5161d638708d89b3cf49d88727b7dd7721141325c0",
"0x6761890246fa48731c333166236dd4bca041ad5ba491abf299bd94ee84faa551",
"0x995cb20d32dca378b4e09f625575141ae1bac9276982971b6402dfd9bc985928",
"0x995cb20d32dca378b4e09f625575141ae1bac9276982971b6402dfd9bc985928",
"0x5784db6dd330eaeb0215c5de57eef097cac679458038aac95a4c6d4b2d247590",
"0x7890bf970c57a80a27f1ad9e2425e9b80f5cbbb7ac1f8e3a17bbd1fd2dafadf2",
"0x6ec60f8c3be68f54efe87f84c48a8474039d30922674ca1d9043eb9205eeb0df"
],
"next_withdrawal_validator_index": "0x1"
}
}
```
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/0g/information/
title: 0G — Information, Transactions, ABCI, Methods (1/3)
source: docs/rpc-service/chains/chains-api/0g/information.mdx
---
# 0G — Information, Transactions, ABCI, Methods (1/3)
> API reference for [0G](/rpc-service/chains/chains-api/0g/). [All methods ->](/rpc-service/chains/chains-api/0g/#methods)
>
> Part 1 of 3: 1 · [2](/rpc-service/chains/chains-api/0g/information-p2/) · [3](/rpc-service/chains/chains-api/0g/information-p3/)
## Information
### `blockchain`
> Retrieves block headers for `minHeight <= height <= maxHeight`.
At most 20 items will return for the `minHeight` or `maxHeight` parameters specified. If `maxHeight` does not yet exist, the blocks up to the current height will return. If `minHeight` does not exist (pruning), the earliest existing height will be used.
#### Parameters
* `minHeight` (integer): the minimum block height to return.
* `maxHeight` (integer): the maximum block height to return.
#### Returns
Block headers, in descending order (highest first).
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "blockchain",
"params": ["1", "2"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/blockchain?minHeight=1&maxHeight=2
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"last_height": "2564978",
"block_metas": [
{
"block_id": {
"hash": "ED3BF22DDEAABE5B194ECE00FC97B73B31D6B6E381946054ADF248FADA65FD4F",
"parts": {
"total": 1,
"hash": "268422F8D294840DBC5B24FB031F976357E8478F72C16B66E7B7388C2429D18F"
}
},
"block_size": "830",
"header": {
"version": {
"block": "11"
},
"chain_id": "zgtendermint_16600-2",
"height": "2",
"time": "2024-06-24T07:25:41.380275895Z",
"last_block_id": {
"hash": "A3052C548269F770727A7E74EE90FCDAE6C4AEB5C0F0C614DA0621790D479B89",
"parts": {
"total": 1,
"hash": "E2CF5FEEBCCDA872FB23EA228B82937C4620A887071E9B68AE77CB62F431F2BA"
}
},
"last_commit_hash": "5148301A7ABA311392D676C3C967F299F85A1AD48D74E96AF083DA4787FF9C2D",
"data_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"next_validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"consensus_hash": "81BA6261D0077795E489737675DE120CC9170ADCCAAD805E12EF2708A2E21453",
"app_hash": "21181DF7C886CEE14012C07031E55BF04428BF77979015F2869ED1EACABAD22E",
"last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "CDFF531A3AFA255BC193D52721027366935F9BF8"
},
"num_txs": "0"
},
{
"block_id": {
"hash": "A3052C548269F770727A7E74EE90FCDAE6C4AEB5C0F0C614DA0621790D479B89",
"parts": {
"total": 1,
"hash": "E2CF5FEEBCCDA872FB23EA228B82937C4620A887071E9B68AE77CB62F431F2BA"
}
},
"block_size": "353",
"header": {
"version": {
"block": "11"
},
"chain_id": "zgtendermint_16600-2",
"height": "1",
"time": "2024-06-24T07:24:31.526533772Z",
"last_block_id": {
"hash": "",
"parts": {
"total": 0,
"hash": ""
}
},
"last_commit_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"data_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"next_validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"consensus_hash": "81BA6261D0077795E489737675DE120CC9170ADCCAAD805E12EF2708A2E21453",
"app_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "13E845BC0B362D63BC7D4817279EDE51BEB7F9AD"
},
"num_txs": "0"
}
]
}
}
```
---
### `block`
> Retrieves a block at a specified height.
#### Parameters
* `height` (integer; default: 0): the height to return. If no height is provided, the latest block is to be fetched.
#### Returns
Block information.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block",
"params": ["1"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/blockchain?height=1
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"block_id": {
"hash": "A3052C548269F770727A7E74EE90FCDAE6C4AEB5C0F0C614DA0621790D479B89",
"parts": {
"total": 1,
"hash": "E2CF5FEEBCCDA872FB23EA228B82937C4620A887071E9B68AE77CB62F431F2BA"
}
},
"block": {
"header": {
"version": {
"block": "11"
},
"chain_id": "zgtendermint_16600-2",
"height": "1",
"time": "2024-06-24T07:24:31.526533772Z",
"last_block_id": {
"hash": "",
"parts": {
"total": 0,
"hash": ""
}
},
"last_commit_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"data_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"next_validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"consensus_hash": "81BA6261D0077795E489737675DE120CC9170ADCCAAD805E12EF2708A2E21453",
"app_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "13E845BC0B362D63BC7D4817279EDE51BEB7F9AD"
},
"data": {
"txs": []
},
"evidence": {
"evidence": []
},
"last_commit": {
"height": "0",
"round": 0,
"block_id": {
"hash": "",
"parts": {
"total": 0,
"hash": ""
}
},
"signatures": []
}
}
}
}
```
---
### `block_by_hash`
> Retrieves a block by hash.
#### Parameters
* `hash` (string; required): the Base64-encoded block hash.
#### Returns
Block information.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block_by_hash",
"params": {
"hash": "zNX/NZMiC0tZQVr5hlXJ9K/oIlcMzjVoXdXll630i0E="
},
"id": 1
}'
```
```shell
curl "https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/block_by_hash?hash=0xccd5ff3593220b4b59415af98655c9f4afe822570cce35685dd5e597adf48b41"
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"block_id": {
"hash": "CCD5FF3593220B4B59415AF98655C9F4AFE822570CCE35685DD5E597ADF48B41",
"parts": {
"total": 1,
"hash": "24E75E2F1D225490E8890316E7E0C0D382579EF0BD8DB3DE4D41A4B92E9D9223"
}
},
"block": {
"header": {
"version": {
"block": "11"
},
"chain_id": "zgtendermint_16600-2",
"height": "2564904",
"time": "2024-12-26T12:10:47.144809998Z",
"last_block_id": {
"hash": "994AA199E4DCDAD2F085FE4B41D20085A0ED12BE557E88D4D9566C314D5A3486",
"parts": {
"total": 1,
"hash": "EBF9742D10789704AC87037D05DC7F445E79DAE4AB01ACB80C99D18ED6D77D11"
}
},
"last_commit_hash": "2D35D340C71BD0ACDA481585236B717C98C31EDD9B7577CB4C40D23E2B16CE27",
"data_hash": "080CF08012B3EDE6D0C7D9092D2B6919EA7A74C6B1F78D3732A43ABBA17A4E2C",
"validators_hash": "50A4F72C26AE3EBF51D521B7BA99D263BBA2E1686CB1B710CD10EF3B81F70282",
"next_validators_hash": "50A4F72C26AE3EBF51D521B7BA99D263BBA2E1686CB1B710CD10EF3B81F70282",
"consensus_hash": "81BA6261D0077795E489737675DE120CC9170ADCCAAD805E12EF2708A2E21453",
"app_hash": "8F7D4C95F3F405A5274DA79833223A8AAA50A25DF68994324296DA3EBD66F0A2",
"last_results_hash": "865B5DC7B13DACE27EEFA0B4617F44946B2A3BEA44541E928859F002DCE466AF",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "CB78E69FD887112E9C3DBD9490B8A51A3EE4E318"
},
"data": {
"txs": [
"CssCCpcCCh8vZXRoZXJtaW50LmV2bS52MS5Nc2dFdGhlcmV1bVR4EvMBCqwBChovZXRoZXJtaW50LmV2bS52MS5MZWdhY3lUeBKNAQj/1QISAjIwGIikASIqMHg4Qjc1MmU4N2RjZTMwNjI2YTYwNjg3MzkxMWFlOGM2ODFiOUZDZTE1KgsxMDAwMDAwMDAwMDoCgdRCICKTguwyMeC0CnN5ejfXSYKT76jiJ7JyunyeFhz73HJsSiA/9hhgI3rQRu81GgjlJ5f9uTZ52PcMV22ed2S5IJlkexpCMHgyMzRmOGRkZmUxMGNhOGEyYmRhMDk2OThhN2VkODk0M2YzZmNiODNhYjgxZTE3NGNmYjg5MDg0Mzg3OTQyZWZl+j8uCiwvZXRoZXJtaW50LmV2bS52MS5FeHRlbnNpb25PcHRpb25zRXRoZXJldW1UeBIYEhYKEAoGbmV1cm9uEgY0MjAwMDAQiKQB, ..."
]
},
"evidence": {
"evidence": []
},
"last_commit": {
"height": "2564903",
"round": 0,
"block_id": {
"hash": "994AA199E4DCDAD2F085FE4B41D20085A0ED12BE557E88D4D9566C314D5A3486",
"parts": {
"total": 1,
"hash": "EBF9742D10789704AC87037D05DC7F445E79DAE4AB01ACB80C99D18ED6D77D11"
}
},
"signatures": [
{
"block_id_flag": 2,
"validator_address": "13E845BC0B362D63BC7D4817279EDE51BEB7F9AD",
"timestamp": "2024-12-26T12:10:47.182829723Z",
"signature": "tc9915ID/XmkBPg1R+aeew0MDkGLgpTpcpo8VqpYqq17RIdwkcQ5rlZxnJuIL9G0skmOrIIXrzri2EhsudW+AQ=="
}
]
}
}
}
}
```
---
### `block_results`
> Retrieves block results at a specified height.
#### Parameters
* `height` (integer; default: 0): the height to return. If no height is provided, the latest block info is to be fetched.
#### Returns
Block results.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block_results",
"params": ["1"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/block_results?height=1
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"height": "1",
"txs_results": null,
"begin_block_events": [
{
"type": "coin_received",
"attributes": [
{
"key": "receiver",
"value": "0g1m3h30wlvsf8llruxtpukdvsy0km2kum85yn938",
"index": true
},
{
"key": "amount",
"value": "38487598u0g",
"index": true
}
]
},
{
"type": "block_gas",
"attributes": [
{
"key": "height",
"value": "1",
"index": true
},
{
"key": "amount",
"value": "0",
"index": true
}
]
}
],
"validator_updates": null,
"consensus_param_updates": {
"block": {
"max_bytes": "200000",
"max_gas": "20000000"
},
"evidence": {
"max_age_num_blocks": "1000000",
"max_age_duration": "6000000000000000",
"max_bytes": "50000"
},
"validator": {
"pub_key_types": [
"ed25519"
]
}
}
}
}
```
---
### `commit`
> Retrieves commit results at a specified height.
#### Parameters
* `height` (integer; default: 0): the height to return. If no height is provided, the latest block commit info is to be fetched.
#### Returns
Commit results. Canonical switches from false to true for block H once block H+1 has been committed, until then it's subjective and only reflects what this node has seen so far.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "commit",
"params": ["1"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/commit?height=1
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"signed_header": {
"header": {
"version": {
"block": "11"
},
"chain_id": "zgtendermint_16600-2",
"height": "1",
"time": "2024-06-24T07:24:31.526533772Z",
"last_block_id": {
"hash": "",
"parts": {
"total": 0,
"hash": ""
}
},
"last_commit_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"data_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"next_validators_hash": "EC4FD9C58AB322D57FD67299FC64AE10459BDAA2652BFC1CC989C66F8B9B6EA1",
"consensus_hash": "81BA6261D0077795E489737675DE120CC9170ADCCAAD805E12EF2708A2E21453",
"app_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"last_results_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "13E845BC0B362D63BC7D4817279EDE51BEB7F9AD"
},
"commit": {
"height": "1",
"round": 0,
"block_id": {
"hash": "A3052C548269F770727A7E74EE90FCDAE6C4AEB5C0F0C614DA0621790D479B89",
"parts": {
"total": 1,
"hash": "E2CF5FEEBCCDA872FB23EA228B82937C4620A887071E9B68AE77CB62F431F2BA"
}
},
"signatures": [
{
"block_id_flag": 2,
"validator_address": "13E845BC0B362D63BC7D4817279EDE51BEB7F9AD",
"timestamp": "2024-06-24T07:25:41.481185893Z",
"signature": "VtIJZ4q7ooX/Bcy5uNojugXaWSxnW2K0hYcqHdZTAhFEURZFCuwqWYKpFCr2Tu95QQR9ROrCVVC9/3UNlPTYDQ=="
},
{
"block_id_flag": 1,
"validator_address": "",
"timestamp": "0001-01-01T00:00:00Z",
"signature": null
}
]
}
},
"canonical": true
}
}
```
---
### `validators`
> Retrieves a validator set at a specified height.
Validators are sorted by voting power.
#### Parameters
* `height` (integer; default: 0): the height to return. If no height is provided, the validator set corresponding to the latest block is to be fetched.
* `page` (integer; default: 1): a page number (1-based).
* `per_page` (integer; default: 30; max: 100): a number of entries per page.
#### Returns
Commit results.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "validators",
"params": ["1","1","30"],
"id": 1
}'
```
```shell
curl "https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/validators?height=1&page=1&per_page=30"
```
#### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"block_height": "1",
"validators": [
{
"address": "13E845BC0B362D63BC7D4817279EDE51BEB7F9AD",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "Cu7jYSsTcNgCfi4upLVfH1ak5OM7A4OEFHJiXQe6lR8="
},
"voting_power": "5000000",
"proposer_priority": "-15000000"
},
{
"address": "542977517E9B10F6D51792A92BCC5F5B9C1DC74A",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "sa0J8aTS4tscdWI0On+JEhWjs+szgH49i4jhzAcyh40="
},
"voting_power": "5000000",
"proposer_priority": "5000000"
},
{
"address": "CDFF531A3AFA255BC193D52721027366935F9BF8",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "kyAfOOxIQSLf2WXQLB8D3gqItZiOHiSeHGjfhhDtlyQ="
},
"voting_power": "5000000",
"proposer_priority": "5000000"
},
{
"address": "FAD365F3FF137C1F70CBA4E3B3E61F4EFD2CDF02",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "ZJGhAhqDwuq1MUsUqT32mGnjlqtjlH7MHzOv8ezK7cg="
},
"voting_power": "5000000",
"proposer_priority": "5000000"
}
],
"count": "4",
"total": "4"
}
}
```
---
### `genesis_chunked`
> Retrieves Genesis in multiple chunks.
Gets genesis document in multiple chunks to make it easier to iterate through larger genesis structures. Each chunk is produced by converting the genesis document to JSON and then splitting the resulting payload into 16MB blocks, and then Base64-encoding each block.
#### Parameters
* `chunk` (integer; default: 0): a sequence number of the chunk to download.
#### Returns
A Genesis chunk response.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_tendermint/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "genesis_chunked",
"params": ["0"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/0g_galileo_testnet_tendermint/genesis_chunked?chunk=0
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": -1,
"result": {
"chunk": "0",
"total": "1",
"data": "eyJnZW5lc2lzX3RpbWUiOiIyMDI0LTA2LTI0VDA3OjI0OjMxLjUyNjUzMzc3MloiLCJjaGFpbl9pZCI6InpndGVuZGVybWludF8xNjYwMC0yIiwiaW5pdGlhbF9oZWlnaHQiOiIxIiwiY29uc2Vuc3VzX3BhcmFtcyI6eyJibG9jayI6eyJtYXhfYnl0ZXMiOiIyMjAyMD..."
}
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/0g/methods-p2/
title: 0G — Methods (2/3)
source: docs/rpc-service/chains/chains-api/0g/methods-p2.mdx
---
# 0G — Methods (2/3)
> API reference for [0G](/rpc-service/chains/chains-api/0g/). [All methods ->](/rpc-service/chains/chains-api/0g/#methods)
>
> Part 2 of 3: [1](/rpc-service/chains/chains-api/0g/methods/) · 2 · [3](/rpc-service/chains/chains-api/0g/methods-p3/)
## `eth_estimateGas`
> Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (hex encoded): the transaction object:
* `from` (string; data, 20 bytes; optional): the address the transaction is sent from.
* `to` (string; data, 20 bytes; optional): the address the transaction is directed to.
* `gas` (string; quantity; optional): the gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter may be needed by some executions.
* `gasPrice` (string; quantity; optional): the gas price willing to be paid by the sender in wei.
* `value` (string; quantity; optional): the value sent with this transaction, in wei.
* `data` (string; data; optional): the hash of the method signature and encoded parameters.
2. `` (quantity|tag; optional): either a HEX value of a *block number* or one of the following *block tags*:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the amount of gas used.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [
{
"from": "0x83c4A688174A8d4b99b4C8A2feC124dff79D58d2",
"to": "0x7E359114E9098cBeB28f4e23648a39E3Fcb915D0",
"data": "0xa9059cbb000000000000000000000000a0df350d2637096571f7a701cb08f08f0775fcf90000000000000000000000000000000000000000000000000000000000000064"
}
],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x705a"
}
```
---
## `eth_getBlockByHash`
> Returns information for the block specified by block hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): the block hash.
2. ``: if `true` it returns the full transaction objects, if `false` — only the hashes of the transactions.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": ["0xc0f659554c7d61d4259afb5b3f43de2624a7339e765ea306b5b0a332e885e724", false],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0x17d7840",
"gasUsed": "0xa640",
"hash": "0xc0f659554c7d61d4259afb5b3f43de2624a7339e765ea306b5b0a332e885e724",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0x0000000000000000000000000000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x2f3c",
"parentHash": "0xd9f7ea5876fd41bb813fc9b398f6757ab92e180a6491d326d68af958a7aa8d27",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1c35",
"stateRoot": "0xacd51211e93c698d8ada90fcf5cf201ae4f396007b3e5548b4f1026486662c74",
"timestamp": "0x667a35ab",
"totalDifficulty": "0x0",
"transactions": [
"0x77ffa56267d61485b5a250b69537fd37f1c14b9dd2572e191870f2c47ad70a4d",
"0xb36be3d2197fd10bcd5ce0b105f4fdb5465b69e964150fe56bb40fa7de977d1e"
],
"transactionsRoot": "0xff05085919eb0bd88b94901cd035a3445853f9b74de9d91dddc6f77ed5950406",
"uncles": []
}
}
```
---
## `eth_getBlockByNumber`
> Returns information for the block specified by block number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag): either the hex value of a *block number* or one of the following *block tags*:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
2. ``: if `true` it returns the full transaction objects, if `false` — only the hashes of the transactions.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["0x2F3C", false],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0x17d7840",
"gasUsed": "0xa640",
"hash": "0xc0f659554c7d61d4259afb5b3f43de2624a7339e765ea306b5b0a332e885e724",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0x0000000000000000000000000000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x2f3c",
"parentHash": "0xd9f7ea5876fd41bb813fc9b398f6757ab92e180a6491d326d68af958a7aa8d27",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x1c35",
"stateRoot": "0xacd51211e93c698d8ada90fcf5cf201ae4f396007b3e5548b4f1026486662c74",
"timestamp": "0x667a35ab",
"totalDifficulty": "0x0",
"transactions": [
"0x77ffa56267d61485b5a250b69537fd37f1c14b9dd2572e191870f2c47ad70a4d",
"0xb36be3d2197fd10bcd5ce0b105f4fdb5465b69e964150fe56bb40fa7de977d1e"
],
"transactionsRoot": "0xff05085919eb0bd88b94901cd035a3445853f9b74de9d91dddc6f77ed5950406",
"uncles": []
}
}
```
---
## `eth_getTransactionByHash`
> Returns information on a transaction specified by transaction hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): a transaction hash.
### Returns
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
* `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending.
* `from` (string; data, 20 bytes): an address of the sender.
* `gas` (string; quantity): the gas provided by the sender.
* `gasPrice` (string; quantity): the gas price provided by the sender in wei.
* `hash` (string; data, 32 bytes): the hash of the transaction.
* `input` (string; data): the data send along with the transaction.
* `nonce` (string; quantity): the number of transactions made by the sender prior to this one.
* `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
* `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending.
* `value` (string; quantity): the value transferred in wei.
* `v` (string; quantity): ECDSA recovery ID.
* `r` (string; quantity): ECDSA signature r.
* `s` (string; quantity): ECDSA signature s.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0x77ffa56267d61485b5a250b69537fd37f1c14b9dd2572e191870f2c47ad70a4d"],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blockHash": "0xc0f659554c7d61d4259afb5b3f43de2624a7339e765ea306b5b0a332e885e724",
"blockNumber": "0x2f3c",
"from": "0x83c4a688174a8d4b99b4c8a2fec124dff79d58d2",
"gas": "0x5208",
"gasPrice": "0x2540be400",
"hash": "0x77ffa56267d61485b5a250b69537fd37f1c14b9dd2572e191870f2c47ad70a4d",
"input": "0x",
"nonce": "0x839",
"to": "0xec33ad015cfd18e1e297fc599b9a4c2545d6f570",
"transactionIndex": "0x0",
"value": "0xde0b6b3a7640000",
"type": "0x1",
"accessList": [],
"chainId": "0x40d8",
"v": "0x1",
"r": "0xcb9d36fad167f688c4340d2ce17c5bc8048164af619c109e989208245a5ef1cd",
"s": "0x7fc1d67ad61b5ed62c67e79d2f6a867f2003cc765a17a2f5acdb785c264e9cb1"
}
}
```
---
## `eth_getTransactionByBlockHashAndIndex`
> Returns information on a transaction specified by block hash and transaction index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): a block hash.
2. `` (quantity): a transaction index position.
### Returns
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
* `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending.
* `from` (string; data, 20 bytes): an address of the sender.
* `gas` (string; quantity): the gas provided by the sender.
* `gasPrice` (string; quantity): the gas price provided by the sender in wei.
* `hash` (string; data, 32 bytes): the hash of the transaction.
* `input` (string; data): the data send along with the transaction.
* `nonce` (string; quantity): the number of transactions made by the sender prior to this one.
* `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
* `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending.
* `value` (string; quantity): the value transferred in wei.
* `v` (string; quantity): ECDSA recovery ID.
* `r` (string; quantity): ECDSA signature r.
* `s` (string; quantity): ECDSA signature s.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"params": [
"0x41a807e984a4e73512979cbbf7ad7cf6cba17d133e87ddf9e2446ec2063c59a5",
"0x0"
],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blockHash": "0x41a807e984a4e73512979cbbf7ad7cf6cba17d133e87ddf9e2446ec2063c59a5",
"blockNumber": "0x27226b",
"from": "0xd0d01fa55e7920a3f90f18aa48f184752b3ed554",
"gas": "0x5208",
"gasPrice": "0x14",
"hash": "0x59fcf4411839f410cc034b151fe94a50814d8cc87f1d55a3e1f3807558d6c65b",
"input": "0x",
"nonce": "0xaad6",
"to": "0x9f218404ddc2aee210c2836361e97813a7993ca1",
"transactionIndex": "0x0",
"value": "0x2540be400",
"type": "0x0",
"chainId": "0x40d8",
"v": "0x81d3",
"r": "0xfdd63bb645b4ba5288fd47fb177e6cb2db157c858a0c8141f50cc7df613548d",
"s": "0x2ae3fa2a8461302e0c5f1e49c6c3c448eea55758484dcdbaadfaa754724b8ec2"
}
}
```
---
## `eth_getTransactionByBlockNumberAndIndex`
> Returns information on a transaction by block number and transaction index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
2. `` (quantity): the transaction index position.
### Returns
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
* `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending.
* `from` (string; data, 20 bytes): an address of the sender.
* `gas` (string; quantity): the gas provided by the sender.
* `gasPrice` (string; quantity): the gas price provided by the sender in wei.
* `hash` (string; data, 32 bytes): the hash of the transaction.
* `input` (string; data): the data send along with the transaction.
* `nonce` (string; quantity): the number of transactions made by the sender prior to this one.
* `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
* `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending.
* `value` (string; quantity): the value transferred in wei.
* `v` (string; quantity): ECDSA recovery ID.
* `r` (string; quantity): ECDSA signature r.
* `s` (string; quantity): ECDSA signature s.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": ["latest", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blockHash": "0x1a607bc23c79c1cd894d85a39f18c8a0cc0f6c14a0709723b3e0e4807d893df8",
"blockNumber": "0x2722c4",
"from": "0x83c4a688174a8d4b99b4c8a2fec124dff79d58d2",
"gas": "0x17d7840",
"gasPrice": "0x2540be400",
"hash": "0x6900d33fc30327f12295886329b612a1e54760aa29b50f9bfedcd8bd3f70b76b",
"input": "0x",
"nonce": "0xc914c",
"to": "0x8990e6db035f041edce0f3174d3af58251f79457",
"transactionIndex": "0x0",
"value": "0xde0b6b3a7640000",
"type": "0x1",
"accessList": [],
"chainId": "0x40d8",
"v": "0x0",
"r": "0xeba5d9e8e61d5f7fa8d10cab4be75d545be434822e3683148b47020d3735474d",
"s": "0xc84dec7945fa5517da680093ef2d876da151a72184ede6f33cec0ad840b9a2b"
}
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/0g/methods-p3/
title: 0G — Methods (3/3)
source: docs/rpc-service/chains/chains-api/0g/methods-p3.mdx
---
# 0G — Methods (3/3)
> API reference for [0G](/rpc-service/chains/chains-api/0g/). [All methods ->](/rpc-service/chains/chains-api/0g/#methods)
>
> Part 3 of 3: [1](/rpc-service/chains/chains-api/0g/methods/) · [2](/rpc-service/chains/chains-api/0g/methods-p2/) · 3
## `eth_getTransactionReceipt`
> Returns the receipt of a transaction by transaction hash.
The receipt is not available for pending transactions.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): a hash of the transaction.
### Returns
* `object`: a transaction receipt object, or null when no receipt was found:
* `transactionHash` (string; data, 32 bytes): a hash of the transaction.
* `transactionIndex` (string; quantity): the transactions index position in the block.
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction.
* `blockNumber` (string; quantity): a number of the block containing the transaction.
* `from` (string; data, 20 bytes): an address of the sender.
* `to` (string; data, 20 bytes): an address of the receiver; null when it's a contract creation transaction.
* `cumulativeGasUsed` (string; quantity): the total amount of gas used when this transaction was executed in the block.
* `effectiveGasPrice` (string; quantity): the sum of the base fee and tip paid per unit of gas.
* `gasUsed` (string; quantity): the amount of gas used by this specific transaction alone.
* `contractAddress` (string; data, 20 bytes): the contract address created, if the transaction was a contract creation, otherwise null.
* `logs` (array): an array of log objects, which this transaction generated.
* `logsBloom` (string; data, 256 bytes): a bloom filter for light clients to quickly retrieve related logs.
* `type` (string; data): the transaction type, `0x00` for legacy transactions, `0x01` for access list types, `0x02` for dynamic fees. It also returns either of the following:
* `root` (string; data, 32 bytes): a post-transaction stateroot (pre Byzantium).
* `status` (string; quantity): either 1 (success) or 0 (failure).
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0x74418d226679f370574a1f82635c63598a91bfdbf3638e70122ec1dc182556ad"],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blockHash": "0x10e8d7221051ed761a33b62fc7c6c012a0675467d7fadd2112a31d5c182099c9",
"blockNumber": "0x158d",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"from": "0x83c4a688174a8d4b99b4c8a2fec124dff79d58d2",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0xda6941c4f108084dedcfb294f506c9e4eeafe2f6",
"transactionHash": "0x74418d226679f370574a1f82635c63598a91bfdbf3638e70122ec1dc182556ad",
"transactionIndex": "0x0",
"type": "0x1"
}
}
```
---
## `eth_getUncleByBlockHashAndIndex`
> Returns information about an uncle of a block by hash and uncle index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): the hash of a block.
2. `` (quantity): the uncle's index position.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleByBlockHashAndIndex",
"params": ["0x10e8d7221051ed761a33b62fc7c6c012a0675467d7fadd2112a31d5c182099c9", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": null
}
```
---
## `eth_getUncleByBlockNumberAndIndex`
> Returns information about an uncle of a block by number and uncle index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag): the hex value of a _block number_.
2. `` (quantity): the uncle's index position.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleByBlockNumberAndIndex",
"params": ["0x272328", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": null
}
```
---
## `eth_getLogs`
> Returns an array of all logs matching a given filter object.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `object`: the filter options:
* `fromBlock` (string; quantity|tag; optional; default: "latest"): either the _block number_ or one of the following _block tags_:
* `latest`: for the last mined block.
* `earliest`: for the lowest numbered block available on the client.
* `pending`: for not yet mined transactions.
* `toBlock` (string; quantity|tag; optional; default: "latest"): either the _block number_ or one of the following _block tags_:
* `latest`: for the last mined block.
* `earliest`: for the lowest numbered block available on the client.
* `pending`: for not yet mined transactions.
* `address` (array of strings; data, 20 bytes; optional): a contract address or a list of addresses from which logs should originate.
* `topics` (array of strings; data; 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` (string; data, 32 bytes; optional; **future**): with the addition of EIP-234, `blockHash` will be a new filter option which 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.
### Returns
* `removed` (string; tag): `true` when the log was removed, due to a chain reorganization; `false` if it's a valid log.
* `logIndex` (string; quantity): the log index position in the block; null when it's a pending log.
* `transactionIndex` (string; quantity): the transactions index position log was created from; null when it's a pending log.
* `transactionHash` (string; data, 32 bytes): a hash of the transactions this log was created from; null when it's a pending log.
* `blockHash` (string; data, 32 bytes): a hash of the block containing the log; null when it's pending; null when it's a pending log.
* `blockNumber` (string; quantity): the number of the block containing the log; null when it's pending; null when it's a pending log.
* `address` (string; data, 20 bytes): an address from which this log originated.
* `data` (string; data): contains one or more 32 bytes non-indexed arguments of the log.
* `topics` (array of strings; 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 you declared the event with the anonymous specifier.)
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [
{
"fromBlock": "0x1",
"toBlock": "0x65"
}
],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"address": "0x361b62b78fdbf68a0e19c2136c167f72059d2a8e",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000008873cc79c5b3b5666535c825205c9a128b1d75f1"
],
"data": "0x",
"blockNumber": "0x323",
"transactionHash": "0xc3fdb3cd6bdb987ae99cfe7dc6f78e81a18ea9888cea584e35dc0691df104464",
"transactionIndex": "0x0",
"blockHash": "0x713cb11222119183f553533df5835c1610190c04c113d02fa7a2e17460a6f6a2",
"logIndex": "0x0",
"removed": false
},
{
"address": "0x85f6722319538a805ed5733c5f4882d96f1c7384",
"topics": [
"0xbfeb006f16aca8eb3d9953cf44db6b11b6f3041a313875dfa18f2e9d71bd309e",
"0x4a6310b386fdabbe95b1cb8fa92d362dd51a32051d1e24cf929856e0cb174a74",
"0x00000000000000000000000063df5c411aa90b9866e7e6082230ffbf61aeda8c"
],
"data": "0x",
"blockNumber": "0x7c5",
"transactionHash": "0xad9036c230807cebcfb78f11fc27824c202b68c3938233877d232ca8a739e4b3",
"transactionIndex": "0x0",
"blockHash": "0x73f32feb88bbd78e03809d28a22dda63f0f1862ce3bd22763efc42bf1a029cee",
"logIndex": "0x0",
"removed": false
}
]
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/0g/methods/
title: 0G — Methods (1/3)
source: docs/rpc-service/chains/chains-api/0g/methods.mdx
---
# 0G — Methods (1/3)
> API reference for [0G](/rpc-service/chains/chains-api/0g/). [All methods ->](/rpc-service/chains/chains-api/0g/#methods)
>
> Part 1 of 3: 1 · [2](/rpc-service/chains/chains-api/0g/methods-p2/) · [3](/rpc-service/chains/chains-api/0g/methods-p3/)
## `web3_clientVersion`
> Returns the current client version.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* ``: the current client version.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "web3_clientVersion",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": "Version dev ()\nCompiled at using Go go1.21.13 (amd64)"
}
```
---
## `web3_sha3`
> Returns Keccak-256 (not the standardized SHA3-256) of the given data.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
* `` (data): the data to convert into a SHA3 hash.
### Returns
* `` (data): the SHA3 result of the given string.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "web3_sha3",
"params": ["0x68656c6c6f20776f726c64"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5b2c76da96136d193336fad3fbc049867b8ca157da22f69ae0e4923648250acc"
}
```
---
## `net_version`
> Returns the current network ID.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* ``: the current network ID.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "16600"
}
```
---
## `net_listening`
> Returns `true` if client is actively listening for network connections.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* ``: `true` when listening, otherwise `false`.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
```
---
## `eth_syncing`
> Returns an object with data about the sync status or false.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* ``|``: an object with sync status data or `false`, when not syncing:
* `startingBlock` (quantity): the block at which the import started (will only be reset, after the sync reached its head).
* `currentBlock` (quantity): the current block, same as `eth_blockNumber`.
* `highestBlock` (quantity): the estimated highest block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": false
}
```
---
## `eth_gasPrice`
> Returns the current price per gas in wei.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* `` (quantity): the current gas price in wei.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x14"
}
```
---
## `eth_accounts`
> Returns a list of addresses owned by client.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* `` (string; data, 20 bytes): addresses owned by the client.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": []
}
```
---
## `eth_blockNumber`
> Returns the number of most recent block.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* `` (quantity): the current block number the client is on.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x27221a"
}
```
---
## `eth_getBalance`
> Returns the balance of the account specified by address.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 20 bytes): an address to check for balance.
2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the current balance in wei.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0x83c4A688174A8d4b99b4C8A2feC124dff79D58d2", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x209e65811b7e34e40de0"
}
```
---
## `eth_getStorageAt`
> Returns the value from a storage position at an address specified.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 20 bytes): an address of the storage (hex encoded).
2. `` (quantity): a slot position in the storage (hex encoded unsigned integer).
3. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (data): the value at this storage position.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": ["0x83c4A688174A8d4b99b4C8A2feC124dff79D58d2", "0x0", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
```
---
## `eth_getTransactionCount`
> Returns the number of transactions sent from an address.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 20 bytes): an address.
2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the number of transactions send from this address.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": ["0x83c4A688174A8d4b99b4C8A2feC124dff79D58d2", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xc9121"
}
```
---
## `eth_getBlockTransactionCountByHash`
> Returns the number of transactions in a block specified by block hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): a block hash.
### Returns
* `` (quantity): the number of transactions in this block.
### Request example:
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": ["0x14d481f2a9bd51b3bb5ab2b64d41deb7083b9b8036969d407da673d163a09905"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
---
## `eth_getBlockTransactionCountByNumber`
> Returns the number of transactions in the block specified by number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the number of transactions in this block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": ["0x87D"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
---
## `eth_getUncleCountByBlockHash`
> Returns the number of uncles in a block specified by block hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): a block hash.
### Returns
* `` (quantity): the number of uncles in this block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockHash",
"params": ["0x14d481f2a9bd51b3bb5ab2b64d41deb7083b9b8036969d407da673d163a09905"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
---
## `eth_getUncleCountByBlockNumber`
> Returns the number of uncles in a block specified by block number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the number of uncles in this block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockNumber",
"params": ["0x87D"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
---
## `eth_getCode`
> Returns code at a given address.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 20 bytes): an address to get the code from.
2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (data): the code from the given address.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": ["0x83c4A688174A8d4b99b4C8A2feC124dff79D58d2", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
```
---
## `eth_sendRawTransaction`
> Creates new message call transaction or a contract creation for signed transactions.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data): the signed transaction data.
### Returns
* `` (data, 32 bytes): the transaction hash, or the zero hash if the transaction is not yet available.
Use [eth_getTransactionReceipt](/rpc-service/chains/chains-api/0g/methods-p3/#eth_gettransactionreceipt) to get the contract address, after the transaction was mined, when you created a contract.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["signed_tx_data"],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
---
## `eth_call`
> Executes a new message call immediately without creating a transaction on the blockchain.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (hex encoded): the transaction object:
* `from` (string; data, 20 bytes; optional): the address the transaction is sent from.
* `to` (string; data, 20 bytes): the address the transaction is directed to.
* `gas` (string; quantity; optional): the gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter may be needed by some executions.
* `gasPrice` (string; quantity; optional): the gas price willing to be paid by the sender in wei.
* `value` (string; quantity; optional): the value sent with this transaction, in wei.
* `data` (string; data; optional): the hash of the method signature and encoded parameters.
2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (hex encoded bytes): the return value of executed contract.
### Request example
```shell
curl -X POST https://rpc.ankr.com/0g_galileo_testnet_evm/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"data": "0x70a08231000000000000000000000000a0df350d2637096571f7a701cb08f08f0775fcf9"
},
"latest"
],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/allora/cosmos-rest-methods-2/
title: Allora — Cosmos REST methods
source: docs/rpc-service/chains/chains-api/allora/cosmos-rest-methods-2.mdx
---
# Allora — Cosmos REST methods
> API reference for [Allora](/rpc-service/chains/chains-api/allora/). [All methods ->](/rpc-service/chains/chains-api/allora/#methods)
### `/cosmos/tx/v1beta1/txs`
> Fetches txs by event.
#### Parameters
* `events` (array[string]): a list of transaction event type.
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Transactions.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/tx/v1beta1/txs
```
#### Response example
```json
{
"txs": [
{
"body": {
"messages": [
{
"type_url": "string",
"value": "string"
}
],
"memo": "string",
"timeout_height": "string",
"extension_options": [
{
"type_url": "string",
"value": "string"
}
],
"non_critical_extension_options": [
{
"type_url": "string",
"value": "string"
}
]
},
"auth_info": {
"signer_infos": [
{
"public_key": {
"type_url": "string",
"value": "string"
},
"mode_info": {
"single": {
"mode": "SIGN_MODE_UNSPECIFIED"
},
"multi": {
"bitarray": {
"extra_bits_stored": 0,
"elems": "string"
},
"mode_infos": [
null
]
}
},
"sequence": "string"
}
],
"fee": {
"amount": [
{
"denom": "string",
"amount": "string"
}
],
"gas_limit": "string",
"payer": "string",
"granter": "string"
}
},
"signatures": [
"string"
]
}
],
"tx_responses": [
{
"height": "string",
"txhash": "string",
"codespace": "string",
"code": 0,
"data": "string",
"raw_log": "string",
"logs": [
{
"msg_index": 0,
"log": "string",
"events": [
{
"type": "string",
"attributes": [
{
"key": "string",
"value": "string"
}
]
}
]
}
],
"info": "string",
"gas_wanted": "string",
"gas_used": "string",
"tx": {
"type_url": "string",
"value": "string"
},
"timestamp": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/cosmos/tx/v1beta1/txs`
> Broadcasts a transaction.
#### Parameters
* `` (object; required):
```json
{
"tx_bytes": "string",
"mode": "BROADCAST_MODE_UNSPECIFIED"
}
```
#### Returns
Broadcasted transaction.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/tx/v1beta1/txs
````
#### Response example
```json
{
"tx_response": {
"height": "string",
"txhash": "string",
"codespace": "string",
"code": 0,
"data": "string",
"raw_log": "string",
"logs": [
{
"msg_index": 0,
"log": "string",
"events": [
{
"type": "string",
"attributes": [
{
"key": "string",
"value": "string"
}
]
}
]
}
],
"info": "string",
"gas_wanted": "string",
"gas_used": "string",
"tx": {
"type_url": "string",
"value": "string"
},
"timestamp": "string"
}
}
```
---
### `/cosmos/tx/v1beta1/txs/{hash}`
> Fetches a tx by hash.
#### Parameters
* `hash` (string, hex; required): a tx hash to query, encoded as a hex string.
#### Returns
Transaction.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/tx/v1beta1/txs/{hash}
```
#### Response example
```json
{
"tx": {
"body": {
"messages": [
{
"type_url": "string",
"value": "string"
}
],
"memo": "string",
"timeout_height": "string",
"extension_options": [
{
"type_url": "string",
"value": "string"
}
],
"non_critical_extension_options": [
{
"type_url": "string",
"value": "string"
}
]
},
"auth_info": {
"signer_infos": [
{
"public_key": {
"type_url": "string",
"value": "string"
},
"mode_info": {
"single": {
"mode": "SIGN_MODE_UNSPECIFIED"
},
"multi": {
"bitarray": {
"extra_bits_stored": 0,
"elems": "string"
},
"mode_infos": [
null
]
}
},
"sequence": "string"
}
],
"fee": {
"amount": [
{
"denom": "string",
"amount": "string"
}
],
"gas_limit": "string",
"payer": "string",
"granter": "string"
}
},
"signatures": [
"string"
]
},
"tx_response": {
"height": "string",
"txhash": "string",
"codespace": "string",
"code": 0,
"data": "string",
"raw_log": "string",
"logs": [
{
"msg_index": 0,
"log": "string",
"events": [
{
"type": "string",
"attributes": [
{
"key": "string",
"value": "string"
}
]
}
]
}
],
"info": "string",
"gas_wanted": "string",
"gas_used": "string",
"tx": {
"type_url": "string",
"value": "string"
},
"timestamp": "string"
}
}
```
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/
title: Allora — Cosmos REST methods (2/4)
source: docs/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2.mdx
---
# Allora — Cosmos REST methods (2/4)
> API reference for [Allora](/rpc-service/chains/chains-api/allora/). [All methods ->](/rpc-service/chains/chains-api/allora/#methods)
>
> Part 2 of 4: [1](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/) · 2 · [3](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/) · [4](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/)
## Cosmos REST methods
### `/cosmos/slashing/v1beta1/signing_infos`
> Retrieves signing info of all validators.
#### Parameters
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
The signing info of all validators.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/slashing/v1beta1/signing_infos
```
#### Response example
```json
{
"info": [
{
"address": "string",
"start_height": "string",
"index_offset": "string",
"jailed_until": "2021-01-19T06:33:32.230Z",
"tombstoned": true,
"missed_blocks_counter": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/cosmos/slashing/v1beta1/signing_infos/{cons_address}`
> Retrieves the signing info of given cons address.
#### Parameters
* `cons_address` (string, required): an address to query signing info for.
#### Returns
The signing info of all specified cons address.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/slashing/v1beta1/signing_infos/{cons_address}
```
#### Response example
```json
{
"val_signing_info": {
"address": "string",
"start_height": "string",
"index_offset": "string",
"jailed_until": "2021-01-19T06:34:40.106Z",
"tombstoned": true,
"missed_blocks_counter": "string"
}
}
```
---
### Staking methods
### `/cosmos/staking/v1beta1/delegations/{delegator_addr}`
> Retrieves all delegations of a given delegator address.
#### Parameters
* `delegator_addr` (string, required): a delegator address to query for.
* `pagination.key` (string, byte): a value returned in PageResponse.next_key to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Delegations from a specific delegator address.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/delegations/{delegator_addr}
```
#### Response example
```json
{
"delegation_responses": [
{
"delegation": {
"delegator_address": "string",
"validator_address": "string",
"shares": "string"
},
"balance": {
"denom": "string",
"amount": "string"
}
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations`
> Retrieves the redelegations of a given address.
#### Parameters
* `delegator_addr` (string, required): a delegator address to query for.
* `src_validator_addr` (string): the validator address to redelegate from.
* `dst_validator_addr` (string): the validator address to redelegate to.
* `pagination.key` (string, byte): a value returned in PageResponse.next_key to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` `string, uint64`: a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Delegations from a specific delegator address.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations
```
#### Response example
```json
{
"redelegation_responses": [
{
"redelegation": {
"delegator_address": "string",
"validator_src_address": "string",
"validator_dst_address": "string",
"entries": [
{
"creation_height": "string",
"completion_time": "2021-01-19T06:58:45.718Z",
"initial_balance": "string",
"shares_dst": "string"
}
]
},
"entries": [
{
"redelegation_entry": {
"creation_height": "string",
"completion_time": "2021-01-19T06:58:45.718Z",
"initial_balance": "string",
"shares_dst": "string"
},
"balance": "string"
}
]
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations`
> Retrieves all unbonding delegations of a given delegator address.
#### Parameters
* `delegator_addr` (string, required): a delegator address to query for.
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Unbonding delegations from a specific delegator address.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations
```
#### Response example
```json
{
"unbonding_responses": [
{
"delegator_address": "string",
"validator_address": "string",
"entries": [
{
"creation_height": "string",
"completion_time": "2021-01-19T07:01:25.628Z",
"initial_balance": "string",
"balance": "string"
}
]
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators`
> Retrieves all validators info for given delegator address.
#### Parameters
* `delegator_addr` (string; required): a delegator address to query for.
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Validator info for a specific delegator address.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators
```
#### Response example
```json
{
"validators": [
{
"operator_address": "string",
"consensus_pubkey": {
"type_url": "string",
"value": "string"
},
"jailed": true,
"status": "BOND_STATUS_UNSPECIFIED",
"tokens": "string",
"delegator_shares": "string",
"description": {
"moniker": "string",
"identity": "string",
"website": "string",
"security_contact": "string",
"details": "string"
},
"unbonding_height": "string",
"unbonding_time": "2021-01-19T07:06:38.006Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2021-01-19T07:06:38.006Z"
},
"min_self_delegation": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}`
> Retrieves validator info for a given delegator-validator pair.
#### Parameters
* `delegator_addr` (string; required): a delegator address to query for.
* `validator_addr` (string; required): a validator address to query for.
#### Returns
Validator info for a given delegator pair.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}
```
#### Response example
```json
{
"validator": {
"operator_address": "string",
"consensus_pubkey": {
"type_url": "string",
"value": "string"
},
"jailed": true,
"status": "BOND_STATUS_UNSPECIFIED",
"tokens": "string",
"delegator_shares": "string",
"description": {
"moniker": "string",
"identity": "string",
"website": "string",
"security_contact": "string",
"details": "string"
},
"unbonding_height": "string",
"unbonding_time": "2021-01-19T07:08:34.100Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2021-01-19T07:08:34.100Z"
},
"min_self_delegation": "string"
}
}
```
---
### `/cosmos/staking/v1beta1/historical_info/{height}`
> Retrieves the historical info for a given height.
#### Parameters
* `height` (string, int64): defines at which height to query the historical info for.
#### Returns
Historical info for a given height.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/historical_info/{height}
```
#### Response example
```json
{
"hist": {
"header": {
"version": {
"block": "string",
"app": "string"
},
"chain_id": "string",
"height": "string",
"time": "2021-01-19T07:13:57.974Z",
"last_block_id": {
"hash": "string",
"part_set_header": {
"total": 0,
"hash": "string"
}
},
"last_commit_hash": "string",
"data_hash": "string",
"validators_hash": "string",
"next_validators_hash": "string",
"consensus_hash": "string",
"app_hash": "string",
"last_results_hash": "string",
"evidence_hash": "string",
"proposer_address": "string"
},
"valset": [
{
"operator_address": "string",
"consensus_pubkey": {
"type_url": "string",
"value": "string"
},
"jailed": true,
"status": "BOND_STATUS_UNSPECIFIED",
"tokens": "string",
"delegator_shares": "string",
"description": {
"moniker": "string",
"identity": "string",
"website": "string",
"security_contact": "string",
"details": "string"
},
"unbonding_height": "string",
"unbonding_time": "2021-01-19T07:13:57.974Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2021-01-19T07:13:57.974Z"
},
"min_self_delegation": "string"
}
]
}
}
```
---
### `/cosmos/staking/v1beta1/params`
> Retrieves the staking parameters.
#### Parameters
None.
#### Returns
Staking parameters.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/params
```
#### Response example
```json
{
"params": {
"unbonding_time": "string",
"max_validators": 0,
"max_entries": 0,
"historical_entries": 0,
"bond_denom": "string"
}
}
```
---
### `/cosmos/staking/v1beta1/pool`
> Retrieves the pool info.
#### Parameters
None.
#### Returns
Pool info.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/pool
```
#### Response example
```json
{
"pool": {
"not_bonded_tokens": "string",
"bonded_tokens": "string"
}
}
```
---
### /cosmos/staking/v1beta1/validators
> Retrieves all validators that match the given status.
#### Parameters
* `status` (string): a status to query validators by.
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Validators that match the given status.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/validators
```
#### Response example
```json
{
"validators": [
{
"operator_address": "string",
"consensus_pubkey": {
"type_url": "string",
"value": "string"
},
"jailed": true,
"status": "BOND_STATUS_UNSPECIFIED",
"tokens": "string",
"delegator_shares": "string",
"description": {
"moniker": "string",
"identity": "string",
"website": "string",
"security_contact": "string",
"details": "string"
},
"unbonding_height": "string",
"unbonding_time": "2021-01-19T07:21:25.914Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2021-01-19T07:21:25.914Z"
},
"min_self_delegation": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/cosmos/staking/v1beta1/validators/{validator_addr}`
> Retrieves validator info for a given validator address.
#### Parameters
* `validator_addr` (string; required): a validator address to query for.
#### Returns
Validator info for a given validator address.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/validators/{validator_addr}
```
#### Response example
```json
{
"validator": {
"operator_address": "string",
"consensus_pubkey": {
"type_url": "string",
"value": "string"
},
"jailed": true,
"status": "BOND_STATUS_UNSPECIFIED",
"tokens": "string",
"delegator_shares": "string",
"description": {
"moniker": "string",
"identity": "string",
"website": "string",
"security_contact": "string",
"details": "string"
},
"unbonding_height": "string",
"unbonding_time": "2021-01-19T07:25:26.679Z",
"commission": {
"commission_rates": {
"rate": "string",
"max_rate": "string",
"max_change_rate": "string"
},
"update_time": "2021-01-19T07:25:26.679Z"
},
"min_self_delegation": "string"
}
}
```
---
### `/cosmos/staking/v1beta1/validators/{validator_addr}/delegations`
> Retrieves delegate info for a given validator.
#### Parameters
* `validator_addr` (string; required): a validator address to query for.
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` `string, uint64`: a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Delegate info for a given validator.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/validators/{validator_addr}/delegations
```
#### Response example
```json
{
"delegation_responses": [
{
"delegation": {
"delegator_address": "string",
"validator_address": "string",
"shares": "string"
},
"balance": {
"denom": "string",
"amount": "string"
}
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}`
> Retrieves delegate info for a given validator-delegator pair.
#### Parameters
* `validator_addr` (string; required): a validator address to query for.
* `delegator_addr` (string; required): a delegator address to query for.
#### Returns
Delegate info for a given validator delegator pair.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}
```
#### Response example
```json
{
"delegation_response": {
"delegation": {
"delegator_address": "string",
"validator_address": "string",
"shares": "string"
},
"balance": {
"denom": "string",
"amount": "string"
}
}
}
```
---
### `/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation`
> Retrieves unbonding info for a given validator-delegator pair.
#### Parameters
* `validator_addr` (string; required): a validator address to query for.
* `delegator_addr` (string; required): a delegator address to query for.
#### Returns
Unbonding info for a given validator delegator pair.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation
```
#### Response example
```json
{
"unbond": {
"delegator_address": "string",
"validator_address": "string",
"entries": [
{
"creation_height": "string",
"completion_time": "2021-01-19T07:35:28.235Z",
"initial_balance": "string",
"balance": "string"
}
]
}
}
```
---
### `/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations`
> Retrieves unbonding delegations of a validator.
#### Parameters
* `validator_addr` (string, required): a validator address to query for.
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Unbonding info for a given validator.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations
```
#### Response example
```json
{
"unbonding_responses": [
{
"delegator_address": "string",
"validator_address": "string",
"entries": [
{
"creation_height": "string",
"completion_time": "2021-01-19T07:37:20.281Z",
"initial_balance": "string",
"balance": "string"
}
]
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### Upgrade methods
### `/cosmos/upgrade/v1beta1/applied_plan/{name}`
> Retrieves a previously applied upgrade plan by its name.
#### Parameters
* `name` (string; required): a name of the applied plan to query for.
#### Returns
Previously applied upgrade plan.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/upgrade/v1beta1/applied_plan/{name}
```
#### Response example
```json
{
"height": "string"
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/
title: Allora — Cosmos REST methods (3/4)
source: docs/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3.mdx
---
# Allora — Cosmos REST methods (3/4)
> API reference for [Allora](/rpc-service/chains/chains-api/allora/). [All methods ->](/rpc-service/chains/chains-api/allora/#methods)
>
> Part 3 of 4: [1](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/) · [2](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/) · 3 · [4](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/)
## Cosmos REST methods
### `/cosmos/upgrade/v1beta1/current_plan`
> Retrieves the current upgrade plan.
#### Parameters
* `name` (string; required): a name of the applied plan to query for.
#### Returns
Current upgrade plan.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/upgrade/v1beta1/current_plan
```
#### Response example
```json
{
"plan": {
"name": "string",
"time": "2021-01-19T07:49:08.875Z",
"height": "string",
"info": "string",
"upgraded_client_state": {
"type_url": "string",
"value": "string"
}
}
}
```
---
### `/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}`
> Retrieves the consensus state that will serve as a trusted kernel for the next version of this chain.
It will only be stored at the last height of this chain, not supported with legacy querier.
#### Parameters
* `last_height` (string, int64): a required last height under which next consensus state is stored.
#### Returns
Consensus state.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}
```
#### Response example
```json
{
"upgraded_consensus_state": {
"type_url": "string",
"value": "string"
}
}
```
---
### Ibc core methods
### `/ibc/core/channel/v1beta1/channels`
> Retrieves all the IBC channels of a chain.
#### Parameters
* `pagination.key` (string, byte): a value returned in PageResponse.next_key to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
IBC channels of a chain.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/channels
```
#### Response example
```json
{
"channels": [
{
"state": "STATE_UNINITIALIZED_UNSPECIFIED",
"ordering": "ORDER_NONE_UNSPECIFIED",
"counterparty": {
"port_id": "string",
"channel_id": "string"
},
"connection_hops": [
"string"
],
"version": "string",
"port_id": "string",
"channel_id": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
},
"height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}`
> Retrieves an IBC Channel.
#### Parameters
* `channel_id` (string; required): a channel unique identifier.
* `port_id` (string; required): a port unique identifier.
#### Returns
IBC channels of a chain.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}
```
#### Response example
```json
{
"channel": {
"state": "STATE_UNINITIALIZED_UNSPECIFIED",
"ordering": "ORDER_NONE_UNSPECIFIED",
"counterparty": {
"port_id": "string",
"channel_id": "string"
},
"connection_hops": [
"string"
],
"version": "string"
},
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state`
> Retrieves the client state for the channel associated with the provided channel identifiers.
#### Parameters
* `channel_id` (string; required): a channel unique identifier.
* `port_id` (string; required): a port unique identifier.
#### Returns
Client state.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state
```
#### Response example
```json
{
"identified_client_state": {
"client_id": "string",
"client_state": {
"type_url": "string",
"value": "string"
}
},
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}`
> Retrieves the consensus state for the channel associated with the provided channel identifiers.
#### Parameters
* `channel_id` (string; required): a channel unique identifier.
* `port_id` (string; required): a port unique identifier.
* `revision_number` (string, uint64; required): a revision number of the consensus state.
* `revision_height` string, uint64; required: a revision height of the consensus state.
#### Returns
Consensus state.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}
```
#### Response example
```json
{
"consensus_state": {
"type_url": "string",
"value": "string"
},
"client_id": "string",
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence`
> Retrieves the next receive sequence for a given channel.
#### Parameters
* `channel_id` (string; required): a channel unique identifier.
* `port_id` (string; required): a port unique identifier.
#### Returns
Next receive sequence.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence
```
#### Response example
```json
{
"next_sequence_receive": "string",
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements`
> Retrieves all the packet acknowledgements associated with a channel.
#### Parameters
* `channel_id` (string; required): a channel unique identifier.
* `port_id` (string; required): a port unique identifier.
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Packet acknowledgements.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements
```
#### Response example
```json
{
"acknowledgements": [
{
"port_id": "string",
"channel_id": "string",
"sequence": "string",
"data": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
},
"height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}`
> Retrieves a stored packet acknowledgement hash.
#### Parameters
* `channel_id` (string; required): a channel unique identifier.
* `port_id` (string; required): a port unique identifier.
* `sequence` (string, uint64): a packet sequence.
#### Returns
Packet acknowledgements.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}
```
#### Response example
```json
{
"acknowledgement": "string",
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments`
> Retrieves all the packet commitments hashes associated with a channel.
#### Parameters
* `channel_id` (string; required): a channel unique identifier.
* `port_id` (string; required): a port unique identifier.
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Packet commitments.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments
```
#### Response example
```json
{
"commitments": [
{
"port_id": "string",
"channel_id": "string",
"sequence": "string",
"data": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
},
"height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks`
> Retrieves all the unreceived IBC acknowledgements associated with a channel and sequences.
#### Parameters
* `channel_id` (string; required): a channel unique identifier.
* `port_id` (string; required): a port unique identifier.
* `packet_ack_sequence` (array[string]): a required list of acknowledgement sequences.
#### Returns
Unreceived IBC acknowledgements.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks
```
#### Response example
```json
{
"sequences": [
"string"
],
"height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets`
> Retrieves all the unreceived IBC packets associated with a channel and sequences.
#### Parameters
* `channel_id` (string; required): a channel unique identifier.
* `port_id` (string; required): a port unique identifier.
* `packet_commitment_sequences` (array[string]): a list of packet sequences.
#### Returns
Unreceived IBC packets.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets
```
#### Response example
```json
{
"sequences": [
"string"
],
"height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}`
> Retrieves a stored packet commitment hash.
#### Parameters
* `channel_id` (string; required): a channel unique identifier.
* `port_id` (string; required): a port unique identifier.
* `packet_commitment_sequences` (array[string]): a list of packet sequences.
#### Returns
Packet commitment hash.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}
```
#### Response example
```json
{
"commitment": "string",
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}`
> Checks whether a given packet sequence has been received on the queried chain.
#### Parameters
* `channel_id` (string; required): a channel unique identifier.
* `port_id` (string; required): a port unique identifier.
* `sequence` (string, uint64): a required packet sequence.
#### Returns
Whether the given packet has been received or not.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}
```
#### Response example
```json
{
"received": true,
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/channel/v1beta1/connections/{connection}/channels`
> Retrieves all the channels associated with a connection end.
#### Parameters
* `connection` (string, required): a connection unique identifier.
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` string($uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Channels associated with a connection.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/channel/v1beta1/connections/{connection}/channels
```
#### Response example
```json
{
"channels": [
{
"state": "STATE_UNINITIALIZED_UNSPECIFIED",
"ordering": "ORDER_NONE_UNSPECIFIED",
"counterparty": {
"port_id": "string",
"channel_id": "string"
},
"connection_hops": [
"string"
],
"version": "string",
"port_id": "string",
"channel_id": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
},
"height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/client/v1beta1/params`
> Retrieves all parameters of the IBC client.
#### Parameters
None.
#### Returns
Params of the IBC client.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/client/v1beta1/params
```
#### Response example
```json
{
"params": {
"allowed_clients": [
"string"
]
}
}
```
---
### `/ibc/core/client/v1beta1/client_states`
> Retrieves all the IBC light clients of a chain.
#### Parameters
* `pagination.key` (string; byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string; uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string; uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
IBC light clients.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/client/v1beta1/client_states
```
#### Response example
```json
{
"client_states": [
{
"client_id": "string",
"client_state": {
"type_url": "string",
"value": "string"
}
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/ibc/core/client/v1beta1/client_states/{client_id}`
> Retrieves an IBC light client.
#### Parameters
* `client_id` (string; required): a client state unique identifier.
#### Returns
IBC light client from client_id.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/client/v1beta1/client_states/{client_id}
```
#### Response example
```json
{
"client_state": {
"type_url": "string",
"value": "string"
},
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/client/v1beta1/consensus_states/{client_id}`
> Retrieves all the consensus state associated with a given client.
#### Parameters
* `client_id` (string; required): a client unique identifier.
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Consensus state associated with given client
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/client/v1beta1/consensus_states/{client_id}
```
#### Response example
```json
{
"consensus_states": [
{
"height": {
"revision_number": "string",
"revision_height": "string"
},
"consensus_state": {
"type_url": "string",
"value": "string"
}
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/ibc/core/client/v1beta1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}`
> Retrieves a consensus state associated with a client state at a given height.
#### Parameters
* `channel_id` (string; required): a channel unique identifier.
* `revision_number` (string, uint64): a required consensus state revision number.
* `revision_height`(string, uint64): a required consensus state revision height.
* `latest_height` (boolean): overrides the height field and queries the latest stored consensus state.
#### Returns
Consensus state associated with a client state at a given height.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/client/v1beta1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}
```
#### Response example
```json
{
"consensus_state": {
"type_url": "string",
"value": "string"
},
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/connection/v1beta1/client_connections/{client_id}`
> Retrieves the connection paths associated with a client state.
#### Parameters
* `client_id` (string, required): a client identifier associated with a connection.
#### Returns
Connections paths associated with a client state.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/connection/v1beta1/client_connections/{client_id}
```
#### Response example
```json
{
"connection_paths": [
"string"
],
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/connection/v1beta1/connections`
> Retrieves all the IBC connections of a chain.
#### Parameters
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
IBC connections.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/connection/v1beta1/connections
```
#### Response example
```json
{
"connections": [
{
"id": "string",
"client_id": "string",
"versions": [
{
"identifier": "string",
"features": [
"string"
]
}
],
"state": "STATE_UNINITIALIZED_UNSPECIFIED",
"counterparty": {
"client_id": "string",
"connection_id": "string",
"prefix": {
"key_prefix": "string"
}
},
"delay_period": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
},
"height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/
title: Allora — Cosmos REST methods (4/4)
source: docs/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4.mdx
---
# Allora — Cosmos REST methods (4/4)
> API reference for [Allora](/rpc-service/chains/chains-api/allora/). [All methods ->](/rpc-service/chains/chains-api/allora/#methods)
>
> Part 4 of 4: [1](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/) · [2](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/) · [3](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/) · 4
## Cosmos REST methods
### `/ibc/core/connection/v1beta1/connections/{connection_id}`
> Retrieves an IBC connection end.
#### Parameters
* `connection_id` (string; required): a connection unique identifier.
#### Returns
IBC connections end.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/connection/v1beta1/connections/{connection_id}
```
#### Response example
```json
{
"connection": {
"client_id": "string",
"versions": [
{
"identifier": "string",
"features": [
"string"
]
}
],
"state": "STATE_UNINITIALIZED_UNSPECIFIED",
"counterparty": {
"client_id": "string",
"connection_id": "string",
"prefix": {
"key_prefix": "string"
}
},
"delay_period": "string"
},
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/connection/v1beta1/connections/{connection_id}/client_state`
> Retrieves the client state associated with the connection.
#### Parameters
* `connection_id` (string; required): a connection unique identifier.
#### Returns
Client state.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/connection/v1beta1/connections/{connection_id}/client_state
```
#### Response example
```json
{
"identified_client_state": {
"client_id": "string",
"client_state": {
"type_url": "string",
"value": "string"
}
},
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### `/ibc/core/connection/v1beta1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}`
> Retrieves the consensus state associated with the connection.
#### Parameters
* `connection_id` (string; required): a connection unique identifier.
* `revision_number` (string, uint64): a required revision number.
* `revision_height` (string, uint64): a required revision height.
#### Returns
Consensus state.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/core/connection/v1beta1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}
```
#### Response example
```json
{
"consensus_state": {
"type_url": "string",
"value": "string"
},
"client_id": "string",
"proof": "string",
"proof_height": {
"revision_number": "string",
"revision_height": "string"
}
}
```
---
### Ibc applications methods
### `/ibc/applications/transfer/v1beta1/denom_traces`
> Retrieves all denomination traces.
#### Parameters
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of `offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Denomination traces.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/applications/transfer/v1beta1/denom_traces
```
#### Response example
```json
{
"denom_traces": [
{
"path": "string",
"base_denom": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/ibc/applications/transfer/v1beta1/denom_traces/{hash}`
> Retrieves a denomination trace information by hash.
#### Parameters
* `hash` (string, hex; required): a hash of the denomination trace information.
#### Returns
Denomination traces.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/applications/transfer/v1beta1/denom_traces/{hash}
```
#### Response example
```json
{
"denom_trace": {
"path": "string",
"base_denom": "string"
}
}
```
---
### `/ibc/applications/transfer/v1beta1/params`
> Retrieves all parameters of the IBC transfer module.
#### Parameters
None.
#### Returns
Parameters of the IBC transfer module.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/ibc/applications/transfer/v1beta1/params
```
#### Response example
```json
{
"params": {
"send_enabled": true,
"receive_enabled": true
}
}
```
---
### Tx methods
### `/cosmos/tx/v1beta1/simulate`
> Simulates executing a transaction for estimating gas usage.
#### Parameters
* `` (object; required):
```json
{
"tx": {
"body": {
"messages": [
{
"type_url": "string",
"value": "string"
}
],
"memo": "string",
"timeout_height": "string",
"extension_options": [
{
"type_url": "string",
"value": "string"
}
],
"non_critical_extension_options": [
{
"type_url": "string",
"value": "string"
}
]
},
"auth_info": {
"signer_infos": [
{
"public_key": {
"type_url": "string",
"value": "string"
},
"mode_info": {
"single": {
"mode": "SIGN_MODE_UNSPECIFIED"
},
"multi": {
"bitarray": {
"extra_bits_stored": 0,
"elems": "string"
},
"mode_infos": [
null
]
}
},
"sequence": "string"
}
],
"fee": {
"amount": [
{
"denom": "string",
"amount": "string"
}
],
"gas_limit": "string",
"payer": "string",
"granter": "string"
}
},
"signatures": [
"string"
]
}
}
```
#### Returns
Estimated gas usage.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/tx/v1beta1/simulate
````
#### Response example
```json
{
"gas_info": {
"gas_wanted": "string",
"gas_used": "string"
},
"result": {
"data": "string",
"log": "string",
"events": [
{
"type": "string",
"attributes": [
{
"key": "string",
"value": "string",
"index": true
}
]
}
]
}
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/allora/cosmos-rest-methods/
title: Allora — Cosmos REST methods (1/4)
source: docs/rpc-service/chains/chains-api/allora/cosmos-rest-methods.mdx
---
# Allora — Cosmos REST methods (1/4)
> API reference for [Allora](/rpc-service/chains/chains-api/allora/). [All methods ->](/rpc-service/chains/chains-api/allora/#methods)
>
> Part 1 of 4: 1 · [2](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/) · [3](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/) · [4](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/)
## Cosmos REST methods
**Query**:
* [Auth methods](#auth-methods)
* [Bank methods](#bank-methods)
* [Distribution methods](#distribution-methods)
* [Evidence methods](#evidence-methods)
* [Gov methods](#gov-methods)
* [Mint methods](#mint-methods)
* [Slashing methods](#slashing-methods)
* [Staking methods](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#staking-methods)
* [Upgrade methods](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#upgrade-methods)
* [Ibc core methods](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibc-core-methods)
* [Ibc applications methods](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/#ibc-applications-methods)
**Service**:
* [Tx methods](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/#tx-methods)
### Auth methods
## Cosmos REST methods
### `/cosmos/auth/v1beta1/accounts/{address}`
> Retrieves account details based on address.
#### Parameters
* `address` (string; required): an address to query for account details.
#### Returns
Account details.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/auth/v1beta1/accounts/{address}
```
#### Response example
```json
{
"account": {
"type_url": "string",
"value": "string"
}
}
```
---
### `/cosmos/auth/v1beta1/params`
> Retrieves all parameters.
#### Parameters
None.
#### Returns
Parameters.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/auth/v1beta1/params
```
#### Response example
```json
{
"params": {
"max_memo_characters": "string",
"tx_sig_limit": "string",
"tx_size_cost_per_byte": "string",
"sig_verify_cost_ed25519": "string",
"sig_verify_cost_secp256k1": "string"
}
}
```
---
### Bank methods
### `/cosmos/bank/v1beta1/balances/{address}`
> Retrieves the balance of all coins for a single account.
#### Parameters
* `address`(string; required): an address to query balances for.
* `pagination.key` (string, byte): value returned in `PageResponse.next_key` to begin querying the next page most efficiently. Only one of offset or key should be set.
* `pagination.offset` (string, uint64): numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set.
* `pagination.limit` (string, uint64): total number of results to be returned in the result page. If left empty it will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. `count_total` is only respected when `offset` is used, it is ignored when `key` is set.
#### Returns
Balance of all coins for a single account.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/bank/v1beta1/balances/{address}
```
#### Response example
```json
{
"balances": [
{
"denom": "string",
"amount": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
### `/cosmos/bank/v1beta1/balances/{address}/{denom}`
> Retrieves balance of a single coin for a single account.
#### Parameters
* `address` (string; required): an address to query balances for.
* `denom` (string; required): a coin denom to query balances for.
#### Returns
Balance of the specific coin for a single account.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/bank/v1beta1/balances/{address}/{denom}
```
#### Response example
```shell
{
"balance": {
"denom": "string",
"amount": "string"
}
}
```
### `/cosmos/bank/v1beta1/params`
> Retrieves the parameters of x/bank module.
#### Parameters
None.
#### Returns
Parameters of x/bank module.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/bank/v1beta1/params
```
#### Response example
```json
{
"params": {
"send_enabled": [
{
"denom": "string",
"enabled": true
}
],
"default_send_enabled": true
}
}
```
---
### `/cosmos/bank/v1beta1/supply`
> Retrieves the total supply of all coins.
#### Parameters
None.
#### Returns
Supply of all coins.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/bank/v1beta1/supply
```
#### Response example
```json
{
"supply": [
{
"denom": "string",
"amount": "string"
}
]
}
```
---
### Distribution methods
### `/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards`
> Retrieves the total rewards accrued by each validator.
#### Parameters
* `delegator_address` (string; required): a delegator address to query for.
#### Returns
Rewards from each validator.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards
```
#### Response example
```shell
{
"rewards": [
{
"validator_address": "string",
"reward": [
{
"denom": "string",
"amount": "string"
}
]
}
],
"total": [
{
"denom": "string",
"amount": "string"
}
]
}
```
---
### `/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}`
> Retrieves the total rewards accrued by a delegation.
#### Parameters
* `delegator_address` (string; required): a delegator address to query for.
* `validator_address` (string; required): a validator address to query for.
#### Returns
Total rewards accrued by a delegation for a specific validator.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}
```
#### Response example
```json
{
"rewards": [
{
"denom": "string",
"amount": "string"
}
]
}
```
---
### `/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators`
> Retrieves the validators of a delegator.
#### Parameters
* `delegator_address` (string; required): a delegator address to query for.
#### Returns
Validators for a given delegator.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators
```
#### Response example
```json
{
"validators": [
"string"
]
}
```
---
### `/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address`
> Retrieves withdraw address of a delegator.
#### Parameters
* `delegator_address` (string, required): a delegator address to query for.
#### Returns
Withdraw address of delegator.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address
```
#### Response example
```json
{
"withdraw_address": "string"
}
```
---
### `/cosmos/distribution/v1beta1/params`
> Retrieves params of the distribution module.
#### Parameters
None.
#### Returns
Params of the distribution module.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/distribution/v1beta1/params
```
#### Response example
```json
{
"params": {
"community_tax": "string",
"base_proposer_reward": "string",
"bonus_proposer_reward": "string",
"withdraw_addr_enabled": true
}
}
```
---
### `/cosmos/distribution/v1beta1/validators/{validator_address}/commission`
> Retrieves accumulated commission for a validator.
#### Parameters
* `validator_address` (string; required): a validator address to query for.
#### Returns
Total commission for a validator.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/distribution/v1beta1/validators/{validator_address}/commission
```
#### Response example
```json
{
"commission": {
"commission": [
{
"denom": "string",
"amount": "string"
}
]
}
}
```
---
### `/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards`
> Retrieves the rewards of a validator address.
#### Parameters
* `validator_address` (string; required): validator address to query for.
#### Returns
Total outstanding rewards for a validator.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards
```
#### Response example
```json
{
"rewards": {
"rewards": [
{
"denom": "string",
"amount": "string"
}
]
}
}
```
---
### `/cosmos/distribution/v1beta1/validators/{validator_address}/slashes`
> Retrieves slash events of a validator.
#### Parameters
* `validator_address` (string; required): a validator address to query for.
* `starting_height` (string, uint64): the optional starting height to query the hashes
* `ending_height` (string, uint64): the optional ending height to query the hashes
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of
`offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
All slash events of a validator.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/distribution/v1beta1/validators/{validator_address}/slashes
```
#### Response example
```json
{
"slashes": [
{
"validator_period": "string",
"fraction": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### Evidence methods
### `/cosmos/evidence/v1beta1/evidence`
> Retrieves all evidence.
#### Parameters
* `pagination.key` (string, byte): a value returned in PageResponse.next_key to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of
`offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
All evidence.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/evidence/v1beta1/evidence
```
#### Response example
```json
{
"evidence": [
{
"type_url": "string",
"value": "string"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/cosmos/evidence/v1beta1/evidence/{evidence_hash}`
> Retrieves evidence based on evidence hash.
#### Parameters
* `evidence_hash` (string, byte): the hash of the requested evidence.
#### Returns
Evidence for a given hash.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/evidence/v1beta1/evidence/{evidence_hash}
```
#### Response example
```json
{
"evidence": {
"type_url": "string",
"value": "string"
}
}
```
---
### Gov methods
### `/cosmos/gov/v1beta1/params/{params_type}`
> Retrieves all parameters of the gov module.
#### Parameters
* `params_type` (string, required): parameters to query for; possible values: `voting`, `tallying`, or `deposit`.
#### Returns
Parameters of the gov module.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/gov/v1beta1/params/{params_type}
```
#### Response example
```json
{
"voting_params": {
"voting_period": "string"
},
"deposit_params": {
"min_deposit": [
{
"denom": "string",
"amount": "string"
}
],
"max_deposit_period": "string"
},
"tally_params": {
"quorum": "string",
"threshold": "string",
"veto_threshold": "string"
}
}
```
---
### `/cosmos/gov/v1beta1/proposals`
> Retrieves all proposals based on given status.
#### Parameters
* `proposal_status`: defines status of the proposals. See below for different options. Default value = PROPOSAL_STATUS_UNSPECIFIED. Other statuses:
* `PROPOSAL_STATUS_UNSPECIFIED`: default proposal status.
* `PROPOSAL_STATUS_DEPOSIT_PERIOD`: defines a proposal status during the deposit period.
* `PROPOSAL_STATUS_VOTING_PERIOD`: defines a proposal status during the voting period.
* `PROPOSAL_STATUS_PASSED`: defines a proposal status of a proposal that has passed.
* `PROPOSAL_STATUS_REJECTED`: defines a proposal status of a proposal that has been rejected.
* `PROPOSAL_STATUS_FAILED`: defines a proposal status of a proposal that has failed.
* `voter` (string): defines the voter address for the proposals.
* `depositor` (string): defines the deposit addresses from the proposals.
* `pagination.key` (string, byte): a value returned in PageResponse.next_key to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of
`offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Proposals based on given status.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/gov/v1beta1/proposals
```
#### Response example
```json
{
"proposals": [
{
"proposal_id": "string",
"content": {
"type_url": "string",
"value": "string"
},
"status": "PROPOSAL_STATUS_UNSPECIFIED",
"final_tally_result": {
"yes": "string",
"abstain": "string",
"no": "string",
"no_with_veto": "string"
},
"submit_time": "2021-01-19T03:03:05.413Z",
"deposit_end_time": "2021-01-19T03:03:05.413Z",
"total_deposit": [
{
"denom": "string",
"amount": "string"
}
],
"voting_start_time": "2021-01-19T03:03:05.413Z",
"voting_end_time": "2021-01-19T03:03:05.413Z"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/cosmos/gov/v1beta1/proposals/{proposal_id}`
> Retrieves proposal details based on `ProposalID`.
#### Parameters
* `proposal_id` (string; required): a unique id of the proposal.
#### Returns
Proposal details based on proposalID.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/gov/v1beta1/proposals/{proposal_id}
```
#### Response example
```json
{
"proposal": {
"proposal_id": "string",
"content": {
"type_url": "string",
"value": "string"
},
"status": "PROPOSAL_STATUS_UNSPECIFIED",
"final_tally_result": {
"yes": "string",
"abstain": "string",
"no": "string",
"no_with_veto": "string"
},
"submit_time": "2021-01-19T03:30:27.807Z",
"deposit_end_time": "2021-01-19T03:30:27.807Z",
"total_deposit": [
{
"denom": "string",
"amount": "string"
}
],
"voting_start_time": "2021-01-19T03:30:27.807Z",
"voting_end_time": "2021-01-19T03:30:27.807Z"
}
}
```
---
### `/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits`
> Retrieves all deposits of a single proposal.
#### Parameters
* `proposal_id` (string, uint64; required): a unique id of the proposal.
* `pagination.key` (string, byte): a value returned in `PageResponse.next_key` to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of
`offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
All deposits based on a proposalID.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits
```
#### Response example
```json
{
"deposits": [
{
"proposal_id": "string",
"depositor": "string",
"amount": [
{
"denom": "string",
"amount": "string"
}
]
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}`
> Retrieves single deposit information based `proposalID` and `depositAddr`.
#### Parameters
* `proposal_id` (string, uint64): a required unique id of the proposal.
* `depositor` (string): the deposit addresses from the proposals.
#### Returns
Single deposit based on a proposalID.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}
```
#### Response example
```json
{
"deposit": {
"proposal_id": "string",
"depositor": "string",
"amount": [
{
"denom": "string",
"amount": "string"
}
]
}
}
```
---
### `/cosmos/gov/v1beta1/proposals/{proposal_id}/tally`
> Retrieves the tally of a proposal vote.
#### Parameters
* `proposal_id` (string, uint64): a required unique ID of the proposal.
#### Returns
Tally of proposal vote.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/gov/v1beta1/proposals/{proposal_id}/tally
```
#### Response example
```json
{
"tally": {
"yes": "string",
"abstain": "string",
"no": "string",
"no_with_veto": "string"
}
}
```
---
### `/cosmos/gov/v1beta1/proposals/{proposal_id}/votes`
> Retrieves the votes of a given proposal.
#### Parameters
* `proposal_id` (string($uint64), required): a unique id of the proposal
* `pagination.key` (string, byte): a value returned in PageResponse.next_key to begin querying the next page efficiently. Only one of
`offset` or `key` should be set.
* `pagination.key` (string, uint64): a numeric offset that can be used when key is unavailable (less efficient than using key). Only one of
`offset` or `key` should be set.
* `pagination.limit` (string, uint64): a total number of results to be returned in the results page. If empty, will default to a value to be set by each app.
* `pagination.count_total` (boolean): set to true to indicate that the result set should include a count of the total number of items available for pagination in the UIs. Only respected when `offset` is used, ignored when `key` is set.
#### Returns
Votes for a given proposal.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/gov/v1beta1/proposals/{proposal_id}/votes
```
#### Response example
```json
{
"votes": [
{
"proposal_id": "string",
"voter": "string",
"option": "VOTE_OPTION_UNSPECIFIED"
}
],
"pagination": {
"next_key": "string",
"total": "string"
}
}
```
---
### `/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}`
> Retrieves voted information based on `proposalID` and `voterAddr`.
#### Parameters
* `proposal_id` (string, uint64; required): a unique ID of the proposal.
* `voter` (string): the other address for the proposals.
#### Returns
Votes for a given proposal.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}
```
#### Response example
```json
{
"vote": {
"proposal_id": "string",
"voter": "string",
"option": "VOTE_OPTION_UNSPECIFIED"
}
}
```
---
### Mint methods
### `/cosmos/mint/v1beta1/annual_provisions`
> Retrieves the current minting annual provisions value.
#### Parameters
None.
#### Returns
Value of minting annual provisions.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/mint/v1beta1/annual_provisions
```
#### Response example
```json
{
"error": "string",
"code": 0,
"message": "string",
"details": [
{
"type_url": "string",
"value": "string"
}
]
}
```
---
### `/cosmos/mint/v1beta1/inflation`
> Retrieves the current minting inflation value.
#### Parameters
None.
#### Returns
Current minting inflation value.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/mint/v1beta1/inflation
```
#### Response example
```json
{
"inflation": "string"
}
```
---
### `/cosmos/mint/v1beta1/params`
> Retrieves the total set of minting parameters
#### Parameters
None.
#### Returns
Total set of minting params.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/mint/v1beta1/params
```
#### Response example
```json
{
"params": {
"mint_denom": "string",
"inflation_rate_change": "string",
"inflation_max": "string",
"inflation_min": "string",
"goal_bonded": "string",
"blocks_per_year": "string"
}
}
```
---
### Slashing methods
### `/cosmos/slashing/v1beta1/params`
> Retrieves the slashing module parameters.
#### Parameters
None.
#### Returns
The parameters of a slashing module.
#### Request example
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/slashing/v1beta1/params
```
#### Response example
```json
{
"params": {
"signed_blocks_window": "string",
"min_signed_per_window": "string",
"downtime_jail_duration": "string",
"slash_fraction_double_sign": "string",
"slash_fraction_downtime": "string"
}
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/allora/
title: Allora
description: The Allora Network is an advanced protocol that leverages decentralized AI and machine learning (ML) to generate… Available on Ankr RPC with a free demo key.
source: docs/rpc-service/chains/chains-api/allora/index.mdx
---
# Allora
> Allora API is available on [Web3 API platform](https://www.ankr.com/rpc/allora).
The Allora Network is an advanced protocol that leverages decentralized AI and machine learning (ML) to generate and share predictions among its participants. It provides a structured way for users to access on-chain AI predictions and pay the AI/ML node operators who produce these insights.
Allora acts as a bridge between various parties — data owners, processors, AI/ML predictors, market analysts, and end-users — allowing them to utilize and act on these predictions. AI/ML agents on the network use their data and algorithms to broadcast predictions across a peer-to-peer network. They also evaluate predictions from other agents.
The network’s consensus mechanism then combines these predictions and assessments, rewarding agents based on the quality of their contributions. This incentive system helps Allora continuously learn and adapt to changing market conditions.
## Tendermint JSON-RPC/REST methods
**Info — node information**:
* [`blockchain`](/rpc-service/chains/chains-api/allora/networks-protocols-supported/#blockchain) — retrieves block headers (max: 20) for `minHeight <= height <= maxHeight`.
* [`block`](/rpc-service/chains/chains-api/allora/networks-protocols-supported/#block) — retrieves a block at a specified height.
* [`block_by_hash`](/rpc-service/chains/chains-api/allora/networks-protocols-supported/#block_by_hash) — retrieves a block by hash.
* [`block_results`](/rpc-service/chains/chains-api/allora/networks-protocols-supported/#block_results) — retrieves block results at a specified height.
* [`commit`](/rpc-service/chains/chains-api/allora/networks-protocols-supported/#commit) — retrieves commit results at a specified height.
* [`validators`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#validators) — retrieves a validator set at a specified height.
* [`genesis_chunked`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#genesis_chunked) — retrieves the Genesis in multiple chunks.
* [`dump_consensus_state`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#dump_consensus_state) — retrieves consensus state.
* [`consensus_state`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#consensus_state) — retrieves consensus state.
* [`consensus_params`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#consensus_params) — retrieves consensus parameters.
* [`unconfirmed_txs`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#unconfirmed_txs) — retrieves the list of unconfirmed transactions.
* [`num_unconfirmed_txs`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#num_unconfirmed_txs) — retrieves data about unconfirmed transactions.
* [`tx_search`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#tx_search) — searches for transactions.
* [`block_search`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#block_search) — searches for blocks by `BeginBlock` and `EndBlock` events.
* [`tx`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#tx) — retrieves transactions by hash.
**Tx — transactions broadcast information**:
* [`broadcast_tx_sync`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/#broadcast_tx_sync) — returns with the response from `CheckTx`. Does not wait for `DeliverTx` result.
* [`broadcast_tx_async`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/#broadcast_tx_async) — returns right away, with no response. Does not wait for `CheckTx` nor `DeliverTx` results.
* [`broadcast_tx_commit`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/#broadcast_tx_commit) — returns with the responses from `CheckTx` and `DeliverTx`.
* [`check_tx`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/#check_tx) — checks the transaction without executing it.
**ABCI — ABCI info**:
* [`abci_info`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/#abci_info) — retrieves info about the application.
* [`abci_query`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/#abci_query) — queries the application for some information.
---
## Methods
### Networks/Protocols supported, Information, Transactions, ABCI
- [`Networks/Protocols supported`](/rpc-service/chains/chains-api/allora/networks-protocols-supported/#networksprotocols-supported)
- [`blockchain`](/rpc-service/chains/chains-api/allora/networks-protocols-supported/#blockchain)
- [`block`](/rpc-service/chains/chains-api/allora/networks-protocols-supported/#block)
- [`block_by_hash`](/rpc-service/chains/chains-api/allora/networks-protocols-supported/#block_by_hash)
- [`block_results`](/rpc-service/chains/chains-api/allora/networks-protocols-supported/#block_results)
- [`commit`](/rpc-service/chains/chains-api/allora/networks-protocols-supported/#commit)
- [`validators`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#validators)
- [`genesis_chunked`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#genesis_chunked)
- [`dump_consensus_state`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#dump_consensus_state)
- [`consensus_state`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#consensus_state)
- [`consensus_params`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#consensus_params)
- [`unconfirmed_txs`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#unconfirmed_txs)
- [`num_unconfirmed_txs`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#num_unconfirmed_txs)
- [`tx_search`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#tx_search)
- [`block_search`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#block_search)
- [`tx`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/#tx)
- [`broadcast_tx_sync`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/#broadcast_tx_sync)
- [`Parameters`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#parameters-15)
- [`broadcast_tx_async`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/#broadcast_tx_async)
- [`broadcast_tx_commit`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/#broadcast_tx_commit)
- [`check_tx`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/#check_tx)
- [`abci_info`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/#abci_info)
- [`abci_query`](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/#abci_query)
### Cosmos REST methods
- [`Auth methods`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#auth-methods)
- [`/cosmos/auth/v1beta1/accounts/{address}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosauthv1beta1accountsaddress)
- [`/cosmos/auth/v1beta1/params`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosauthv1beta1params)
- [`Bank methods`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#bank-methods)
- [`/cosmos/bank/v1beta1/balances/{address}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosbankv1beta1balancesaddress)
- [`/cosmos/bank/v1beta1/balances/{address}/{denom}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosbankv1beta1balancesaddressdenom)
- [`/cosmos/bank/v1beta1/params`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosbankv1beta1params)
- [`/cosmos/bank/v1beta1/supply`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosbankv1beta1supply)
- [`Distribution methods`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#distribution-methods)
- [`/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosdistributionv1beta1delegatorsdelegator_addressrewards)
- [`/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosdistributionv1beta1delegatorsdelegator_addressrewardsvalidator_address)
- [`/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosdistributionv1beta1delegatorsdelegator_addressvalidators)
- [`/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosdistributionv1beta1delegatorsdelegator_addresswithdraw_address)
- [`/cosmos/distribution/v1beta1/params`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosdistributionv1beta1params)
- [`/cosmos/distribution/v1beta1/validators/{validator_address}/commission`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosdistributionv1beta1validatorsvalidator_addresscommission)
- [`/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosdistributionv1beta1validatorsvalidator_addressoutstanding_rewards)
- [`/cosmos/distribution/v1beta1/validators/{validator_address}/slashes`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosdistributionv1beta1validatorsvalidator_addressslashes)
- [`Evidence methods`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#evidence-methods)
- [`/cosmos/evidence/v1beta1/evidence`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosevidencev1beta1evidence)
- [`/cosmos/evidence/v1beta1/evidence/{evidence_hash}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosevidencev1beta1evidenceevidence_hash)
- [`Gov methods`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#gov-methods)
- [`/cosmos/gov/v1beta1/params/{params_type}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosgovv1beta1paramsparams_type)
- [`/cosmos/gov/v1beta1/proposals`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosgovv1beta1proposals)
- [`/cosmos/gov/v1beta1/proposals/{proposal_id}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosgovv1beta1proposalsproposal_id)
- [`/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosgovv1beta1proposalsproposal_iddeposits)
- [`/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosgovv1beta1proposalsproposal_iddepositsdepositor)
- [`/cosmos/gov/v1beta1/proposals/{proposal_id}/tally`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosgovv1beta1proposalsproposal_idtally)
- [`/cosmos/gov/v1beta1/proposals/{proposal_id}/votes`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosgovv1beta1proposalsproposal_idvotes)
- [`/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosgovv1beta1proposalsproposal_idvotesvoter)
- [`Mint methods`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#mint-methods)
- [`/cosmos/mint/v1beta1/annual_provisions`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosmintv1beta1annual_provisions)
- [`/cosmos/mint/v1beta1/inflation`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosmintv1beta1inflation)
- [`/cosmos/mint/v1beta1/params`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosmintv1beta1params)
- [`Slashing methods`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#slashing-methods)
- [`/cosmos/slashing/v1beta1/params`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods/#cosmosslashingv1beta1params)
- [`/cosmos/slashing/v1beta1/signing_infos`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosslashingv1beta1signing_infos)
- [`/cosmos/slashing/v1beta1/signing_infos/{cons_address}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosslashingv1beta1signing_infoscons_address)
- [`Staking methods`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#staking-methods)
- [`/cosmos/staking/v1beta1/delegations/{delegator_addr}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1delegationsdelegator_addr)
- [`/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1delegatorsdelegator_addrredelegations)
- [`/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1delegatorsdelegator_addrunbonding_delegations)
- [`/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1delegatorsdelegator_addrvalidators)
- [`/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1delegatorsdelegator_addrvalidatorsvalidator_addr)
- [`/cosmos/staking/v1beta1/historical_info/{height}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1historical_infoheight)
- [`/cosmos/staking/v1beta1/params`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1params)
- [`/cosmos/staking/v1beta1/pool`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1pool)
- [`/cosmos/staking/v1beta1/validators`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1validators)
- [`/cosmos/staking/v1beta1/validators/{validator_addr}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1validatorsvalidator_addr)
- [`/cosmos/staking/v1beta1/validators/{validator_addr}/delegations`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1validatorsvalidator_addrdelegations)
- [`/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1validatorsvalidator_addrdelegationsdelegator_addr)
- [`/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1validatorsvalidator_addrdelegationsdelegator_addrunbonding_delegation)
- [`/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosstakingv1beta1validatorsvalidator_addrunbonding_delegations)
- [`Upgrade methods`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#upgrade-methods)
- [`/cosmos/upgrade/v1beta1/applied_plan/{name}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p2/#cosmosupgradev1beta1applied_planname)
- [`/cosmos/upgrade/v1beta1/current_plan`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#cosmosupgradev1beta1current_plan)
- [`/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#cosmosupgradev1beta1upgraded_consensus_statelast_height)
- [`Ibc core methods`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibc-core-methods)
- [`/ibc/core/channel/v1beta1/channels`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1channels)
- [`/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1channelschannel_idportsport_id)
- [`/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1channelschannel_idportsport_idclient_state)
- [`/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1channelschannel_idportsport_idconsensus_staterevisionrevision_numberheightrevision_height)
- [`/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1channelschannel_idportsport_idnext_sequence)
- [`/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1channelschannel_idportsport_idpacket_acknowledgements)
- [`/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1channelschannel_idportsport_idpacket_ackssequence)
- [`/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1channelschannel_idportsport_idpacket_commitments)
- [`/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1channelschannel_idportsport_idpacket_commitmentspacket_ack_sequencesunreceived_acks)
- [`/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1channelschannel_idportsport_idpacket_commitmentspacket_commitment_sequencesunreceived_packets)
- [`/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1channelschannel_idportsport_idpacket_commitmentssequence)
- [`/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1channelschannel_idportsport_idpacket_receiptssequence)
- [`/ibc/core/channel/v1beta1/connections/{connection}/channels`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccorechannelv1beta1connectionsconnectionchannels)
- [`/ibc/client/v1beta1/params`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibcclientv1beta1params)
- [`/ibc/core/client/v1beta1/client_states`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccoreclientv1beta1client_states)
- [`/ibc/core/client/v1beta1/client_states/{client_id}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccoreclientv1beta1client_statesclient_id)
- [`/ibc/core/client/v1beta1/consensus_states/{client_id}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccoreclientv1beta1consensus_statesclient_id)
- [`/ibc/core/client/v1beta1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccoreclientv1beta1consensus_statesclient_idrevisionrevision_numberheightrevision_height)
- [`/ibc/core/connection/v1beta1/client_connections/{client_id}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccoreconnectionv1beta1client_connectionsclient_id)
- [`/ibc/core/connection/v1beta1/connections`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p3/#ibccoreconnectionv1beta1connections)
- [`/ibc/core/connection/v1beta1/connections/{connection_id}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/#ibccoreconnectionv1beta1connectionsconnection_id)
- [`/ibc/core/connection/v1beta1/connections/{connection_id}/client_state`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/#ibccoreconnectionv1beta1connectionsconnection_idclient_state)
- [`/ibc/core/connection/v1beta1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/#ibccoreconnectionv1beta1connectionsconnection_idconsensus_staterevisionrevision_numberheightrevision_height)
- [`Ibc applications methods`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/#ibc-applications-methods)
- [`/ibc/applications/transfer/v1beta1/denom_traces`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/#ibcapplicationstransferv1beta1denom_traces)
- [`/ibc/applications/transfer/v1beta1/denom_traces/{hash}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/#ibcapplicationstransferv1beta1denom_traceshash)
- [`/ibc/applications/transfer/v1beta1/params`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/#ibcapplicationstransferv1beta1params)
- [`Tx methods`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/#tx-methods)
- [`/cosmos/tx/v1beta1/simulate`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-p4/#cosmostxv1beta1simulate)
### Cosmos REST methods
- [`/cosmos/tx/v1beta1/txs`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-2/#cosmostxv1beta1txs-1)
- [`/cosmos/tx/v1beta1/txs`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-2/#cosmostxv1beta1txs-1)
- [`/cosmos/tx/v1beta1/txs/{hash}`](/rpc-service/chains/chains-api/allora/cosmos-rest-methods-2/#cosmostxv1beta1txshash)
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/
title: Allora — Networks/Protocols supported, Information, Transactions, ABCI (2/3)
source: docs/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2.mdx
---
# Allora — Networks/Protocols supported, Information, Transactions, ABCI (2/3)
> API reference for [Allora](/rpc-service/chains/chains-api/allora/). [All methods ->](/rpc-service/chains/chains-api/allora/#methods)
>
> Part 2 of 3: [1](/rpc-service/chains/chains-api/allora/networks-protocols-supported/) · 2 · [3](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/)
## Information
### `validators`
> Retrieves a validator set at a specified height.
Validators are sorted by voting power.
#### Parameters
* `height` (integer; default: 0): the height to return. If no height is provided, the validator set corresponding to the latest block is to be fetched.
* `page` (integer; default: 1): a page number (1-based).
* `per_page` (integer; default: 30; max: 100): a number of entries per page.
#### Returns
Commit results.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "validators",
"params": ["1","1","30"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/validators?height=1&page=2&per_page=30
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"block_height": "55",
"validators": [
{
"address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"voting_power": "239727",
"proposer_priority": "-11896414"
}
],
"count": "1",
"total": "25"
}
}
```
---
### `genesis_chunked`
> Retrieves Genesis in multiple chunks.
Gets genesis document in multiple chunks to make it easier to iterate through larger genesis structures. Each chunk is produced by converting the genesis document to JSON and then splitting the resulting payload into 16MB blocks, and then Base64-encoding each block.
#### Parameters
* `chunk` (integer; default: 0): a sequence number of the chunk to download.
#### Returns
A Genesis chunk response.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "genesis_chunked",
"params": ["1"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/genesis_chunked?chunk=1
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"chunk": 0,
"total": 1,
"data": "Z2VuZXNpcwo="
}
}
```
---
### `dump_consensus_state`
> Retrieves consensus state.
Not safe to call from inside the ABCI application during a block execution.
#### Parameters
None.
#### Returns
A complete consensus state. See the [Vote string description](https://pkg.go.dev/github.com/tendermint/tendermint/types?tab=doc#Vote.String).
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "dump_consensus_state",
"params": [],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/dump_consensus_state
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"round_state": {
"height": "1311801",
"round": 0,
"step": 3,
"start_time": "2019-08-05T11:28:49.064658805Z",
"commit_time": "2019-08-05T11:28:44.064658805Z",
"validators": {
"validators": [
{
"address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"voting_power": "239727",
"proposer_priority": "-11896414"
}
],
"proposer": {
"address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"voting_power": "239727",
"proposer_priority": "-11896414"
}
},
"locked_round": -1,
"valid_round": "-1",
"votes": [
{
"round": "0",
"prevotes": [
"nil-Vote",
"Vote{19:46A3F8B8393B 1311801/00/1(Prevote) 000000000000 64CE682305CB @ 2019-08-05T11:28:47.374703444Z}"
],
"prevotes_bit_array": "BA{100:___________________x________________________________________________________________________________} 209706/170220253 = 0.00",
"precommits": [
"nil-Vote"
],
"precommits_bit_array": "BA{100:____________________________________________________________________________________________________} 0/170220253 = 0.00"
}
],
"commit_round": -1,
"last_commit": {
"votes": [
"Vote{0:000001E443FD 1311800/00/2(Precommit) 3071ADB27D1A 77EE1B6B6847 @ 2019-08-05T11:28:43.810128139Z}"
],
"votes_bit_array": "BA{100:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} 170220253/170220253 = 1.00",
"peer_maj_23s": {}
},
"last_validators": {
"validators": [
{
"address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"voting_power": "239727",
"proposer_priority": "-11896414"
}
],
"proposer": {
"address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"voting_power": "239727",
"proposer_priority": "-11896414"
}
},
"triggered_timeout_precommit": false
},
"peers": [
{
"node_address": "357f6a6c1d27414579a8185060aa8adf9815c43c@68.183.41.207:26656",
"peer_state": {
"round_state": {
"height": "1311801",
"round": "0",
"step": 3,
"start_time": "2019-08-05T11:28:49.21730864Z",
"proposal": false,
"proposal_block_parts_header": {
"total": 0,
"hash": ""
},
"proposal_pol_round": -1,
"proposal_pol": "____________________________________________________________________________________________________",
"prevotes": "___________________x________________________________________________________________________________",
"precommits": "____________________________________________________________________________________________________",
"last_commit_round": 0,
"last_commit": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"catchup_commit_round": -1,
"catchup_commit": "____________________________________________________________________________________________________"
},
"stats": {
"votes": "1159558",
"block_parts": "4786"
}
}
}
]
}
}
```
---
### `consensus_state`
> Retrieves consensus state.
Not safe to call from inside the ABCI application during a block execution.
#### Parameters
None.
#### Returns
Consensus state results.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "consensus_state",
"params": [],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/consensus_state
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"round_state": {
"height/round/step": "1262197/0/8",
"start_time": "2019-08-01T11:52:38.962730289Z",
"proposal_block_hash": "634ADAF1F402663BEC2ABC340ECE8B4B45AA906FA603272ACC5F5EED3097E009",
"locked_block_hash": "634ADAF1F402663BEC2ABC340ECE8B4B45AA906FA603272ACC5F5EED3097E009",
"valid_block_hash": "634ADAF1F402663BEC2ABC340ECE8B4B45AA906FA603272ACC5F5EED3097E009",
"height_vote_set": [
{
"round": 0,
"prevotes": [
"Vote{0:000001E443FD 1262197/00/1(Prevote) 634ADAF1F402 7BB974E1BA40 @ 2019-08-01T11:52:35.513572509Z}",
"nil-Vote"
],
"prevotes_bit_array": "BA{100:xxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx} 169753436/170151262 = 1.00",
"precommits": [
"Vote{5:18C78D135C9D 1262197/00/2(Precommit) 634ADAF1F402 8B5EFFFEABCD @ 2019-08-01T11:52:36.25600005Z}",
"nil-Vote"
],
"precommits_bit_array": "BA{100:xxxxxx_xxxxx_xxxx_x_xxx_xx_xx_xx__x_x_x__xxxxxxxxxxxxxx_xxxx_xx_xxxxxx_xxxxxxxx_xxxx_xxx_x_xxxx__xxx} 118726247/170151262 = 0.70"
}
],
"proposer": {
"address": "D540AB022088612AC74B287D076DBFBC4A377A2E",
"index": 0
}
}
}
}
```
---
### `consensus_params`
> Retrieves consensus parameters.
#### Parameters
* `height` (integer; default: 0): the height to return. If no height is provided, the latest block commit info is to be returned.
#### Returns
Consensus parameters results.
#### Request parameters
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "consensus_params",
"params": ["1"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/consensus_params?height=1
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"block_height": "1",
"consensus_params": {
"block": {
"max_bytes": "22020096",
"max_gas": "1000",
"time_iota_ms": "1000"
},
"evidence": {
"max_age": "100000"
},
"validator": {
"pub_key_types": [
"ed25519"
]
}
}
}
}
```
---
### `unconfirmed_txs`
> Retrieves the list of unconfirmed transactions.
#### Parameters
* `limit` (integer; default: 30; max: 100): the maximum number of unconfirmed transactions to return.
#### Returns
The list of unconfirmed transactions.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "unconfirmed_txs",
"params": ["1"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/unconfirmed_txs?limit=1
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"n_txs": "82",
"total": "82",
"total_bytes": "19974",
"txs": [
"gAPwYl3uCjCMTXENChSMnIkb5ZpYHBKIZqecFEV2tuZr7xIUA75/FmYq9WymsOBJ0XSJ8yV8zmQKMIxNcQ0KFIyciRvlmlgcEohmp5wURXa25mvvEhQbrvwbvlNiT+Yjr86G+YQNx7kRVgowjE1xDQoUjJyJG+WaWBwSiGannBRFdrbma+8SFK2m+1oxgILuQLO55n8mWfnbIzyPCjCMTXENChSMnIkb5ZpYHBKIZqecFEV2tuZr7xIUQNGfkmhTNMis4j+dyMDIWXdIPiYKMIxNcQ0KFIyciRvlmlgcEohmp5wURXa25mvvEhS8sL0D0wwgGCItQwVowak5YB38KRIUCg4KBXVhdG9tEgUxMDA1NBDoxRgaagom61rphyECn8x7emhhKdRCB2io7aS/6Cpuq5NbVqbODmqOT3jWw6kSQKUresk+d+Gw0BhjiggTsu8+1voW+VlDCQ1GRYnMaFOHXhyFv7BCLhFWxLxHSAYT8a5XqoMayosZf9mANKdXArA="
]
}
}
```
---
### `num_unconfirmed_txs`
> Retrieves data on unconfirmed transactions.
#### Parameters
None.
#### Returns
The status of unconfirmed transactions.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "num_unconfirmed_txs",
"params": [],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/num_unconfirmed_txs
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"n_txs": "31",
"total": "82",
"total_bytes": "19974"
}
}
```
---
### `tx_search`
> Searches for transactions with their results.
#### Parameters
* `query` (string; required): query is a string, which has a form: "condition AND condition ..." (no OR at the moment). condition has a form: "key operation operand". key is a string with a restricted set of possible symbols ( \t\n\r\()"'=>< are not allowed). operation can be `=`, `<`, `<=`, `>`, `>=`, `CONTAINS`. An operand can be a string (escaped with single quotes), number, date, or time.
* `prove` (boolean; default: false): adds proofs of the transactions inclusion in the block.
* `page` (integer; default: 1): a page number (1-based).
* `per_page` (integer; default: 30, max: 100): a number of entries per page.
* `order_by` (string; default: asc): the order in which transactions are sorted (`asc` or `desc`), by height & index. If empty, default sorting still applies.
* `match_events` (boolean; default: false): match attributes in query within events, in addition to the height and txhash.
#### Returns
The list of unconfirmed transactions.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "tx_search",
"params": ["4D2000", true, "1", "30", "asc"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/tx_search?query=tx.height%4D2000&prove=true&page=1&per_page=30&order_by=asc
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"txs": [
{
"hash": "D70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED",
"height": "1000",
"index": 0,
"tx_result": {
"log": "[{\"msg_index\":\"0\",\"success\":true,\"log\":\"\"}]",
"gas_wanted": "200000",
"gas_used": "28596",
"tags": {
"key": "YWN0aW9u",
"value": "c2VuZA==",
"index": false
}
},
"tx": "5wHwYl3uCkaoo2GaChQmSIu8hxpJxLcCuIi8fiHN4TMwrRIU/Af1cEG7Rcs/6LjTl7YjRSymJfYaFAoFdWF0b20SCzE0OTk5OTk1MDAwEhMKDQoFdWF0b20SBDUwMDAQwJoMGmoKJuta6YchAwswBShaB1wkZBctLIhYqBC3JrAI28XGzxP+rVEticGEEkAc+khTkKL9CDE47aDvjEHvUNt+izJfT4KVF2v2JkC+bmlH9K08q3PqHeMI9Z5up+XMusnTqlP985KF+SI5J3ZOIhhNYWRlIGJ5IENpcmNsZSB3aXRoIGxvdmU=",
"proof": {
"RootHash": "72FE6BF6D4109105357AECE0A82E99D0F6288854D16D8767C5E72C57F876A14D",
"Data": "5wHwYl3uCkaoo2GaChQmSIu8hxpJxLcCuIi8fiHN4TMwrRIU/Af1cEG7Rcs/6LjTl7YjRSymJfYaFAoFdWF0b20SCzE0OTk5OTk1MDAwEhMKDQoFdWF0b20SBDUwMDAQwJoMGmoKJuta6YchAwswBShaB1wkZBctLIhYqBC3JrAI28XGzxP+rVEticGEEkAc+khTkKL9CDE47aDvjEHvUNt+izJfT4KVF2v2JkC+bmlH9K08q3PqHeMI9Z5up+XMusnTqlP985KF+SI5J3ZOIhhNYWRlIGJ5IENpcmNsZSB3aXRoIGxvdmU=",
"Proof": {
"total": "2",
"index": "0",
"leaf_hash": "eoJxKCzF3m72Xiwb/Q43vJ37/2Sx8sfNS9JKJohlsYI=",
"aunts": [
"eWb+HG/eMmukrQj4vNGyFYb3nKQncAWacq4HF5eFzDY="
]
}
}
}
],
"total_count": "2"
}
}
```
---
### `block_search`
> Searches for blocks by `BeginBlock` and `EndBlock` events.
#### Parameters
* `query` (string; required): query is a string, which has a form: "condition AND condition ..." (no OR at the moment). condition has a form: "key operation operand". key is a string with a restricted set of possible symbols ( \t\n\r\()"'=>< are not allowed). operation can be `=`, `<`, `<=`, `>`, `>=`, `CONTAINS`. An operand can be a string (escaped with single quotes), number, date, or time.
* `page` (integer; default: 1): a page number (1-based).
* `per_page` (integer; default: 30, max: 100): a number of entries per page.
* `order_by` (string; default: asc): the order in which transactions are sorted (`asc` or `desc`), by height & index. If empty, default sorting still applies.
* `match_events` (boolean; default: false): match attributes in query within events, in addition to the height.
#### Returns
The list of paginated blocks matching the search criteria.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block_search",
"params": ["4D2000", "1", "30", "asc"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/block_search?query=block.height%4D2000&page=1&per_page=30&order_by=asc
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"blocks": [
{
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"block": {
"header": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
},
"data": [
"yQHwYl3uCkKoo2GaChRnd+THLQ2RM87nEZrE19910Z28ABIUWW/t8AtIMwcyU0sT32RcMDI9GF0aEAoFdWF0b20SBzEwMDAwMDASEwoNCgV1YXRvbRIEMzEwMRCd8gEaagom61rphyEDoJPxlcjRoNDtZ9xMdvs+lRzFaHe2dl2P5R2yVCWrsHISQKkqX5H1zXAIJuC57yw0Yb03Fwy75VRip0ZBtLiYsUqkOsPUoQZAhDNP+6LY+RUwz/nVzedkF0S29NZ32QXdGv0="
],
"evidence": [
{
"type": "string",
"height": 0,
"time": 0,
"total_voting_power": 0,
"validator": {
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
},
"voting_power": 0,
"address": "string"
}
}
],
"last_commit": {
"height": 0,
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"signatures": [
{
"type": 2,
"height": "1262085",
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"timestamp": "2019-08-01T11:39:38.867269833Z",
"validator_address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"validator_index": 0,
"signature": "DBchvucTzAUEJnGYpNvMdqLhBAHG4Px8BsOBB3J3mAFCLGeuG7uJqy+nVngKzZdPhPi8RhmE/xcw/M9DOJjEDg=="
}
]
}
}
}
],
"total_count": 2
}
}
```
---
### `tx`
> Retrieves a transaction by hash.
#### Parameters
* `hash` (string; required): a hash of a transaction to retrieve.
* `prove` (boolean; default: false): adds proofs of the transaction's inclusion in the block.
#### Returns
Transaction info.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "tx",
"params": ["0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED", true],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/tx?hash=0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED&prove=true
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"hash": "D70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED",
"height": "1000",
"index": 0,
"tx_result": {
"log": "[{\"msg_index\":\"0\",\"success\":true,\"log\":\"\"}]",
"gas_wanted": "200000",
"gas_used": "28596",
"tags": [
{
"key": "YWN0aW9u",
"value": "c2VuZA==",
"index": false
}
]
},
"tx": "5wHwYl3uCkaoo2GaChQmSIu8hxpJxLcCuIi8fiHN4TMwrRIU/Af1cEG7Rcs/6LjTl7YjRSymJfYaFAoFdWF0b20SCzE0OTk5OTk1MDAwEhMKDQoFdWF0b20SBDUwMDAQwJoMGmoKJuta6YchAwswBShaB1wkZBctLIhYqBC3JrAI28XGzxP+rVEticGEEkAc+khTkKL9CDE47aDvjEHvUNt+izJfT4KVF2v2JkC+bmlH9K08q3PqHeMI9Z5up+XMusnTqlP985KF+SI5J3ZOIhhNYWRlIGJ5IENpcmNsZSB3aXRoIGxvdmU="
}
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/
title: Allora — Networks/Protocols supported, Information, Transactions, ABCI (3/3)
source: docs/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3.mdx
---
# Allora — Networks/Protocols supported, Information, Transactions, ABCI (3/3)
> API reference for [Allora](/rpc-service/chains/chains-api/allora/). [All methods ->](/rpc-service/chains/chains-api/allora/#methods)
>
> Part 3 of 3: [1](/rpc-service/chains/chains-api/allora/networks-protocols-supported/) · [2](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/) · 3
## Transactions
### `broadcast_tx_sync`
> Returns with the response from `CheckTx`. Does not wait for `DeliverTx` result.
If you want to be sure that the transaction is included in a block, you can subscribe for the result using JSON-RPC via a websocket. See https://docs.cometbft.com/v0.34/core/subscription.html If you haven't received anything after a couple of blocks, resend it. If the same happens again, send it to some other node. A few reasons why it could happen:
1. A malicious node drops or pretends it has committed your tx.
2. A malicious proposer (not necessary the one you're communicating with) drops transactions, which might become valid in the future (https://github.com/tendermint/tendermint/issues/3322).
Please refer to [Tendermint docs](https://docs.tendermint.com/v0.34/tendermint-core/using-tendermint.html#formatting) for formatting/encoding rules.
### Parameters
* `tx` (string; required): the transaction.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_sync",
"params": ["456"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/broadcast_tx_sync?tx=456
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"code": "0",
"data": "",
"log": "",
"codespace": "ibc",
"hash": "0D33F2F03A5234F38706E43004489E061AC40A2E"
},
"error": ""
}
```
---
### `broadcast_tx_async`
> Returns right away, with no response. Does not wait for `CheckTx` nor `DeliverTx` results.
If you want to be sure that the transaction is included in a block, you can subscribe for the result using JSON-RPC via a websocket. See https://docs.cometbft.com/v0.34/core/subscription.html If you haven't received anything after a couple of blocks, resend it. If the same happens again, send it to some other node. A few reasons why it could happen:
1. A malicious node drops or pretends it has committed your tx.
2. A malicious proposer (not necessary the one you're communicating with) drops transactions, which might become valid in the future (https://github.com/tendermint/tendermint/issues/3322).
3. A node is offline.
Please refer to [CometBFT docs](https://docs.cometbft.com/v0.34/core/using-cometbft.html#formatting) for formatting/encoding rules.
#### Parameters
* `tx` (string; required): the transaction.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_async",
"params": ["123"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/broadcast_tx_async?tx=123
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"code": "0",
"data": "",
"log": "",
"codespace": "ibc",
"hash": "0D33F2F03A5234F38706E43004489E061AC40A2E"
},
"error": ""
}
```
---
### `broadcast_tx_commit`
> Returns with the responses from `CheckTx` and `DeliverTx`.
:::warning
Use only for testing and development. In production, use `BroadcastTxSync` or `BroadcastTxAsync`. You can subscribe for the transaction result using JSON-RPC via a websocket (see [CometBFT docs](https://docs.cometbft.com/v0.34/core/subscription.html)).
:::
:::tip
CONTRACT: only returns error if `mempool.CheckTx()` errs or if we timeout waiting for tx to commit.
If `CheckTx` or `DeliverTx` fails, no error will be returned, but the result will contain a non-OK ABCI code.
Please refer to [CometBFT docs](https://docs.cometbft.com/v0.34/core/using-cometbft.html#formatting) for formatting/encoding rules.
:::
#### Parameters
* `tx` (string; required): the transaction.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_commit",
"params": ["785"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/broadcast_tx_commit?tx=785
```
#### Response example
```json
{
"error": "",
"result": {
"height": "26682",
"hash": "75CA0F856A4DA078FC4911580360E70CEFB2EBEE",
"deliver_tx": {
"log": "",
"data": "",
"code": "0"
},
"check_tx": {
"log": "",
"data": "",
"code": "0"
}
},
"id": 0,
"jsonrpc": "2.0"
}
```
---
### `check_tx`
> Checks the transaction without executing it.
The transaction won't be added to the mempool.
Please refer to [CometBFT docs](https://docs.cometbft.com/v0.34/core/using-cometbft.html#formatting) for formatting/encoding rules.
#### Parameters
* `tx` (string; required): the transaction.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "check_tx",
"params": ["785"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/check_tx?tx=785
```
#### Response example
```json
{
"error": "",
"result": {
"code": "0",
"data": "",
"log": "",
"info": "",
"gas_wanted": "1",
"gas_used": "0",
"events": [
{
"type": "app",
"attributes": [
{
"key": "YWN0aW9u",
"value": "c2VuZA==",
"index": false
}
]
}
],
"codespace": "bank"
},
"id": 0,
"jsonrpc": "2.0"
}
```
---
## ABCI
### `abci_info`
> Retrieves application info.
#### Parameters
None.
#### Returns
Application info.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "abci_info",
"params": [],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/abci_info
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"response": {
"data": "data-sample",
"version": "1.6.1",
"last_block_height": "7690381",
"last_block_app_hash": "J1tJC9R3q3cNzkDcI7ipyi9NuZ8XUVbMyy7B42TPWuc="
}
}
}
```
---
### `abci_query`
> Queries the application for particular information.
#### Parameters
* `path` (string; required): a path to the data ("/a/b/c").
* `data` (string; required): the data.
* `height` (integer; default: 0): the height (0 means latest).
* `prove` (boolean; default: false): adds proofs of the transactions inclusion in the block.
#### Returns
Particular info according to the query submitted.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "abci_query",
"params": ["a/b/c", "the_data", "1", true],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/blockchain?path=%2Fa%2Fb%2Fc&data=the_data&height=1&prove=true
```
#### Response example
```json
{
"error": "",
"result": {
"response": {
"log": "exists",
"height": "0",
"proof": "010114FED0DAD959F36091AD761C922ABA3CBF1D8349990101020103011406AA2262E2F448242DF2C2607C3CDC705313EE3B0001149D16177BC71E445476174622EA559715C293740C",
"value": "61626364",
"key": "61626364",
"index": "-1",
"code": "0"
}
},
"id": 0,
"jsonrpc": "2.0"
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/allora/networks-protocols-supported/
title: Allora — Networks/Protocols supported, Information, Transactions, ABCI (1/3)
source: docs/rpc-service/chains/chains-api/allora/networks-protocols-supported.mdx
---
# Allora — Networks/Protocols supported, Information, Transactions, ABCI (1/3)
> API reference for [Allora](/rpc-service/chains/chains-api/allora/). [All methods ->](/rpc-service/chains/chains-api/allora/#methods)
>
> Part 1 of 3: 1 · [2](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p2/) · [3](/rpc-service/chains/chains-api/allora/networks-protocols-supported-p3/)
## Networks/Protocols supported
We support the following networks and protocols for Allora:
* [Tendermint JSON-RPC/REST API](/rpc-service/chains/chains-api/allora/#tendermint-json-rpcrest-methods)
* [Cosmos REST API](/rpc-service/chains/chains-api/allora/#cosmos-rest-methods)
Currently, we provide two interfaces to query Allora API — [JSON-RPC](https://www.jsonrpc.org/specification) and REST. Responses for both of them come in [JSON format](https://www.json.org/json-en.html).
Here is the request/response structure to use for querying:
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block",
"params": ["761001"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/block?height=761001
```
```shell
curl https://rpc.ankr.com/http/allora_cosmos_testnet/cosmos/base/tendermint/v1beta1/blocks/{height}
```
```json
{
"jsonrpc": "2.0",
"id": -1,
"result": {
"block_id": {
"hash": "663789D1BAA0354453A5BB1474C46C9F74E6140B247153482BBE84893C029600",
"parts": {
"total": 1,
"hash": "BFCC2C78C439E367ABEEA996FD9A120EAA70DC44572B8BFDCA032908BA4B439B"
}
},
"block": {
"header": {
"version": {
"block": "11"
},
"chain_id": "allora-testnet-1",
"height": "761001",
"time": "2024-08-21T21:33:36.088780054Z",
"last_block_id": {
"hash": "AD51186842A63CB515A4946C558DF1DA71D384DF646EC5522ECD5008E3FAEDA0",
"parts": {
"total": 1,
"hash": "16A9CCD523F2E593E66F46CBD20FCC03B5849ACE5325951E50BC53B6D7D2F893"
}
},
"last_commit_hash": "77BE45E09B5A5F40FA1F10BF430C2E14371445B9E2DF89952478E84A98DFA081",
"data_hash": "78F2AF9D01AC871045FB53CB383AA50EF4C0094E9563428BFF8BA59071801050",
"validators_hash": "CB957FF7AB192A9F9321F0E471C7BAE5A9AA82573FF8D509F8ACF7CA3A450A42",
"next_validators_hash": "CB957FF7AB192A9F9321F0E471C7BAE5A9AA82573FF8D509F8ACF7CA3A450A42",
"consensus_hash": "048091BC7DDC283F77BFBF91D73C44DA58C3DF8A9CBC867405D8B7F3DAADA22F",
"app_hash": "72AEC5979CEA9EE65275B77DA8F31676C7E52DA57B991D86C4870237E3D40127",
"last_results_hash": "455FD6D9D1888EBE5B8602E20E84EEACA30020B717A5B5298890E7236CAB84AD",
"evidence_hash": "E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855",
"proposer_address": "01458B61F0D7DE6E90798FE8C370413D718EB34C"
},
"data": {
"txs": [
"CuECCt4CCiQvZW1pc3Npb25zLnYyLk1zZ0luc2VydFdvcmtlclBheWxvYWQStQIKK2FsbG8xYWhhcGE2ZHpkOG0yNjc0MHp5N2gyd3pnamx1ZnM4NjRmeDR1eHcShQIKK2FsbG8xYWhhcGE2ZHpkOG0yNjc0MHp5N2gyd3pnamx1ZnM4NjRmeDR1eHcSBAiRuS4YBSJICkYIBRCRuS4aK2FsbG8xYWhhcGE2ZHpkOG0yNjc0MHp5N2gyd3pnamx1ZnM4NjRmeDR1eHciETE0NS42NTg1MDk2NjIzMjkzKkBkgCxd7XHQh+Debe/yvS+c8BBoKguydI/J/YNqRaYpBDpnwQo+4/LPouiYF04JXDBa4qxTfJFlpdSJ9EgoX+TAMkIwMmQ4MjYzOTFiYWI4ZjYzNWYzNDhkYmQxNDQ1ZGUxZmQ0YjgzZjNiNGJiZjFkY2EzY2Q4YWFjM2FlMWMyYmY5ODcSWApQCkYKHy9jb3Ntb3MuY3J5cHRvLnNlY3AyNTZrMS5QdWJLZXkSIwohAtgmORurj2NfNI29FEXeH9S4PztLvx3KPNiqw64cK/mHEgQKAggBGCkSBBDAhD0aQN1AnyLR2Kz/KMZ5yr+Sz4wo+4Tp8OnyDqSlr98oCNQVPtF69bWneamHvTEq7r5WUGuwQfWSD+sybXlUgnDlmIw=",
"CuECCt4CCiQvZW1pc3Npb25zLnYyLk1zZ0luc2VydFdvcmtlclBheWxvYWQStQIKK2FsbG8xcmZweng2MGR6MDc5dWhuZXRxdHNkdTJ1ZTM0dmdyMnJ3ZGFrd2cShQIKK2FsbG8xcmZweng2MGR6MDc5dWhuZXRxdHNkdTJ1ZTM0dmdyMnJ3ZGFrd2cSBAiTuS4YAyJICkYIAxCTuS4aK2FsbG8xcmZweng2MGR6MDc5dWhuZXRxdHNkdTJ1ZTM0dmdyMnJ3ZGFrd2ciETYxMzI3LjIzMTM5NzQ3MTg1KkA2b71NaRNK8PFRv+nLbaTfB53wu/AqI4cGoFYED/4U/3c8JOYW+Q2moUdlX35tKF0U2gneVA2jQy0vmem8uIz6MkIwMzA5Zjg2ZWY3YzNlM2IyZjUzMzg3OGZiNjY2Mjk1NjljNjFkYTNhMzg2OTkyNjNmMWM4MDhlMTcxMTQzOWYxMmMSWQpRCkYKHy9jb3Ntb3MuY3J5cHRvLnNlY3AyNTZrMS5QdWJLZXkSIwohAwn4bvfD47L1M4ePtmYpVpxh2jo4aZJj8cgI4XEUOfEsEgQKAggBGLJKEgQQwIQ9GkAYepebNx4qruj3/XCxlmVQ3XDbhfsXZlZyM+yeqUs7d263LfRxugRgQH3aiV/ROiC/gVH0bID6GA00y5QMWM+B"
]
},
"evidence": {
"evidence": []
},
"last_commit": {
"height": "761000",
"round": 0,
"block_id": {
"hash": "AD51186842A63CB515A4946C558DF1DA71D384DF646EC5522ECD5008E3FAEDA0",
"parts": {
"total": 1,
"hash": "16A9CCD523F2E593E66F46CBD20FCC03B5849ACE5325951E50BC53B6D7D2F893"
}
},
"signatures": [
{
"block_id_flag": 1,
"validator_address": "",
"timestamp": "0001-01-01T00:00:00Z",
"signature": null
},
{
"block_id_flag": 2,
"validator_address": "2D5A6E69CDFBE8FF7C0C2DAFF752387AC73B9AB1",
"timestamp": "2024-08-21T21:33:36.07519025Z",
"signature": "LvyV25u8kxAivi7rHuAZlXtawVBMYyOJflcr4al44TWVLmYnztqycSgGyi1S9GkUGoeA4nG+wRM/4pqk4YIKDQ=="
}
]
}
}
}
}
```
---
## Information
### `blockchain`
> Retrieves block headers for `minHeight <= height <= maxHeight`.
At most 20 items will return for the `minHeight` or `maxHeight` parameters specified. If `maxHeight` does not yet exist, the blocks up to the current height will return. If `minHeight` does not exist (pruning), the earliest existing height will be used.
#### Parameters
* `minHeight` (integer): the minimum block height to return.
* `maxHeight` (integer): the maximum block height to return.
#### Returns
Block headers, in descending order (highest first).
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "blockchain",
"params": ["1", "2"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/blockchain?minHeight=1&maxHeight=2
```
#### Response example
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"last_height": "1276718",
"block_metas": [
{
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"block_size": 1000000,
"header": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
},
"num_txs": "54"
}
]
}
}
```
---
### `block`
> Retrieves a block at a specified height.
#### Parameters
* `height` (integer; default: 0): the height to return. If no height is provided, the latest block is to be fetched.
#### Returns
Block information.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block",
"params": ["1"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/blockchain?height=1
```
#### Response example
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"block": {
"header": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
},
"data": [
"yQHwYl3uCkKoo2GaChRnd+THLQ2RM87nEZrE19910Z28ABIUWW/t8AtIMwcyU0sT32RcMDI9GF0aEAoFdWF0b20SBzEwMDAwMDASEwoNCgV1YXRvbRIEMzEwMRCd8gEaagom61rphyEDoJPxlcjRoNDtZ9xMdvs+lRzFaHe2dl2P5R2yVCWrsHISQKkqX5H1zXAIJuC57yw0Yb03Fwy75VRip0ZBtLiYsUqkOsPUoQZAhDNP+6LY+RUwz/nVzedkF0S29NZ32QXdGv0="
],
"evidence": [
{
"type": "string",
"height": 0,
"time": 0,
"total_voting_power": 0,
"validator": {
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
},
"voting_power": 0,
"address": "string"
}
}
],
"last_commit": {
"height": 0,
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"signatures": [
{
"type": 2,
"height": "1262085",
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"timestamp": "2019-08-01T11:39:38.867269833Z",
"validator_address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"validator_index": 0,
"signature": "DBchvucTzAUEJnGYpNvMdqLhBAHG4Px8BsOBB3J3mAFCLGeuG7uJqy+nVngKzZdPhPi8RhmE/xcw/M9DOJjEDg=="
}
]
}
}
}
}
```
---
### `block_by_hash`
> Retrieves a block by hash.
#### Parameters
* `hash` (string; required): a block hash.
#### Returns
Block information.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block_by_hash",
"params": ["0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/block_by_hash?hash=0xD70952032620CC4E2737EB8AC379806359D8E0B17B0488F627997A0B043ABDED
```
#### Response example
```json
{
"id": 0,
"jsonrpc": "2.0",
"result": {
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"block": {
"header": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
},
"data": [
"yQHwYl3uCkKoo2GaChRnd+THLQ2RM87nEZrE19910Z28ABIUWW/t8AtIMwcyU0sT32RcMDI9GF0aEAoFdWF0b20SBzEwMDAwMDASEwoNCgV1YXRvbRIEMzEwMRCd8gEaagom61rphyEDoJPxlcjRoNDtZ9xMdvs+lRzFaHe2dl2P5R2yVCWrsHISQKkqX5H1zXAIJuC57yw0Yb03Fwy75VRip0ZBtLiYsUqkOsPUoQZAhDNP+6LY+RUwz/nVzedkF0S29NZ32QXdGv0="
],
"evidence": [
{
"type": "string",
"height": 0,
"time": 0,
"total_voting_power": 0,
"validator": {
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "A6DoBUypNtUAyEHWtQ9bFjfNg8Bo9CrnkUGl6k6OHN4="
},
"voting_power": 0,
"address": "string"
}
}
],
"last_commit": {
"height": 0,
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"signatures": [
{
"type": 2,
"height": "1262085",
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"timestamp": "2019-08-01T11:39:38.867269833Z",
"validator_address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"validator_index": 0,
"signature": "DBchvucTzAUEJnGYpNvMdqLhBAHG4Px8BsOBB3J3mAFCLGeuG7uJqy+nVngKzZdPhPi8RhmE/xcw/M9DOJjEDg=="
}
]
}
}
}
}
```
---
### `block_results`
> Retrieves block results at a specified height.
#### Parameters
* `height` (integer; default: 0): the height to return. If no height is provided, the latest block info is to be fetched.
#### Returns
Block results.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "block_results",
"params": ["1"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/block_results?height=1
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"height": "12",
"txs_results": [
{
"code": "0",
"data": "",
"log": "not enough gas",
"info": "",
"gas_wanted": "100",
"gas_used": "100",
"events": [
{
"type": "app",
"attributes": [
{
"key": "YWN0aW9u",
"value": "c2VuZA==",
"index": false
}
]
}
],
"codespace": "ibc"
}
],
"begin_block_events": [
{
"type": "app",
"attributes": [
{
"key": "YWN0aW9u",
"value": "c2VuZA==",
"index": false
}
]
}
],
"end_block": [
{
"type": "app",
"attributes": [
{
"key": "YWN0aW9u",
"value": "c2VuZA==",
"index": false
}
]
}
],
"validator_updates": [
{
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "9tK9IT+FPdf2qm+5c2qaxi10sWP+3erWTKgftn2PaQM="
},
"power": "300"
}
],
"consensus_params_updates": {
"block": {
"max_bytes": "22020096",
"max_gas": "1000",
"time_iota_ms": "1000"
},
"evidence": {
"max_age": "100000"
},
"validator": {
"pub_key_types": [
"ed25519"
]
}
}
}
}
```
---
### `commit`
> Retrieves commit results at a specified height.
#### Parameters
* `height` (integer; default: 0): the height to return. If no height is provided, the latest block commit info is to be fetched.
#### Returns
Commit results. Canonical switches from false to true for block H once block H+1 has been committed, until then it's subjective and only reflects what this node has seen so far.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/allora_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "commit",
"params": ["1"],
"id": 1
}'
```
```shell
curl https://rpc.ankr.com/http/allora_testnet/commit?height=1
```
#### Response example
```json
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"signed_header": {
"header": {
"version": {
"block": "10",
"app": "0"
},
"chain_id": "cosmoshub-2",
"height": "12",
"time": "2019-04-22T17:01:51.701356223Z",
"last_block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"last_commit_hash": "21B9BC845AD2CB2C4193CDD17BFC506F1EBE5A7402E84AD96E64171287A34812",
"data_hash": "970886F99E77ED0D60DA8FCE0447C2676E59F2F77302B0C4AA10E1D02F18EF73",
"validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"next_validators_hash": "D658BFD100CA8025CFD3BECFE86194322731D387286FBD26E059115FD5F2BCA0",
"consensus_hash": "0F2908883A105C793B74495EB7D6DF2EEA479ED7FC9349206A65CB0F9987A0B8",
"app_hash": "223BF64D4A01074DC523A80E76B9BBC786C791FB0A1893AC5B14866356FCFD6C",
"last_results_hash": "",
"evidence_hash": "",
"proposer_address": "D540AB022088612AC74B287D076DBFBC4A377A2E"
},
"commit": {
"height": "1311801",
"round": 0,
"block_id": {
"hash": "112BC173FD838FB68EB43476816CD7B4C6661B6884A9E357B417EE957E1CF8F7",
"parts": {
"total": 1,
"hash": "38D4B26B5B725C4F13571EFE022C030390E4C33C8CF6F88EDD142EA769642DBD"
}
},
"signatures": [
{
"block_id_flag": 2,
"validator_address": "000001E443FD237E4B616E2FA69DF4EE3D49A94F",
"timestamp": "2019-04-22T17:01:58.376629719Z",
"signature": "14jaTQXYRt8kbLKEhdHq7AXycrFImiLuZx50uOjs2+Zv+2i7RTG/jnObD07Jo2ubZ8xd7bNBJMqkgtkd0oQHAw=="
}
]
}
},
"canonical": true
}
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/aptos/accounts-p2/
title: Aptos — Accounts, Blocks, Events, General, Table, Transactions (2/2)
source: docs/rpc-service/chains/chains-api/aptos/accounts-p2.mdx
---
# Aptos — Accounts, Blocks, Events, General, Table, Transactions (2/2)
> API reference for [Aptos](/rpc-service/chains/chains-api/aptos/). [All methods ->](/rpc-service/chains/chains-api/aptos/#methods)
>
> Part 2 of 2: [1](/rpc-service/chains/chains-api/aptos/accounts/) · 2
## Transactions
### Get transactions
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/transactions`**
Retrieves on-chain committed transactions. The page size and start ledger version can be provided to get a specific sequence of transactions.
If the version has been pruned, then a 410 will be returned.
To retrieve a pending transaction, use [Get transactions by hash](#get-transaction-by-hash).
#### Parameters
* `limit` (integer; query): max number of events to retrieve. If unspecified, defaults to default page size.
* `start` (string; uint64; query): a ledger version to start th list of transactions. If not provided, defaults to showing the latest transactions
Example: `32425224034`
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/transactions \
-H 'Content-Type: application/json'
```
#### Response example
```json
[
{
"type": "pending_transaction",
"hash": "string",
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}
]
```
---
### Submit transaction
> **POST `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/transactions`**
This endpoint accepts transaction submissions in two formats.
To submit a transaction as JSON, you must create a SubmitTransactionRequest. To build this request, do the following:
1. Encode the transaction as BCS. If you are using a language that has
2. Sign the encoded transaction and use it to create a TransactionSignature.
3. Submit the request. Make sure to use the "application/json" Content-Type.
To submit a transaction as BCS, you must submit a SignedTransaction encoded as BCS. Make sure to use the `application/x.aptos.signed_transaction+bcs` Content-Type.
#### Parameters
Request is an `application/json` body with the following parameters:
* `sender` (string; hex; required): a hex-encoded 32-byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address `0x0000000000000000000000000000000000000000000000000000000000000001` is represented as `0x1`.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `sequence_number` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `max_gas_amount` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `gas_unit_price` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `expiration_timestamp_secs` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `payload` (object; required): a payload is one of the following objects:
1. A payload which runs a single entry function:
* `type` (string; required): a payload type. Example: `entry_function_payload`.
* `function` (string; required): an entry function ID is a string representation of an entry function defined on-chain.
Format: `{address}::{module name}::{function name}`
Both `module name` and `function name` are case-sensitive.
Example: `0x1::aptos_coin::transfer`
* `type_arguments` (array[string]; required): type arguments of the function.
* `arguments` (array; required): arguments of the function.
2. A payload which runs a script that can run multiple functions:
* `type` (string; required): a payload type. Example: `script_payload`.
* `code` (object; required): a Move script bytecode:
* `bytecode` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with `0x` and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `abi` (object): a Move function:
* `name` (string; required): a name of the function.
* `visibility` (string; required): Move function visibility.
Allowed values: `private`, `public`, `friend`
* `is_entry` (boolean; required): whether the function can be called as an entry function directly in a transaction.
* `generic_type_params` (array[object]; required): generic type params associated with the Move function:
* `constraints` (array[string]; required): Move abilities tied to the generic type param and associated with the function that uses it.
* `params` (array[string]; required): parameters associated with the Move function.
* `return` (array[string]: required): a return type of the function.
* `type_arguments` (array[string]; required): type arguments of the function.
* `arguments` (array; required): arguments of the function.
3. An enum of possible transaction payloads:
* `type` (string; required): a payload type. Example: `module_bundle_payload`.
* `modules` (array[object]; required):
* `bytecode` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `abi` (object): a Move module:
* `address` (string; hex; required): a hex-encoded 32-byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address `0x0000000000000000000000000000000000000000000000000000000000000001` is represented as `0x1`.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `name` (string; required): a name of the module.
* `friends` (array[string]: required): friends of the module.
* `exposed_functions` (array[object]; required): public functions of the module:
* `name` (string; required): a name of the function.
* `visibility` (string; required): Move function visibility.
Allowed values: `private`, `public`, `friend`
* `is_entry` (boolean; required): whether the function can be called as an entry function directly in a transaction.
* `generic_type_params` (array[object]; required): generic type params associated with the Move function:
* `constraints` (array[string]; required): Move abilities tied to the generic type param and associated with the function that uses it.
* `params` (array[string]; required): parameters associated with the Move function.
* `return` (array[string]; required): a return type of the function.
* `structs` (array[object]; required): structs of the module:
* `name` (string; required): a name of the struct.
* `is_native` (boolean; required): whether the struct is a native struct of Move.
* `abilities` (array[string]; required): abilities associated with the struct.
* `generic_type_params` (array[object]; required): generic types associated with the struct:
* `constraints` (array[string]; required): Move abilities tied to the generic type param and associated with the type that uses it.
* `fields` (array[object]; required): fields associated with the struct:
* `name` (string; required): a name of the field.
* `type` (string; required): a string representation of an on-chain Move type tag that is exposed in transaction payload.
Values: - bool - u8 - u16 - u32 - u64 - u128 - u256 - address - signer - vector: `vector<{non-reference MoveTypeId}>` - struct: `{address}::{module_name}::{struct_name}::<{generic types}>`
```
Vector type value examples:
- `vector`
- `vector>`
- `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>`
Struct type value examples:
- `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>
- `0x1::account::Account`
Note:
1. Empty chars should be ignored when comparing 2 struct tag ids.
2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).
```
Match pattern: `^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$`
* `signature` (object; required): a signature is one of the following objects:
1. A single Ed25519 signature:
* `type` (string; required): a signature type. Example: `ed25519_signature`.
* `public_key` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `signature` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
2. An Ed25519 multi-sig signature (allows k-of-n signing for a transaction):
* `type` (string; required): a type of signature. Example: `multi_ed25519_signature`.
* `public_keys` (array[string]; hex; required): the public keys for the Ed25519 signature.
* `signatures` (array[string]; hex; required): signatures associated with the public keys in the same order.
* `threshold` (integer; required): the number of signatures required for a successful transaction.
* `bitmap` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
3. A multi-agent signature for multi-agent transactions (allows you to have transactions across multiple accounts):
* `type` (string; required): a type of signature. Example: `multi_agent_signature`.
* `sender` (object; required): a sender is on of the following objects:
1. A single Ed25519 signature:
* `type` (string; required): a type of sender signature. Example: `ed25519_signature`.
* `public_key` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `signature` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
2. An Ed25519 multi-sig signature (allows k-of-n signing for a transaction):
* `type` (string; required): a type of sender signature. Example: `multi_ed25519_signature`.
* `public_keys` (array[string]; hex; required): the public keys for the Ed25519 signature.
* `signatures` (array[string]; hex; required): signatures associated with the public keys in the same order.
* `threshold` (integer; required): the number of signatures required for a successful transaction.
* `bitmap` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `secondary_signer_addresses` (array[string]; hex; required): the other involved parties' addresses.
* `secondary_signers` (array of objects): an array of on of the following objects:
1. A single Ed25519 signature:
* `type` (string; required): a type of secondary signers' signature. Example: `ed25519_signature`.
* `public_key` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `signature` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
2. An Ed25519 multi-sig signature (allows k-of-n signing for a transaction):
* `type` (string; required): a type of secondary signers' signature. Example: `multi_ed25519_signature`.
* `public_keys` (array[string]; hex; required): the public keys for the Ed25519 signature.
* `signatures` (array[string]; hex; required): signatures associated with the public keys in the same order.
* `threshold` (integer; required): the number of signatures required for a successful transaction.
* `bitmap` (string; hex; required): bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
#### Request example
```shell
curl -X POST https://rpc.ankr.com/premium/YOUR_ANKR_API_KEY-http/aptos/YOUR_ANKR_API_KEY/v1/transactions \
-H 'Content-Type: application/json'
-d '{
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}'
```
#### Response example
```json
{
"hash": "string",
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}
```
---
### Get transaction by hash
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/transactions/by_hash/{txn_hash}`**
Retrieves a transaction by its hash. This is the same hash that is returned by the API when submitting a transaction (see PendingTransaction).
When given a transaction hash, the server first looks for the transaction in storage (on-chain, committed). If no on-chain transaction is found, it looks the transaction up by hash in the mempool (pending, not yet committed).
To create a transaction hash by yourself, do the following:
1. Hash message bytes: "RawTransaction" bytes + BCS bytes of Transaction.
2. Apply hash algorithm `SHA3-256` to the hash message bytes.
3. Hex-encode the hash bytes with `0x` prefix.
#### Parameters
* `txn_hash` (string; path; required): a hash of the transaction to retrieve.
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/transactions/by_hash/{txn_hash} \
-H 'Content-Type: application/json'
```
#### Response example
```json
{
"type": "pending_transaction",
"hash": "string",
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}
```
---
### Get transaction by version
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/transactions/by_version/{txn_version}`**
Retrieves a transaction by a given version. If the version has been pruned, a 410 will be returned.
#### Parameters
* `txn_version` (string; uint64; path; required): a version of the transaction to retrieve.
Example: `32425224034`
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/transactions/by_version/{txn_version} \
-H 'Content-Type: application/json'
```
#### Response example
```json
{
"type": "pending_transaction",
"hash": "string",
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}
```
---
### Get account transactions
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/transactions`**
Retrieves on-chain committed transactions from an account. If the start version is too far in the past, a 410 will be returned.
If no start version is given, it will start at version 0.
To retrieve a pending transaction, use [Get transaction by hash](#get-transaction-by-hash).
#### Parameters
* `address` (string; hex; path; required): an address of account with or without a `0x` prefix.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `limit` (integer; query): a max number of transactions to retrieve. If not provided, retrieves a default page size.
* `start` (string; uint64; query): a ledger version to start the list of transactions. If not provided, defaults to showing the latest transactions.
Example: `32425224034`
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/transactions \
-H 'Content-Type: application/json'
```
#### Response example
```json
[
{
"type": "pending_transaction",
"hash": "string",
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}
]
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/aptos/accounts/
title: Aptos — Accounts, Blocks, Events, General, Table, Transactions (1/2)
source: docs/rpc-service/chains/chains-api/aptos/accounts.mdx
---
# Aptos — Accounts, Blocks, Events, General, Table, Transactions (1/2)
> API reference for [Aptos](/rpc-service/chains/chains-api/aptos/). [All methods ->](/rpc-service/chains/chains-api/aptos/#methods)
>
> Part 1 of 2: 1 · [2](/rpc-service/chains/chains-api/aptos/accounts-p2/)
## Accounts
### Get account
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}`**
Returns the authentication key and the sequence number for an account address. Optionally, a ledger version can be specified. If the ledger version is not specified in the request, the latest ledger version is used.
#### Parameters
* `address` (string; hex; path; required): an address of account with or without a `0x` prefix.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `ledger_version` (string; uint64; query): a ledger version to get state of account. If not provided, it will be the latest version. Example: `32425224034`
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address} \
-H 'Content-Type: application/json'
```
#### Response example
```json
{
"sequence_number": "32425224034",
"authentication_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
```
---
### Get account resources
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/resources`**
Retrieves all account resources for a given account and a specific ledger version. If the ledger version is not specified in the request, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.
#### Parameters
* `address` (string; hex; path; required): an address of account with or without a `0x` prefix.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `ledger_version` (string; uint64; query): a ledger version to get state of account. If not provided, it will be the latest version. Example: `32425224034`
* `limit` (integer; query): max number of account resources to retrieve. If not provided, retrieves a default page size.
* `start` (string; query): cursor specifying where to start for pagination. This cursor cannot be derived manually client-side. Instead, you must call this endpoint once without this query parameter specified, and then use the cursor returned in the X-Aptos-Cursor header in the response.
Example: `0000000000000000000000000000000000000000000000000000000000000000012f0000000000000000000000000000000000000000000000000000000000000000010d7374616b696e675f70726f7879
`
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/resources \
-H 'Content-Type: application/json'
```
#### Response example
```json
[
{
"type": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>",
"data": {
"authentication_key": "0x0000000000000000000000000000000000000000000000000000000000000001",
"coin_register_events": {
"counter": "0",
"guid": {
"id": {
"addr": "0x1",
"creation_num": "0"
}
}
},
"self_address": "0x1",
"sequence_number": "0"
}
}
]
```
---
### Get account modules
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/modules`**
Retrieves all account modules' bytecode for a given account at a specific ledger version. If the ledger version is not specified in the request, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.
#### Parameters
* `address` (string; hex; path; required): an address of account with or without a `0x` prefix.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `ledger_version` (string; uint64; query): a ledger version to get state of account. If not provided, it will be the latest version. Example: `32425224034`
* `limit` (integer; query): max number of account resources to retrieve. If not provided, retrieves a default page size.
* `start` (string; query): cursor specifying where to start for pagination. This cursor cannot be derived manually client-side. Instead, you must call this endpoint once without this query parameter specified, and then use the cursor returned in the X-Aptos-Cursor header in the response.
Example: `0000000000000000000000000000000000000000000000000000000000000000012f0000000000000000000000000000000000000000000000000000000000000000010d7374616b696e675f70726f7879
`
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/modules \
-H 'Content-Type: application/json'
```
#### Response example
```json
[
{
"bytecode": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"abi": {
"address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"name": "string",
"friends": [
"0x1::aptos_coin"
],
"exposed_functions": [
{
"name": "string",
"visibility": "private",
"is_entry": true,
"generic_type_params": [
{
"constraints": [
"string"
]
}
],
"params": [
"string"
],
"return": [
"string"
]
}
],
"structs": [
{
"name": "string",
"is_native": true,
"abilities": [
"string"
],
"generic_type_params": [
{
"constraints": [
"string"
]
}
],
"fields": [
{
"name": "string",
"type": "string"
}
]
}
]
}
}
]
```
---
### Get account resource
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/resource/{resource_type}`**
Retrieves an individual resource from a given account and at a specific ledger version. If the ledger version is not specified in the request, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.
#### Parameters
* `address` (string; hex; path; required): an address of account with or without a `0x` prefix.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `resource_type` (string; path; required) a name of struct to retrieve.
Example: `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>`
Match pattern: `^0x[0-9a-zA-Z:_<>]+$`
* `ledger_version` (string; uint64; query): a ledger version to get state of account. If not provided, it will be the latest version. Example: `32425224034`
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/resource/{resource_type} \
-H 'Content-Type: application/json'
```
#### Response example
```json
{
"type": "0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>",
"data": {
"authentication_key": "0x0000000000000000000000000000000000000000000000000000000000000001",
"coin_register_events": {
"counter": "0",
"guid": {
"id": {
"addr": "0x1",
"creation_num": "0"
}
}
},
"self_address": "0x1",
"sequence_number": "0"
}
}
```
---
### Get account module
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/module/{module_name}`**
Retrieves an individual module from a given account and at a specific ledger version. If the ledger version is not specified in the request, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.
#### Parameters
* `address` (string; hex; path; required): an address of account with or without a `0x` prefix.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `module_name` (string; path; required): a name of module to retrieve (example: `coin`).
* `ledger_version` (string; uint64; query): a ledger version to get state of account. If not provided, it will be the latest version. Example: `32425224034`
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/module/{module_name} \
-H 'Content-Type: application/json'
```
#### Response example
```json
{
"bytecode": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"abi": {
"address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"name": "string",
"friends": [
"0x1::aptos_coin"
],
"exposed_functions": [
{
"name": "string",
"visibility": "private",
"is_entry": true,
"generic_type_params": [
{
"constraints": [
"string"
]
}
],
"params": [
"string"
],
"return": [
"string"
]
}
],
"structs": [
{
"name": "string",
"is_native": true,
"abilities": [
"string"
],
"generic_type_params": [
{
"constraints": [
"string"
]
}
],
"fields": [
{
"name": "string",
"type": "string"
}
]
}
]
}
}
```
---
## Blocks
### Get blocks by height
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/blocks/by_height/{block_height}`**
This endpoint allows you to get the transactions in a block and the corresponding block information.
Transactions are limited by max default transactions size. If not all transactions are present, the user will need to query for the rest of the transactions via the get transactions API.
If the block is pruned, it will return a 410
#### Parameters
* `block_height` (integer; path; required): a block height to look up. Starts at 0.
* `with_transactions` (boolean; query): if set to true, includes all transactions in the block. If not provided, no transactions will be retrieved.
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/blocks/by_height/{block_height} \
-H 'Content-Type: application/json'
```
#### Response example
```json
{
"block_height": "32425224034",
"block_hash": "string",
"block_timestamp": "32425224034",
"first_version": "32425224034",
"last_version": "32425224034",
"transactions": [
{
"type": "pending_transaction",
"hash": "string",
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}
]
}
```
---
### Get blocks by version
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/blocks/by_version/{version}`**
This endpoint allows you to get the transactions in a block and the corresponding block information given a version in the block.
Transactions are limited by max default transactions size. If not all transactions are present, the user will need to query for the rest of the transactions via the get transactions API.
If the block has been pruned, it will return a 410
#### Parameters
* `version` (integer; path; required): a ledger version to look up block information for.
* `with_transactions` (boolean; query): if set to true, includes all transactions in the block. If not provided, no transactions will be retrieved.
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/blocks/by_version/{version} \
-H 'Content-Type: application/json'
```
#### Response example
```json
{
"block_height": "32425224034",
"block_hash": "string",
"block_timestamp": "32425224034",
"first_version": "32425224034",
"last_version": "32425224034",
"transactions": [
{
"type": "pending_transaction",
"hash": "string",
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}
]
}
```
---
## Events
### Get events by creation number
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/events/{creation_number}`**
Event types are globally identifiable by an account `address` and monotonically increasing `creation_number`, one per event type emitted to the given account. This API returns events corresponding to that that event type.
#### Parameters
* `address` (string; hex; path; required): a hex-encoded 32 byte Aptos account, with or without a `0x` prefix, for which events are queried. This refers to the account that events were emitted to, not the account hosting the move module that emits that event type.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `creation_number` (string; uint64; path; required): a creation number corresponding to the event stream originating from the given account.
* `limit` (integer; query): max number of events to retrieve. If unspecified, defaults to default page size.
* `start` (string; uint64; query): the starting sequence number of events. If unspecified, by default will retrieve the most recent events.
Example: `32425224034`
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/events/{creation_number} \
-H 'Content-Type: application/json'
```
#### Response example
```json
[
{
"version": "32425224034",
"guid": {
"creation_number": "32425224034",
"account_address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
},
"sequence_number": "32425224034",
"type": "string",
"data": null
}
]
```
---
### Get events by event handle
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/events/{event_handle}/{field_name}`**
This API uses the given account `address`, `eventHandle`, and `fieldName` to build a key that can globally identify an event types. It then uses this key to return events emitted to the given account matching that event type.
#### Parameters
* `address` (string; hex; path; required): a hex-encoded 32 byte Aptos account, with or without a `0x` prefix, for which events are queried. This refers to the account that events were emitted to, not the account hosting the move module that emits that event type.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `event_handle` (string; path; required): a name of struct to look up event handle.
Example: `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>`
Match pattern: `^0x[0-9a-zA-Z:_<>]+$`
* `field_name` (string; path; required): a name of field to look up event handle (example: `withdraw_events`).
* `limit` (integer; query): max number of events to retrieve. If unspecified, defaults to default page size.
* `start` (string; uint64; query): the starting sequence number of events. If unspecified, by default will retrieve the most recent events.
Example: `32425224034`
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/accounts/{address}/events/{event_handle}/{field_name} \
-H 'Content-Type: application/json'
```
#### Response example
```json
[
{
"version": "32425224034",
"guid": {
"creation_number": "32425224034",
"account_address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
},
"sequence_number": "32425224034",
"type": "string",
"data": null
}
]
```
---
## General
### Get ledger info
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/`**
Retrieves the latest ledger information, including data such as chain ID, role type, ledger versions, epoch, etc.
#### Parameters
None.
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/ \
-H 'Content-Type: application/json'
```
#### Response example
```json
{
"chain_id": 0,
"epoch": "32425224034",
"ledger_version": "32425224034",
"oldest_ledger_version": "32425224034",
"ledger_timestamp": "32425224034",
"node_role": "validator",
"oldest_block_height": "32425224034",
"block_height": "32425224034",
"git_hash": "string"
}
```
---
## Table
### Get table item
> **POST `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/tables/{table_handle}/item`**
Get a table item at a specific ledger version from the table identified by `{table_handle}` in the path and the "key" (TableItemRequest) provided in the request body.
The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.
#### Parameters
* `table_handle` (string; hex; path; required): a table handle hex encoded 32-byte string.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `ledger_version` (string; uint64; query): a ledger version to get state of account. If not provided, it will be the latest version.
Example: `32425224034`
* `key_type` (string; body; required): a string representation of an on-chain Move type tag that is exposed in transaction payload. Values: - bool - u8 - u16 - u32 - u64 - u128 - u256 - address - signer - vector: `vector<{non-reference MoveTypeId}>` - struct: `{address}::{module_name}::{struct_name}::<{generic types}>`
```
Vector type value examples:
- `vector`
- `vector>`
- `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>`
Struct type value examples:
- `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>
- `0x1::account::Account`
Note:
1. Empty chars should be ignored when comparing 2 struct tag ids.
2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).
```
Match patterns: `^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$`
* `value_type` (string; body; required): a string representation of an on-chain Move type tag that is exposed in transaction payload. Values: - bool - u8 - u16 - u32 - u64 - u128 - u256 - address - signer - vector: `vector<{non-reference MoveTypeId}>` - struct: `{address}::{module_name}::{struct_name}::<{generic types}>`
```
Vector type value examples:
- `vector`
- `vector>`
- `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>`
Struct type value examples:
- `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>
- `0x1::account::Account`
Note:
1. Empty chars should be ignored when comparing 2 struct tag ids.
2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).
```
Match pattern: `^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$`
* `key` (body; required): the value of the table item's key.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/premium/YOUR_ANKR_API_KEY-http/aptos/YOUR_ANKR_API_KEY/v1/tables/{table_handle}/item \
-H 'Content-Type: application/json' \
-d '{
"key_type": "string",
"value_type": "string",
"key": null
}'
```
#### Response example
```json
0
```
---
### Get raw table item
> **POST `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/tables/{table_handle}/raw_item`**
Get a table item at a specific ledger version from the table identified by `{table_handle}` in the path and the "key" (RawTableItemRequest) provided in the request body.
The `get_raw_table_item` requires only a serialized key comparing to the full move type information comparing to the `get_table_item` api, and can only return the query in the bcs format.
The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.
#### Parameters
* `table_handle` (string; hex; path; required): a table handle hex encoded 32-byte string.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `ledger_version` (string; uint64; query): a ledger version to get state of account. If not provided, it will be the latest version.
Example: `32425224034`
* `key` (string; hex; body; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
#### Request example
```shell
curl -X POST https://rpc.ankr.com/premium/YOUR_ANKR_API_KEY-http/aptos/YOUR_ANKR_API_KEY/v1/tables/{table_handle}/item \
-H 'Content-Type: application/json' \
-d '{
"key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}'
```
#### Response example
```json
0
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/aptos/
title: Aptos
description: The Aptos blockchain, designed with scalability, safety, reliability, and upgradability as key principles, to… Available on Ankr RPC with a free demo key.
source: docs/rpc-service/chains/chains-api/aptos/index.mdx
---
# Aptos
> Aptos API is available on [Web3 API platform](https://www.ankr.com/rpc/aptos).
The *Aptos* blockchain, designed with scalability, safety, reliability, and upgradability as key principles, to address blockchain challenges, such as frequent outages, high costs, low throughput limits, and security concerns. The Aptos blockchain has been developed over the past three years by over 350+ developers across the globe. It offers new and novel innovations in consensus, smart contract design, system security, performance, and decentralization. The combination of these technologies will provide a fundamental building block to bring web3 to the masses.
In order for your Web3 application to interact with the Aptos blockchain — either by reading blockchain data or sending transactions to the network — it must connect to an Aptos node. Developers interact with the blockchain using the methods provided by the API.
Aptos API uses the REST interface for querying, responses come in [JSON format](https://www.json.org/json-en.html).
## Methods supported
**Accounts**:
* [Get account](/rpc-service/chains/chains-api/aptos/accounts/#get-account) — retrieves the authentication key and the sequence number for an account address.
* [Get account resources](/rpc-service/chains/chains-api/aptos/accounts/#get-account-resources) — retrieves all account resources for a given account and a specific ledger version.
* [Get account modules](/rpc-service/chains/chains-api/aptos/accounts/#get-account-modules) — retrieves all account modules' bytecode for a given account at a specific ledger version.
* [Get account resource](/rpc-service/chains/chains-api/aptos/accounts/#get-account-resource) — retrieves an individual resource from a given account and at a specific ledger version.
* [Get account module](/rpc-service/chains/chains-api/aptos/accounts/#get-account-module) — retrieves an individual module from a given account and at a specific ledger version.
**Blocks**:
* [Get blocks by height](/rpc-service/chains/chains-api/aptos/accounts/#get-blocks-by-height) — retrieves the transactions in a block and the corresponding block information.
* [Get blocks by version](/rpc-service/chains/chains-api/aptos/accounts/#get-blocks-by-version) — retrieves the transactions in a block and the corresponding block information by version in the block.
**Events**:
* [Get events by creation number](/rpc-service/chains/chains-api/aptos/accounts/#get-events-by-creation-number) — retrieves events by creation number.
* [Get events by event handle](/rpc-service/chains/chains-api/aptos/accounts/#get-events-by-event-handle) — retrieves events by event handle.
**General**:
* [Get ledger info](/rpc-service/chains/chains-api/aptos/accounts/#get-ledger-info) — retrieves the latest ledger information.
**Table**:
* [Get table item](/rpc-service/chains/chains-api/aptos/accounts/#get-table-item) — retrieves a table item.
* [Get raw table item](/rpc-service/chains/chains-api/aptos/accounts/#get-raw-table-item) — retrieves a raw table item.
**Transactions**:
* [Get transactions](/rpc-service/chains/chains-api/aptos/accounts-p2/#get-transactions) — retrieves on-chain committed transactions.
* [Submit transaction](/rpc-service/chains/chains-api/aptos/accounts-p2/#submit-transaction) — submits a transaction in JSON or BCS.
* [Get transaction by hash](/rpc-service/chains/chains-api/aptos/accounts-p2/#get-transaction-by-hash) — retrieves a transaction by its hash.
* [Get transaction by version](/rpc-service/chains/chains-api/aptos/accounts-p2/#get-transaction-by-version) — retrieves a transaction by a given version.
* [Get account transactions](/rpc-service/chains/chains-api/aptos/accounts-p2/#get-account-transactions) — retrieves on-chain committed transactions from an account.
* [Submit batch transactions](/rpc-service/chains/chains-api/aptos/transactions/#submit-batch-transactions) — submits multiple transactions.
* [Simulate transaction](/rpc-service/chains/chains-api/aptos/transactions-p2/#simulate-transaction) — simulates transaction submission.
* [Encode submission](/rpc-service/chains/chains-api/aptos/transactions-p2/#encode-submission) — accepts an EncodeSubmissionRequest, which internally is a UserTransactionRequestInner (and optionally secondary signers) encoded as JSON, validates the request format, and then returns that request encoded in BCS.
* [Estimate gas price](/rpc-service/chains/chains-api/aptos/transactions-p3/#estimate-gas-price) — estimates gas price.
**View**:
* [Execute view function of a module](/rpc-service/chains/chains-api/aptos/transactions-p3/#execute-view-function-of-a-module) — executes the Move function with the given parameters and return its execution result.
---
## Methods
### Accounts, Blocks, Events, General, Table, Transactions
- [`Get account`](/rpc-service/chains/chains-api/aptos/accounts/#get-account)
- [`Get account resources`](/rpc-service/chains/chains-api/aptos/accounts/#get-account-resources)
- [`Get account modules`](/rpc-service/chains/chains-api/aptos/accounts/#get-account-modules)
- [`Get account resource`](/rpc-service/chains/chains-api/aptos/accounts/#get-account-resource)
- [`Get account module`](/rpc-service/chains/chains-api/aptos/accounts/#get-account-module)
- [`Get blocks by height`](/rpc-service/chains/chains-api/aptos/accounts/#get-blocks-by-height)
- [`Get blocks by version`](/rpc-service/chains/chains-api/aptos/accounts/#get-blocks-by-version)
- [`Get events by creation number`](/rpc-service/chains/chains-api/aptos/accounts/#get-events-by-creation-number)
- [`Get events by event handle`](/rpc-service/chains/chains-api/aptos/accounts/#get-events-by-event-handle)
- [`Get ledger info`](/rpc-service/chains/chains-api/aptos/accounts/#get-ledger-info)
- [`Get table item`](/rpc-service/chains/chains-api/aptos/accounts/#get-table-item)
- [`Get raw table item`](/rpc-service/chains/chains-api/aptos/accounts/#get-raw-table-item)
- [`Get transactions`](/rpc-service/chains/chains-api/aptos/accounts-p2/#get-transactions)
- [`Submit transaction`](/rpc-service/chains/chains-api/aptos/accounts-p2/#submit-transaction)
- [`Get transaction by hash`](/rpc-service/chains/chains-api/aptos/accounts-p2/#get-transaction-by-hash)
- [`Get transaction by version`](/rpc-service/chains/chains-api/aptos/accounts-p2/#get-transaction-by-version)
- [`Get account transactions`](/rpc-service/chains/chains-api/aptos/accounts-p2/#get-account-transactions)
### Transactions, View
- [`Submit batch transactions`](/rpc-service/chains/chains-api/aptos/transactions/#submit-batch-transactions)
- [`Simulate transaction`](/rpc-service/chains/chains-api/aptos/transactions-p2/#simulate-transaction)
- [`Encode submission`](/rpc-service/chains/chains-api/aptos/transactions-p2/#encode-submission)
- [`Estimate gas price`](/rpc-service/chains/chains-api/aptos/transactions-p3/#estimate-gas-price)
- [`Execute view function of a module`](/rpc-service/chains/chains-api/aptos/transactions-p3/#execute-view-function-of-a-module)
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/aptos/transactions-p2/
title: Aptos — Transactions, View (2/3)
source: docs/rpc-service/chains/chains-api/aptos/transactions-p2.mdx
---
# Aptos — Transactions, View (2/3)
> API reference for [Aptos](/rpc-service/chains/chains-api/aptos/). [All methods ->](/rpc-service/chains/chains-api/aptos/#methods)
>
> Part 2 of 3: [1](/rpc-service/chains/chains-api/aptos/transactions/) · 2 · [3](/rpc-service/chains/chains-api/aptos/transactions-p3/)
### Simulate transaction
> **POST `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/transactions/simulate`**
Simulates a transaction. The output of the transaction will have the exact transaction outputs and events that running an actual signed transaction would have. However, it will not have the associated state hashes, as they are not updated in storage. This can be used to estimate the maximum gas units for a submitted transaction.
To use this, you must:
* Create a SignedTransaction with a zero-padded signature.
* Submit a SubmitTransactionRequest containing a UserTransactionRequest containing that signature.
To use this endpoint with BCS, you must submit a SignedTransaction encoded as BCS.
#### Parameters
* `estimate_gas_unit_price` (boolean, query): if set to true, the gas unit price in the transaction will be ignored and the estimated value will be used.
* `estimate_max_gas_amount` (boolean; query): if set to true, the max gas value in the transaction will be ignored and the maximum possible gas will be used.
* `estimate_prioritized_gas_unit_price` (boolean; query): if set to true, the transaction will use a higher price than the original estimate.
**Body**
A request body is represented by an array of the following parameters:
* `sender` (string; hex; required): a hex-encoded 32-byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address `0x0000000000000000000000000000000000000000000000000000000000000001` is represented as `0x1`.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `sequence_number` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `max_gas_amount` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `gas_unit_price` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `expiration_timestamp_secs` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `payload` (object; required): a payload is one of the following objects:
1. A payload which runs a single entry function:
* `type` (string; required): a payload type. Example: `entry_function_payload`.
* `function` (string; required): an entry function ID is a string representation of an entry function defined on-chain.
Format: `{address}::{module name}::{function name}`
Both `module name` and `function name` are case-sensitive.
Example: `0x1::aptos_coin::transfer`
* `type_arguments` (array[string]; required): type arguments of the function.
* `arguments` (array; required): arguments of the function.
2. A payload which runs a script that can run multiple functions:
* `type` (string; required): a payload type. Example: `script_payload`.
* `code` (object; required): a Move script bytecode:
* `bytecode` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with `0x` and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `abi` (object): a Move function:
* `name` (string; required): a name of the function.
* `visibility` (string; required): Move function visibility.
Allowed values: `private`, `public`, `friend`
* `is_entry` (boolean; required): whether the function can be called as an entry function directly in a transaction.
* `generic_type_params` (array[object]; required): generic type params associated with the Move function:
* `constraints` (array[string]; required): Move abilities tied to the generic type param and associated with the function that uses it.
* `params` (array[string]; required): parameters associated with the Move function.
* `return` (array[string]: required): a return type of the function.
* `type_arguments` (array[string]; required): type arguments of the function.
* `arguments` (array; required): arguments of the function.
3. An enum of possible transaction payloads:
* `type` (string; required): a payload type. Example: `module_bundle_payload`.
* `modules` (array[object]; required):
* `bytecode` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `abi` (object): a Move module:
* `address` (string; hex; required): a hex-encoded 32-byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address `0x0000000000000000000000000000000000000000000000000000000000000001` is represented as `0x1`.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `name` (string; required): a name of the module.
* `friends` (array[string]: required): friends of the module.
* `exposed_functions` (array[object]; required): public functions of the module:
* `name` (string; required): a name of the function.
* `visibility` (string; required): Move function visibility.
Allowed values: `private`, `public`, `friend`
* `is_entry` (boolean; required): whether the function can be called as an entry function directly in a transaction.
* `generic_type_params` (array[object]; required): generic type params associated with the Move function:
* `constraints` (array[string]; required): Move abilities tied to the generic type param and associated with the function that uses it.
* `params` (array[string]; required): parameters associated with the Move function.
* `return` (array[string]; required): a return type of the function.
* `structs` (array[object]; required): structs of the module:
* `name` (string; required): a name of the struct.
* `is_native` (boolean; required): whether the struct is a native struct of Move.
* `abilities` (array[string]; required): abilities associated with the struct.
* `generic_type_params` (array[object]; required): generic types associated with the struct:
* `constraints` (array[string]; required): Move abilities tied to the generic type param and associated with the type that uses it.
* `fields` (array[object]; required): fields associated with the struct:
* `name` (string; required): a name of the field.
* `type` (string; required): a string representation of an on-chain Move type tag that is exposed in transaction payload.
Values: - bool - u8 - u16 - u32 - u64 - u128 - u256 - address - signer - vector: `vector<{non-reference MoveTypeId}>` - struct: `{address}::{module_name}::{struct_name}::<{generic types}>`
```
Vector type value examples:
- `vector`
- `vector>`
- `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>`
Struct type value examples:
- `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>
- `0x1::account::Account`
Note:
1. Empty chars should be ignored when comparing 2 struct tag ids.
2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).
```
Match pattern: `^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$`
* `signature` (object; required): a signature is one of the following objects:
1. A single Ed25519 signature:
* `type` (string; required): a signature type. Example: `ed25519_signature`.
* `public_key` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `signature` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
2. An Ed25519 multi-sig signature (allows k-of-n signing for a transaction):
* `type` (string; required): a type of signature. Example: `multi_ed25519_signature`.
* `public_keys` (array[string]; hex; required): the public keys for the Ed25519 signature.
* `signatures` (array[string]; hex; required): signatures associated with the public keys in the same order.
* `threshold` (integer; required): the number of signatures required for a successful transaction.
* `bitmap` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
3. A multi-agent signature for multi-agent transactions (allows you to have transactions across multiple accounts):
* `type` (string; required): a type of signature. Example: `multi_agent_signature`.
* `sender` (object; required): a sender is on of the following objects:
1. A single Ed25519 signature:
* `type` (string; required): a type of sender signature. Example: `ed25519_signature`.
* `public_key` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `signature` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
2. An Ed25519 multi-sig signature (allows k-of-n signing for a transaction):
* `type` (string; required): a type of sender signature. Example: `multi_ed25519_signature`.
* `public_keys` (array[string]; hex; required): the public keys for the Ed25519 signature.
* `signatures` (array[string]; hex; required): signatures associated with the public keys in the same order.
* `threshold` (integer; required): the number of signatures required for a successful transaction.
* `bitmap` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `secondary_signer_addresses` (array[string]; hex; required): the other involved parties' addresses.
* `secondary_signers` (array of objects): an array of on of the following objects:
1. A single Ed25519 signature:
* `type` (string; required): a type of secondary signers' signature. Example: `ed25519_signature`.
* `public_key` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `signature` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
2. An Ed25519 multi-sig signature (allows k-of-n signing for a transaction):
* `type` (string; required): a type of secondary signers' signature. Example: `multi_ed25519_signature`.
* `public_keys` (array[string]; hex; required): the public keys for the Ed25519 signature.
* `signatures` (array[string]; hex; required): signatures associated with the public keys in the same order.
* `threshold` (integer; required): the number of signatures required for a successful transaction.
* `bitmap` (string; hex; required): bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
#### Request example
```shell
curl -X POST https://rpc.ankr.com/premium/YOUR_ANKR_API_KEY-http/aptos/YOUR_ANKR_API_KEY/v1/transactions/simulate \
-H 'Content-Type: application/json' \
-d '{
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}'
```
#### Response example
```json
[
{
"version": "32425224034",
"hash": "string",
"state_change_hash": "string",
"event_root_hash": "string",
"state_checkpoint_hash": "string",
"gas_used": "32425224034",
"success": true,
"vm_status": "string",
"accumulator_root_hash": "string",
"changes": [
{
"type": "delete_module",
"address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"state_key_hash": "string",
"module": "0x1::aptos_coin"
}
],
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
},
"events": [
{
"guid": {
"creation_number": "32425224034",
"account_address": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
},
"sequence_number": "32425224034",
"type": "string",
"data": null
}
],
"timestamp": "32425224034"
}
]
```
---
### Encode submission
> **POST `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/transactions/encode_submission`**
This endpoint accepts an EncodeSubmissionRequest, which internally is a UserTransactionRequestInner (and optionally secondary signers) encoded as JSON, validates the request format, and then returns that request encoded in BCS. The client can then use this to create a transaction signature to be used in a SubmitTransactionRequest, which it then passes to the [Submit transaction](/rpc-service/chains/chains-api/aptos/accounts-p2/#submit-transaction) POST endpoint.
To be clear, this endpoint makes it possible to submit transaction requests to the API from languages that do not have library support for BCS. If you are using an SDK that has BCS support, such as the official Rust, TypeScript, or Python SDKs, you do not need to use this endpoint.
To sign a message using the response from this endpoint:
* Decode the hex encoded string in the response to bytes.
* Sign the bytes to create the signature.
* Use that as the signature field in something like Ed25519Signature, which you then use to build a TransactionSignature.
#### Parameters
Submission encoding request body contains the following parameters:
* `sender` (string; hex; required): a hex-encoded 32-byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address `0x0000000000000000000000000000000000000000000000000000000000000001` is represented as `0x1`.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `sequence_number` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `max_gas_amount` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `gas_unit_price` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `expiration_timestamp_secs` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `payload` (object; required): a payload is one of the following objects:
1. A payload which runs a single entry function:
* `type` (string; required): a payload type. Example: `entry_function_payload`.
* `function` (string; required): an entry function ID is a string representation of an entry function defined on-chain.
Format: `{address}::{module name}::{function name}`
Both `module name` and `function name` are case-sensitive.
Example: `0x1::aptos_coin::transfer`
* `type_arguments` (array[string]; required): type arguments of the function.
* `arguments` (array; required): arguments of the function.
2. A payload which runs a script that can run multiple functions:
* `type` (string; required): a payload type. Example: `script_payload`.
* `code` (object; required): a Move script bytecode:
* `bytecode` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with `0x` and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `abi` (object): a Move function:
* `name` (string; required): a name of the function.
* `visibility` (string; required): Move function visibility.
Allowed values: `private`, `public`, `friend`
* `is_entry` (boolean; required): whether the function can be called as an entry function directly in a transaction.
* `generic_type_params` (array[object]; required): generic type params associated with the Move function:
* `constraints` (array[string]; required): Move abilities tied to the generic type param and associated with the function that uses it.
* `params` (array[string]; required): parameters associated with the Move function.
* `return` (array[string]: required): a return type of the function.
* `type_arguments` (array[string]; required): type arguments of the function.
* `arguments` (array; required): arguments of the function.
3. An enum of possible transaction payloads:
* `type` (string; required): a payload type. Example: `module_bundle_payload`.
* `modules` (array[object]; required):
* `bytecode` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `abi` (object): a Move module:
* `address` (string; hex; required): a hex-encoded 32-byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address `0x0000000000000000000000000000000000000000000000000000000000000001` is represented as `0x1`.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `name` (string; required): a name of the module.
* `friends` (array[string]: required): friends of the module.
* `exposed_functions` (array[object]; required): public functions of the module:
* `name` (string; required): a name of the function.
* `visibility` (string; required): Move function visibility.
Allowed values: `private`, `public`, `friend`
* `is_entry` (boolean; required): whether the function can be called as an entry function directly in a transaction.
* `generic_type_params` (array[object]; required): generic type params associated with the Move function:
* `constraints` (array[string]; required): Move abilities tied to the generic type param and associated with the function that uses it.
* `params` (array[string]; required): parameters associated with the Move function.
* `return` (array[string]; required): a return type of the function.
* `structs` (array[object]; required): structs of the module:
* `name` (string; required): a name of the struct.
* `is_native` (boolean; required): whether the struct is a native struct of Move.
* `abilities` (array[string]; required): abilities associated with the struct.
* `generic_type_params` (array[object]; required): generic types associated with the struct:
* `constraints` (array[string]; required): Move abilities tied to the generic type param and associated with the type that uses it.
* `fields` (array[object]; required): fields associated with the struct:
* `name` (string; required): a name of the field.
* `type` (string; required): a string representation of an on-chain Move type tag that is exposed in transaction payload.
Values: - bool - u8 - u16 - u32 - u64 - u128 - u256 - address - signer - vector: `vector<{non-reference MoveTypeId}>` - struct: `{address}::{module_name}::{struct_name}::<{generic types}>`
```
Vector type value examples:
- `vector`
- `vector>`
- `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>`
Struct type value examples:
- `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>
- `0x1::account::Account`
Note:
1. Empty chars should be ignored when comparing 2 struct tag ids.
2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).
```
Match pattern: `^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$`
* `secondary_signers` (array[string]; hex): secondary signer accounts of the request for Multi-agent.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/premium/YOUR_ANKR_API_KEY-http/aptos/YOUR_ANKR_API_KEY/v1/transactions/encode_submission \
-H 'Content-Type: application/json' \
-d '{
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
},
"secondary_signers": [
"0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
]
}'
```
---
#### Response example
```json
0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/aptos/transactions-p3/
title: Aptos — Transactions, View (3/3)
source: docs/rpc-service/chains/chains-api/aptos/transactions-p3.mdx
---
# Aptos — Transactions, View (3/3)
> API reference for [Aptos](/rpc-service/chains/chains-api/aptos/). [All methods ->](/rpc-service/chains/chains-api/aptos/#methods)
>
> Part 3 of 3: [1](/rpc-service/chains/chains-api/aptos/transactions/) · [2](/rpc-service/chains/chains-api/aptos/transactions-p2/) · 3
### Estimate gas price
> **GET `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/estimate_gas_price`**
Currently, the gas estimation is handled by taking the median of the last 100,000 transactions If a user wants to prioritize their transaction and is willing to pay, they can pay more than the gas price. If they're willing to wait longer, they can pay less. Note that the gas price moves with the fee market, and should only increase when demand outweighs supply.
If there have been no transactions in the last 100,000 transactions, the price will be 1.
#### Parameters
None.
#### Request example
```shell
curl -X GET https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/estimate_gas_price \
-H 'Content-Type: application/json'
```
#### Response example
```json
{
"deprioritized_gas_estimate": 0,
"gas_estimate": 0,
"prioritized_gas_estimate": 0
}
```
---
## View
### Execute view function of a module
> **POST `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/view`**
Executes the Move function with the given parameters and return its execution result.
The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.
#### Parameters
* `ledger_version` (string; uint64; query): a ledger version to get state of account. If not provided, it will be the latest version.
Example: `32425224034`
**Body**
The Move view function request body contains the following parameters:
* `function` (string; required): an entry function ID is a string representation of an entry function defined on-chain.
Format: `{address}::{module name}::{function name}`
Both the module name and function name are case-sensitive.
Example: `0x1::aptos_coin::transfer`
* `type_arguments` (array[string]; required): type arguments of the function.
* `arguments` (array; required): arguments of the function.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/premium/YOUR_ANKR_API_KEY-http/aptos/YOUR_ANKR_API_KEY/v1/view \
-H 'Content-Type: application/json' \
-d '{
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
}'
```
#### Response example
```json
[
0
]
```
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/aptos/transactions/
title: Aptos — Transactions, View (1/3)
source: docs/rpc-service/chains/chains-api/aptos/transactions.mdx
---
# Aptos — Transactions, View (1/3)
> API reference for [Aptos](/rpc-service/chains/chains-api/aptos/). [All methods ->](/rpc-service/chains/chains-api/aptos/#methods)
>
> Part 1 of 3: 1 · [2](/rpc-service/chains/chains-api/aptos/transactions-p2/) · [3](/rpc-service/chains/chains-api/aptos/transactions-p3/)
### Submit batch transactions
> **POST `https://rpc.ankr.com/premium-http/aptos/YOUR_ANKR_API_KEY/v1/transactions/batch`**
Submits multiple transactions. The response has three outcomes:
1. All transactions succeed, and it will return a 202.
2. Some transactions succeed, and it will return the failed transactions and a 206.
3. No transactions succeed, and it will also return the failed transactions and a 206.
To submit a transaction as JSON, you must submit a SubmitTransactionRequest. To build this request, do the following:
1. Encode the transaction as BCS. If you are using a language that has native BCS support, make sure to use that library. If not, you may take advantage of [Encode submission](/rpc-service/chains/chains-api/aptos/transactions-p2/#encode-submission). When using this endpoint, make sure you trust the node you're talking to, as it is possible they could manipulate your request.
2. Sign the encoded transaction and use it to create a TransactionSignature.
3. Submit the request. Make sure to use the "application/json" Content-Type.
To submit a transaction as BCS, you must submit a SignedTransaction encoded as BCS. Make sure to use the application/x.aptos.signed_transaction+bcs Content-Type.
#### Parameters
A request body is represented by an array of the following parameters:
* `sender` (string; hex; required): a hex-encoded 32-byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address `0x0000000000000000000000000000000000000000000000000000000000000001` is represented as `0x1`.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `sequence_number` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `max_gas_amount` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `gas_unit_price` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `expiration_timestamp_secs` (string; uint64; required): a string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
Example: `32425224034`
* `payload` (object; required): a payload is one of the following objects:
1. A payload which runs a single entry function:
* `type` (string; required): a payload type. Example: `entry_function_payload`.
* `function` (string; required): an entry function ID is a string representation of an entry function defined on-chain.
Format: `{address}::{module name}::{function name}`
Both `module name` and `function name` are case-sensitive.
Example: `0x1::aptos_coin::transfer`
* `type_arguments` (array[string]; required): type arguments of the function.
* `arguments` (array; required): arguments of the function.
2. A payload which runs a script that can run multiple functions:
* `type` (string; required): a payload type. Example: `script_payload`.
* `code` (object; required): a Move script bytecode:
* `bytecode` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with `0x` and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `abi` (object): a Move function:
* `name` (string; required): a name of the function.
* `visibility` (string; required): Move function visibility.
Allowed values: `private`, `public`, `friend`
* `is_entry` (boolean; required): whether the function can be called as an entry function directly in a transaction.
* `generic_type_params` (array[object]; required): generic type params associated with the Move function:
* `constraints` (array[string]; required): Move abilities tied to the generic type param and associated with the function that uses it.
* `params` (array[string]; required): parameters associated with the Move function.
* `return` (array[string]: required): a return type of the function.
* `type_arguments` (array[string]; required): type arguments of the function.
* `arguments` (array; required): arguments of the function.
3. An enum of possible transaction payloads:
* `type` (string; required): a payload type. Example: `module_bundle_payload`.
* `modules` (array[object]; required):
* `bytecode` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `abi` (object): a Move module:
* `address` (string; hex; required): a hex-encoded 32-byte Aptos account address. This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x. For example, address `0x0000000000000000000000000000000000000000000000000000000000000001` is represented as `0x1`.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `name` (string; required): a name of the module.
* `friends` (array[string]: required): friends of the module.
* `exposed_functions` (array[object]; required): public functions of the module:
* `name` (string; required): a name of the function.
* `visibility` (string; required): Move function visibility.
Allowed values: `private`, `public`, `friend`
* `is_entry` (boolean; required): whether the function can be called as an entry function directly in a transaction.
* `generic_type_params` (array[object]; required): generic type params associated with the Move function:
* `constraints` (array[string]; required): Move abilities tied to the generic type param and associated with the function that uses it.
* `params` (array[string]; required): parameters associated with the Move function.
* `return` (array[string]; required): a return type of the function.
* `structs` (array[object]; required): structs of the module:
* `name` (string; required): a name of the struct.
* `is_native` (boolean; required): whether the struct is a native struct of Move.
* `abilities` (array[string]; required): abilities associated with the struct.
* `generic_type_params` (array[object]; required): generic types associated with the struct:
* `constraints` (array[string]; required): Move abilities tied to the generic type param and associated with the type that uses it.
* `fields` (array[object]; required): fields associated with the struct:
* `name` (string; required): a name of the field.
* `type` (string; required): a string representation of an on-chain Move type tag that is exposed in transaction payload.
Values: - bool - u8 - u16 - u32 - u64 - u128 - u256 - address - signer - vector: `vector<{non-reference MoveTypeId}>` - struct: `{address}::{module_name}::{struct_name}::<{generic types}>`
```
Vector type value examples:
- `vector`
- `vector>`
- `vector<0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>>`
Struct type value examples:
- `0x1::coin::CoinStore<0x1::aptos_coin::AptosCoin>
- `0x1::account::Account`
Note:
1. Empty chars should be ignored when comparing 2 struct tag ids.
2. When used in an URL path, should be encoded by url-encoding (AKA percent-encoding).
```
Match pattern: `^(bool|u8|u64|u128|address|signer|vector<.+>|0x[0-9a-zA-Z:_<, >]+)$`
* `signature` (object; required): a signature is one of the following objects:
1. A single Ed25519 signature:
* `type` (string; required): a signature type. Example: `ed25519_signature`.
* `public_key` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `signature` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
2. An Ed25519 multi-sig signature (allows k-of-n signing for a transaction):
* `type` (string; required): a type of signature. Example: `multi_ed25519_signature`.
* `public_keys` (array[string]; hex; required): the public keys for the Ed25519 signature.
* `signatures` (array[string]; hex; required): signatures associated with the public keys in the same order.
* `threshold` (integer; required): the number of signatures required for a successful transaction.
* `bitmap` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
3. A multi-agent signature for multi-agent transactions (allows you to have transactions across multiple accounts):
* `type` (string; required): a type of signature. Example: `multi_agent_signature`.
* `sender` (object; required): a sender is on of the following objects:
1. A single Ed25519 signature:
* `type` (string; required): a type of sender signature. Example: `ed25519_signature`.
* `public_key` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `signature` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
2. An Ed25519 multi-sig signature (allows k-of-n signing for a transaction):
* `type` (string; required): a type of sender signature. Example: `multi_ed25519_signature`.
* `public_keys` (array[string]; hex; required): the public keys for the Ed25519 signature.
* `signatures` (array[string]; hex; required): signatures associated with the public keys in the same order.
* `threshold` (integer; required): the number of signatures required for a successful transaction.
* `bitmap` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `secondary_signer_addresses` (array[string]; hex; required): the other involved parties' addresses.
* `secondary_signers` (array of objects): an array of on of the following objects:
1. A single Ed25519 signature:
* `type` (string; required): a type of secondary signers' signature. Example: `ed25519_signature`.
* `public_key` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
* `signature` (string; hex; required): all bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
2. An Ed25519 multi-sig signature (allows k-of-n signing for a transaction):
* `type` (string; required): a type of secondary signers' signature. Example: `multi_ed25519_signature`.
* `public_keys` (array[string]; hex; required): the public keys for the Ed25519 signature.
* `signatures` (array[string]; hex; required): signatures associated with the public keys in the same order.
* `threshold` (integer; required): the number of signatures required for a successful transaction.
* `bitmap` (string; hex; required): bytes (Vec) data is represented as hex-encoded string prefixed with 0x and fulfilled with two hex digits per byte.
Unlike the Address type, HexEncodedBytes will not trim any zeros.
Example: `0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1`
#### Request example
```shell
curl -X POST https://rpc.ankr.com/premium/YOUR_ANKR_API_KEY-http/aptos/YOUR_ANKR_API_KEY/v1/transactions/batch \
-H 'Content-Type: application/json'
-d '[
{
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"string"
],
"arguments": [
null
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}
]'
```
#### Response example
```json
{
"transaction_failures": [
{
"error": {
"message": "string",
"error_code": "account_not_found",
"vm_error_code": 0
},
"transaction_index": 0
}
]
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/arbitrum-nova/
title: Arbitrum Nova
description: Arbitrum Nova offers an ultra-low transaction costs with high security. 27 methods on Ankr RPC with a free demo key.
source: docs/rpc-service/chains/chains-api/arbitrum-nova/index.mdx
---
# Arbitrum Nova
> Arbitrum Nova API is available on [Web3 API platform](https://www.ankr.com/rpc/arbitrumnova).
*Arbitrum Nova* offers an ultra-low transaction costs with high security. Nova powers dapps with high transaction volumes that seek to drive costs even lower.
In order for your Web3 application to interact with Arbitrum Nova — either by reading blockchain data or sending transactions to the network — it must connect to an Arbitrum Nova node. Developers interact with the blockchain using the methods provided by the API.
The API interaction follows the [JSON-RPC](https://www.jsonrpc.org/specification) which is a stateless, light-weight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in other message-passing environments. It uses JSON (RFC 4627) as data format.
---
## Methods supported
* [`web3_clientVersion`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#web3_clientversion) — returns the current client version.
* [`web3_sha3`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#web3_sha3) — returns Keccak-256 (not the standardized SHA3-256) of the given data.
* [`net_version`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#net_version) — returns the current network ID.
* [`eth_syncing`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_syncing) — returns data on the sync status or false.
* [`eth_gasPrice`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_gasprice) — returns the current price per gas in wei.
* [`eth_accounts`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_accounts) — returns a list of addresses owned by client.
* [`eth_blockNumber`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_blocknumber) — returns the number of most recent block.
* [`eth_getBalance`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getbalance) — returns the balance of the account specified by address.
* [`eth_getStorageAt`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getstorageat) — returns the value from a storage position at an address specified.
* [`eth_getTransactionCount`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_gettransactioncount) — returns the number of transactions sent from an address.
* [`eth_getBlockTransactionCountByHash`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getblocktransactioncountbyhash) — returns the number of transactions in a block specified by block hash.
* [`eth_getBlockTransactionCountByNumber`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getblocktransactioncountbynumber) — returns the number of transactions in the block specified by number.
* [`eth_getUncleCountByBlockHash`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getunclecountbyblockhash) — returns the number of uncles in a block specified by block hash.
* [`eth_getUncleCountByBlockNumber`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getunclecountbyblocknumber) — returns the number of uncles in a block specified by block number.
* [`eth_getCode`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getcode) — returns code at an address specified.
* [`eth_sendRawTransaction`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_sendrawtransaction) — creates a new message call transaction or a contract creation for signed transactions.
* [`eth_call`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_call) — executes a new message call immediately without creating a transaction on the blockchain.
* [`eth_estimateGas`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/#eth_estimategas) — generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
* [`eth_getBlockByHash`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/#eth_getblockbyhash) — returns information for the block specified by block hash.
* [`eth_getBlockByNumber`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/#eth_getblockbynumber) — returns information for the block specified by block number.
* [`eth_getTransactionByHash`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/#eth_gettransactionbyhash) — returns information on a transaction specified by transaction hash.
* [`eth_getTransactionByBlockHashAndIndex`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/#eth_gettransactionbyblockhashandindex) — returns information on a transaction specified by block hash and transaction index position.
* [`eth_getTransactionByBlockNumberAndIndex`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/#eth_gettransactionbyblocknumberandindex) — returns information on a transaction by block number and transaction index position.
* [`eth_getTransactionReceipt`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p3/#eth_gettransactionreceipt) — returns the receipt of a transaction by transaction hash.
* [`eth_getUncleByBlockHashAndIndex`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p3/#eth_getunclebyblockhashandindex) — returns information about an uncle of a block by hash and uncle index position.
* [`eth_getUncleByBlockNumberAndIndex`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p3/#eth_getunclebyblocknumberandindex) — returns information about an uncle of a block by number and uncle index position.
* [`eth_getLogs`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p3/#eth_getlogs) — returns logs matching the parameters specified.
---
## Methods
### web3, net, eth
- [`web3_clientVersion`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#web3_clientversion)
- [`web3_sha3`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#web3_sha3)
- [`net_version`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#net_version)
- [`eth_syncing`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_syncing)
- [`eth_gasPrice`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_gasprice)
- [`eth_accounts`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_accounts)
- [`eth_blockNumber`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_blocknumber)
- [`eth_getBalance`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getbalance)
- [`eth_getStorageAt`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getstorageat)
- [`eth_getTransactionCount`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_gettransactioncount)
- [`eth_getBlockTransactionCountByHash`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getblocktransactioncountbyhash)
- [`eth_getBlockTransactionCountByNumber`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getblocktransactioncountbynumber)
- [`eth_getUncleCountByBlockHash`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getunclecountbyblockhash)
- [`eth_getUncleCountByBlockNumber`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getunclecountbyblocknumber)
- [`eth_getCode`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_getcode)
- [`eth_sendRawTransaction`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_sendrawtransaction)
- [`eth_call`](/rpc-service/chains/chains-api/arbitrum-nova/web3/#eth_call)
- [`eth_estimateGas`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/#eth_estimategas)
- [`eth_getBlockByHash`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/#eth_getblockbyhash)
- [`eth_getBlockByNumber`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/#eth_getblockbynumber)
- [`eth_getTransactionByHash`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/#eth_gettransactionbyhash)
- [`eth_getTransactionByBlockHashAndIndex`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/#eth_gettransactionbyblockhashandindex)
- [`eth_getTransactionByBlockNumberAndIndex`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/#eth_gettransactionbyblocknumberandindex)
- [`eth_getTransactionReceipt`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p3/#eth_gettransactionreceipt)
- [`eth_getUncleByBlockHashAndIndex`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p3/#eth_getunclebyblockhashandindex)
- [`eth_getUncleByBlockNumberAndIndex`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p3/#eth_getunclebyblocknumberandindex)
- [`eth_getLogs`](/rpc-service/chains/chains-api/arbitrum-nova/web3-p3/#eth_getlogs)
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/
title: Arbitrum Nova — web3, net, eth (2/3)
source: docs/rpc-service/chains/chains-api/arbitrum-nova/web3-p2.mdx
---
# Arbitrum Nova — web3, net, eth (2/3)
> API reference for [Arbitrum Nova](/rpc-service/chains/chains-api/arbitrum-nova/). [All methods ->](/rpc-service/chains/chains-api/arbitrum-nova/#methods)
>
> Part 2 of 3: [1](/rpc-service/chains/chains-api/arbitrum-nova/web3/) · 2 · [3](/rpc-service/chains/chains-api/arbitrum-nova/web3-p3/)
## `eth_estimateGas`
> Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (hex encoded): the transaction object:
* `from` (string; data, 20 bytes; optional): the address the transaction is sent from.
* `to` (string; data, 20 bytes; optional): the address the transaction is directed to.
* `gas` (string; quantity; optional): the gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter may be needed by some executions.
* `gasPrice` (string; quantity; optional): the gas price willing to be paid by the sender in wei.
* `value` (string; quantity; optional): the value sent with this transaction, in wei.
* `data` (string; data; optional): the hash of the method signature and encoded parameters.
2. `` (quantity|tag): either a HEX value of a *block number* or one of the following *block tags*:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the amount of gas used.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [{"from":"0x07f327929A3A3131EB4BE83f784DBD3E5C2698f8"}],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xfb79"
}
```
---
## `eth_getBlockByHash`
> Returns information for the block specified by block hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes; required): a block hash.
2. ``: if `true` it returns the full transaction objects, if `false` — only the hashes of the transactions.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": ["0x01851296020b91cb47ac6bd926da14fb24c24eb3512a979136d9446b82f5f819", false],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x989680",
"difficulty": "0x1",
"extraData": "0x1182fdff4a2945d6ab76bc47a4a3366e644b97bf4136b6418d0a613182a643b7",
"gasLimit": "0x4000000000000",
"gasUsed": "0x7909",
"hash": "0x01851296020b91cb47ac6bd926da14fb24c24eb3512a979136d9446b82f5f819",
"l1BlockNumber": "0xfe78a9",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0xa4b000000000000000000073657175656e636572",
"mixHash": "0x0000000000003bf10000000000fe78a9000000000000000a0000000000000000",
"nonce": "0x0000000000021e99",
"number": "0x2586fc",
"parentHash": "0xe3fb34fa71fc5c293937abb64b98060f1934fb371673ee1b205ca3d5b61ba7da",
"receiptsRoot": "0x7ced3427a01d1dd989376f5b813e9c9a1253344905d0e7cbcc0a687827f92f9c",
"sendCount": "0x3bf1",
"sendRoot": "0x1182fdff4a2945d6ab76bc47a4a3366e644b97bf4136b6418d0a613182a643b7",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x32c",
"stateRoot": "0xd23d3f92d74a6435238f719981dd0e2b1ddfe535b737fa507396d0ecc7e070e6",
"timestamp": "0x63f4c05c",
"totalDifficulty": "0x2586fd",
"transactions": [
"0xd9bce4bd8bf9daaa8f00c91d85b78a4ca6583ddd092ea1e128c7c6d11b314a20",
"0x8586de57de4896b97ff97ec96a2b01b8b05798a09e4fe4e5403c99e0fea67e49"
],
"transactionsRoot": "0x8f62bc998fb30c85671182064494701b0df155f46fc69c2e62ee11987fdf05b2",
"uncles": []
}
}
```
---
## `eth_getBlockByNumber`
> Returns information for the block specified by block number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag; required): either the hex value of a *block number* or one of the following *block tags*:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
2. ``: if `true` it returns the full transaction objects, if `false` — only the hashes of the transactions.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["0x3C962", false],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"baseFeePerGas": "0x5f5e100",
"difficulty": "0x1",
"extraData": "0x64d4a7abaa7fc93f447254c02b05b20b0ecb02b9ff5201f7bb24dc7faf781954",
"gasLimit": "0x4000000000000",
"gasUsed": "0x3a899",
"hash": "0x19d53ccf46e19a5097495d619fc191ed8fcbcfbb6f15a3cdb9e8d702fe7f3af3",
"l1BlockNumber": "0xec021b",
"logsBloom": "0x00000000000000000000001010000040000000000001000000000000000000000040000000000010000000084002000000000000000000000000000000000800000000000008040000800008000000000000000008000000000000000000000000000000020000000000000000000800000000000000000000000010000000000000400000000000000000010000000000000008000000000000000040000000000000000000000000000000401000000a00000000000000000000000000000000001402040000000400000000000000000002400000000000000000000020000000000008000000000000000040008000000001004000000000000000000000",
"miner": "0xa4b000000000000000000073657175656e636572",
"mixHash": "0x00000000000006170000000000ec021b00000000000000050000000000000000",
"nonce": "0x000000000000633f",
"number": "0x3c962",
"parentHash": "0xd8c8730646435745391753b96bab79b8b0c6b1159556f8916c1136bf3606c50f",
"receiptsRoot": "0x8520e430daf00bedbcf1de7327cf003468e435e0b9c4c36a157ed7ab94bedb93",
"sendCount": "0x617",
"sendRoot": "0x64d4a7abaa7fc93f447254c02b05b20b0ecb02b9ff5201f7bb24dc7faf781954",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x433",
"stateRoot": "0x2c23077018de41f5ce90ccca8363fed3b99465b674c055b4f378d023cc09c67b",
"timestamp": "0x6313a16f",
"totalDifficulty": "0x3c963",
"transactions": [
"0x1b54ecdb00015fa4d402880c07f8c8c823091f0ec08555b6d8877846f68f5ba9",
"0x891f6f0436a33b36fff9760a433be9963d6eee1ec1a6c3d187871e42e74cfd46"
],
"transactionsRoot": "0xa7ff40e60c8bee96add8493bf034ac340625ab189d62314115a7e4a27d3a9e75",
"uncles": []
}
}
```
---
## `eth_getTransactionByHash`
> Returns information on a transaction specified by transaction hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes; required): a transaction hash.
### Returns
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
* `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending.
* `from` (string; data, 20 bytes): an address of the sender.
* `gas` (string; quantity): the gas provided by the sender.
* `gasPrice` (string; quantity): the gas price provided by the sender in wei.
* `hash` (string; data, 32 bytes): the hash of the transaction.
* `input` (string; data): the data send along with the transaction.
* `nonce` (string; quantity): the number of transactions made by the sender prior to this one.
* `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
* `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending.
* `value` (string; quantity): the value transferred in wei.
* `v` (string; quantity): ECDSA recovery ID.
* `r` (string; quantity): ECDSA signature r.
* `s` (string; quantity): ECDSA signature s.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0x162e65b69d5afeba2ddecff3df893fb90413cda0e198a8797bc5d02ff327e2e7"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x07460b2f6ee380d7ab3488e30c1ee90352db1dcb1de711e6c6896e2149ac58d2",
"blockNumber": "0x2586f8",
"from": "0x6d809d5399ddf9bb2261bb2d8ec242c162f38923",
"gas": "0xd884",
"gasPrice": "0x989680",
"maxFeePerGas": "0xcdfe60",
"maxPriorityFeePerGas": "0x0",
"hash": "0x162e65b69d5afeba2ddecff3df893fb90413cda0e198a8797bc5d02ff327e2e7",
"input": "0xd0e30db0",
"nonce": "0x50",
"to": "0x722e8bdd2ce80a4422e880164f2079488e115365",
"transactionIndex": "0x1",
"value": "0x11c37937e08000",
"type": "0x2",
"accessList": [],
"chainId": "0xa4ba",
"v": "0x1",
"r": "0x159d1e1a92b2153f70c7d2d99b6571dd2f1acba71c9c65f74a75c409aa66c034",
"s": "0x2bac0216abf06b2c12c8b2c09dcbc1b437e54717b324897f9babcf6a2b56772"
}
}
```
---
## `eth_getTransactionByBlockHashAndIndex`
> Returns information on a transaction specified by block hash and transaction index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes; required): a block hash.
2. `` (quantity; required): a transaction index position.
### Returns
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
* `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending.
* `from` (string; data, 20 bytes): an address of the sender.
* `gas` (string; quantity): the gas provided by the sender.
* `gasPrice` (string; quantity): the gas price provided by the sender in wei.
* `hash` (string; data, 32 bytes): the hash of the transaction.
* `input` (string; data): the data send along with the transaction.
* `nonce` (string; quantity): the number of transactions made by the sender prior to this one.
* `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
* `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending.
* `value` (string; quantity): the value transferred in wei.
* `v` (string; quantity): ECDSA recovery ID.
* `r` (string; quantity): ECDSA signature r.
* `s` (string; quantity): ECDSA signature s.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"params": ["0x25acbbcaf2446cf8b15dfb0521448e68702cf11815bbd6f81bda56f3b527e47a", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x25acbbcaf2446cf8b15dfb0521448e68702cf11815bbd6f81bda56f3b527e47a",
"blockNumber": "0x3c962",
"from": "0x0639556f03714a74a5feeaf5736a4a64ff70d206",
"gas": "0x5208",
"gasPrice": "0x165a0bc00",
"maxFeePerGas": "0x165a0bc00",
"maxPriorityFeePerGas": "0x165a0bc00",
"hash": "0xc028c90e2727b130ecab4561e755f25bf7edb699d0e9d3bbd4883f1ba7ced342",
"input": "0x",
"nonce": "0x188",
"to": "0x279bc70bc870f55546639924a00e1b1e02f3b61d",
"transactionIndex": "0x0",
"value": "0x2a06487cbac738000",
"type": "0x2",
"accessList": [],
"chainId": "0x39",
"v": "0x1",
"r": "0x4271c455b615ce98d036030b30cdfdc5e1c79420caaf3907cd65bbaa49b1889e",
"s": "0x1c360f303a21b8df3dbb3b970925f07ba707046593015d30c820f617485d7683"
}
}
```
---
## `eth_getTransactionByBlockNumberAndIndex`
> Returns information on a transaction by block number and transaction index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag; required): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
2. `` (quantity; required): the transaction index position.
### Returns
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
* `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending.
* `from` (string; data, 20 bytes): an address of the sender.
* `gas` (string; quantity): the gas provided by the sender.
* `gasPrice` (string; quantity): the gas price provided by the sender in wei.
* `hash` (string; data, 32 bytes): the hash of the transaction.
* `input` (string; data): the data send along with the transaction.
* `nonce` (string; quantity): the number of transactions made by the sender prior to this one.
* `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
* `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending.
* `value` (string; quantity): the value transferred in wei.
* `v` (string; quantity): ECDSA recovery ID.
* `r` (string; quantity): ECDSA signature r.
* `s` (string; quantity): ECDSA signature s.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": ["0x3C962", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x25acbbcaf2446cf8b15dfb0521448e68702cf11815bbd6f81bda56f3b527e47a",
"blockNumber": "0x3c962",
"from": "0x0639556f03714a74a5feeaf5736a4a64ff70d206",
"gas": "0x5208",
"gasPrice": "0x165a0bc00",
"maxFeePerGas": "0x165a0bc00",
"maxPriorityFeePerGas": "0x165a0bc00",
"hash": "0xc028c90e2727b130ecab4561e755f25bf7edb699d0e9d3bbd4883f1ba7ced342",
"input": "0x",
"nonce": "0x188",
"to": "0x279bc70bc870f55546639924a00e1b1e02f3b61d",
"transactionIndex": "0x0",
"value": "0x2a06487cbac738000",
"type": "0x2",
"accessList": [],
"chainId": "0x39",
"v": "0x1",
"r": "0x4271c455b615ce98d036030b30cdfdc5e1c79420caaf3907cd65bbaa49b1889e",
"s": "0x1c360f303a21b8df3dbb3b970925f07ba707046593015d30c820f617485d7683"
}
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/arbitrum-nova/web3-p3/
title: Arbitrum Nova — web3, net, eth (3/3)
source: docs/rpc-service/chains/chains-api/arbitrum-nova/web3-p3.mdx
---
# Arbitrum Nova — web3, net, eth (3/3)
> API reference for [Arbitrum Nova](/rpc-service/chains/chains-api/arbitrum-nova/). [All methods ->](/rpc-service/chains/chains-api/arbitrum-nova/#methods)
>
> Part 3 of 3: [1](/rpc-service/chains/chains-api/arbitrum-nova/web3/) · [2](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/) · 3
## `eth_getTransactionReceipt`
> Returns the receipt of a transaction by transaction hash.
The receipt is not available for pending transactions.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes; required): a hash of the transaction.
### Returns
* `object`: a transaction receipt object, or null when no receipt was found:
* `transactionHash` (string; data, 32 bytes): a hash of the transaction.
* `transactionIndex` (string; quantity): the transactions index position in the block.
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction.
* `blockNumber` (string; quantity): a number of the block containing the transaction.
* `from` (string; data, 20 bytes): an address of the sender.
* `to` (string; data, 20 bytes): an address of the receiver; null when it's a contract creation transaction.
* `cumulativeGasUsed` (string; quantity): the total amount of gas used when this transaction was executed in the block.
* `effectiveGasPrice` (string; quantity): the sum of the base fee and tip paid per unit of gas.
* `gasUsed` (string; quantity): the amount of gas used by this specific transaction alone.
* `contractAddress` (string; data, 20 bytes): the contract address created, if the transaction was a contract creation, otherwise null.
* `logs` (array): an array of log objects, which this transaction generated.
* `logsBloom` (string; data, 256 bytes): a bloom filter for light clients to quickly retrieve related logs.
* `type` (string; data): the transaction type, `0x00` for legacy transactions, `0x01` for access list types, `0x02` for dynamic fees. It also returns either of the following:
* `root` (string; data, 32 bytes): a post-transaction stateroot (pre Byzantium).
* `status` (string; quantity): either 1 (success) or 0 (failure).
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0xc028c90e2727b130ecab4561e755f25bf7edb699d0e9d3bbd4883f1ba7ced342"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x25acbbcaf2446cf8b15dfb0521448e68702cf11815bbd6f81bda56f3b527e47a",
"blockNumber": "0x3c962",
"contractAddress": null,
"cumulativeGasUsed": "0x5208",
"effectiveGasPrice": "0x165a0bc00",
"from": "0x0639556f03714a74a5feeaf5736a4a64ff70d206",
"gasUsed": "0x5208",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": "0x1",
"to": "0x279bc70bc870f55546639924a00e1b1e02f3b61d",
"transactionHash": "0xc028c90e2727b130ecab4561e755f25bf7edb699d0e9d3bbd4883f1ba7ced342",
"transactionIndex": "0x0",
"type": "0x2"
}
}
```
---
## `eth_getUncleByBlockHashAndIndex`
> Returns information about an uncle of a block by hash and uncle index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes; required): the hash of a block.
2. `` (quantity; required): the uncle's index position.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleByBlockHashAndIndex",
"params": ["0x25acbbcaf2446cf8b15dfb0521448e68702cf11815bbd6f81bda56f3b527e47a", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x4ea3f27bc",
"extraData": "0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32",
"gasLimit": "0x1388",
"gasUsed": "0x0",
"hash": "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0xbb7b8287f3f0a933474a79eae42cbca977791171",
"mixHash": "0x4fffe9ae21f1c9e15207b1f472d5bbdd68c9595d461666602f2be20daf5e7843",
"nonce": "0x689056015818adbe",
"number": "0x1b4",
"parentHash": "0xe99e022112df268087ea7eafaf4790497fd21dbeeb6bd7a1721df161a6657a54",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0xddc8b0234c2e0cad087c8b389aa7ef01f7d79b2570bccb77ce48648aa61c904d",
"timestamp": "0x55ba467c",
"totalDifficulty": "0x78ed983323d",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
---
## `eth_getUncleByBlockNumberAndIndex`
> Returns information about an uncle of a block by number and uncle index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag; required): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
2. `` (quantity; required): the uncle's index position.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleByBlockNumberAndIndex",
"params": ["0x3C962", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"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": "0xc46826a2c6a",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
---
## `eth_getLogs`
> Returns an array of all logs matching a given filter object.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `object`: the filter options:
* `fromBlock` (string; quantity|tag; optional; default: "latest"): either a hex of the _block number_ or one of the following _block tags_:
* `latest`: for the last mined block.
* `earliest`: for the lowest numbered block available on the client.
* `pending`: for not yet mined transactions.
* `toBlock` (string; quantity|tag; optional; default: "latest"): either the _block number_ or one of the following _block tags_:
* `latest`: for the last mined block.
* `earliest`: for the lowest numbered block available on the client.
* `pending`: for not yet mined transactions.
* `address` (array of strings; data, 20 bytes; optional): a contract address or a list of addresses from which logs should originate.
* `topics` (array of strings; data; 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` (string; data, 32 bytes; optional; **future**): with the addition of EIP-234, `blockHash` will be a new filter option which 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.
### Returns
* `removed` (string; tag): `true` when the log was removed, due to a chain reorganization; `false` if it's a valid log.
* `logIndex` (string; quantity): the log index position in the block; null when it's a pending log.
* `transactionIndex` (string; quantity): the transactions index position log was created from; null when it's a pending log.
* `transactionHash` (string; data, 32 bytes): a hash of the transactions this log was created from; null when it's a pending log.
* `blockHash` (string; data, 32 bytes): a hash of the block containing the log; null when it's pending; null when it's a pending log.
* `blockNumber` (string; quantity): the number of the block containing the log; null when it's pending; null when it's a pending log.
* `address` (string; data, 20 bytes): an address from which this log originated.
* `data` (string; data): contains one or more 32 bytes non-indexed arguments of the log.
* `topics` (array of strings; 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 you declared the event with the anonymous specifier.)
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [{"address": "0x1D220215ddBd0A9F525b56A400C24487Ed696000"}],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000009acbb72cf67103a30333a32cd203459c6a9c3311",
"0x000000000000000000000000994871e1103c5da4be270365fa62771ea4525520"
],
"data": "0x000000000000000000000000000000000000000000000000000000001ec39aa0",
"blockNumber": "0xf6289d",
"transactionHash": "0xc7ed73c9b219d4243872e5993ad2950c8ea87d15af28562d33b0c05d46a90cee",
"transactionIndex": "0x1e",
"blockHash": "0x1e12377f0357320c0e5cfcadc2dfbc9c75fc339be668e118c34e4333f835ef31",
"logIndex": "0x13",
"removed": false
},
{
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000005879975799597392c031f10b6eff282cb7974ac8",
"0x0000000000000000000000006d52ab66340f3f78d0c1007bec484268876b5948"
],
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",
"blockNumber": "0xf6289d",
"transactionHash": "0x0118499f7be4c3510bd60fe3a3aee5f5f316743b6cc13a8cb0528d784f962aec",
"transactionIndex": "0x20",
"blockHash": "0x1e12377f0357320c0e5cfcadc2dfbc9c75fc339be668e118c34e4333f835ef31",
"logIndex": "0x14",
"removed": false
}
]
}
```
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/arbitrum-nova/web3/
title: Arbitrum Nova — web3, net, eth (1/3)
source: docs/rpc-service/chains/chains-api/arbitrum-nova/web3.mdx
---
# Arbitrum Nova — web3, net, eth (1/3)
> API reference for [Arbitrum Nova](/rpc-service/chains/chains-api/arbitrum-nova/). [All methods ->](/rpc-service/chains/chains-api/arbitrum-nova/#methods)
>
> Part 1 of 3: 1 · [2](/rpc-service/chains/chains-api/arbitrum-nova/web3-p2/) · [3](/rpc-service/chains/chains-api/arbitrum-nova/web3-p3/)
## `web3_clientVersion`
> Returns the current client version.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): None.
### Returns
* ``: the current client version.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "web3_clientVersion",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"result": "nitro/vv2.0.11-8e786ec/linux-amd64/go1.19.5",
"id": 1
}
```
---
## `web3_sha3`
> Returns Keccak-256 (not the standardized SHA3-256) of the given data.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
* `` (data; required): the data to convert into a SHA3 hash.
### Returns
* `` (data): the SHA3 result of the given string.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "web3_sha3",
"params": ["0x68656c6c6f20776f726c64"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad"
}
```
---
## `net_version`
> Returns the current network ID.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): None.
### Returns
* ``: the current network ID.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "42170"
}
```
---
## `eth_syncing`
> Returns an object with data about the sync status or false.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): None.
### Returns
* ``|``: an object with sync status data or `false`, when not syncing:
* `startingBlock` (quantity): the block at which the import started (will only be reset, after the sync reached its head).
* `currentBlock` (quantity): the current block, same as `eth_blockNumber`.
* `highestBlock` (quantity): the estimated highest block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
}'
```
### Response example (syncing)
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"startingBlock": "0x384",
"currentBlock": "0x386",
"highestBlock": "0x454"
}
}
```
### Response example (not syncing)
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": false
}
```
---
## `eth_gasPrice`
> Returns the current price per gas in wei.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): None.
### Returns
* `` (quantity): the current gas price in wei.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x989680"
}
```
---
## `eth_accounts`
> Returns a list of addresses owned by client.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): None.
### Returns
* `` (string; data, 20 bytes): addresses owned by the client.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": [
"0x407d73d8a49eeb85d32cf465507dd71d507100c1"
]
}
```
---
## `eth_blockNumber`
> Returns the number of most recent block.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): None.
### Returns
* `` (quantity): the current block number the client is on.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x258290"
}
```
---
## `eth_getBalance`
> Returns the balance of the account specified by address.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 20 bytes; required): an address to check for balance.
2. `` (quantity|tag; required): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the current balance in wei.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xDe01a19B76b31040860eD061827c73d91B07947a", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1229ca8a77520"
}
```
---
## `eth_getStorageAt`
> Returns the value from a storage position at an address specified.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 20 bytes; required): an address of the storage (hex encoded).
2. `` (quantity; required): a slot position in the storage (hex encoded unsigned integer).
3. `` (quantity|tag; required): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (data): the value at this storage position.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": ["0xDe01a19B76b31040860eD061827c73d91B07947a", "0x0", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
```
---
## `eth_getTransactionCount`
> Returns the number of transactions sent from an address.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 20 bytes; required): an address.
2. `` (quantity|tag; required): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the number of transactions send from this address.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": ["0x475a82B8CA56740C6C965625bA06BBe7bB33D88d", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x8"
}
```
---
## `eth_getBlockTransactionCountByHash`
> Returns the number of transactions in a block specified by block hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes; required): a block hash.
### Returns
* `` (quantity): the number of transactions in this block.
### Request example:
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": ["0x185dbc690d43d1c8fed6f5df6d28538250953453f3fc174d208229390a1a3226"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x2"
}
```
---
## `eth_getBlockTransactionCountByNumber`
> Returns the number of transactions in the block specified by number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag; required): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the number of transactions in this block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": ["0x258704"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x2"
}
```
---
## `eth_getUncleCountByBlockHash`
> Returns the number of uncles in a block specified by block hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes; required): a block hash.
### Returns
* `` (quantity): the number of uncles in this block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockHash",
"params": ["0xd84165bd25576bec1013a95918996d48fc3d4253925236f7303a4ba28a9d8e51"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
---
## `eth_getUncleCountByBlockNumber`
> Returns the number of uncles in a block specified by block number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag; required): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the number of uncles in this block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockNumber",
"params": ["0x2586FC"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
---
## `eth_getCode`
> Returns code at a given address.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 20 bytes; required): an address to get the code from.
2. `` (quantity|tag; required): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (data): the code from the given address.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": ["0xb1398c4D958B97c181Df60148678f04eCEc62c69", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
```
---
## `eth_sendRawTransaction`
> Creates new message call transaction or a contract creation for signed transactions.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data; required): the signed transaction data.
### Returns
* `` (data, 32 bytes): the transaction hash, or the zero hash if the transaction is not yet available.
Use [eth_getTransactionReceipt](/rpc-service/chains/chains-api/arbitrum-nova/web3-p3/#eth_gettransactionreceipt) to get the contract address, after the transaction was mined, when you created a contract.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
---
## `eth_call`
> Executes a new message call immediately without creating a transaction on the blockchain.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (hex encoded; required): the transaction object:
* `from` (string; data, 20 bytes; optional): the address the transaction is sent from.
* `to` (string; data, 20 bytes): the address the transaction is directed to.
* `gas` (string; quantity; optional): the gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter may be needed by some executions.
* `gasPrice` (string; quantity; optional): the gas price willing to be paid by the sender in wei.
* `value` (string; quantity; optional): the value sent with this transaction, in wei.
* `data` (string; data; optional): the hash of the method signature and encoded parameters.
2. `` (quantity|tag; required): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (hex encoded bytes): the return value of executed contract.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrumnova/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [{"from":null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000858898f93629000"
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/arbitrum/eth-p2/
title: Arbitrum — eth, debug (2/2)
source: docs/rpc-service/chains/chains-api/arbitrum/eth-p2.mdx
---
# Arbitrum — eth, debug (2/2)
> API reference for [Arbitrum](/rpc-service/chains/chains-api/arbitrum/). [All methods ->](/rpc-service/chains/chains-api/arbitrum/#methods)
>
> Part 2 of 2: [1](/rpc-service/chains/chains-api/arbitrum/eth/) · 2
## `debug_traceBlock`
> Traces the execution of all transactions within a block.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
* `` (string; hex; required): the RLP-encoded data of the block you want to trace.
* `tracer` (string; optional): the tracer to use for the operation. Tracers can customize the output, for example, by including only certain types of operations. Common tracers are the following:
* `callTracer`: generates a detailed trace of all calls, including internal contract calls. `callTracer` has the following parameters:
* `onlyTopCall` (boolean): if `true`, only the top-level call is traced.
* `tracerConfig` (object): additional options to customize the output, such as including or excluding specific call types.
* `prestateTracer`: traces the state of accounts before the execution of transactions.
* `noopTracer`: a no-operation tracer that returns minimal information.
* `fourByteTracer`: identifies the function signature of calls by analyzing the first four bytes of the calldata.
* `memoryTracer`: traces memory changes during the execution of transactions. `memoryTracer` has the following parameters:
* `disableMemory` (boolean): if true, memory output is omitted.
* `opTracer`: traces all the EVM opcodes executed during a transaction. `opTracer` has the following parameters:
* `includeMemory` (boolean): if true, includes memory output.
* `includeStack` (boolean): if true, includes stack output.
* `includeStorage` (boolean): if true, includes storage output.
* `gasTracer`: traces the gas usage of the transaction and breaks it down by operation.
* `timeout` (optional, string): sets a timeout for the tracing operation, expressed in milliseconds (e.g., "5s" for 5 seconds). If the operation exceeds this time, it will be terminated.
* `tracingOptions` (optional, object): an object to specify additional options for the trace, such as:
* `disableMemory` (boolean): if true, memory output is omitted.
* `disableStack` (boolean): if true, stack output is omitted.
* `disableStorage` (boolean): if true, storage output is omitted.
You can create custom tracers by combining existing tracer parameters or defining new ones. The flexibility of tracers allows you to tailor the debugging output to your specific needs, focusing on different aspects of transaction execution.
If you're working on specific use cases, it may be helpful to look into the Arbitrum blockchain documentation to get detailed information on additional or custom tracers that may be supported.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceBlock",
"params": [
"blockRlp",
{
"tracer": "tracerType",
"timeout": "timeoutDuration",
"tracingOptions": {
"disableMemory": boolean,
"disableStack": boolean,
"disableStorage": boolean
}
}
],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"type": "call",
"from": "0x1234...abcd", // Address initiating the transaction
"to": "0xabcd...1234", // Address receiving the transaction
"gas": "0x5208", // Gas provided for the transaction
"gasUsed": "0x2100", // Gas actually used during execution
"input": "0x...", // Input data to the transaction (usually calldata)
"output": "0x...", // Output data from the transaction (e.g., return data)
"value": "0x0", // Value transferred in the transaction (in wei)
"calls": [ // Nested calls (if any)
{
"type": "call",
"from": "0xabcd...1234",
"to": "0x1234...abcd",
"gas": "0x5208",
"gasUsed": "0x2100",
"input": "0x...",
"output": "0x...",
"value": "0x0"
}
]
}
]
}
```
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/arbitrum/eth/
title: Arbitrum — eth, debug (1/2)
source: docs/rpc-service/chains/chains-api/arbitrum/eth.mdx
---
# Arbitrum — eth, debug (1/2)
> API reference for [Arbitrum](/rpc-service/chains/chains-api/arbitrum/). [All methods ->](/rpc-service/chains/chains-api/arbitrum/#methods)
>
> Part 1 of 2: 1 · [2](/rpc-service/chains/chains-api/arbitrum/eth-p2/)
## `eth_getUncleByBlockHashAndIndex`
> Returns information about an uncle of a block by hash and uncle index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (data, 32 bytes): the hash of a block.
2. `` (quantity): the uncle's index position.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleByBlockHashAndIndex",
"params": ["0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x4ea3f27bc",
"extraData": "0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32",
"gasLimit": "0x1388",
"gasUsed": "0x0",
"hash": "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0xbb7b8287f3f0a933474a79eae42cbca977791171",
"mixHash": "0x4fffe9ae21f1c9e15207b1f472d5bbdd68c9595d461666602f2be20daf5e7843",
"nonce": "0x689056015818adbe",
"number": "0x1b4",
"parentHash": "0xe99e022112df268087ea7eafaf4790497fd21dbeeb6bd7a1721df161a6657a54",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0xddc8b0234c2e0cad087c8b389aa7ef01f7d79b2570bccb77ce48648aa61c904d",
"timestamp": "0x55ba467c",
"totalDifficulty": "0x78ed983323d",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
---
## `eth_getUncleByBlockNumberAndIndex`
> Returns information about an uncle of a block by number and uncle index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
2. `` (quantity): the uncle's index position.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleByBlockNumberAndIndex",
"params": ["0x29c", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"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": "0xc46826a2c6a",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
---
## `eth_getLogs`
> Returns an array of all logs matching a given filter object.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `object`: the filter options:
* `fromBlock` (string; quantity|tag; optional; default: "latest"): either the _block number_ or one of the following _block tags_:
* `latest`: for the last mined block.
* `earliest`: for the lowest numbered block available on the client.
* `pending`: for not yet mined transactions.
* `toBlock` (string; quantity|tag; optional; default: "latest"): either the _block number_ or one of the following _block tags_:
* `latest`: for the last mined block.
* `earliest`: for the lowest numbered block available on the client.
* `pending`: for not yet mined transactions.
* `address` (array of strings; data, 20 bytes; optional): a contract address or a list of addresses from which logs should originate.
* `topics` (array of strings; data; 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` (string; data, 32 bytes; optional; **future**): with the addition of EIP-234, `blockHash` will be a new filter option which 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.
### Returns
* `removed` (string; tag): `true` when the log was removed, due to a chain reorganization; `false` if it's a valid log.
* `logIndex` (string; quantity): the log index position in the block; null when it's a pending log.
* `transactionIndex` (string; quantity): the transactions index position log was created from; null when it's a pending log.
* `transactionHash` (string; data, 32 bytes): a hash of the transactions this log was created from; null when it's a pending log.
* `blockHash` (string; data, 32 bytes): a hash of the block containing the log; null when it's pending; null when it's a pending log.
* `blockNumber` (string; quantity): the number of the block containing the log; null when it's pending; null when it's a pending log.
* `address` (string; data, 20 bytes): an address from which this log originated.
* `data` (string; data): contains one or more 32 bytes non-indexed arguments of the log.
* `topics` (array of strings; 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 you declared the event with the anonymous specifier.)
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [{
"fromBlock": "0xA00000",
"toBlock": "0xA00010",
"address": "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
}],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": []
}
```
---
## `debug_traceBlockByHash`
> Traces the execution of all transactions within a block specified by hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
* `` (string; required): the hash of the block you want to trace.
* `tracer` (string; optional): the tracer to use for the operation. Tracers can customize the output, for example, by including only certain types of operations. Common tracers are the following:
* `callTracer`: generates a detailed trace of all calls, including internal contract calls. `callTracer` has the following parameters:
* `onlyTopCall` (boolean): if `true`, only the top-level call is traced.
* `tracerConfig` (object): additional options to customize the output, such as including or excluding specific call types.
* `prestateTracer`: traces the state of accounts before the execution of transactions.
* `noopTracer`: a no-operation tracer that returns minimal information.
* `fourByteTracer`: identifies the function signature of calls by analyzing the first four bytes of the calldata.
* `memoryTracer`: traces memory changes during the execution of transactions. `memoryTracer` has the following parameters:
* `disableMemory` (boolean): if true, memory output is omitted.
* `opTracer`: traces all the EVM opcodes executed during a transaction. `opTracer` has the following parameters:
* `includeMemory` (boolean): if true, includes memory output.
* `includeStack` (boolean): if true, includes stack output.
* `includeStorage` (boolean): if true, includes storage output.
* `gasTracer`: traces the gas usage of the transaction and breaks it down by operation.
* `timeout` (optional, string): sets a timeout for the tracing operation, expressed in milliseconds (e.g., "5s" for 5 seconds). If the operation exceeds this time, it will be terminated.
* `tracingOptions` (optional, object): an object to specify additional options for the trace, such as:
* `disableMemory` (boolean): if true, memory output is omitted.
* `disableStack` (boolean): if true, stack output is omitted.
* `disableStorage` (boolean): if true, storage output is omitted.
You can create custom tracers by combining existing tracer parameters or defining new ones. The flexibility of tracers allows you to tailor the debugging output to your specific needs, focusing on different aspects of transaction execution.
If you're working on specific use cases, it may be helpful to look into the Arbitrum blockchain documentation to get detailed information on additional or custom tracers that may be supported.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceBlockByHash",
"params": [
"0x00ce359860d877197c27559e19900a2021644dc1979017364e409e25411b8799",
{
"tracer": "callTracer",
"timeout": "5s",
"tracingOptions": {
"disableMemory": true,
"disableStack": true,
"disableStorage": false
}
}
],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"txHash": "0xd2a3cf11f26051b63d8493a31e46973fd0f53a49f7d2797262b346a1efc1da19",
"result": {
"beforeEVMTransfers": [],
"afterEVMTransfers": [],
"from": "0x00000000000000000000000000000000000a4b05",
"gas": "0x0",
"gasUsed": "0x0",
"to": "0x00000000000000000000000000000000000a4b05",
"input": "0x6bf6a42d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000631152000000000000000000000000000000000000000000000000000000000438ce1d0000000000000000000000000000000000000000000000000000000000000000",
"value": "0x0",
"type": "CALL"
}
}
]
}
```
---
## `debug_traceBlockByNumber`
> Traces the execution of all transactions within a block specified by number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
* `` (string; hex; required): the hex number of the block you want to trace.
* `tracer` (string; optional): the tracer to use for the operation. Tracers can customize the output, for example, by including only certain types of operations. Common tracers are the following:
* `callTracer`: generates a detailed trace of all calls, including internal contract calls. `callTracer` has the following parameters:
* `onlyTopCall` (boolean): if `true`, only the top-level call is traced.
* `tracerConfig` (object): additional options to customize the output, such as including or excluding specific call types.
* `prestateTracer`: traces the state of accounts before the execution of transactions.
* `noopTracer`: a no-operation tracer that returns minimal information.
* `fourByteTracer`: identifies the function signature of calls by analyzing the first four bytes of the calldata.
* `memoryTracer`: traces memory changes during the execution of transactions. `memoryTracer` has the following parameters:
* `disableMemory` (boolean): if true, memory output is omitted.
* `opTracer`: traces all the EVM opcodes executed during a transaction. `opTracer` has the following parameters:
* `includeMemory` (boolean): if true, includes memory output.
* `includeStack` (boolean): if true, includes stack output.
* `includeStorage` (boolean): if true, includes storage output.
* `gasTracer`: traces the gas usage of the transaction and breaks it down by operation.
* `timeout` (optional, string): sets a timeout for the tracing operation, expressed in milliseconds (e.g., "5s" for 5 seconds). If the operation exceeds this time, it will be terminated.
* `tracingOptions` (optional, object): an object to specify additional options for the trace, such as:
* `disableMemory` (boolean): if true, memory output is omitted.
* `disableStack` (boolean): if true, stack output is omitted.
* `disableStorage` (boolean): if true, storage output is omitted.
You can create custom tracers by combining existing tracer parameters or defining new ones. The flexibility of tracers allows you to tailor the debugging output to your specific needs, focusing on different aspects of transaction execution.
If you're working on specific use cases, it may be helpful to look into the Arbitrum blockchain documentation to get detailed information on additional or custom tracers that may be supported.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceBlockByNumber",
"params": [
"0x438CE1D",
{
"tracer": "callTracer",
"timeout": "5s",
"tracingOptions": {
"disableMemory": true,
"disableStack": true,
"disableStorage": false
}
}
],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"txHash": "0xd2a3cf11f26051b63d8493a31e46973fd0f53a49f7d2797262b346a1efc1da19",
"result": {
"beforeEVMTransfers": [],
"afterEVMTransfers": [],
"from": "0x00000000000000000000000000000000000a4b05",
"gas": "0x0",
"gasUsed": "0x0",
"to": "0x00000000000000000000000000000000000a4b05",
"input": "0x6bf6a42d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000631152000000000000000000000000000000000000000000000000000000000438ce1d0000000000000000000000000000000000000000000000000000000000000000",
"value": "0x0",
"type": "CALL"
}
}
]
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/arbitrum/
title: Arbitrum
description: Arbitrum is designed to be as compatible and consistent with Ethereum as possible, from its high-level RPCs to… 30 methods on Ankr RPC with a free demo key.
source: docs/rpc-service/chains/chains-api/arbitrum/index.mdx
---
# Arbitrum
> Arbitrum API is available on [Web3 API platform](https://www.ankr.com/rpc/arbitrum).
*Arbitrum* is designed to be as compatible and consistent with Ethereum as possible, from its high-level RPCs to its low-level bytecode and everything in between. Dapp developers with experience building on Ethereum will likely find that little-to-no new L2-specific knowledge is required to build on Arbitrum.
In order for your Web3 application to interact with the Arbitrum blockchain — either by reading blockchain data or sending transactions to the network — it must connect to an Arbitrum node. Developers interact with the blockchain using the methods provided by the API.
The API interaction follows the [JSON-RPC](https://www.jsonrpc.org/specification) which is a stateless, light-weight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in many various message passing environments. It uses JSON (RFC 4627) as data format.
## Methods supported
* [`web3_clientVersion`](/rpc-service/chains/chains-api/arbitrum/web3/#web3_clientversion) — returns the current client version.
* [`web3_sha3`](/rpc-service/chains/chains-api/arbitrum/web3/#web3_sha3) — returns Keccak-256 (not the standardized SHA3-256) of the given data.
* [`net_version`](/rpc-service/chains/chains-api/arbitrum/web3/#net_version) — returns the current network ID.
* [`eth_syncing`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_syncing) — returns data on the sync status or false.
* [`eth_gasPrice`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_gasprice) — returns the current price per gas in wei.
* [`eth_accounts`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_accounts) — returns a list of addresses owned by client.
* [`eth_blockNumber`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_blocknumber) — returns the number of most recent block.
* [`eth_getBalance`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getbalance) — returns the balance of the account specified by address.
* [`eth_getStorageAt`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getstorageat) — returns the value from a storage position at an address specified.
* [`eth_getTransactionCount`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_gettransactioncount) — returns the number of transactions sent from an address.
* [`eth_getBlockTransactionCountByHash`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getblocktransactioncountbyhash) — returns the number of transactions in a block specified by block hash.
* [`eth_getBlockTransactionCountByNumber`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getblocktransactioncountbynumber) — returns the number of transactions in the block specified by number.
* [`eth_getUncleCountByBlockHash`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getunclecountbyblockhash) — returns the number of uncles in a block specified by block hash.
* [`eth_getUncleCountByBlockNumber`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getunclecountbyblocknumber) — returns the number of uncles in a block specified by block number.
* [`eth_getCode`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getcode) — returns code at an address specified.
* [`eth_sendRawTransaction`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_sendrawtransaction) — creates a new message call transaction or a contract creation for signed transactions.
* [`eth_call`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_call) — executes a new message call immediately without creating a transaction on the blockchain.
* [`eth_estimateGas`](/rpc-service/chains/chains-api/arbitrum/web3-p2/#eth_estimategas) — generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
* [`eth_getBlockByHash`](/rpc-service/chains/chains-api/arbitrum/web3-p2/#eth_getblockbyhash) — returns information for the block specified by block hash.
* [`eth_getBlockByNumber`](/rpc-service/chains/chains-api/arbitrum/web3-p2/#eth_getblockbynumber) — returns information for the block specified by block number.
* [`eth_getTransactionByHash`](/rpc-service/chains/chains-api/arbitrum/web3-p2/#eth_gettransactionbyhash) — returns information on a transaction specified by transaction hash.
* [`eth_getTransactionByBlockHashAndIndex`](/rpc-service/chains/chains-api/arbitrum/web3-p2/#eth_gettransactionbyblockhashandindex) — returns information on a transaction specified by block hash and transaction index position.
* [`eth_getTransactionByBlockNumberAndIndex`](/rpc-service/chains/chains-api/arbitrum/web3-p2/#eth_gettransactionbyblocknumberandindex) — returns information on a transaction by block number and transaction index position.
* [`eth_getTransactionReceipt`](/rpc-service/chains/chains-api/arbitrum/web3-p3/#eth_gettransactionreceipt) — returns the receipt of a transaction by transaction hash.
* [`eth_getUncleByBlockHashAndIndex`](/rpc-service/chains/chains-api/arbitrum/eth/#eth_getunclebyblockhashandindex) — returns information about an uncle of a block by hash and uncle index position.
* [`eth_getUncleByBlockNumberAndIndex`](/rpc-service/chains/chains-api/arbitrum/eth/#eth_getunclebyblocknumberandindex) — returns information about an uncle of a block by number and uncle index position.
* [`eth_getLogs`](/rpc-service/chains/chains-api/arbitrum/eth/#eth_getlogs) — returns logs matching the parameters specified.
**Premium-only methods (Arbitrum Sepolia Testnet)**:
* [`debug_traceBlockByHash`](/rpc-service/chains/chains-api/arbitrum/eth/#debug_traceblockbyhash) — traces the execution of all transactions within a block specified by hash.
* [`debug_traceBlockByNumber`](/rpc-service/chains/chains-api/arbitrum/eth/#debug_traceblockbynumber) — traces the execution of all transactions within a block specified by number.
* [`debug_traceBlock`](/rpc-service/chains/chains-api/arbitrum/eth-p2/#debug_traceblock) — traces the execution of all transactions within a block.
---
## Methods
### web3, net, eth
- [`web3_clientVersion`](/rpc-service/chains/chains-api/arbitrum/web3/#web3_clientversion)
- [`web3_sha3`](/rpc-service/chains/chains-api/arbitrum/web3/#web3_sha3)
- [`net_version`](/rpc-service/chains/chains-api/arbitrum/web3/#net_version)
- [`eth_syncing`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_syncing)
- [`eth_gasPrice`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_gasprice)
- [`eth_accounts`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_accounts)
- [`eth_blockNumber`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_blocknumber)
- [`eth_getBalance`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getbalance)
- [`eth_getStorageAt`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getstorageat)
- [`eth_getTransactionCount`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_gettransactioncount)
- [`eth_getBlockTransactionCountByHash`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getblocktransactioncountbyhash)
- [`eth_getBlockTransactionCountByNumber`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getblocktransactioncountbynumber)
- [`eth_getUncleCountByBlockHash`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getunclecountbyblockhash)
- [`eth_getUncleCountByBlockNumber`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getunclecountbyblocknumber)
- [`eth_getCode`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_getcode)
- [`eth_sendRawTransaction`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_sendrawtransaction)
- [`eth_call`](/rpc-service/chains/chains-api/arbitrum/web3/#eth_call)
- [`eth_estimateGas`](/rpc-service/chains/chains-api/arbitrum/web3-p2/#eth_estimategas)
- [`eth_getBlockByHash`](/rpc-service/chains/chains-api/arbitrum/web3-p2/#eth_getblockbyhash)
- [`eth_getBlockByNumber`](/rpc-service/chains/chains-api/arbitrum/web3-p2/#eth_getblockbynumber)
- [`eth_getTransactionByHash`](/rpc-service/chains/chains-api/arbitrum/web3-p2/#eth_gettransactionbyhash)
- [`eth_getTransactionByBlockHashAndIndex`](/rpc-service/chains/chains-api/arbitrum/web3-p2/#eth_gettransactionbyblockhashandindex)
- [`eth_getTransactionByBlockNumberAndIndex`](/rpc-service/chains/chains-api/arbitrum/web3-p2/#eth_gettransactionbyblocknumberandindex)
- [`eth_getTransactionReceipt`](/rpc-service/chains/chains-api/arbitrum/web3-p3/#eth_gettransactionreceipt)
### eth, debug
- [`eth_getUncleByBlockHashAndIndex`](/rpc-service/chains/chains-api/arbitrum/eth/#eth_getunclebyblockhashandindex)
- [`eth_getUncleByBlockNumberAndIndex`](/rpc-service/chains/chains-api/arbitrum/eth/#eth_getunclebyblocknumberandindex)
- [`eth_getLogs`](/rpc-service/chains/chains-api/arbitrum/eth/#eth_getlogs)
- [`debug_traceBlockByHash`](/rpc-service/chains/chains-api/arbitrum/eth/#debug_traceblockbyhash)
- [`debug_traceBlockByNumber`](/rpc-service/chains/chains-api/arbitrum/eth/#debug_traceblockbynumber)
- [`debug_traceBlock`](/rpc-service/chains/chains-api/arbitrum/eth-p2/#debug_traceblock)
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/arbitrum/web3-p2/
title: Arbitrum — web3, net, eth (2/3)
source: docs/rpc-service/chains/chains-api/arbitrum/web3-p2.mdx
---
# Arbitrum — web3, net, eth (2/3)
> API reference for [Arbitrum](/rpc-service/chains/chains-api/arbitrum/). [All methods ->](/rpc-service/chains/chains-api/arbitrum/#methods)
>
> Part 2 of 3: [1](/rpc-service/chains/chains-api/arbitrum/web3/) · 2 · [3](/rpc-service/chains/chains-api/arbitrum/web3-p3/)
## `eth_estimateGas`
> Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (hex encoded): the transaction object:
* `from` (string; data, 20 bytes; optional): the address the transaction is sent from.
* `to` (string; data, 20 bytes; optional): the address the transaction is directed to.
* `gas` (string; quantity; optional): the gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter may be needed by some executions.
* `gasPrice` (string; quantity; optional): the gas price willing to be paid by the sender in wei.
* `value` (string; quantity; optional): the value sent with this transaction, in wei.
* `data` (string; data; optional): the hash of the method signature and encoded parameters.
2. `` (quantity|tag; optional): either a HEX value of a *block number* or one of the following *block tags*:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the amount of gas used.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [{"from":null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x48204"
}
```
---
## `eth_getBlockByHash`
> Returns information for the block specified by block hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (data, 32 bytes): the block's hash.
2. ``: if `true` it returns the full transaction objects, if `false` — only the hashes of the transactions.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": ["0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae", false],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x4ea3f27bc",
"extraData": "0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32",
"gasLimit": "0x1388",
"gasUsed": "0x0",
"hash": "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0xbb7b8287f3f0a933474a79eae42cbca977791171",
"mixHash": "0x4fffe9ae21f1c9e15207b1f472d5bbdd68c9595d461666602f2be20daf5e7843",
"nonce": "0x689056015818adbe",
"number": "0x1b4",
"parentHash": "0xe99e022112df268087ea7eafaf4790497fd21dbeeb6bd7a1721df161a6657a54",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0xddc8b0234c2e0cad087c8b389aa7ef01f7d79b2570bccb77ce48648aa61c904d",
"timestamp": "0x55ba467c",
"totalDifficulty": "0x78ed983323d",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
---
## `eth_getBlockByNumber`
> Returns information for the block specified by block number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (quantity|tag): either the hex value of a *block number* or one of the following *block tags*:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
2. ``: if `true` it returns the full transaction objects, if `false` — only the hashes of the transactions.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["0x1b4", true],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x4ea3f27bc",
"extraData": "0x476574682f4c5649562f76312e302e302f6c696e75782f676f312e342e32",
"gasLimit": "0x1388",
"gasUsed": "0x0",
"hash": "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0xbb7b8287f3f0a933474a79eae42cbca977791171",
"mixHash": "0x4fffe9ae21f1c9e15207b1f472d5bbdd68c9595d461666602f2be20daf5e7843",
"nonce": "0x689056015818adbe",
"number": "0x1b4",
"parentHash": "0xe99e022112df268087ea7eafaf4790497fd21dbeeb6bd7a1721df161a6657a54",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x220",
"stateRoot": "0xddc8b0234c2e0cad087c8b389aa7ef01f7d79b2570bccb77ce48648aa61c904d",
"timestamp": "0x55ba467c",
"totalDifficulty": "0x78ed983323d",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
---
## `eth_getTransactionByHash`
> Returns information on a transaction specified by transaction hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (data, 32 bytes): a transaction hash.
### Returns
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
* `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending.
* `from` (string; data, 20 bytes): an address of the sender.
* `gas` (string; quantity): the gas provided by the sender.
* `gasPrice` (string; quantity): the gas price provided by the sender in wei.
* `hash` (string; data, 32 bytes): the hash of the transaction.
* `input` (string; data): the data send along with the transaction.
* `nonce` (string; quantity): the number of transactions made by the sender prior to this one.
* `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
* `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending.
* `value` (string; quantity): the value transferred in wei.
* `v` (string; quantity): ECDSA recovery ID.
* `r` (string; quantity): ECDSA signature r.
* `s` (string; quantity): ECDSA signature s.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
"blockNumber": "0x5daf3b",
"from": "0xa7d9ddbe1f17865597fbd27ec712455208b6b76d",
"gas": "0xc350",
"gasPrice": "0x4a817c800",
"hash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b",
"input": "0x68656c6c6f21",
"nonce": "0x15",
"to": "0xf02c1c8e6114b1dbe8937a39260b5b0a374432bb",
"transactionIndex": "0x41",
"value": "0xf3dbb76162000",
"type": "0x0",
"chainId": "0x1",
"v": "0x25",
"r": "0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea",
"s": "0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c"
}
}
```
---
## `eth_getTransactionByBlockHashAndIndex`
> Returns information on a transaction specified by block hash and transaction index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (data, 32 bytes): a block hash.
2. `` (quantity): a transaction index position.
### Returns
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
* `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending.
* `from` (string; data, 20 bytes): an address of the sender.
* `gas` (string; quantity): the gas provided by the sender.
* `gasPrice` (string; quantity): the gas price provided by the sender in wei.
* `hash` (string; data, 32 bytes): the hash of the transaction.
* `input` (string; data): the data send along with the transaction.
* `nonce` (string; quantity): the number of transactions made by the sender prior to this one.
* `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
* `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending.
* `value` (string; quantity): the value transferred in wei.
* `v` (string; quantity): ECDSA recovery ID.
* `r` (string; quantity): ECDSA signature r.
* `s` (string; quantity): ECDSA signature s.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"params": ["0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b", "0x2"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b",
"blockNumber": "0xc4fa88",
"from": "0x4e0c43c30964b80c37df90d229e668823b6f36b6",
"gas": "0x34ed8",
"gasPrice": "0x6c088e200",
"hash": "0xd0f7b79f2b38a5e8303ff523da621d6cb04a18e722d6cc0bcce75309cd804b2e",
"input": "0x38ed1739000000000000000000000000000000000000000000000012f211da6a00e70ccd0000000000000000000000000000000000000000000000059ddf43d23461577600000000000000000000000000000000000000000000000000000000000000a00000000000000000000000004e0c43c30964b80c37df90d229e668823b6f36b600000000000000000000000000000000000000000000000000000000610039cb00000000000000000000000000000000000000000000000000000000000000030000000000000000000000007d1afa7b718fb893db30a3abc0cfc608aacfebb0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000009813037ee2218799597d83d4a5b6f3b6778218d9",
"nonce": "0x26",
"to": "0x03f7724180aa6b939894b5ca4314783b0b36b329",
"transactionIndex": "0x2",
"value": "0x0",
"type": "0x0",
"chainId": "0x1",
"v": "0x25",
"r": "0x43284f337fce4ab4225dd123935934ebd12067440d8a2a05ac297c2d0f62d8ab",
"s": "0x3827daa345b9b30ecef4df256a72059ca04106dee07a6a97ba5b4b719550cde3"
}
}
```
---
## `eth_getTransactionByBlockNumberAndIndex`
> Returns information on a transaction by block number and transaction index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
2. `` (quantity): the transaction index position.
### Returns
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
* `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending.
* `from` (string; data, 20 bytes): an address of the sender.
* `gas` (string; quantity): the gas provided by the sender.
* `gasPrice` (string; quantity): the gas price provided by the sender in wei.
* `hash` (string; data, 32 bytes): the hash of the transaction.
* `input` (string; data): the data send along with the transaction.
* `nonce` (string; quantity): the number of transactions made by the sender prior to this one.
* `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
* `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending.
* `value` (string; quantity): the value transferred in wei.
* `v` (string; quantity): ECDSA recovery ID.
* `r` (string; quantity): ECDSA signature r.
* `s` (string; quantity): ECDSA signature s.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": ["0xc5043f", "0x2"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0xa917fcc721a5465a484e9be17cda0cc5493933dd3bc70c9adbee192cb419c9d7",
"blockNumber": "0xc5043f",
"from": "0x829bd824b016326a401d083b33d092293333a830",
"gas": "0x33450",
"gasPrice": "0x0",
"hash": "0xdf8d8677c9cd5f81d8ee3663a4a64ce7fe93d35fcb46004529e77394630f8e11",
"input": "0x",
"nonce": "0xa16562",
"to": "0x6e2edc2af25cd5704d99ba73ac7ece701f50192d",
"transactionIndex": "0x2",
"value": "0x20b9632b7dc0a3e",
"type": "0x0",
"v": "0x26",
"r": "0x6fd8d85d440c87e894898ce7c12725eb994d416b0843ae5ddb0f188bc21ac9a2",
"s": "0x47fe6bc7bb3ddc8d579509fed960934ab8ed6004152e62b2abca6639393b8e77"
}
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/arbitrum/web3-p3/
title: Arbitrum — web3, net, eth (3/3)
source: docs/rpc-service/chains/chains-api/arbitrum/web3-p3.mdx
---
# Arbitrum — web3, net, eth (3/3)
> API reference for [Arbitrum](/rpc-service/chains/chains-api/arbitrum/). [All methods ->](/rpc-service/chains/chains-api/arbitrum/#methods)
>
> Part 3 of 3: [1](/rpc-service/chains/chains-api/arbitrum/web3/) · [2](/rpc-service/chains/chains-api/arbitrum/web3-p2/) · 3
## `eth_getTransactionReceipt`
> Returns the receipt of a transaction by transaction hash.
The receipt is not available for pending transactions.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (data, 32 bytes): a hash of the transaction.
### Returns
* `object`: a transaction receipt object, or null when no receipt was found:
* `transactionHash` (string; data, 32 bytes): a hash of the transaction.
* `transactionIndex` (string; quantity): the transactions index position in the block.
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction.
* `blockNumber` (string; quantity): a number of the block containing the transaction.
* `from` (string; data, 20 bytes): an address of the sender.
* `to` (string; data, 20 bytes): an address of the receiver; null when it's a contract creation transaction.
* `cumulativeGasUsed` (string; quantity): the total amount of gas used when this transaction was executed in the block.
* `effectiveGasPrice` (string; quantity): the sum of the base fee and tip paid per unit of gas.
* `gasUsed` (string; quantity): the amount of gas used by this specific transaction alone.
* `contractAddress` (string; data, 20 bytes): the contract address created, if the transaction was a contract creation, otherwise null.
* `logs` (array): an array of log objects, which this transaction generated.
* `logsBloom` (string; data, 256 bytes): a bloom filter for light clients to quickly retrieve related logs.
* `type` (string; data): the transaction type, `0x00` for legacy transactions, `0x01` for access list types, `0x02` for dynamic fees. It also returns either of the following:
* `root` (string; data, 32 bytes): a post-transaction stateroot (pre Byzantium).
* `status` (string; quantity): either 1 (success) or 0 (failure).
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0x3c9329b765d88c03d18f87dc1f2b5138c89d9a415d5c73dc7827b87aca176c8e"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"blockHash": "0xa957d47df264a31badc3ae823e10ac1d444b098d9b73d204c40426e57f47e8c3",
"blockNumber": "0xeff35f",
"contractAddress": null,
"cumulativeGasUsed": "0xa12515",
"effectiveGasPrice": "0x5a9c688d4",
"from": "0x6221a9c005f6e47eb398fd867784cacfdcfff4e7",
"gasUsed": "0xb4c8",
"logs": [
{
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"topics": [
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"0x0000000000000000000000006221a9c005f6e47eb398fd867784cacfdcfff4e7",
"0x0000000000000000000000001e0049783f008a0085193e00003d00cd54003c71"
],
"data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"blockNumber": "0xeff35f",
"transactionHash": "0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5",
"transactionIndex": "0x66",
"blockHash": "0xa957d47df264a31badc3ae823e10ac1d444b098d9b73d204c40426e57f47e8c3",
"logIndex": "0xfa",
"removed": false
}
],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000080000000000000000200000000000000000000020000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020001000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000010200000000000000000000000000000000000000000000000000000020000",
"status": "0x1",
"to": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"transactionHash": "0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5",
"transactionIndex": "0x66",
"type": "0x2"
}
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/arbitrum/web3/
title: Arbitrum — web3, net, eth (1/3)
source: docs/rpc-service/chains/chains-api/arbitrum/web3.mdx
---
# Arbitrum — web3, net, eth (1/3)
> API reference for [Arbitrum](/rpc-service/chains/chains-api/arbitrum/). [All methods ->](/rpc-service/chains/chains-api/arbitrum/#methods)
>
> Part 1 of 3: 1 · [2](/rpc-service/chains/chains-api/arbitrum/web3-p2/) · [3](/rpc-service/chains/chains-api/arbitrum/web3-p3/)
## `web3_clientVersion`
> Returns the current client version.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array): None.
### Returns
* ``: the current client version.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "web3_clientVersion",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "nitro/vv2.0.9-51f9452/linux-amd64/go1.19.4"
}
```
---
## `web3_sha3`
> Returns Keccak-256 (not the standardized SHA3-256) of the given data.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
* `` (data): the data to convert into a SHA3 hash.
### Returns
* `` (data): the SHA3 result of the given string.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "web3_sha3",
"params": ["0x68656c6c6f20776f726c64"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad"
}
```
---
## `net_version`
> Returns the current network ID.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array): None.
### Returns
* ``: the current network ID.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "42161"
}
```
---
## `eth_syncing`
> Returns an object with data about the sync status or false.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array): None.
### Returns
* ``|``: an object with sync status data or FALSE, when not syncing:
* `startingBlock` (quantity): the block at which the import started (will only be reset, after the sync reached its head).
* `currentBlock` (quantity): the current block, same as `eth_blockNumber`.
* `highestBlock` (quantity): the estimated highest block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
}'
```
### Response example (syncing)
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"startingBlock": "0x384",
"currentBlock": "0x386",
"highestBlock": "0x454"
}
}
```
### Response example (not syncing)
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": false
}
```
---
## `eth_gasPrice`
> Returns the current price per gas in wei.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array): None.
### Returns
* `` (quantity): the current gas price in wei.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5f5e100"
}
```
---
## `eth_accounts`
> Returns a list of addresses owned by client.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array): None.
### Returns
* `` (string; data, 20 bytes): addresses owned by the client.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": [
"0x407d73d8a49eeb85d32cf465507dd71d507100c1"
]
}
```
---
## `eth_blockNumber`
> Returns the number of most recent block.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array): None.
### Returns
* `` (quantity): the current block number the client is on.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x3681baf"
}
```
---
## `eth_getBalance`
> Returns the balance of the account specified by address.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (data, 20 bytes): an address to check for balance.
2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the current balance in wei.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x2c85c3ecfcb5fb"
}
```
---
## `eth_getStorageAt`
> Returns the value from a storage position at an address specified.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (data, 20 bytes): an address of the storage (hex encoded).
2. `` (quantity): a slot position in the storage (hex encoded unsigned integer).
3. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (data): the value at this storage position.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
```
---
## `eth_getTransactionCount`
> Returns the number of transactions sent from an address.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (data, 20 bytes): an address.
2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the number of transactions send from this address.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": ["0x8D97689C9818892B700e27F316cc3E41e17fBeb9", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x9"
}
```
---
## `eth_getBlockTransactionCountByHash`
> Returns the number of transactions in a block specified by block hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (data, 32 bytes): a block hash.
### Returns
* `` (quantity): the number of transactions in this block.
### Request example:
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": ["0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x7b"
}
```
---
## `eth_getBlockTransactionCountByNumber`
> Returns the number of transactions in the block specified by number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the number of transactions in this block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": ["0x36c1d18"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xb6"
}
```
---
## `eth_getUncleCountByBlockHash`
> Returns the number of uncles in a block specified by block hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (data, 32 bytes): a block's hash.
### Returns
* `` (quantity): the number of uncles in this block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockHash",
"params": ["0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
---
## `eth_getUncleCountByBlockNumber`
> Returns the number of uncles in a block specified by block number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the number of uncles in this block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockNumber",
"params": ["0xc5043f"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
```
---
## `eth_getCode`
> Returns code at a given address.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (data, 20 bytes): an address to get the code from.
2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (data): the code from the given address.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
```
---
## `eth_sendRawTransaction`
> Creates new message call transaction or a contract creation for signed transactions.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (data): the signed transaction data.
### Returns
* `` (data, 32 bytes): the transaction hash, or the zero hash if the transaction is not yet available.
Use [eth_getTransactionReceipt](/rpc-service/chains/chains-api/arbitrum/web3-p3/#eth_gettransactionreceipt) to get the contract address, after the transaction was mined, when you created a contract.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
```
---
## `eth_call`
> Executes a new message call immediately without creating a transaction on the blockchain.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array):
1. `` (hex encoded): the transaction object:
* `from` (string; data, 20 bytes; optional): the address the transaction is sent from.
* `to` (string; data, 20 bytes): the address the transaction is directed to.
* `gas` (string; quantity; optional): the gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter may be needed by some executions.
* `gasPrice` (string; quantity; optional): the gas price willing to be paid by the sender in wei.
* `value` (string; quantity; optional): the value sent with this transaction, in wei.
* `data` (string; data; optional): the hash of the method signature and encoded parameters.
2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (hex encoded bytes): the return value of executed contract.
### Request example
```shell
curl -X POST https://rpc.ankr.com/arbitrum/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [{"from":null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000858898f93629000"
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/atleta/
title: Atleta
description: Atleta is a modular, multi-layer, EVM-compatible, smart contract platform with native cross-chain… 29 methods on Ankr RPC with a free demo key.
source: docs/rpc-service/chains/chains-api/atleta/index.mdx
---
# Atleta
> Atleta API is available on [Web3 API platform](https://www.ankr.com/rpc/atleta).
*Atleta* is a modular, multi-layer, EVM-compatible, smart contract platform with native cross-chain interoperability, dedicated to servicing the sports industry.
In order for your Web3 application to interact with Atleta — either by reading blockchain data or sending transactions to the network — it must connect to an Atleta node. Developers interact with the blockchain using the methods provided by the API.
The API interaction follows the [JSON-RPC](https://www.jsonrpc.org/specification) which is a stateless, light-weight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in other message-passing environments. It uses JSON (RFC 4627) as data format.
---
## Methods supported
* [`web3_clientVersion`](/rpc-service/chains/chains-api/atleta/web3/#web3_clientversion) — returns the current client version.
* [`web3_sha3`](/rpc-service/chains/chains-api/atleta/web3/#web3_sha3) — returns Keccak-256 (not the standardized SHA3-256) of the given data.
* [`net_version`](/rpc-service/chains/chains-api/atleta/web3/#net_version) — returns the current network ID.
* [`net_listening`](/rpc-service/chains/chains-api/atleta/web3/#net_listening) — returns true if client is actively listening for network connections.
* [`eth_protocolVersion`](/rpc-service/chains/chains-api/atleta/web3/#eth_protocolversion) — returns the current protocol version.
* [`eth_syncing`](/rpc-service/chains/chains-api/atleta/web3/#eth_syncing) — returns data on the sync status or false.
* [`eth_gasPrice`](/rpc-service/chains/chains-api/atleta/web3/#eth_gasprice) — returns the current price per gas in wei.
* [`eth_accounts`](/rpc-service/chains/chains-api/atleta/web3/#eth_accounts) — returns a list of addresses owned by client.
* [`eth_blockNumber`](/rpc-service/chains/chains-api/atleta/web3/#eth_blocknumber) — returns the number of most recent block.
* [`eth_getBalance`](/rpc-service/chains/chains-api/atleta/web3/#eth_getbalance) — returns the balance of the account specified by address.
* [`eth_getStorageAt`](/rpc-service/chains/chains-api/atleta/web3/#eth_getstorageat) — returns the value from a storage position at an address specified.
* [`eth_getTransactionCount`](/rpc-service/chains/chains-api/atleta/web3/#eth_gettransactioncount) — returns the number of transactions sent from an address.
* [`eth_getBlockTransactionCountByHash`](/rpc-service/chains/chains-api/atleta/web3/#eth_getblocktransactioncountbyhash) — returns the number of transactions in a block specified by block hash.
* [`eth_getBlockTransactionCountByNumber`](/rpc-service/chains/chains-api/atleta/web3/#eth_getblocktransactioncountbynumber) — returns the number of transactions in the block specified by number.
* [`eth_getUncleCountByBlockHash`](/rpc-service/chains/chains-api/atleta/web3/#eth_getunclecountbyblockhash) — returns the number of uncles in a block specified by block hash.
* [`eth_getUncleCountByBlockNumber`](/rpc-service/chains/chains-api/atleta/web3/#eth_getunclecountbyblocknumber) — returns the number of uncles in a block specified by block number.
* [`eth_getCode`](/rpc-service/chains/chains-api/atleta/web3/#eth_getcode) — returns code at an address specified.
* [`eth_sendRawTransaction`](/rpc-service/chains/chains-api/atleta/web3/#eth_sendrawtransaction) — creates a new message call transaction or a contract creation for signed transactions.
* [`eth_call`](/rpc-service/chains/chains-api/atleta/web3-p2/#eth_call) — executes a new message call immediately without creating a transaction on the blockchain.
* [`eth_estimateGas`](/rpc-service/chains/chains-api/atleta/web3-p2/#eth_estimategas) — generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
* [`eth_getBlockByHash`](/rpc-service/chains/chains-api/atleta/web3-p2/#eth_getblockbyhash) — returns information for the block specified by block hash.
* [`eth_getBlockByNumber`](/rpc-service/chains/chains-api/atleta/web3-p2/#eth_getblockbynumber) — returns information for the block specified by block number.
* [`eth_getTransactionByHash`](/rpc-service/chains/chains-api/atleta/web3-p2/#eth_gettransactionbyhash) — returns information on a transaction specified by transaction hash.
* [`eth_getTransactionByBlockHashAndIndex`](/rpc-service/chains/chains-api/atleta/web3-p2/#eth_gettransactionbyblockhashandindex) — returns information on a transaction specified by block hash and transaction index position.
* [`eth_getTransactionByBlockNumberAndIndex`](/rpc-service/chains/chains-api/atleta/web3-p3/#eth_gettransactionbyblocknumberandindex) — returns information on a transaction by block number and transaction index position.
* [`eth_getTransactionReceipt`](/rpc-service/chains/chains-api/atleta/web3-p3/#eth_gettransactionreceipt) — returns the receipt of a transaction by transaction hash.
* [`eth_getUncleByBlockHashAndIndex`](/rpc-service/chains/chains-api/atleta/web3-p3/#eth_getunclebyblockhashandindex) — returns information about an uncle of a block by hash and uncle index position.
* [`eth_getUncleByBlockNumberAndIndex`](/rpc-service/chains/chains-api/atleta/web3-p3/#eth_getunclebyblocknumberandindex) — returns information about an uncle of a block by number and uncle index position.
* [`eth_getLogs`](/rpc-service/chains/chains-api/atleta/web3-p3/#eth_getlogs) — returns logs matching the parameters specified.
---
## Methods
### web3, net, eth
- [`web3_clientVersion`](/rpc-service/chains/chains-api/atleta/web3/#web3_clientversion)
- [`web3_sha3`](/rpc-service/chains/chains-api/atleta/web3/#web3_sha3)
- [`net_version`](/rpc-service/chains/chains-api/atleta/web3/#net_version)
- [`net_listening`](/rpc-service/chains/chains-api/atleta/web3/#net_listening)
- [`eth_protocolVersion`](/rpc-service/chains/chains-api/atleta/web3/#eth_protocolversion)
- [`eth_syncing`](/rpc-service/chains/chains-api/atleta/web3/#eth_syncing)
- [`eth_gasPrice`](/rpc-service/chains/chains-api/atleta/web3/#eth_gasprice)
- [`eth_accounts`](/rpc-service/chains/chains-api/atleta/web3/#eth_accounts)
- [`eth_blockNumber`](/rpc-service/chains/chains-api/atleta/web3/#eth_blocknumber)
- [`eth_getBalance`](/rpc-service/chains/chains-api/atleta/web3/#eth_getbalance)
- [`eth_getStorageAt`](/rpc-service/chains/chains-api/atleta/web3/#eth_getstorageat)
- [`eth_getTransactionCount`](/rpc-service/chains/chains-api/atleta/web3/#eth_gettransactioncount)
- [`eth_getBlockTransactionCountByHash`](/rpc-service/chains/chains-api/atleta/web3/#eth_getblocktransactioncountbyhash)
- [`eth_getBlockTransactionCountByNumber`](/rpc-service/chains/chains-api/atleta/web3/#eth_getblocktransactioncountbynumber)
- [`eth_getUncleCountByBlockHash`](/rpc-service/chains/chains-api/atleta/web3/#eth_getunclecountbyblockhash)
- [`eth_getUncleCountByBlockNumber`](/rpc-service/chains/chains-api/atleta/web3/#eth_getunclecountbyblocknumber)
- [`eth_getCode`](/rpc-service/chains/chains-api/atleta/web3/#eth_getcode)
- [`eth_sendRawTransaction`](/rpc-service/chains/chains-api/atleta/web3/#eth_sendrawtransaction)
- [`eth_call`](/rpc-service/chains/chains-api/atleta/web3-p2/#eth_call)
- [`eth_estimateGas`](/rpc-service/chains/chains-api/atleta/web3-p2/#eth_estimategas)
- [`eth_getBlockByHash`](/rpc-service/chains/chains-api/atleta/web3-p2/#eth_getblockbyhash)
- [`eth_getBlockByNumber`](/rpc-service/chains/chains-api/atleta/web3-p2/#eth_getblockbynumber)
- [`eth_getTransactionByHash`](/rpc-service/chains/chains-api/atleta/web3-p2/#eth_gettransactionbyhash)
- [`eth_getTransactionByBlockHashAndIndex`](/rpc-service/chains/chains-api/atleta/web3-p2/#eth_gettransactionbyblockhashandindex)
- [`eth_getTransactionByBlockNumberAndIndex`](/rpc-service/chains/chains-api/atleta/web3-p3/#eth_gettransactionbyblocknumberandindex)
- [`eth_getTransactionReceipt`](/rpc-service/chains/chains-api/atleta/web3-p3/#eth_gettransactionreceipt)
- [`eth_getUncleByBlockHashAndIndex`](/rpc-service/chains/chains-api/atleta/web3-p3/#eth_getunclebyblockhashandindex)
- [`eth_getUncleByBlockNumberAndIndex`](/rpc-service/chains/chains-api/atleta/web3-p3/#eth_getunclebyblocknumberandindex)
- [`eth_getLogs`](/rpc-service/chains/chains-api/atleta/web3-p3/#eth_getlogs)
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/atleta/web3-p2/
title: Atleta — web3, net, eth (2/3)
source: docs/rpc-service/chains/chains-api/atleta/web3-p2.mdx
---
# Atleta — web3, net, eth (2/3)
> API reference for [Atleta](/rpc-service/chains/chains-api/atleta/). [All methods ->](/rpc-service/chains/chains-api/atleta/#methods)
>
> Part 2 of 3: [1](/rpc-service/chains/chains-api/atleta/web3/) · 2 · [3](/rpc-service/chains/chains-api/atleta/web3-p3/)
## `eth_call`
> Executes a new message call immediately without creating a transaction on the blockchain.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (hex encoded): the transaction object:
* `from` (string; data, 20 bytes; optional): the address the transaction is sent from.
* `to` (string; data, 20 bytes): the address the transaction is directed to.
* `gas` (string; quantity; optional): the gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter may be needed by some executions.
* `gasPrice` (string; quantity; optional): the gas price willing to be paid by the sender in wei.
* `value` (string; quantity; optional): the value sent with this transaction, in wei.
* `data` (string; data; optional): the hash of the method signature and encoded parameters.
2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (hex encoded bytes): the return value of executed contract.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"to": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4",
"data": "0x70a082310000000000000000000000005a93a3f8c5e3eae603b36e3e0805a2e2290b1e82"
},
"latest"
],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
```
---
## `eth_estimateGas`
> Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.
The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (hex encoded): the transaction object:
* `from` (string; data, 20 bytes; optional): the address the transaction is sent from.
* `to` (string; data, 20 bytes; optional): the address the transaction is directed to.
* `gas` (string; quantity; optional): the gas provided for the transaction execution. `eth_call` consumes zero gas, but this parameter may be needed by some executions.
* `gasPrice` (string; quantity; optional): the gas price willing to be paid by the sender in wei.
* `value` (string; quantity; optional): the value sent with this transaction, in wei.
* `data` (string; data; optional): the hash of the method signature and encoded parameters.
2. `` (quantity|tag; optional): either a HEX value of a *block number* or one of the following *block tags*:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the amount of gas used.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [
{
"to": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4",
"data": "0xa9059cbb0000000000000000000000005a93a3f8c5e3eae603b36e3e0805a2e2290b1e820000000000000000000000000000000000000000000000000000000000000003e8"
}
],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x575f"
}
```
---
## `eth_getBlockByHash`
> Returns information for the block specified by block hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): the block hash.
2. ``: if `true` it returns the full transaction objects, if `false` — only the hashes of the transactions.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": ["0xe01796432573b7895f847e042eb6d924776068cc5e7f5a3f2096f71006ced9a0", false],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"result": {
"author": "0xa99e38bcf899411fac369257bd8971eddc167e71",
"baseFeePerGas": "0x1dcd6500",
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0x47868c0",
"gasUsed": "0x12e5fc",
"hash": "0xe01796432573b7895f847e042eb6d924776068cc5e7f5a3f2096f71006ced9a0",
"logsBloom": "0x00200000000000000000000080000000000000800000000000800000000400000000000000000000000100100000000000000000000000000000000000000000000000000000000000000008000000200000000000000000000000000000000000000004020000000000040000000800000000000000000000000010000000000400000000100000020000000500000000000000000000080000004000000200000000000000000000000000000200000000000000000000000100000200800000000002000000000000008200000040000000000000001000008000000020000000010000000020000008000000000000000000000000000000000001000000",
"miner": "0xa99e38bcf899411fac369257bd8971eddc167e71",
"nonce": "0x0000000000000000",
"number": "0x282e8e",
"parentHash": "0xdaba959bdfcd83404f775f5b1942224b61f426e8a20950fa91b0b403ac2c8da5",
"receiptsRoot": "0x676af341605971218e46e9638c5898d479eead4f5fa9d778e8c4b6377984194c",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x4ce",
"stateRoot": "0x9bf8ca03c4cc588d5087ede981aaad92a0407498dc84afe9bc1b2b383ca9d7b7",
"timestamp": "0x6751a148",
"totalDifficulty": "0x0",
"transactions": [
"0x2867c9de7f388bfffa93340e147602c78091e4fcf39bece0e7025b476ca6f8eb",
"0xdfc7d9c1de3bbee0f3f5fa18205a2dedd5a7fa041bfdba7f77fffc052b5a0a07"
],
"transactionsRoot": "0xe619025cf67c585c53a2b4fd612e95eae0cd667e444438faf79bfc1366141739",
"uncles": []
},
"id": 1
}
```
---
## `eth_getBlockByNumber`
> Returns information for the block specified by block number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag): either the hex value of a *block number* or one of the following *block tags*:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
2. ``: if `true` it returns the full transaction objects, if `false` — only the hashes of the transactions.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", true],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"author": "0x0c00ec3a3a031f5c9885978dd03a3a4fdb27bcf1",
"baseFeePerGas": "0x1dcd6500",
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0x47868c0",
"gasUsed": "0x0",
"hash": "0xd2c14a163cee5db0a041f9db15643cf3042108095c5fb756e82581b38aa92a7c",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"miner": "0x0c00ec3a3a031f5c9885978dd03a3a4fdb27bcf1",
"nonce": "0x0000000000000000",
"number": "0x7b389",
"parentHash": "0xef65775f9d84f201b06415ef8c816ff78c1edbe164c308217fa40a5d654c01a7",
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x202",
"stateRoot": "0x39c114288f38e34c0c3f73279e80ab7099d786d69511fe071ba5e7c33960e01a",
"timestamp": "0x6751aacc",
"totalDifficulty": "0x0",
"transactions": [],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
```
---
## `eth_getTransactionByHash`
> Returns information on a transaction specified by transaction hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): a transaction hash.
### Returns
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
* `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending.
* `from` (string; data, 20 bytes): an address of the sender.
* `gas` (string; quantity): the gas provided by the sender.
* `gasPrice` (string; quantity): the gas price provided by the sender in wei.
* `hash` (string; data, 32 bytes): the hash of the transaction.
* `input` (string; data): the data send along with the transaction.
* `nonce` (string; quantity): the number of transactions made by the sender prior to this one.
* `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
* `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending.
* `value` (string; quantity): the value transferred in wei.
* `v` (string; quantity): ECDSA recovery ID.
* `r` (string; quantity): ECDSA signature r.
* `s` (string; quantity): ECDSA signature s.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByHash",
"params": ["0x2867c9de7f388bfffa93340e147602c78091e4fcf39bece0e7025b476ca6f8eb"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"result": {
"type": "0x2",
"hash": "0x2867c9de7f388bfffa93340e147602c78091e4fcf39bece0e7025b476ca6f8eb",
"nonce": "0x0",
"blockHash": "0xe01796432573b7895f847e042eb6d924776068cc5e7f5a3f2096f71006ced9a0",
"blockNumber": "0x282e8e",
"transactionIndex": "0x0",
"from": "0x6245581b9e13143269404ea6f2efa7b99eca53ee",
"to": "0x31cac5c91c483a637116934d21565361950e6b7f",
"value": "0x8ac7230489e80000",
"gas": "0x118f90",
"gasPrice": "0x77359400",
"maxFeePerGas": "0x7d2b7500",
"maxPriorityFeePerGas": "0x59682f00",
"input": "0x5ae401dc000000000000000000000000000000000000000000000000000000006751a83f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000104472b43f30000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000005f70c277b9dd00000000000000000000000000000000000000000000000000000000000000800000000000000000000000006245581b9e13143269404ea6f2efa7b99eca53ee0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000e26fea44c00802b9cae594974c0a6cbcad5fd8630000000000000000000000009f294c5d5da451e1fa5c2a654cb6d6e394efe2cd000000000000000000000000cda75276918a66d609a55b04570d7b4015a974a000000000000000000000000000000000000000000000000000000000",
"creates": null,
"chainId": "0x924",
"accessList": [],
"yParity": "0x0",
"v": "0x0",
"r": "0xf92ae479d4df56a637835816455621c023aa34a9257928fe4a035ce8a602603a",
"s": "0x33f34f08a51a17f5e3e8cff9fc4fe5bdb9956e6b5c34ad44d10e9be250869119"
},
"id": 1
}
```
---
## `eth_getTransactionByBlockHashAndIndex`
> Returns information on a transaction specified by block hash and transaction index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): a block hash.
2. `` (quantity): a transaction index position.
### Returns
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
* `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending.
* `from` (string; data, 20 bytes): an address of the sender.
* `gas` (string; quantity): the gas provided by the sender.
* `gasPrice` (string; quantity): the gas price provided by the sender in wei.
* `hash` (string; data, 32 bytes): the hash of the transaction.
* `input` (string; data): the data send along with the transaction.
* `nonce` (string; quantity): the number of transactions made by the sender prior to this one.
* `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
* `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending.
* `value` (string; quantity): the value transferred in wei.
* `v` (string; quantity): ECDSA recovery ID.
* `r` (string; quantity): ECDSA signature r.
* `s` (string; quantity): ECDSA signature s.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockHashAndIndex",
"params": ["0xe01796432573b7895f847e042eb6d924776068cc5e7f5a3f2096f71006ced9a0", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"result": {
"type": "0x2",
"hash": "0x2867c9de7f388bfffa93340e147602c78091e4fcf39bece0e7025b476ca6f8eb",
"nonce": "0x0",
"blockHash": "0xe01796432573b7895f847e042eb6d924776068cc5e7f5a3f2096f71006ced9a0",
"blockNumber": "0x282e8e",
"transactionIndex": "0x0",
"from": "0x6245581b9e13143269404ea6f2efa7b99eca53ee",
"to": "0x31cac5c91c483a637116934d21565361950e6b7f",
"value": "0x8ac7230489e80000",
"gas": "0x118f90",
"gasPrice": "0x77359400",
"maxFeePerGas": "0x7d2b7500",
"maxPriorityFeePerGas": "0x59682f00",
"input": "0x5ae401dc000000000000000000000000000000000000000000000000000000006751a83f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000104472b43f30000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000005f70c277b9dd00000000000000000000000000000000000000000000000000000000000000800000000000000000000000006245581b9e13143269404ea6f2efa7b99eca53ee0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000e26fea44c00802b9cae594974c0a6cbcad5fd8630000000000000000000000009f294c5d5da451e1fa5c2a654cb6d6e394efe2cd000000000000000000000000cda75276918a66d609a55b04570d7b4015a974a000000000000000000000000000000000000000000000000000000000",
"creates": null,
"chainId": "0x924",
"accessList": [],
"yParity": "0x0",
"v": "0x0",
"r": "0xf92ae479d4df56a637835816455621c023aa34a9257928fe4a035ce8a602603a",
"s": "0x33f34f08a51a17f5e3e8cff9fc4fe5bdb9956e6b5c34ad44d10e9be250869119"
},
"id": 1
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/atleta/web3-p3/
title: Atleta — web3, net, eth (3/3)
source: docs/rpc-service/chains/chains-api/atleta/web3-p3.mdx
---
# Atleta — web3, net, eth (3/3)
> API reference for [Atleta](/rpc-service/chains/chains-api/atleta/). [All methods ->](/rpc-service/chains/chains-api/atleta/#methods)
>
> Part 3 of 3: [1](/rpc-service/chains/chains-api/atleta/web3/) · [2](/rpc-service/chains/chains-api/atleta/web3-p2/) · 3
## `eth_getTransactionByBlockNumberAndIndex`
> Returns information on a transaction by block number and transaction index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
2. `` (quantity): the transaction index position.
### Returns
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction; null when it's pending.
* `blockNumber` (string; quantity): a number of the block containing the transaction; null when it's pending.
* `from` (string; data, 20 bytes): an address of the sender.
* `gas` (string; quantity): the gas provided by the sender.
* `gasPrice` (string; quantity): the gas price provided by the sender in wei.
* `hash` (string; data, 32 bytes): the hash of the transaction.
* `input` (string; data): the data send along with the transaction.
* `nonce` (string; quantity): the number of transactions made by the sender prior to this one.
* `to` (string: data, 20 bytes): an address of the receiver: null when it's a contract creation transaction.
* `transactionIndex` (string; quantity): the transaction index position in the block; null when it's pending.
* `value` (string; quantity): the value transferred in wei.
* `v` (string; quantity): ECDSA recovery ID.
* `r` (string; quantity): ECDSA signature r.
* `s` (string; quantity): ECDSA signature s.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionByBlockNumberAndIndex",
"params": ["0x282E8E", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"result": {
"type": "0x2",
"hash": "0x2867c9de7f388bfffa93340e147602c78091e4fcf39bece0e7025b476ca6f8eb",
"nonce": "0x0",
"blockHash": "0xe01796432573b7895f847e042eb6d924776068cc5e7f5a3f2096f71006ced9a0",
"blockNumber": "0x282e8e",
"transactionIndex": "0x0",
"from": "0x6245581b9e13143269404ea6f2efa7b99eca53ee",
"to": "0x31cac5c91c483a637116934d21565361950e6b7f",
"value": "0x8ac7230489e80000",
"gas": "0x118f90",
"gasPrice": "0x77359400",
"maxFeePerGas": "0x7d2b7500",
"maxPriorityFeePerGas": "0x59682f00",
"input": "0x5ae401dc000000000000000000000000000000000000000000000000000000006751a83f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000104472b43f30000000000000000000000000000000000000000000000008ac7230489e8000000000000000000000000000000000000000000000000000000005f70c277b9dd00000000000000000000000000000000000000000000000000000000000000800000000000000000000000006245581b9e13143269404ea6f2efa7b99eca53ee0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000e26fea44c00802b9cae594974c0a6cbcad5fd8630000000000000000000000009f294c5d5da451e1fa5c2a654cb6d6e394efe2cd000000000000000000000000cda75276918a66d609a55b04570d7b4015a974a000000000000000000000000000000000000000000000000000000000",
"creates": null,
"chainId": "0x924",
"accessList": [],
"yParity": "0x0",
"v": "0x0",
"r": "0xf92ae479d4df56a637835816455621c023aa34a9257928fe4a035ce8a602603a",
"s": "0x33f34f08a51a17f5e3e8cff9fc4fe5bdb9956e6b5c34ad44d10e9be250869119"
},
"id": 1
}
```
---
## `eth_getTransactionReceipt`
> Returns the receipt of a transaction by transaction hash.
The receipt is not available for pending transactions.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): a hash of the transaction.
### Returns
* `object`: a transaction receipt object, or null when no receipt was found:
* `transactionHash` (string; data, 32 bytes): a hash of the transaction.
* `transactionIndex` (string; quantity): the transactions index position in the block.
* `blockHash` (string; data, 32 bytes): a hash of the block containing the transaction.
* `blockNumber` (string; quantity): a number of the block containing the transaction.
* `from` (string; data, 20 bytes): an address of the sender.
* `to` (string; data, 20 bytes): an address of the receiver; null when it's a contract creation transaction.
* `cumulativeGasUsed` (string; quantity): the total amount of gas used when this transaction was executed in the block.
* `effectiveGasPrice` (string; quantity): the sum of the base fee and tip paid per unit of gas.
* `gasUsed` (string; quantity): the amount of gas used by this specific transaction alone.
* `contractAddress` (string; data, 20 bytes): the contract address created, if the transaction was a contract creation, otherwise null.
* `logs` (array): an array of log objects, which this transaction generated.
* `logsBloom` (string; data, 256 bytes): a bloom filter for light clients to quickly retrieve related logs.
* `type` (string; data): the transaction type, `0x00` for legacy transactions, `0x01` for access list types, `0x02` for dynamic fees. It also returns either of the following:
* `root` (string; data, 32 bytes): a post-transaction stateroot (pre Byzantium).
* `status` (string; quantity): either 1 (success) or 0 (failure).
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0x2867c9de7f388bfffa93340e147602c78091e4fcf39bece0e7025b476ca6f8eb"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"result": {
"transactionHash": "0x2867c9de7f388bfffa93340e147602c78091e4fcf39bece0e7025b476ca6f8eb",
"transactionIndex": "0x0",
"blockHash": "0xe01796432573b7895f847e042eb6d924776068cc5e7f5a3f2096f71006ced9a0",
"from": "0x6245581b9e13143269404ea6f2efa7b99eca53ee",
"to": "0x31cac5c91c483a637116934d21565361950e6b7f",
"blockNumber": "0x282e8e",
"cumulativeGasUsed": "0x10e192",
"gasUsed": "0x10e192",
"contractAddress": null,
"logs": [
{
"address": "0xe26fea44c00802b9cae594974c0a6cbcad5fd863",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x00000000000000000000000031cac5c91c483a637116934d21565361950e6b7f"
],
"data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
"blockHash": "0xe01796432573b7895f847e042eb6d924776068cc5e7f5a3f2096f71006ced9a0",
"blockNumber": "0x282e8e",
"transactionHash": "0x2867c9de7f388bfffa93340e147602c78091e4fcf39bece0e7025b476ca6f8eb",
"transactionIndex": "0x0",
"logIndex": "0x0",
"transactionLogIndex": "0x0",
"removed": false
}
],
"logsBloom": "0x00200000000000000000000080000000000000800000000000800000000400000000000000000000000100100000000000000000000000000000000000000000000000000000000000000008000000200000000000000000000000000000000000000004020000000000040000000800000000000000000000000010000000000400000000100000020000000500000000000000000000080000004000000200000000000000000000000000000200000000000000000000000100000200800000000002000000000000008200000040000000000000001000008000000020000000010000000020000008000000000000000000000000000000000001000000",
"status": "0x1",
"effectiveGasPrice": "0x77359400",
"type": "0x2"
},
"id": 1
}
```
---
## `eth_getUncleByBlockHashAndIndex`
> Returns information about an uncle of a block by hash and uncle index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): the hash of a block.
2. `` (quantity): the uncle's index position.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleByBlockHashAndIndex",
"params": ["0x5b827b4e810d61d986706cac9118a93b0de1a588e39cb6f24ca141694b4fc86a", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": null
}
```
---
## `eth_getUncleByBlockNumberAndIndex`
> Returns information about an uncle of a block by number and uncle index position.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
2. `` (quantity): the uncle's index position.
### Returns
* ``: a block object, or null when no block was found:
* `number` (string; quantity): the block number; null when it's a pending block.
* `hash` (string; data, 32 bytes): the hash of the block; null when it's a pending block.
* `parentHash` (string; data, 32 bytes): the hash of the parent block.
* `nonce` (string; data, 8 bytes): the hash of the generated proof-of-work; null when it's a pending block.
* `sha3Uncles` (string; data, 32 bytes): SHA3 of the uncles data in the block.
* `logsBloom` (string; data, 256 bytes): the bloom filter for the logs of the block. null when its pending block.
* `transactionsRoot` (string; data, 32 bytes): the root of the transaction trie of the block.
* `stateRoot` (string; data, 32 bytes): the root of the final state trie of the block.
* `receiptsRoot` (string; data, 32 bytes): the root of the receipts trie of the block.
* `miner` (string; data, 20 bytes): the address of the beneficiary to whom the mining rewards were given.
* `difficulty` (string; quantity): the difficulty for this block.
* `totalDifficulty` (string; quantity): the total difficulty of the chain until this block.
* `extraData` (string; data): the **extra data** field of this block.
* `size` (string; quantity): the size of this block in bytes.
* `gasLimit` (string; quantity): the maximum gas allowed in this block.
* `gasUsed` (string; quantity): the total used gas by all transactions in this block.
* `timestamp` (string; quantity): the unix timestamp for when the block was collated.
* `transactions` (array of strings): an array of transaction objects, or 32 bytes transaction hashes depending on the last given parameter.
* `uncles` (array of strings): an array of uncle hashes.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleByBlockNumberAndIndex",
"params": ["latest", "0x0"],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": null
}
```
---
## `eth_getLogs`
> Returns an array of all logs matching a given filter object.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `object`: the filter options:
* `fromBlock` (string; quantity|tag; optional; default: "latest"): either the _block number_ or one of the following _block tags_:
* `latest`: for the last mined block.
* `earliest`: for the lowest numbered block available on the client.
* `pending`: for not yet mined transactions.
* `toBlock` (string; quantity|tag; optional; default: "latest"): either the _block number_ or one of the following _block tags_:
* `latest`: for the last mined block.
* `earliest`: for the lowest numbered block available on the client.
* `pending`: for not yet mined transactions.
* `address` (array of strings; data, 20 bytes; optional): a contract address or a list of addresses from which logs should originate.
* `topics` (array of strings; data; 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` (string; data, 32 bytes; optional; **future**): with the addition of EIP-234, `blockHash` will be a new filter option which 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.
### Returns
* `removed` (string; tag): `true` when the log was removed, due to a chain reorganization; `false` if it's a valid log.
* `logIndex` (string; quantity): the log index position in the block; null when it's a pending log.
* `transactionIndex` (string; quantity): the transactions index position log was created from; null when it's a pending log.
* `transactionHash` (string; data, 32 bytes): a hash of the transactions this log was created from; null when it's a pending log.
* `blockHash` (string; data, 32 bytes): a hash of the block containing the log; null when it's pending; null when it's a pending log.
* `blockNumber` (string; quantity): the number of the block containing the log; null when it's pending; null when it's a pending log.
* `address` (string; data, 20 bytes): an address from which this log originated.
* `data` (string; data): contains one or more 32 bytes non-indexed arguments of the log.
* `topics` (array of strings; 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 you declared the event with the anonymous specifier.)
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [{"address": "0x956Bdd9606EcFB0c247Ec85C2a2b82104483759c"}],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"result": [],
"id": 1
}
```
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/atleta/web3/
title: Atleta — web3, net, eth (1/3)
source: docs/rpc-service/chains/chains-api/atleta/web3.mdx
---
# Atleta — web3, net, eth (1/3)
> API reference for [Atleta](/rpc-service/chains/chains-api/atleta/). [All methods ->](/rpc-service/chains/chains-api/atleta/#methods)
>
> Part 1 of 3: 1 · [2](/rpc-service/chains/chains-api/atleta/web3-p2/) · [3](/rpc-service/chains/chains-api/atleta/web3-p3/)
## `web3_clientVersion`
> Returns the current client version.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* ``: the current client version.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "web3_clientVersion",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"result": "atleta/v8.1/fc-rpc-2.0.0-dev",
"id": 1
}
```
---
## `web3_sha3`
> Returns Keccak-256 (not the standardized SHA3-256) of the given data.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
* `` (data): the data to convert into a SHA3 hash.
### Returns
* `` (data): the SHA3 result of the given string.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "web3_sha3",
"params": ["0x68656c6c6f20776f726c64"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad"
}
```
---
## `net_version`
> Returns the current network ID.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* ``: the current network ID.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "net_version",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "2340"
}
```
---
## `net_listening`
> Returns `true` if client is actively listening for network connections.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* ``: `true` when listening, otherwise `false`.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "net_listening",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": true
}
```
---
## `eth_protocolVersion`
> Returns the current Ethereum protocol version.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* ``: the current Ethereum protocol version.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_protocolVersion",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": 1
}
```
---
## `eth_syncing`
> Returns an object with data about the sync status or false.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* ``|``: an object with sync status data or `false`, when not syncing:
* `startingBlock` (quantity): the block at which the import started (will only be reset, after the sync reached its head).
* `currentBlock` (quantity): the current block, same as `eth_blockNumber`.
* `highestBlock` (quantity): the estimated highest block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_syncing",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": false
}
```
---
## `eth_gasPrice`
> Returns the current price per gas in wei.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* `` (quantity): the current gas price in wei.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_gasPrice",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1dcd6500"
}
```
---
## `eth_accounts`
> Returns a list of addresses owned by client.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* `` (string; data, 20 bytes): addresses owned by the client.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_accounts",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": []
}
```
---
## `eth_blockNumber`
> Returns the number of most recent block.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
### Returns
* `` (quantity): the current block number the client is on.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x7b182"
}
```
---
## `eth_getBalance`
> Returns the balance of the account specified by address.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 20 bytes): an address to check for balance.
2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the current balance in wei.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xA99E38BCf899411FaC369257bD8971EDdC167e71", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xe1a944018c24f"
}
```
---
## `eth_getStorageAt`
> Returns the value from a storage position at an address specified.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 20 bytes): an address of the storage (hex encoded).
2. `` (quantity): a slot position in the storage (hex encoded unsigned integer).
3. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (data): the value at this storage position.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getStorageAt",
"params": ["0xA99E38BCf899411FaC369257bD8971EDdC167e71", "0x0", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
```
---
## `eth_getTransactionCount`
> Returns the number of transactions sent from an address.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 20 bytes): an address.
2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the number of transactions send from this address.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": ["0x7a7fe466Ce0b09517E8A8B81AfC27e50b259a1Ed", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
---
## `eth_getBlockTransactionCountByHash`
> Returns the number of transactions in a block specified by block hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): a block hash.
### Returns
* `` (quantity): the number of transactions in this block.
### Request example:
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": ["0xe9b008a3de1a934eddbadf9930c4aebb59a809c49b146f23096f91dd85fe6f37"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"result": "0x3",
"id": 1
}
```
---
## `eth_getBlockTransactionCountByNumber`
> Returns the number of transactions in the block specified by number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the number of transactions in this block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": ["latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
---
## `eth_getUncleCountByBlockHash`
> Returns the number of uncles in a block specified by block hash.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 32 bytes): a block hash.
### Returns
* `` (quantity): the number of uncles in this block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockHash",
"params": ["0xe9b008a3de1a934eddbadf9930c4aebb59a809c49b146f23096f91dd85fe6f37"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
---
## `eth_getUncleCountByBlockNumber`
> Returns the number of uncles in a block specified by block number.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (quantity): the number of uncles in this block.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockNumber",
"params": ["0x282EA1"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
```
---
## `eth_getCode`
> Returns code at a given address.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data, 20 bytes): an address to get the code from.
2. `` (quantity|tag): either the hex value of a _block number_ or one of the following _block tags_:
* `earliest`: the lowest numbered block available on the client.
* `finalized`: the most recent crypto-economically secure block; cannot be re-orged outside of manual intervention driven by community coordination.
* `safe`: the most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions.
* `latest`: the most recent block in the canonical chain observed by the client; this block can be re-orged out of the canonical chain even under healthy/normal conditions.
* `pending`: a sample next block built by the client on top of the `latest` and containing the set of transactions usually taken from local mempool. In other words, it is the block that has not been mined yet.
### Returns
* `` (data): the code from the given address.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": ["0x7BFa2D90De2d8a06a63F335543c9967588339d23", "latest"],
"id": 1
}'
```
### Response example
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
```
---
## `eth_sendRawTransaction`
> Creates new message call transaction or a contract creation for signed transactions.
### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
1. `` (data): the signed transaction data.
### Returns
* `` (data, 32 bytes): the transaction hash, or the zero hash if the transaction is not yet available.
Use [eth_getTransactionReceipt](/rpc-service/chains/chains-api/atleta/web3-p3/#eth_gettransactionreceipt) to get the contract address, after the transaction was mined, when you created a contract.
### Request example
```shell
curl -X POST https://rpc.ankr.com/atleta_olympia/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["signed_transaction_data"],
"id": 1
}'
```
### Response example
```json
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x9f8d8f6d5c2baf89407bcd97b7b3d763de98146f5762eae39f18b88b15f1f5da"
}
```
---
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/avail/
title: Avail
description: Avail is a Web3 infrastructure layer that allows modular execution layers to scale and interoperate in a… Available on Ankr RPC with a free demo key.
source: docs/rpc-service/chains/chains-api/avail/index.mdx
---
# Avail
> Avail API is available on [Web3 API platform](https://www.ankr.com/rpc/avail).
*Avail* is a Web3 infrastructure layer that allows modular execution layers to scale and interoperate in a trust-minimized way.
Avail's mission is to streamline the rollup experience, offering a unified, efficient platform for both users and developers from any ecosystem. This vertically integrated stack aims to dissolve the growing pains and user fragmentation experienced today, enabling Rollups to seamlessly access users and liquidity across the entire blockchain landscape.
The Turing Testnet is live and marks Avail's final and definitive pre-Mainnet testing environment, aimed at vetting Mainnet deployments, executing extensive stress tests, and assessing network topologies for scalability and resilience.
In order for your Web3 application to interact with Avail — either by reading blockchain data or sending transactions to the network — it must connect to an Avail node. Developers interact with the blockchain using the methods provided by the API.
The API interaction follows the [JSON-RPC](https://www.jsonrpc.org/specification) which is a stateless, light-weight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in other message-passing environments. It uses JSON (RFC 4627) as data format.
---
## Methods
### Methods supported
- [`chain_getBlock`](/rpc-service/chains/chains-api/avail/methods-supported/#chain_getblock)
- [`chain_getBlockHash`](/rpc-service/chains/chains-api/avail/methods-supported/#chain_getblockhash)
- [`chain_getHeader`](/rpc-service/chains/chains-api/avail/methods-supported/#chain_getheader)
- [`chain_getFinalizedHead`](/rpc-service/chains/chains-api/avail/methods-supported/#chain_getfinalizedhead)
- [`state_getStorage`](/rpc-service/chains/chains-api/avail/methods-supported/#state_getstorage)
- [`state_getStorageHash`](/rpc-service/chains/chains-api/avail/methods-supported/#state_getstoragehash)
- [`state_getStorageSize`](/rpc-service/chains/chains-api/avail/methods-supported/#state_getstoragesize)
- [`grandpa_proveFinality`](/rpc-service/chains/chains-api/avail/methods-supported/#grandpa_provefinality)
- [`grandpa_roundState`](/rpc-service/chains/chains-api/avail/methods-supported/#grandpa_roundstate)
- [`system_chain`](/rpc-service/chains/chains-api/avail/methods-supported/#system_chain)
- [`system_chainType`](/rpc-service/chains/chains-api/avail/methods-supported/#system_chaintype)
---
url: https://www.ankr.com/docs/rpc-service/chains/chains-api/avail/methods-supported/
title: Avail — Methods supported
source: docs/rpc-service/chains/chains-api/avail/methods-supported.mdx
---
# Avail — Methods supported
> API reference for [Avail](/rpc-service/chains/chains-api/avail/). [All methods ->](/rpc-service/chains/chains-api/avail/#methods)
## Methods supported
* [`chain_getBlock`](#chain_getblock) — retrieves the header and body of a relay chain block.
* [`chain_getBlockHash`](#chain_getblockhash) — retrieves the block hash for a specific block.
* [`chain_getHeader`](#chain_getheader) — retrieves the header for a specific block.
* [`chain_getFinalizedHead`](#chain_getfinalizedhead) — retrieves the hash of the last finalized block in the canon chain.
* [`state_getStorage`](#state_getstorage) — retrieves the storage for a key.
* [`state_getStorageHash`](#state_getstoragehash) — retrieves the storage hash.
* [`state_getStorageSize`](#state_getstoragesize) — retrieves the storage size.
* [`grandpa_proveFinality`](#grandpa_provefinality) — proves finality for the given block number, returning the Justification for the last block in the set.
* [`grandpa_roundState`](#grandpa_roundstate) — returns the state of the current best round state as well as the ongoing background rounds.
* [`system_chain`](#system_chain) — retrieves the chain.
* [`system_chainType`](#system_chaintype) — retrieves the chain type.
---
### `chain_getBlock`
> Retrieves the header and body of a relay chain block.
#### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
* `` (data; 32 byte; optional): a hash of the block to retrieve; if omitted, retrieves the latest finalized block.
#### Returns
* `SignedBlock`: the header and body data of a relay chain block.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/avail_turing_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "chain_getBlock",
"params": []
}'
```
#### Response example
```json
{
"jsonrpc": "2.0",
"result": {
"block": {
"header": {
"parentHash": "0x32d67a9e5843dd8527bf0e2ec1f4c6d2f8642ef264348ef7d610575619a5b6e8",
"number": "0x49993",
"stateRoot": "0x7d0860d48e20e42886aeac479dd339d1f75387d3be844a490ca1734efd430213",
"extrinsicsRoot": "0x07d2cb3154a4bc3ff485d0101bb1cba8045bf1bd74a34a977cc2672a41e76596",
"digest": {
"logs": [
"0x0642414245b5010359000000757a1e0500000000841bf8fb61a548ec94caba8ddedcf85e02de0110990ffe3c4216277ee0b9734a9b966b69d9025691e82043d9a647ce917871b1b2d2082afc3ce3b195c96e1c039b2e312d9028cf976284d61c41f1069b1df154b5e6b6bef9ad4455dd24ea160d",
"0x05424142450101c2be2a753a256b1261e00d5d31a20befa735767d5debe27edfff52149e4ce53398135479d97a0e594a2160cf78b3743ca42899138b0c5b58334bc7c4d0217080"
]
},
"extension": {
"V3": {
"appLookup": {
"size": 114,
"index": [
{
"appId": 36,
"start": 0
}
]
},
"commitment": {
"rows": 1,
"cols": 128,
"commitment": [
128,
27,
216,
161
],
"dataRoot": "0x67e432157400275ba4e6e7c9d61312afa5cbbea68d8b718fa8be3038980a9970"
}
}
}
},
"extrinsics": [
"0x280403000ba0f41eed8f01",
"0xc90384007ce8ccf46bbdf7561f0d1419857dab91bfbda9866d564c2c5cfe43210a75db310122850737c933478016ee92ddcbd1eda470ead30b6a7938adba396b9e51922949b1bba1bf56ca8bd67f2241b1240fa1f2bd18f07b42111fe70f9f386b78f66f87040162760100000001020c0603004e558a63713b227cb661a5cb639c5bea499bd00039d7dabe16cb891e8fc2025213000064a7b3b6e00d06030006aa84733a1b39c3cc83586e589fd6bb82228321e1f75d4e2bc3af8d4957785213000064a7b3b6e00d0603003a1e5289c81ff9dfd53cf55e64aaaee9aeb31e5ae43c9679de15a841b406521d13000064a7b3b6e00d"
]
},
"justifications": null
},
"id": 1
}
```
---
### `chain_getBlockHash`
> Retrieves the block hash for a specific block.
#### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
`` (string; hex; optional): the number of a block to retrieve the hash for; if omitted, retrieves the latest finalized block.
#### Returns
* ``: the block hash of the block specified.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/avail_turing_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "chain_getBlockHash",
"params": ["0x499A4"]
}'
```
#### Response example
```json
{
"jsonrpc": "2.0",
"result": "0xfe9e859407f0ceb39140690d34a12e2ff34fef0e38fda83ecf3474d31a1a3526",
"id": 1
}
```
---
### `chain_getHeader`
> Retrieves the header for a specific block.
#### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
* `` (data; 32 byte; optional): a hash of the block to retrieve the header for; if omitted, shows the result for the latest finalized block.
#### Returns
* ``: the header of the block specified.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/avail_turing_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "chain_getHeader",
"params": ["0x1d8ec46e226db5453ab546efb873e7a2bf611aded65818b68206747c646bd478"]
}'
```
#### Response example
```json
{
"jsonrpc": "2.0",
"result": {
"parentHash": "0x23c72818d0462766e69f90895ce47b6251eca7112ca2be56e2efe56c9546f5b9",
"number": "0x499b7",
"stateRoot": "0xa31b41414cba3ecd32dbf23cf1541c9105de308d396b76e840635076c5dedd95",
"extrinsicsRoot": "0xb3fea001c50633dcbcb8304486061c433e5e33d32f3d21759368228e58defadd",
"digest": {
"logs": [
"0x0642414245b5010337000000997a1e050000000078c42af8d5e7733c9aff7cd090c873a89892c101276b7dc96e1610ceca285a3d35133d72233df237ac7aa399c25c4d88b2a58835d93dc903919722ac312e4900ab66b214730d7280a9b9dbb4ef020efa785ef444d6477f9e34b7d295ddd6fb0a",
"0x05424142450101ea438e2f3314fc10aba33b53aa79b4a75ba89131d9a847b96eb70c0bf70bbb6bc4720a57f973833c02f8dd3f0f7596ca83e76af9f9933b3ea33f14c2e84e8781"
]
},
"extension": {
"V3": {
"appLookup": {
"size": 0,
"index": []
},
"commitment": {
"rows": 0,
"cols": 0,
"commitment": [],
"dataRoot": "0xad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5"
}
}
}
},
"id": 1
}
```
---
### `chain_getFinalizedHead`
> Retrieves the hash of the last finalized block in the canon chain.
#### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required): none.
#### Returns
* ``: the hash of the last finalized block in the canon chain.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/avail_turing_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "chain_getFinalizedHead",
"params": []
}'
```
#### Response example
```json
{
"jsonrpc": "2.0",
"result": "0x7021a6a7aa0d6db341684d0969b1a31248d7568596a7028f0d7f490d9b7990ed",
"id": 1
}
```
---
### `state_getStorage`
> Retrieves the storage for a key.
#### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
* `` (string; hex ; required): the key to retrieve the storage for.
* `` (data; 32 byte; optional): a hash of the block.
#### Returns
* ``: the storage data.
#### Request example
```shell
curl -X POST https://rpc.ankr.com/avail_turing_testnet/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "state_getStorage",
"params": ["0xf0c365c3cf59d671eb72da0e7a4113c49f1f0515f462cdcf84e0f1d6045dfcbb"]
}'
```
#### Response example
```json
{
"jsonrpc": "2.0",
"result": "0xc1772bed8f010000",
"id": 1
}
```
---
### `state_getStorageHash`
> Retrieves the storage hash.
#### Parameters
* `id` (integer; required): a request ID (example: 1).
* `jsonrpc` (string; required): a JSON RPC spec used (example: 2.0).
* `method` (string; required): a method used for the request.
* `params` (array; required):
* `` (string; hex; required): a storage key.
* `` (data; 32 byte; optional): a hash of the block.
#### Returns
* `