# Table of Contents
- [Getting an API key | Abscan](#getting-an-api-key-abscan)
- [Creating an Account | Abscan](#creating-an-account-abscan)
- [Stats | Abscan](#stats-abscan)
- [Rate Limits | Abscan](#rate-limits-abscan)
- [Transactions | Abscan](#transactions-abscan)
- [FAQ | Abscan](#faq-abscan)
- [Endpoint URLs | Abscan](#endpoint-urls-abscan)
- [Introduction | Abscan](#introduction-abscan)
- [Blocks | Abscan](#blocks-abscan)
- [Tokens | Abscan](#tokens-abscan)
- [Sepolia Testnet | Abscan](#sepolia-testnet-abscan)
- [Stats | Abscan](#stats-abscan)
- [Getting Help | Abscan](#getting-help-abscan)
- [Geth/Parity Proxy | Abscan](#geth-parity-proxy-abscan)
- [Accounts | Abscan](#accounts-abscan)
- [Logs | Abscan](#logs-abscan)
- [Blocks | Abscan](#blocks-abscan)
- [Accounts | Abscan](#accounts-abscan)
- [Common Error Messages | Abscan](#common-error-messages-abscan)
- [Logs | Abscan](#logs-abscan)
- [Tokens | Abscan](#tokens-abscan)
- [Transactions | Abscan](#transactions-abscan)
- [Contracts | Abscan](#contracts-abscan)
- [Contracts | Abscan](#contracts-abscan)
---
# Getting an API key | Abscan
A valid API Key is required for all queries, [**let us know**](https://docs.etherscan.io/support/getting-help)
if you run into any issues ✅
[](#creating-an-api-key)
Creating an API Key
-------------------------------------------------
From your [**Account Dashboard**](https://abscan.org/myaccount)
, click on the navigation tab labelled 🗝️ **API-KEYs**
From there, you may click on **Add** to create a new key and give a name to your project. Each Abscan account is limited to creating **3 keys** at any one time.
The same keys can be used for testnet explorers 🏗️ .
[](#editing-an-api-key)
Editing an API Key
-----------------------------------------------
To change your **project name** associated with an API Key, click on **Edit** to specify a new App Name, and save the changes.
If you would like to **delete an API Key** or suspect your key has been compromised, you may click on **Remove** to delete that key and generate a new one.
[PreviousCreating an Account](/getting-started/creating-an-account)
[NextEndpoint URLs](/getting-started/endpoint-urls)
Last updated 2 months ago
---
# Creating an Account | Abscan
Having an Abscan account allows you to use **sign-in only** features and tools such as Address Watch List, Txn Private Notes, Token Ignore List and APIs.
Note that creating an **Abscan account** is only linked to Abscan's block explorer services, it is not the same as creating an [**Ethereum address**](https://info.etherscan.com/what-is-an-ethereum-address/)
💡.
[](#id-1.-register-an-account)
1\. Register an Account
-----------------------------------------------------------
Head over to the [**Account Registration**](https://abscan.org/register)
page and provide a username, email and password for your account.
You may **opt-in** for our monthly newsletter 📰 to receive updates on the latest features, analyses, trending topics, giveaways 🎁 and more!
[](#id-2.-verify-your-email)
2\. Verify Your Email
-------------------------------------------------------
A confirmation link 🔗 will be sent to your email address to verify your sign up request.
Once you've clicked on the link, your account set-up process is complete and you may [**sign in**](https://abscan.org/login)
to use your account-specific features ! 🎉
[](#id-3.-using-your-account)
3\. Using Your Account
---------------------------------------------------------
Upon signing in, you will have access to your **account dashboard** where you can make full use of Abscan's features such as generating API keys 🔑 , hide unwanted tokens and add private notes.
[PreviousIntroduction](/)
[NextGetting an API key](/getting-started/viewing-api-usage-statistics)
Last updated 2 months ago
---
# Stats | Abscan
[PreviousTokens](/api-endpoints/tokens)
[NextFAQ](/support/faq)
Last updated 2 months ago
Endpoints with are under the API Pro subscription. To upgrade your API plan, kindly visit [**Abscan API Pro**](https://abscan.org/apis)
**.**
[](#get-total-supply-of-ether)
Get Total Supply of Ether
-------------------------------------------------------------
Returns the current amount of Ether in circulation excluding ETH2 Staking rewards and EIP1559 burnt fees.
Copy
https://api.abscan.org/api
?module=stats
&action=ethsupply
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=stats&action=ethsupply&apikey=YourApiKeyToken)
> 🔗
RequestResponse
No parameters required.
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":"116487067186500000000000000"
}
📖 **Tip :** Easily convert Ethereum units using our [**unit converter.**](https://abscan.org/unitconverter)
[](#get-ether-last-price)
Get Ether Last Price
---------------------------------------------------
Returns the latest price of 1 ETH.
Copy
https://api.abscan.org/api
?module=stats
&action=ethprice
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=stats&action=ethprice&apikey=YourApiKeyToken)
> 🔗
RequestResponse
No parameters required.
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":{
"ethbtc":"0.06116",
"ethbtc_timestamp":"1624961308",
"ethusd":"2149.18",
"ethusd_timestamp":"1624961308"
}
}
⏳ **Tip :** The `timestamps` are represented in [**Unix timestamp.**](https://www.unixtimestamp.com/)

---
# Rate Limits | Abscan
Reference for various API tiers and their rate limits 🚧 .
All keys created share the same **combined limit** 🥧
API Tier
Rate Limit
Free
5 calls/second , up to 100,000 calls/day
Standard
10 calls/second , up to 200,000 calls/day
Advanced
20 calls/second , up to 500,000 calls/day
Professional
30 calls/second , up to 1,000,000 calls/day
Dedicated
[**Contact Us**](mailto:apisupport@etherscan.io)
[PreviousFAQ](/support/faq)
[NextCommon Error Messages](/support/common-error-messages)
---
# Transactions | Abscan
[](#check-contract-execution-status)
Check Contract Execution Status
-------------------------------------------------------------------------
Returns the status code of a contract execution.
Copy
https://api.abscan.org/api
?module=transaction
&action=getstatus
&txhash=0xe85d44420eead951aeae2b12740367c15c0ccfe5c90447edb4f41e9b5f9d0a64
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=transaction&action=getstatus&txhash=0xe85d44420eead951aeae2b12740367c15c0ccfe5c90447edb4f41e9b5f9d0a64&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
txhash
the `string` representing the transaction hash to check the execution status
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": {
"isError": "0",
"errDescription": ""
}
}
📖 **Tip:** The `isError` field returns `0` for **successful transactions** and `1` for **failed transactions.**
[](#check-transaction-receipt-status)
Check Transaction Receipt Status
---------------------------------------------------------------------------
Returns the status code of a transaction execution.
📝 **Note:** Only applicable for post [**Byzantium Fork**](https://www.investopedia.com/news/what-byzantium-hard-fork-ethereum/)
transactions.
Copy
https://api.abscan.org/api
?module=transaction
&action=gettxreceiptstatus
&txhash=0xe85d44420eead951aeae2b12740367c15c0ccfe5c90447edb4f41e9b5f9d0a64
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=transaction&action=gettxreceiptstatus&txhash=0xe85d44420eead951aeae2b12740367c15c0ccfe5c90447edb4f41e9b5f9d0a64&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
txhash
the `string` representing the transaction hash to check the execution status
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":{
"status":"1"
}
}
📖 **Tip:** The `status` field returns `0` for **failed transactions** and `1` for **successful transactions.**
[PreviousContracts](/api-endpoints/contracts)
[NextBlocks](/api-endpoints/blocks)
Last updated 2 months ago
---
# FAQ | Abscan
[PreviousStats](/api-endpoints/stats-1)
[NextRate Limits](/support/rate-limits)
Last updated 3 months ago
[](#can-the-same-api-keys-be-used-across-different-explorers)
Can the same API keys be used across different explorers?
----------------------------------------------------------------------------------------------------------------------------
Every block explorer built by Abscan ( eg. BscScan, PolygonScan, HecoInfo ) requires a different account to be created and hence a different set of API keys 🗝️ .
[](#which-networks-are-api-pro-endpoints-applicable-to)
Which networks are API PRO endpoints applicable to?
----------------------------------------------------------------------------------------------------------------
The additional endpoints available under any API PRO subscription are only available to the **Ethereum mainnet**, and not supported on testnets.
[](#my-api-keys-are-not-working-what-can-i-do)
My API keys are not working, what can I do?
-----------------------------------------------------------------------------------------------
Newly generated keys may take a moment to fully activate, please retry this in a moment! ✨
If the issue still persists after a few minutes or with a previously working key, do [**reach out**](/support/getting-help)
for us to have a closer look.

---
# Endpoint URLs | Abscan
[PreviousGetting an API key](/getting-started/viewing-api-usage-statistics)
[NextAccounts](/api-endpoints/accounts)
Last updated 29 days ago
An API key generated on Abscan can be used across all **mainnet** and **testnet** explorers.
Similarly, all endpoints and parameter formatting remain the same across testnet explorers, you are only required to change the relevant API endpoint URL as follows.
Network
URL
Documentation
Mainnet
[https://api.abscan.org/api](https://api.abscan.org/api)
[https://docs.abscan.org/](https://docs.abscan.org/)
Testnet
[https://api-testnet.abscan.org/api](https://api-testnet.abscan.org/api)
[https://docs.abscan.org/testnet-abscan](https://docs.abscan.org/testnet-abscan)

---
# Introduction | Abscan
[NextCreating an Account](/getting-started/creating-an-account)
Last updated 10 days ago
Abscan is the leading blockchain explorer, search, API and analytics platform for Abstract, a Layer 2 (L2) network built on top of Ethereum, a decentralized smart contracts platform.
As a means to provide equitable access to blockchain data, we've developed the **Abscan Developer APIs** to empower developers with direct access to Abscan's block explorer data and services via **GET/POST requests.**
Abscan's APIs are provided as a **community service** and **without warranty**, so please use what you need and no more.
**Source attribution** via a backlink or a mention that your app is **"Powered by Abscan.io APIs"** is required except for personal/private usage.
[](#api-endpoints)
API Endpoints
-------------------------------------
> Your app may need to show _a user's ERC-20 token holdings_ and their USD value 💰 , check if a transaction has been mined ⛏️ or _get the latest gas price estimates_ ⛽ _._
For that you may find a suitable endpoint from our wide range of APIs that you can simply query to provide data while you remain fully focused on building your applications.
Abscan offers 2 types of API plans, a set of free **community endpoints** and [**API PRO**](https://etherscan.io/apis)
which consists of additional derived blockchain data via Etherscan V2
**Note :** All Free API endpoint returns a maximum of **1000 records/call** only.
[](#tutorials)
Tutorials
-----------------------------
> There is an overwhelming amount of data 📈 that can be extracted from the Ethereum blockchain.
We've helped you take the first steps by writing some thorough tutorials on how to query and derive popular blockchain metrics.
For power users, we've also added guides such as how you can _programmatically verify contracts_ through API calls and more advanced use cases of endpoints.
[](#support-and-faq)
Support & FAQ
---------------------------------------
Our curated list of **support articles** and **common questions** you may have on topics such as _rate limits_ 🚧 , _common error messages_ ⛔ and API key usage _across different networks_ 🌏
If your issue is a unique one or you need more clarification, feel free to reach out to us via our [**support channels.**](/support/getting-help)


---
# Blocks | Abscan
[PreviousTransactions](/api-endpoints/stats)
[NextLogs](/api-endpoints/logs)
Last updated 2 months ago
Endpoints with are under the API Pro subscription. To upgrade your API plan, browse through the [**Abscan APIs**](https://abscan.org/apis)
page.
[](#get-block-and-uncle-rewards-by-blockno)
Get Block And Uncle Rewards by BlockNo
---------------------------------------------------------------------------------------
Returns the block reward and 'Uncle' block rewards.
Copy
https://api.abscan.org/api
?module=block
&action=getblockreward
&blockno=3
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=block&action=getblockreward&blockno=3&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
blockno
the `integer` block number to check block rewards for eg. [`12697906`](https://abscan.org/block/12697906)
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": {
"blockNumber": "3",
"timeStamp": "1730292322",
"blockMiner": "0x0000000000000000000000000000000000000000",
"blockReward": "98359830010332",
"uncles": [],
"uncleInclusionReward": "0"
}
}
⏳ **Tip :** The `timestamp` field is denoted in [**Unix timestamp.**](https://www.unixtimestamp.com/)
[](#get-estimated-block-countdown-time-by-blockno)
Get Estimated Block Countdown Time by BlockNo
-----------------------------------------------------------------------------------------------------
Returns the estimated time remaining, in seconds, until a certain block is mined.
Copy
https://api.abscan.org/api
?module=block
&action=getblockcountdown
&blockno=1000
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=block&action=getblockcountdown&blockno=1000&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
blockno
the `integer` block number to estimate time remaining to be mined eg. [`12697906`](https://abscan.org/block/12697906)
Sample Response
Copy
{
"status": "0",
"message": "NOTOK",
"result": "Error! Block number already pass"
}
[](#get-block-number-by-timestamp)
Get Block Number by Timestamp
---------------------------------------------------------------------
Returns the block number that was mined at a certain timestamp.
Copy
https://api.abscan.org/api
?module=block
&action=getblocknobytime
×tamp=1733382101
&closest=before
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=block&action=getblocknobytime×tamp=1733382101&closest=before&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
timestamp
the `integer` representing the Unix timestamp in **seconds**.
closest
the closest available block to the provided timestamp, either `before` or `after`
⏳ **Tip :** Convert a regular date-time to a [**Unix timestamp.**](https://www.unixtimestamp.com/)
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": "37312"
}

---
# Tokens | Abscan
[PreviousGeth/Parity Proxy](/api-endpoints/geth-parity-proxy)
[NextStats](/api-endpoints/stats-1)
Last updated 2 months ago
Endpoints with are under the API Pro subscription. To upgrade your API plan, browse through the [**Abscan APIs**](https://abscan.org/apis)
page.
[](#get-erc20-token-totalsupply-by-contractaddress)
Get ERC20-Token TotalSupply by ContractAddress
-------------------------------------------------------------------------------------------------------
Returns the current amount of an ERC-20 token in circulation.
Copy
https://api.abscan.org/api
?module=stats
&action=tokensupply
&contractaddress=0x000000000000000000000000000000000000800A
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=stats&action=tokensupply&contractaddress=0x57d90b64a1a57749b0f932f1a3395792e12e7055&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
contractaddress
the `contract address` of the ERC-20 token
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":"21265524714464"
}
📈 **Tip** : The `result` is returned in the token's **smallest decimal representation.**
Eg. a token with a balance of `215.241526476136819398` and 18 decimal places will be returned as `215241526476136819398`
[](#get-erc20-token-account-balance-for-tokencontractaddress)
Get ERC20-Token Account Balance for TokenContractAddress
---------------------------------------------------------------------------------------------------------------------------
Returns the current balance of an ERC-20 token of an address.
Copy
https://api.abscan.org/api
?module=account
&action=tokenbalance
&contractaddress=0x000000000000000000000000000000000000800A
&address=0xf70da97812CB96acDF810712Aa562db8dfA3dbEF
&tag=latest
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=account&action=tokenbalance&contractaddress=0x57d90b64a1a57749b0f932f1a3395792e12e7055&address=0xe04f27eb70e025b78871a2ad7eabe85e61212761&tag=latest&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
contractaddress
the `contract address` of the ERC-20 token
address
the `string` representing the address to check for token balance
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":"135499"
}
📈 **Tip** : The `result` is returned in the token's **smallest decimal representation.**
Eg. a token with a balance of `215.241526476136819398` and 18 decimal places will be returned as `215241526476136819398`

---
# Sepolia Testnet | Abscan
[NextAccounts](/testnet-abscan/api-endpoints/accounts)
Last updated 1 month ago
An API key generated on Abscan can be used across all **mainnet** and **testnet** explorers.
Similarly, all endpoints and parameter formatting remain the same across testnet explorers, you are only required to change the relevant API endpoint URL as follows.
Network
URL
Documentation
Sepolia
[https://api-sepolia.abscan.org/api](https://api-sepolia.abscan.org/api)
[https://docs.abscan.org/testnet-abscan/](https://docs.abscan.org/testnet-abscan/)
**Source attribution** via a backlink or a mention that your app is **"Powered by Abscan APIs"** is required except for personal/private usage.

---
# Stats | Abscan
[](#get-total-supply-of-ether)
Get Total Supply of Ether
-------------------------------------------------------------
Returns the current amount of Ether in circulation.
Copy
https://api-sepolia.abscan.org/api
?module=stats
&action=ethsupply
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=stats&action=ethsupply&apikey=YourApiKeyToken)
> 🔗
RequestResponse
No parameters required.
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":"77523186686500000000000000"
}
📖 **Tip** : Easily convert Ethereum units using our [**unit converter.**](https://sepolia.abscan.org/unitconverter)
[](#get-ether-last-price)
Get Ether Last Price
---------------------------------------------------
Returns the latest price of 1 ETH.
Copy
https://api-sepolia.abscan.org/api
?module=stats
&action=ethprice
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=stats&action=ethprice&apikey=YourApiKeyToken)
> 🔗
RequestResponse
No parameters required.
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":{
"ethbtc":"0.06906",
"ethbtc_timestamp":"1652444393",
"ethusd":"2110.63",
"ethusd_timestamp":"1652444395"
}
}
⏳ **Tip :** The `timestamps` are represented in [**Unix timestamp.**](https://www.unixtimestamp.com)
[PreviousTokens](/testnet-abscan/api-endpoints/tokens)
Last updated 1 month ago
---
# Getting Help | Abscan
[PreviousCommon Error Messages](/support/common-error-messages)
Last updated 3 months ago
Beware of **phishing attempts** and emails **impersonating the team** at Abscan Take note of our official support and communication channels as below.
[](#general-support-tickets)
General Support Tickets
---------------------------------------------------------
The best way to reach out to us regarding general inquiries, advertising, updating token information, and API technical support.
Keep in mind that as a block explorer service, we **cannot cancel, refund or reverse transactions** as we do not process them.
If your issues are related to transactions, you may find helpful articles over at the [**Abscan Information Center.**](https://info.etherscan.com/)
> Reach out to us via a [**support ticket.**](https://abscan.org/contactus)
[](#twitter)
Twitter
-------------------------
For general updates, new feature releases and community support, keep in touch with us via Twitter.
> Follow us on [**Twitter.**](https://twitter.com/etherscan)
[](#freshstatus)
Freshstatus
---------------------------------
Announcements for ongoing and scheduled maintenance works that may affect certain services used.
> Check Abscan's [**network status.**](https://etherscan.freshstatus.io/)




---
# Geth/Parity Proxy | Abscan
For the full documentation of available parameters and descriptions, please visit the official [**Ethereum JSON-RPC**](https://eth.wiki/json-rpc/API)
docs.
For compatibility with **Parity**, please prefix all hex strings with " **0x** ".
[](#eth_blocknumber)
**eth\_blockNumber**
----------------------------------------------
Returns the number of most recent block
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_blockNumber
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_blockNumber&apikey=YourApiKeyToken)
> 🔗
RequestResponse
No parameters required.
Sample response
Copy
{
"jsonrpc":"2.0",
"id":83,
"result":"0xc36b29"
}
[](#eth_getblockbynumber)
**eth\_getBlockByNumber**
--------------------------------------------------------
Returns information about a block by block number.
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_getBlockByNumber
&tag=0x10
&boolean=true
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_getBlockByNumber&tag=0x10&boolean=true&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
tag
the block number, in hex eg. `0xC36B3C`
boolean
the `boolean` value to show full transaction objects.
when `true`, returns **full transaction objects** and their information, when `false` only returns a **list of transactions.**
Sample response
Copy
{
"jsonrpc": "2.0",
"result": {
"hash": "0x6c0fe6371e2848b5480ce9559bda133c339e0a7e13cc1d2c698b29846ba7a3aa",
"parentHash": "0x3c6474c3c5df55b6c77199fd8740b70067367dfd4f32abab3fdd408b9d76c341",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"miner": "0x0000000000000000000000000000000000000000",
"stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"receiptsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"number": "0x10",
"l1BatchNumber": "0x2",
"gasUsed": "0x14b29",
"gasLimit": "0x4000000000000",
"baseFeePerGas": "0x2b275d0",
"extraData": "0x",
"logsBloom": "0x00000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000008000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000014000000000000000000000080000004000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000002008000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000",
"timestamp": "0x67227508",
"l1BatchTimestamp": "0x67222a62",
"difficulty": "0x0",
"totalDifficulty": "0x0",
"sealFields": [],
"uncles": [],
"transactions": [\
{\
"hash": "0xa9e785f87727fe76f77b07c8f22b39521ecdbadd93f097c7fa40a2aacf8266bb",\
"nonce": "0x7",\
"blockHash": "0x6c0fe6371e2848b5480ce9559bda133c339e0a7e13cc1d2c698b29846ba7a3aa",\
"blockNumber": "0x10",\
"transactionIndex": "0x0",\
"from": "0xe85b66fca403bc35bcae17ce7758e942aea65dc0",\
"to": "0xe85b66fca403bc35bcae17ce7758e942aea65dc0",\
"value": "0x1",\
"gasPrice": "0x2b275d0",\
"gas": "0x38019",\
"input": "0x",\
"v": "0x158e",\
"r": "0xb7ecdadcb403daac7bc4506ceb0ba09efe36c51c1e811ccf310b0a8fa6ae2052",\
"s": "0x6c6e3710f592addcad345e478abd802fcea182198087fc6f4eb9a0371fca9a76",\
"type": "0x0",\
"maxFeePerGas": "0x2b275d0",\
"maxPriorityFeePerGas": "0x2b275d0",\
"chainId": "0xab5",\
"l1BatchNumber": "0x2",\
"l1BatchTxIndex": "0xd"\
}\
],
"size": "0x0",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000"
},
"id": 1
}
[](#eth_getblocktransactioncountbynumber)
**eth\_getBlockTransactionCountByNumber**
----------------------------------------------------------------------------------------
Returns the number of transactions in a block.
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_getBlockTransactionCountByNumber
&tag=0x10FB78
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_getBlockTransactionCountByNumber&tag=0x10FB78&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
tag
the block number, in hex eg. `0x10FB78`
Sample response
Copy
{
"jsonrpc":"2.0",
"id":1,
"result":"0x3"
}
[](#eth_gettransactionbyhash)
**eth\_getTransactionByHash**
----------------------------------------------------------------
Returns the information about a transaction requested by transaction hash.
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_getTransactionByHash
&txhash=0xab6b5e7ad34d78aa03d82de4cbb7dea86fad2c80a017dfc6bc1a43511439994e
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_getTransactionByHash&txhash=0xab6b5e7ad34d78aa03d82de4cbb7dea86fad2c80a017dfc6bc1a43511439994e&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
txhash
the `string` representing the hash of the transaction
Sample Response
Copy
{
"jsonrpc": "2.0",
"result": {
"hash": "0xab6b5e7ad34d78aa03d82de4cbb7dea86fad2c80a017dfc6bc1a43511439994e",
"nonce": "0xeac5",
"blockHash": "0x0f2ee6a77e68254d4383fa63a0b48f5b26a7771b6bc1a0669a9d5a1ec3662384",
"blockNumber": "0x91ba",
"transactionIndex": "0x0",
"from": "0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",
"to": "0xd07671b9c43f6c93020062d3fcb18263c7d6e686",
"value": "0x0",
"gasPrice": "0x33c8d60",
"gas": "0x3b5a6",
"input": "0x3161b7f60000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000a8000000000000000000000000000000000000000013920619cf2485d7b1f0a74f00000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000010",
"v": "0x158e",
"r": "0xf3b6308528c9b8fbe18e8efb0618d82db527ec9b414cc5eca99f1721bccc8380",
"s": "0x543d9b65ffe15d3026bf60d85fc433c305c39308b5b2974e3b1d547406863167",
"type": "0x0",
"maxFeePerGas": "0x33c8d60",
"maxPriorityFeePerGas": "0x33c8d60",
"chainId": "0xab5"
},
"id": 1
}
[](#eth_gettransactionbyblocknumberandindex)
**eth\_getTransactionByBlockNumberAndIndex**
----------------------------------------------------------------------------------------------
Returns information about a transaction by block number and transaction index position.
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_getTransactionByBlockNumberAndIndex
&tag=0x10
&index=0x0
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_getTransactionByBlockNumberAndIndex&tag=0x10&index=0x0&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
tag
the block number, in hex eg. `0x10FB78`
index
the position of the uncle's index in the block, in hex eg. `0x0`
Sample Response
Copy
{
"jsonrpc": "2.0",
"result": {
"hash": "0xa9e785f87727fe76f77b07c8f22b39521ecdbadd93f097c7fa40a2aacf8266bb",
"nonce": "0x7",
"blockHash": "0x6c0fe6371e2848b5480ce9559bda133c339e0a7e13cc1d2c698b29846ba7a3aa",
"blockNumber": "0x10",
"transactionIndex": "0x0",
"from": "0xe85b66fca403bc35bcae17ce7758e942aea65dc0",
"to": "0xe85b66fca403bc35bcae17ce7758e942aea65dc0",
"value": "0x1",
"gasPrice": "0x2b275d0",
"gas": "0x38019",
"input": "0x",
"v": "0x158e",
"r": "0xb7ecdadcb403daac7bc4506ceb0ba09efe36c51c1e811ccf310b0a8fa6ae2052",
"s": "0x6c6e3710f592addcad345e478abd802fcea182198087fc6f4eb9a0371fca9a76",
"type": "0x0",
"maxFeePerGas": "0x2b275d0",
"maxPriorityFeePerGas": "0x2b275d0",
"chainId": "0xab5",
"l1BatchNumber": "0x2",
"l1BatchTxIndex": "0xd"
},
"id": 1
}
[](#eth_gettransactioncount)
**eth\_getTransactionCount**
--------------------------------------------------------------
Returns the number of transactions performed by an address.
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_getTransactionCount
&address=0xe85b66fca403bc35bcae17ce7758e942aea65dc0
&tag=latest
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_getTransactionCount&address=0xe85b66fca403bc35bcae17ce7758e942aea65dc0&tag=latest&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to get transaction count
tag
the `string` pre-defined block parameter, either `earliest`, `pending` or `latest`
Sample Response
Copy
{
"jsonrpc":"2.0",
"id":1,
"result":"0x27f2"
}
[](#eth_sendrawtransaction)
**eth\_sendRawTransaction**
------------------------------------------------------------
Submits a pre-signed transaction for broadcast to the Ethereum network.
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_sendRawTransaction
&hex=0xf904808000831cfde080
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_sendRawTransaction&hex=0xf904808000831cfde080&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
hex
the `string` representing the signed raw transaction data to broadcast.
💡 **Tip:** Send a **POST** request if your hex string is particularly long.
🖋️ For more information on creating a **signed raw transaction**, visit this [**page.**](/tutorials/signing-raw-transactions)
Sample Response
Copy
{
"id":1,
"jsonrpc": "2.0",
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
⛏️ **Note:** The `result` represents the **transaction hash** of the submitted raw transaction.
Use **eth\_getTransactionReceipt** to retrieve full details.
[](#eth_gettransactionreceipt)
**eth\_getTransactionReceipt**
------------------------------------------------------------------
Returns the receipt of a transaction by transaction hash.
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_getTransactionReceipt
&txhash=0xab6b5e7ad34d78aa03d82de4cbb7dea86fad2c80a017dfc6bc1a43511439994e
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_getTransactionReceipt&txhash=0xab6b5e7ad34d78aa03d82de4cbb7dea86fad2c80a017dfc6bc1a43511439994e&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
txhash
the `string` representing the hash of the transaction
Sample Response
Copy
{
"jsonrpc": "2.0",
"result": {
"transactionHash": "0xab6b5e7ad34d78aa03d82de4cbb7dea86fad2c80a017dfc6bc1a43511439994e",
"transactionIndex": "0x0",
"blockHash": "0x0f2ee6a77e68254d4383fa63a0b48f5b26a7771b6bc1a0669a9d5a1ec3662384",
"blockNumber": "0x91ba",
"l1BatchTxIndex": null,
"l1BatchNumber": null,
"from": "0x339d413ccefd986b1b3647a9cfa9cbbe70a30749",
"to": "0xd07671b9c43f6c93020062d3fcb18263c7d6e686",
"cumulativeGasUsed": "0x0",
"gasUsed": "0x1873e",
"contractAddress": null,
"logs": [\
{\
"address": "0x000000000000000000000000000000000000800a",\
"topics": [\
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",\
"0x000000000000000000000000339d413ccefd986b1b3647a9cfa9cbbe70a30749",\
"0x0000000000000000000000000000000000000000000000000000000000008001"\
],\
"data": "0x00000000000000000000000000000000000000000000000000000c0191588c40",\
"blockHash": "0x0f2ee6a77e68254d4383fa63a0b48f5b26a7771b6bc1a0669a9d5a1ec3662384",\
"blockNumber": "0x91ba",\
"l1BatchNumber": null,\
"transactionHash": "0xab6b5e7ad34d78aa03d82de4cbb7dea86fad2c80a017dfc6bc1a43511439994e",\
"transactionIndex": "0x0",\
"logIndex": "0x0",\
"transactionLogIndex": "0x0",\
"logType": null,\
"removed": false,\
"blockTimestamp": "0x67514e59"\
},\
{\
"address": "0x000000000000000000000000000000000000800a",\
"topics": [\
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",\
"0x0000000000000000000000000000000000000000000000000000000000008001",\
"0x000000000000000000000000339d413ccefd986b1b3647a9cfa9cbbe70a30749"\
],\
"data": "0x0000000000000000000000000000000000000000000000000000020042e41760",\
"blockHash": "0x0f2ee6a77e68254d4383fa63a0b48f5b26a7771b6bc1a0669a9d5a1ec3662384",\
"blockNumber": "0x91ba",\
"l1BatchNumber": null,\
"transactionHash": "0xab6b5e7ad34d78aa03d82de4cbb7dea86fad2c80a017dfc6bc1a43511439994e",\
"transactionIndex": "0x0",\
"logIndex": "0x1",\
"transactionLogIndex": "0x1",\
"logType": null,\
"removed": false,\
"blockTimestamp": "0x67514e59"\
},\
{\
"address": "0x000000000000000000000000000000000000800a",\
"topics": [\
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",\
"0x0000000000000000000000000000000000000000000000000000000000008001",\
"0x000000000000000000000000339d413ccefd986b1b3647a9cfa9cbbe70a30749"\
],\
"data": "0x000000000000000000000000000000000000000000000000000005e2154b3c80",\
"blockHash": "0x0f2ee6a77e68254d4383fa63a0b48f5b26a7771b6bc1a0669a9d5a1ec3662384",\
"blockNumber": "0x91ba",\
"l1BatchNumber": null,\
"transactionHash": "0xab6b5e7ad34d78aa03d82de4cbb7dea86fad2c80a017dfc6bc1a43511439994e",\
"transactionIndex": "0x0",\
"logIndex": "0x2",\
"transactionLogIndex": "0x2",\
"logType": null,\
"removed": false,\
"blockTimestamp": "0x67514e59"\
}\
],
"l2ToL1Logs": [],
"status": "0x1",
"root": "0x0f2ee6a77e68254d4383fa63a0b48f5b26a7771b6bc1a0669a9d5a1ec3662384",
"logsBloom": "0x00000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000008000000000000000000000000000000000000080000000000000000000000000000000000000800000000000000000010000000000000000000000000000004000000000000000000000000000000000000000000000000200000100000000000000000000000000000000000000008000000000000000002008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x0",
"effectiveGasPrice": "0x2b275d0"
},
"id": 1
}
[](#eth_call)
**eth\_call**
--------------------------------
Executes a new message call immediately without creating a transaction on the block chain.
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_call
&to=0xAEEF46DB4855E25702F8237E8f403FddcaF931C0
&data=0x70a08231000000000000000000000000e16359506c028e51f16be38986ec5746251e9724
&tag=latest
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_call&to=0xAEEF46DB4855E25702F8237E8f403FddcaF931C0&data=0x70a08231000000000000000000000000e16359506c028e51f16be38986ec5746251e9724&tag=latest&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
to
the `string` representing the address to interact with
data
the hash of the method signature and encoded parameters
tag
the `string` pre-defined block parameter, either `earliest`, `pending` or `latest`
⛽ **Note:** The `gas` parameter is capped at **2x** the current block gas limit.
Sample Response
Copy
{
"jsonrpc":"2.0",
"id":1,
"result":"0x00000000000000000000000000000000000000000000000000601d8888141c00"
}
[](#eth_getcode)
**eth\_getCode**
--------------------------------------
Returns code at a given address.
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_getCode
&address=0x000000000000000000000000000000000000800A
&tag=latest
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_getCode&address=0x000000000000000000000000000000000000800A&tag=latest&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to get code
tag
the `string` pre-defined block parameter, either `earliest`, `pending` or `latest`
Sample Response
Copy
{
"jsonrpc": "2.0",
"result": "0x00050000000000020000008003000039000000400030043f00000000030100190000006003300270000000d8033001970000000102200190000000240000c13d000000040230008c0000030b0000413d000000000201043b000000e002200270000000da0420009c0000002c0000a13d000000db0420009c000000380000a13d000000dc0420009c000000b20000613d000000dd0420009c000002040000613d000000de0220009c0000030b0000c13d0000000002000416000000000202004b0000030b0000c13d000000040230008a000000200220008c0000030b0000413d0000000401100370000000000101043b000000e6011001970000000000100435000000200000043f00000000010000190359033d0000040f000000360000013d0000000001000416000000000101004b0000030b0000c13d000000200100003900000100001004430000012000000443000000d9010000410000035a0001042e000000e10420009c0000007a0000213d000000e40120009c000001c20000613d000000e50120009c0000030b0000c13d0000000001000416000000000101004b0000030b0000c13d0000000101000039000000000101041a000002010000013d000000df0420009c000001cb0000613d000000e00220009c0000030b0000c13d0000000002000416000000000202004b0000030b0000c13d000000040230008a000000600220008c0000030b0000413d0000000402100370000000000402043b000000e60240009c0000030b0000213d0000002402100370000000000202043b000000e605200197000000e60220009c0000030b0000213d0000004401100370000000000101043b000400000001001d0000000001000411000080010210008c000000550000613d000080060210008c000000550000613d000080090110008c000002940000c13d0000000000400435000000200000043f000000d8010000410000000002000414000000d80320009c0000000002018019000000c001200210000000ec011001c70000801002000039000500000004001d000300000005001d035903540000040f000000050300002900000001022001900000030b0000613d000000000101043b000000000201041a000000040120006c000002c30000813d000000400100043d0000004402100039000000f303000041000000000032043500000024021000390000001f030000390000000000320435000000f4020000410000000000210435000000040210003900000020030000390000000000320435000000d802000041000000d80310009c00000000010280190000004001100210000000f5011001c70000035b00010430000000e20420009c000001fd0000613d000000e30220009c0000030b0000c13d0000000002000416000000000202004b0000030b0000c13d000000040230008a000000400220008c0000030b0000413d0000000402100370000000000402043b000000e60240009c0000030b0000213d0000002401100370000000000501043b0000000001000411000080010110008c000002190000c13d0000000101000039000000000301041a0000000002530019000000000332004b000000000300001900000001030040390000000103300190000000ae0000c13d000400000005001d000000000021041b0000000000400435000000200000043f000000d8010000410000000002000414000000d80320009c0000000002018019000000c001200210000000ec011001c70000801002000039000500000004001d035903540000040f000000050500002900000001022001900000030b0000613d000000000101043b000000000301041a00000004040000290000000002430019000000000332004b000000000300001900000001030040390000000103300190000002f60000613d000000fb0100004100000000001004350000001101000039000001fa0000013d000000040230008a000000400220008c0000030b0000413d0000000402100370000000000802043b000000e60280009c0000030b0000213d0000002402100370000000000402043b000000ea0240009c0000030b0000213d0000002302400039000000eb05000041000000000632004b00000000060000190000000006058019000000eb02200197000000000702004b0000000005008019000000eb0220009c000000000506c019000000000205004b0000030b0000c13d0000000405400039000000000251034f000000000202043b000000ea0620009c000001f70000213d000000bf06200039000000200900008a000000000696016f000000ea0760009c000001f70000213d000000400060043f000000800020043f00000000042400190000002404400039000000000334004b0000030b0000213d0000002003500039000000000131034f0000001f0320018f0000000504200272000000e70000613d00000000050000190000000506500210000000000761034f000000000707043b000000a00660003900000000007604350000000105500039000000000645004b000000df0000413d000400000009001d000500000008001d000000000503004b000000f80000613d0000000504400210000000000141034f0000000303300210000000a004400039000000000504043300000000053501cf000000000535022f000000000101043b0000010003300089000000000131022f00000000013101cf000000000151019f0000000000140435000000a001200039000000000001043500000000010004100000000000100435000000200000043f000000d8010000410000000002000414000000d80320009c0000000002018019000000c001200210000000ec011001c70000801002000039035903540000040f0000000102200190000000050400002900000004070000290000030b0000613d000000000101043b000000000201041a00000000090004160000000002920049000000000021041b0000000101000039000000000201041a0000000002920049000000000021041b000000ed02000041000000400100043d000000200310003900000000002304350000006002400210000000240310003900000000002304350000000008000411000000600280021000000058031000390000000000230435000000380210003900000000009204350000006c03100039000000800200043d000000000402004b0000012b0000613d00000000040000190000000005340019000000a006400039000000000606043300000000006504350000002004400039000000000524004b000001240000413d000000000332001900000000000304350000004c0320003900000000003104350000008b02200039000000000272016f000000000a12001900000000022a004b00000000020000190000000102004039000000ea03a0009c000001f70000213d0000000102200190000001f70000c13d000100000009001d000200000008001d0000004000a0043f000000ee0200004100000000002a04350000000402a000390000002003000039000000000032043500000000020104330000002403a0003900000000002304350000004403a00039000000000402004b0000014f0000613d000000000400001900000000053400190000002004400039000000000614001900000000060604330000000000650435000000000524004b000001480000413d000000000132001900000000000104350000001f01200039000000000171016f000000d802000041000000d803a0009c000000000302001900000000030a401900000040033002100000004401100039000000d80410009c00000000010280190000006001100210000000000131019f0000000003000414000000d80430009c0000000003028019000000c002300210000000000112019f000080080200003900030000000a001d0359034f0000040f000000030a00002900000000030100190000006003300270000000d803300197000000200430008c000000000403001900000020040080390000001f0540018f0000000506400272000001780000613d0000000007000019000000050870021000000000098a0019000000000881034f000000000808043b00000000008904350000000107700039000000000867004b000001700000413d000000000705004b000001870000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f000000000056043500000001022001900000030d0000613d0000001f01400039000000600210018f0000000001a20019000000000221004b00000000020000190000000102004039000000ea0410009c0000000504000029000001f70000213d0000000102200190000001f70000c13d000000400010043f000000200230008c0000030b0000413d000000200210003900000040030000390000000000320435000000010200002900000000002104350000004003100039000000800200043d00000000002304350000006003100039000000e606400197000000000402004b000001ab0000613d00000000040000190000000005340019000000a007400039000000000707043300000000007504350000002004400039000000000524004b000001a40000413d000000000332001900000000000304350000007f02200039000000040220017f000000d803000041000000d80410009c00000000010380190000004001100210000000d80420009c00000000020380190000006002200210000000000112019f0000000002000414000000d80420009c0000000002038019000000c002200210000000000112019f000000ef011001c70000800d020000390000000303000039000000f0040000410000000205000029000003060000013d0000000001000416000000000101004b0000030b0000c13d000000c001000039000000400010043f0000000501000039000000800010043f00000100010000410000020c0000013d000000040230008a000000200220008c0000030b0000413d0000000401100370000000000401043b000000e60140009c0000030b0000213d00000000010004100000000000100435000000200000043f000000d8010000410000000002000414000000d80320009c0000000002018019000000c001200210000000ec011001c70000801002000039000500000004001d035903540000040f000000050400002900000001022001900000030b0000613d000000000101043b000000000201041a00000000050004160000000002520049000000000021041b0000000101000039000000000201041a0000000002520049000000000021041b000000ed02000041000000400100043d000000200310003900000000002304350000006002400210000000240310003900000000002304350000003802000039000000000021043500000038021000390000000000520435000000f90210009c000002230000413d000000fb0100004100000000001004350000004101000039000000040010043f000000fc010000410000035b000104300000000001000416000000000101004b0000030b0000c13d0000001201000039000000800010043f000000e7010000410000035a0001042e0000000001000416000000000101004b0000030b0000c13d000000c001000039000000400010043f0000000301000039000000800010043f000000e801000041000000a00010043f0000002001000039000000c00010043f0000008001000039000000e0020000390359032a0000040f000000c00110008a000000d802000041000000d80310009c00000000010280190000006001100210000000e9011001c70000035a0001042e000000f401000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000000fd01000041000000c40010043f000000fe010000410000035b00010430000300000005001d0000006007100039000000400070043f000000ee020000410000000000270435000000640210003900000020030000390000000000320435000000840310003900000000020104330000000000230435000000a403100039000000000402004b000002390000613d000000000400001900000000053400190000002004400039000000000614001900000000060604330000000000650435000000000524004b000002320000413d000000000132001900000000000104350000001f01200039000000200200008a000000000121016f000000d802000041000000d80370009c0000000003020019000000000307401900000040033002100000004401100039000000d80410009c00000000010280190000006001100210000000000131019f0000000003000414000000d80430009c0000000003028019000000c002300210000000000112019f0000800802000039000400000007001d0359034f0000040f000000040a00002900000000030100190000006003300270000000d803300197000000200430008c000000000403001900000020040080390000001f0540018f0000000506400272000002630000613d0000000007000019000000050870021000000000098a0019000000000881034f000000000808043b00000000008904350000000107700039000000000867004b0000025b0000413d000000000705004b000002720000613d0000000506600210000000000761034f00000000066a00190000000305500210000000000806043300000000085801cf000000000858022f000000000707043b0000010005500089000000000757022f00000000055701cf000000000585019f00000000005604350000000102200190000002a00000613d0000001f01400039000000600210018f0000000001a20019000000000221004b00000000020000190000000102004039000000ea0410009c00000005050000290000000304000029000001f70000213d0000000102200190000001f70000c13d000000400010043f000000200230008c0000030b0000413d0000000000410435000000d8020000410000000003000414000000d80430009c0000000003028019000000d80410009c00000000010280190000004001100210000000c002300210000000000112019f000000f1011001c7000000e6065001970000800d0200003900000003030000390000000005000411000000fa04000041000003060000013d000000f401000041000000800010043f0000002001000039000000840010043f0000003e01000039000000a40010043f000000f601000041000000c40010043f000000f701000041000000e40010043f000000f8010000410000035b00010430000000400200043d0000001f0430018f0000000505300272000002ad0000613d000000000600001900000005076002100000000008720019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b000002a50000413d000000000604004b000002bc0000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000000d801000041000000d80420009c000000000201801900000040012002100000006002300210000000000121019f0000035b00010430000200000002001d0000000000300435000000200000043f000000d8030000410000000001000414000000d80210009c0000000001038019000000c001100210000000ec011001c70000801002000039035903540000040f000000030300002900000001022001900000030b0000613d0000000204000029000000040240006a000000000101043b000000000021041b00000000003004350000000001000414000000d80210009c000000d801008041000000c001100210000000ec011001c70000801002000039035903540000040f0000000306000029000000050500002900000001022001900000030b0000613d000000000101043b000000000201041a00000004030000290000000002320019000000000021041b000000400100043d0000000000310435000000d8020000410000000003000414000000d80430009c0000000003028019000000d80410009c00000000010280190000004001100210000000c002300210000000000112019f000000f1011001c70000800d020000390000000303000039000000f204000041000003060000013d000000000021041b000000400100043d0000000000410435000000d8020000410000000003000414000000d80430009c0000000003028019000000d80410009c00000000010280190000004001100210000000c002300210000000000112019f000000f1011001c70000800d020000390000000203000039000000ff040000410359034f0000040f00000001012001900000030b0000613d00000000010000190000035a0001042e00000000010000190000035b00010430000000400200043d0000001f0430018f00000005053002720000031a0000613d000000000600001900000005076002100000000008720019000000000771034f000000000707043b00000000007804350000000106600039000000000756004b000003120000413d000000000604004b000003290000613d0000000505500210000000000151034f00000000055200190000000304400210000000000605043300000000064601cf000000000646022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000161019f0000000000150435000002bc0000013d00000000030104330000000002320436000000000403004b000003360000613d000000000400001900000000052400190000002004400039000000000614001900000000060604330000000000650435000000000534004b0000032f0000413d000000000123001900000000000104350000001f01300039000000200300008a000000000131016f0000000001120019000000000001042d000000d802000041000000d80310009c00000000010280190000000003000414000000d80430009c0000000003028019000000c0023002100000004001100210000000000121019f000000ec011001c70000801002000039035903540000040f00000001022001900000034d0000613d000000000101043b000000000001042d00000000010000190000035b0001043000000352002104210000000102000039000000000001042d0000000002000019000000000001042d00000357002104230000000102000039000000000001042d0000000002000019000000000001042d00000359000004320000035a0001042e0000035b00010430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000002000000000000000000000000000000400000010000000000000000000000000000000000000000000000000000000000000000000000000051cff8d80000000000000000000000000000000000000000000000000000000084bc3eaf0000000000000000000000000000000000000000000000000000000084bc3eb00000000000000000000000000000000000000000000000000000000095d89b41000000000000000000000000000000000000000000000000000000009cc7f7080000000000000000000000000000000000000000000000000000000051cff8d900000000000000000000000000000000000000000000000000000000579952fc00000000000000000000000000000000000000000000000000000000313ce56600000000000000000000000000000000000000000000000000000000313ce5670000000000000000000000000000000000000000000000000000000040c10f190000000000000000000000000000000000000000000000000000000006fdde030000000000000000000000000000000000000000000000000000000018160ddd000000000000000000000000ffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000002000000080000000000000000045544800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000ffffffffffffffff800000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000400000000000000000000000006c0960f90000000000000000000000000000000000000000000000000000000062f84b24000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000c405fe8958410bbaf0c73b7a0c3e20859e86ca168a4c9b0def9c54d2555a306b0200000000000000000000000000000000000020000000000000000000000000ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5472616e7366657220616d6f756e7420657863656564732062616c616e63650008c379a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000640000000000000000000000004f6e6c792073797374656d20636f6e7472616374732077697468207370656369616c206163636573732063616e2063616c6c2074686973206d6574686f6400000000000000000000000000000000000000000084000000800000000000000000000000000000000000000000000000000000000000000000ffffffffffffffa02717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b63984e487b7100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000043616c6c61626c65206f6e6c792062792074686520626f6f746c6f616465720000000000000000000000000000000000000000640000008000000000000000000f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885457468657200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006d79792f4d4f92f90ab0ff8bbcb67a80b934901da8bdb472a2f5e444e360de04",
"id": 1
}
[](#eth_getstorageat)
**eth\_getStorageAt**
------------------------------------------------
Returns the value from a storage position at a given address.
This endpoint is still **experimental** and may have potential issues
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_getStorageAt
&address=0x000000000000000000000000000000000000800A
&position=0x0
&tag=latest
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_getStorageAt&address=0x000000000000000000000000000000000000800A&position=0x0&tag=latest&apikey=YourApiKeyToken)
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to get code
position
the hex code of the position in storage, eg `0x0`
tag
the `string` pre-defined block parameter, either `earliest`, `pending` or `latest`
Sample Response
Copy
{
"jsonrpc": "2.0",
"result": "0x0000000000000000000000000000000000000000000000000000000000000000",
"id": 1
}
[](#eth_gasprice)
**eth\_gasPrice**
----------------------------------------
Returns the current price per gas in wei.
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_gasPrice
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_gasPrice&apikey=YourApiKeyToken)
> 🔗
RequestResponse
No parameters required.
Sample Response
Copy
{
"jsonrpc":"2.0",
"id":73,
"result":"0x430e23400"
}
📖 **Tip:** The `result` is returned in **wei**.
Easily convert Ethereum units using our [**unit converter.**](https://abscan.org/unitconverter)
[](#eth_estimategas)
**eth\_estimateGas**
----------------------------------------------
Makes a call or transaction, which won't be added to the blockchain and returns the used gas.
Copy
https://api.abscan.org/api
?module=proxy
&action=eth_estimateGas
&data=0x4e71d92d
&to=0xf0160428a8552ac9bb7e050d90eeade4ddd52843
&value=0xff22
&gasPrice=0x51da038cc
&gas=0x5f5e0ff
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=proxy&action=eth_estimateGas&data=0x4e71d92d&to=0xf0160428a8552ac9bb7e050d90eeade4ddd52843&value=0xff22&gasPrice=0x51da038cc&gas=0x5f5e0ff&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
data
the hash of the method signature and encoded parameters
to
the `string` representing the address to interact with
value
the value sent in this transaction, in hex eg. `0xff22`
gas
the amount of gas provided for the transaction, in hex eg. `0x5f5e0ff`
gasPrice
the gas price paid for each unit of gas, in wei
post **EIP-1559**, the `gasPrice` has to be higher than the block's `baseFeePerGas`
⛽ **Note:** The `gas` parameter is capped at **2x** the current block gas limit.
Sample Response
Copy
{
"jsonrpc":"2.0",
"id":1,
"result":"0x6556"
}
[PreviousLogs](/api-endpoints/logs)
[NextTokens](/api-endpoints/tokens)
Last updated 2 months ago
---
# Accounts | Abscan
[](#get-ether-balance-for-a-single-address)
Get Ether Balance for a Single Address
---------------------------------------------------------------------------------------
Returns the Ether balance of a given address.
Copy
https://api.abscan.org/api
?module=account
&action=balance
&address=0xf70da97812CB96acDF810712Aa562db8dfA3dbEF
&tag=latest
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=account&action=balance&address=0xf70da97812CB96acDF810712Aa562db8dfA3dbEF&tag=latest&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to check for balance
tag
the `string` pre-defined block parameter, either `earliest`, `pending` or `latest`
Sample response
Copy
{
"status":"1",
"message":"OK",
"result":"6022480788143234640"
}
📖 **Tip:** The `result` is returned in [**wei.**](https://abscan.org/unitconverter)
Convert Ethereum units using our [**Unit Converter.**](https://abscan.org/unitconverter)
[](#get-ether-balance-for-multiple-addresses-in-a-single-call)
Get Ether Balance for Multiple Addresses in a Single Call
-----------------------------------------------------------------------------------------------------------------------------
Returns the balance of the accounts from a list of addresses.
Copy
https://api.abscan.org/api
?module=account
&action=balancemulti
&address=0xf70da97812CB96acDF810712Aa562db8dfA3dbEF,0xe93685f3bBA03016F02bD1828BaDD6195988D950,0x9F403140Bc0574D7d36eA472b82DAa1Bbd4eF327
&tag=latest
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=account&action=balancemulti&address=0xf70da97812CB96acDF810712Aa562db8dfA3dbEF,0xe93685f3bBA03016F02bD1828BaDD6195988D950,0x9F403140Bc0574D7d36eA472b82DAa1Bbd4eF327&tag=latest&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `strings` representing the addresses to check for balance, separated by `,`
up to **20 addresses** per call
tag
the `integer` pre-defined block parameter, either `earliest`, `pending` or `latest`
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"account": "0xf70da97812CB96acDF810712Aa562db8dfA3dbEF",\
"balance": "6022480788143234640"\
},\
{\
"account": "0xe93685f3bBA03016F02bD1828BaDD6195988D950",\
"balance": "1399936552893500000"\
},\
{\
"account": "0x9F403140Bc0574D7d36eA472b82DAa1Bbd4eF327",\
"balance": "727436915077250000"\
}\
]
}
📖 **Tip:** The `result` is returned in [**wei.**](https://abscan.org/unitconverter)
Convert Ethereum units using our [**Unit Converter.**](https://abscan.org/unitconverter)
[](#get-a-list-of-normal-transactions-by-address)
Get a list of 'Normal' Transactions By Address
-----------------------------------------------------------------------------------------------------
Returns the list of transactions performed by an address, with optional pagination.
**** 📝 **Note :** This API endpoint returns a maximum of **10000 records** only.
Copy
https://api.abscan.org/api
?module=account
&action=txlist
&address=0x9F403140Bc0574D7d36eA472b82DAa1Bbd4eF327
&startblock=0
&endblock=99999999
&page=1
&offset=2
&sort=asc
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=account&action=txlist&address=0x9F403140Bc0574D7d36eA472b82DAa1Bbd4eF327&startblock=0&endblock=99999999&page=1&offset=2&sort=asc&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the addresses to check for balance
startblock
the `integer` block number to start searching for transactions
endblock
the `integer` block number to stop searching for transactions
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
sort
the sorting preference, use `asc` to sort by ascending and `desc` to sort by descendin **Tip:** Specify a smaller `startblock` and `endblock` range for faster search results.
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"blockNumber": "353",\
"timeStamp": "1730410596",\
"hash": "0x1bd37f504fb693bd0d8ce4575f8a7952a1d7f3474acd170c1da03a9ea04e544d",\
"nonce": "0",\
"blockHash": "0xcd30e651ea2377580257351fab4ed2212c2cc0c6a42470075826993886e8784f",\
"transactionIndex": "0",\
"from": "0xc13b65f7c53cd6db2ea205a4b574b4a0858720a6",\
"to": "0x9f403140bc0574d7d36ea472b82daa1bbd4ef327",\
"value": "750000000000000000",\
"gas": "241185",\
"gasPrice": "45250000",\
"isError": "0",\
"txreceipt_status": "1",\
"input": "0x",\
"contractAddress": "",\
"cumulativeGasUsed": "0",\
"gasUsed": "147739",\
"confirmations": "36940",\
"methodId": "0x",\
"functionName": ""\
},\
{\
"blockNumber": "389",\
"timeStamp": "1730420812",\
"hash": "0xeb0dfaeedf8019be848acf94aac088279dd7719a8fb5d3174294e0c11450da04",\
"nonce": "0",\
"blockHash": "0x1797d5b7aca3589d942fd3a43f661f53f97e66ad87d5941f7c8941aeabe9f54f",\
"transactionIndex": "0",\
"from": "0x9f403140bc0574d7d36ea472b82daa1bbd4ef327",\
"to": "0x0000000000000000000000000000000000008006",\
"value": "0",\
"gas": "6459102",\
"gasPrice": "45250000",\
"isError": "0",\
"txreceipt_status": "1",\
"input": "0x9c4d535b0000000000000000000000000000000000000000000000000000000000000000010000ff99cadf9e5deaaeb7d99485bfc7caad0494843dafb89dc03ca24d15070000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002000000000000000000000000076f6d257ceb5736cbcaab5c48e4225a45f74d6e5",\
"contractAddress": "0x9b896c0e23220469c7ae69cb4bbae391eaa4c8da",\
"cumulativeGasUsed": "0",\
"gasUsed": "4847379",\
"confirmations": "36904",\
"methodId": "0x9c4d535b",\
"functionName": "create(bytes32 _salt,bytes32 _bytecodeHash,bytes _input)"\
}\
]
}
[](#get-a-list-of-internal-transactions-by-address)
Get a list of 'Internal' Transactions by Address
---------------------------------------------------------------------------------------------------------
Returns the list of internal transactions performed by an address, with optional pagination.
📝 **Note :** This API endpoint returns a maximum of **10000 records** only.
Copy
https://api.abscan.org/api
?module=account
&action=txlistinternal
&address=0xe85B66fCA403bc35bcAE17CE7758e942aEa65Dc0
&startblock=0
&endblock=2702578
&page=1
&offset=2
&sort=asc
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=account&action=txlistinternal&address=0xe85B66fCA403bc35bcAE17CE7758e942aEa65Dc0&startblock=0&endblock=2702578&page=1&offset=2&sort=asc&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the addresses to check for balance
startblock
the `integer` block number to start searching for transactions
endblock
the `integer` block number to stop searching for transactions
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
sort
the sorting preference, use `asc` to sort by ascending and `desc` to sort by descending
💡 **Tip:** Specify a smaller `startblock` and `endblock` range for faster search results
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"blockNumber": "8",\
"timeStamp": "1730300219",\
"hash": "0xdb8180968e61cad260b79ab855c8cdcd1b63c6d76cb6d68238fda841f02bec3e",\
"from": "0x58551793beedca08a861c394258e0457e48a2fcc",\
"to": "0xe85b66fca403bc35bcae17ce7758e942aea65dc0",\
"value": "40000000000000000",\
"contractAddress": "",\
"input": "",\
"type": "call",\
"gas": "99810",\
"gasUsed": "210",\
"traceId": "0_1_1_1_1",\
"isError": "0",\
"errCode": ""\
},\
{\
"blockNumber": "9",\
"timeStamp": "1730309440",\
"hash": "0xaee99df490cd30d0473a1da0f2ccd451c53b965c0b090d2913ffb5233f572131",\
"from": "0xe85b66fca403bc35bcae17ce7758e942aea65dc0",\
"to": "0x0000000000000000000000000000000000008001",\
"value": "10637189000000",\
"contractAddress": "",\
"input": "",\
"type": "call",\
"gas": "147249",\
"gasUsed": "23",\
"traceId": "0_1_1_1_1",\
"isError": "0",\
"errCode": ""\
}\
]
}
[](#get-internal-transactions-by-transaction-hash)
Get 'Internal Transactions' by Transaction Hash
-------------------------------------------------------------------------------------------------------
Returns the list of internal transactions performed within a transaction.
📝 **Note :** This API endpoint returns a maximum of **10000 records** only.
Copy
https://api.abscan.org/api
?module=account
&action=txlistinternal
&txhash=0xdb8180968e61cad260b79ab855c8cdcd1b63c6d76cb6d68238fda841f02bec3e
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=account&action=txlistinternal&txhash=0xdb8180968e61cad260b79ab855c8cdcd1b63c6d76cb6d68238fda841f02bec3e&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
txhash
the `string` representing the transaction hash to check for internal transactions
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"blockNumber": "8",\
"timeStamp": "1730300219",\
"from": "0x58551793beedca08a861c394258e0457e48a2fcc",\
"to": "0x0000000000000000000000000000000000008001",\
"value": "20324942724585",\
"contractAddress": "",\
"input": "",\
"type": "call",\
"gas": "135153",\
"gasUsed": "23",\
"isError": "0",\
"errCode": ""\
},\
{\
"blockNumber": "8",\
"timeStamp": "1730300219",\
"from": "0x58551793beedca08a861c394258e0457e48a2fcc",\
"to": "0xe85b66fca403bc35bcae17ce7758e942aea65dc0",\
"value": "40000000000000000",\
"contractAddress": "",\
"input": "",\
"type": "call",\
"gas": "99810",\
"gasUsed": "210",\
"isError": "0",\
"errCode": ""\
}\
]
}
The `isError` field returns `0` for **successful transactions** and `1` for **rejected/cancelled transactions.**
[](#get-internal-transactions-by-block-range)
Get "Internal Transactions" by Block Range
---------------------------------------------------------------------------------------------
Returns the list of internal transactions performed within a block range, with optional pagination.
📝 **Note :** This API endpoint returns a maximum of **10000 records** only.
Copy
https://api.abscan.org/api
?module=account
&action=txlistinternal
&startblock=0
&endblock=8
&page=1
&offset=2
&sort=asc
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=account&action=txlistinternal&startblock=0&endblock=8&page=1&offset=2&sort=asc&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
startblock
the `integer` block number to start searching for transactions
endblock
the `integer` block number to stop searching for transactions
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
sort
the sorting preference, use `asc` to sort by ascending and `desc` to sort by descending
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"blockNumber": "1",\
"timeStamp": "1729881083",\
"hash": "0x033c539d168ceb56423ad8cf91d1d8afd4e5223fa8f30a97d0fbd2450a3b1d23",\
"from": "0x58551793beedca08a861c394258e0457e48a2fcc",\
"to": "",\
"value": "0",\
"contractAddress": "0x39f71318a250d30aba4d04c6b55d6ba91b40135a",\
"input": "",\
"type": "create",\
"gas": "68390910",\
"gasUsed": "6204",\
"traceId": "0_1_1_1_1",\
"isError": "0",\
"errCode": ""\
},\
{\
"blockNumber": "1",\
"timeStamp": "1729881083",\
"hash": "0x3f805d7129eb70686d39add90d6fc5429b574f4619b1c74d56103aeb27a5ae29",\
"from": "0x58551793beedca08a861c394258e0457e48a2fcc",\
"to": "",\
"value": "0",\
"contractAddress": "0x0ba08b2e2fc141c4def0d80638486490dc503205",\
"input": "",\
"type": "create",\
"gas": "68401053",\
"gasUsed": "6420",\
"traceId": "0_1_1_1_1",\
"isError": "0",\
"errCode": ""\
}\
]
}
The `isError` field returns `0` for **successful transactions** and `1` for **rejected/cancelled transactions.**
[](#get-a-list-of-erc20-token-transfer-events-by-address)
Get a list of 'ERC20 - Token Transfer Events' by Address
-----------------------------------------------------------------------------------------------------------------------
Returns the list of ERC-20 tokens transferred by an address, with optional filtering by token contract.
Copy
https://api.abscan.org/api
?module=account
&action=tokentx
&contractaddress=0x000000000000000000000000000000000000800A
&address=0xe93685f3bBA03016F02bD1828BaDD6195988D950
&page=1
&offset=2
&startblock=0
&endblock=27025780
&sort=asc
&apikey=YourApiKeyToken
Usage:
* ERC-20 transfers from an **address**, specify the `address` parameter
* ERC-20 transfers from a **contract address**, specify the `contract address` parameter
* ERC-20 transfers from an **address** filtered by a **token contract**, specify both `address` and `contract address` parameters.
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=account&action=tokentx&contractaddress=0x000000000000000000000000000000000000800A&address=0xe93685f3bBA03016F02bD1828BaDD6195988D950&page=1&offset=2&startblock=0&endblock=27025780&sort=asc&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to check for balance
contractaddress
the `string` representing the token contract address to check for balance
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
startblock
the `integer` block number to start searching for transactions
endblock
the `integer` block number to stop searching for transactions
sort
the sorting preference, use `asc` to sort by ascending and `desc` to sort by descending
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"blockNumber": "354",\
"timeStamp": "1730410781",\
"hash": "0x277dbe3e4565054c409a2bce10aca4b5a6e7c5e8d344a72c14cb13b9e9cfe398",\
"nonce": "1",\
"blockHash": "0xa15d3dff3f7aa2e1b522f0c6a208ccce51ee3448270c4e2f80b6bd8a2e1a5fb6",\
"from": "0xc13b65f7c53cd6db2ea205a4b574b4a0858720a6",\
"contractAddress": "0x000000000000000000000000000000000000800a",\
"to": "0xe93685f3bba03016f02bd1828badd6195988d950",\
"value": "1100000000000000000",\
"tokenName": "Ether",\
"tokenSymbol": "ETH",\
"tokenDecimal": "18",\
"transactionIndex": "0",\
"gas": "241185",\
"gasPrice": "45250000",\
"gasUsed": "116852",\
"cumulativeGasUsed": "0",\
"input": "deprecated",\
"confirmations": "36944"\
},\
{\
"blockNumber": "1875",\
"timeStamp": "1730846603",\
"hash": "0xc7b1423e05d0c96a2b8d9a7a40b76eaac0fac40a0912676c1856d38c832008c9",\
"nonce": "0",\
"blockHash": "0x80c483b1d8cd18063c7e4e968910ce3fc148cd39c11e0976d1d154c72c288885",\
"from": "0xe93685f3bba03016f02bd1828badd6195988d950",\
"contractAddress": "0x000000000000000000000000000000000000800a",\
"to": "0x0000000000000000000000000000000000008001",\
"value": "19610879400000",\
"tokenName": "Ether",\
"tokenSymbol": "ETH",\
"tokenDecimal": "18",\
"transactionIndex": "0",\
"gas": "361158",\
"gasPrice": "54300000",\
"gasUsed": "129720",\
"cumulativeGasUsed": "0",\
"input": "deprecated",\
"confirmations": "35423"\
}\
]
}
[](#get-a-list-of-erc721-token-transfer-events-by-address)
Get a list of 'ERC721 - Token Transfer Events' by Address
-------------------------------------------------------------------------------------------------------------------------
Returns the list of ERC-721 ( NFT ) tokens transferred by an address, with optional filtering by token contract.
Copy
https://api.abscan.org/api
?module=account
&action=tokennfttx
&contractaddress=0xe8b9ec89dcb15fa902af64f681c2f12f08c552a5
&address=0x03508bB71268BBA25ECaCC8F620e01866650532c
&page=1
&offset=2
&startblock=0
&endblock=27025780
&sort=asc
&apikey=YourApiKeyToken
Usage:
* ERC-721 transfers from an **address**, specify the `address` parameter
* ERC-721 transfers from a **contract address**, specify the `contract address` parameter
* ERC-721 transfers from an **address** filtered by a **token contract**, specify both `address` and `contract address` parameters.
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=account&action=tokennfttx&contractaddress=0xe8b9ec89dcb15fa902af64f681c2f12f08c552a5&address=0x03508bB71268BBA25ECaCC8F620e01866650532c&page=1&offset=2&startblock=0&endblock=27025780&sort=asc&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to check for balance
contractaddress
the `string` representing the token contract address to check for balance
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
startblock
the `integer` block number to start searching for transactions
endblock
the `integer` block number to stop searching for transactions
sort
the sorting preference, use `asc` to sort by ascending and `desc` to sort by descending
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"blockNumber": "2863",\
"timeStamp": "1730919950",\
"hash": "0xd6176d2ffb66eeb09dfacdb6b779812ad4168b4d9bc17bc3bb91d610f019f65b",\
"nonce": "0",\
"blockHash": "0xed8ef0ee23b6a05e8cf37baff04b0abe2f0fe58cb34b8ed4d464263ad8e1f3fd",\
"from": "0xf3d63166f0ca56c3c1a3508fce03ff0cf3fb691e",\
"contractAddress": "0xe8b9ec89dcb15fa902af64f681c2f12f08c552a5",\
"to": "0x03508bb71268bba25ecacc8f620e01866650532c",\
"tokenID": "0",\
"tokenName": "Reservoir",\
"tokenSymbol": "RSV",\
"tokenDecimal": "0",\
"transactionIndex": "0",\
"gas": "781249",\
"gasPrice": "45250000",\
"gasUsed": "277542",\
"cumulativeGasUsed": "0",\
"input": "deprecated",\
"confirmations": "34436"\
},\
{\
"blockNumber": "2866",\
"timeStamp": "1730920037",\
"hash": "0x61b9f0e4b0c0082df35053249dd6a2b4031d04dc96fababf00d6c6a53b1988ca",\
"nonce": "1",\
"blockHash": "0xc00d48efc6adb5a6748d7655c75c71bbaef75deee6dc24afdc5815edec7692cb",\
"from": "0x03508bb71268bba25ecacc8f620e01866650532c",\
"contractAddress": "0xe8b9ec89dcb15fa902af64f681c2f12f08c552a5",\
"to": "0x0da7fe8aa50e8cecedf3242597bd9560bffbf8ec",\
"tokenID": "0",\
"tokenName": "Reservoir",\
"tokenSymbol": "RSV",\
"tokenDecimal": "0",\
"transactionIndex": "0",\
"gas": "1196130",\
"gasPrice": "45250000",\
"gasUsed": "363729",\
"cumulativeGasUsed": "0",\
"input": "deprecated",\
"confirmations": "34433"\
}\
]
}
[](#get-a-list-of-erc1155-token-transfer-events-by-address)
Get a list of 'ERC1155 - Token Transfer Events' by Address
---------------------------------------------------------------------------------------------------------------------------
Returns the list of ERC-1155 ( Multi Token Standard ) tokens transferred by an address, with optional filtering by token contract.
Copy
https://api.abscan.org/api
?module=account
&action=token1155tx
&contractaddress=0x84c0897ee2b89cb183139ebc507826167f15d389
&address=0x0000000000000000000000000000000000000000
&page=1
&offset=2
&startblock=0
&endblock=99999999
&sort=asc
&apikey=YourApiKeyToken
Usage:
* ERC-1155 transfers from an **address**, specify the `address` parameter
* ERC-1155 transfers from a **contract address**, specify the `contract address` parameter
* ERC-1155 transfers from an **address** filtered by a **token contract**, specify both `address` and `contract address` parameters.
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=account&action=token1155tx&contractaddress=0x84c0897ee2b89cb183139ebc507826167f15d389&address=0x0000000000000000000000000000000000000000&page=1&offset=2&startblock=0&endblock=99999999&sort=asc&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to check for balance
contractaddress
the `string` representing the token contract address to check for balance
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
startblock
the `integer` block number to start searching for transactions
endblock
the `integer` block number to stop searching for transactions
sort
the sorting preference, use `asc` to sort by ascending and `desc` to sort by descending
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"blockNumber": "2847",\
"timeStamp": "1730918840",\
"hash": "0xaa24d2223a032af72d62dbaecb3f5095b4420da79cd703095b94d9cafac8becc",\
"nonce": "25",\
"blockHash": "0xcf4f4bec00b0f53cf319471674857fa8c30fca4262b09a2d211b8b3be981bf08",\
"transactionIndex": "0",\
"gas": "258141",\
"gasPrice": "45250000",\
"gasUsed": "119084",\
"cumulativeGasUsed": "0",\
"input": "deprecated",\
"contractAddress": "0x84c0897ee2b89cb183139ebc507826167f15d389",\
"from": "0x0000000000000000000000000000000000000000",\
"to": "0xf3d63166f0ca56c3c1a3508fce03ff0cf3fb691e",\
"tokenID": "1",\
"tokenValue": "10",\
"tokenName": "",\
"tokenSymbol": "",\
"confirmations": "34455"\
},\
{\
"blockNumber": "2848",\
"timeStamp": "1730918844",\
"hash": "0x6f39c05f458436823729555f3ea5c805ae826f9837f8d166304155c7f6e5ddfb",\
"nonce": "26",\
"blockHash": "0xc92e65add64ddb1c81851d62004f16cbc454b3b99188d6c52e7ae515e7e35f45",\
"transactionIndex": "0",\
"gas": "258209",\
"gasPrice": "45250000",\
"gasUsed": "88218",\
"cumulativeGasUsed": "0",\
"input": "deprecated",\
"contractAddress": "0x84c0897ee2b89cb183139ebc507826167f15d389",\
"from": "0x0000000000000000000000000000000000000000",\
"to": "0xf3d63166f0ca56c3c1a3508fce03ff0cf3fb691e",\
"tokenID": "1",\
"tokenValue": "10",\
"tokenName": "",\
"tokenSymbol": "",\
"confirmations": "34454"\
}\
]
}
[](#get-list-of-blocks-validated-by-address)
Get list of Blocks Validated by Address
-----------------------------------------------------------------------------------------
Returns the list of blocks validated by an address.
Copy
https://api.abscan.org/api
?module=account
&action=getminedblocks
&address=0x0000000000000000000000000000000000000000
&blocktype=blocks
&page=1
&offset=2
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=account&action=getminedblocks&address=0x0000000000000000000000000000000000000000&blocktype=blocks&page=1&offset=2&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to check for balance
blocktype
the `string` pre-defined block type, either `blocks` for canonical blocks or `uncles` for uncle blocks only
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"blockNumber": "37302",\
"timeStamp": "1733381418",\
"blockReward": "0"\
},\
{\
"blockNumber": "37301",\
"timeStamp": "1733381417",\
"blockReward": "803468050000"\
}\
]
}
⏳ **Note :** The `timeStamp` is represented in [**Unix timestamp.**](https://www.unixtimestamp.com/)
\*\*\*\*
[PreviousEndpoint URLs](/getting-started/endpoint-urls)
[NextContracts](/api-endpoints/contracts)
Last updated 2 months ago
---
# Logs | Abscan
[](#get-event-logs-by-address)
Get Event Logs by Address
-------------------------------------------------------------
Returns the event logs from an address, with optional filtering by block range.
Copy
https://api.abscan.org/api
?module=logs
&action=getLogs
&address=0x000000000000000000000000000000000000800A
&fromBlock=0
&toBlock=latest
&page=1
&offset=2
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=logs&action=getLogs&address=0x000000000000000000000000000000000000800A&fromBlock=0&toBlock=latest&page=1&offset=2&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to check for logs
fromBlock
the `integer` block number to start searching for logs eg. `12878196`
toBlock
the `integer` block number to stop searching for logs eg. `12879196`
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page limited to **1000 records** per query, use the `page` parameter for subsequent records
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"address": "0x000000000000000000000000000000000000800a",\
"topics": [\
"0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885",\
"0x0000000000000000000000000000000000000000000000000000000000008001"\
],\
"data": "0x0000000000000000000000000000000000000000000000000000000000000000",\
"blockNumber": "0x1",\
"blockHash": "0xbb77aa496662b74ee5cc762b61751a53edbb5aedcd077c8e48e6339dbb27d7ac",\
"timeStamp": "0x671be3fb",\
"gasPrice": "0x",\
"gasUsed": "0x3f751",\
"logIndex": "0x",\
"transactionHash": "0x95dfd4a533a0f0b22eef49a559ffc54a163c17e8e312220213a2d55f7ba708e2",\
"transactionIndex": "0x"\
},\
{\
"address": "0x000000000000000000000000000000000000800a",\
"topics": [\
"0x0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885",\
"0x0000000000000000000000000000000000000000000000000000000000008001"\
],\
"data": "0x000000000000000000000000000000000000000000000000000083fce9b08f66",\
"blockNumber": "0x1",\
"blockHash": "0xbb77aa496662b74ee5cc762b61751a53edbb5aedcd077c8e48e6339dbb27d7ac",\
"timeStamp": "0x671be3fb",\
"gasPrice": "0x183c44ab",\
"gasUsed": "0x57232",\
"logIndex": "0x5",\
"transactionHash": "0x9bb096814eeaee4ac947bbdfeb7cd84a8f30b583a7e2c6eb9a9e613728150692",\
"transactionIndex": "0x1"\
}\
]
}
[](#get-event-logs-by-topics)
Get Event Logs by Topics
-----------------------------------------------------------
Returns the events log in a block range, filtered by topics.
Copy
https://api.abscan.org/api
?module=logs
&action=getLogs
&fromBlock=0
&toBlock=latest
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&topic0_1_opr=and
&topic1=0x000000000000000000000000339d413ccefd986b1b3647a9cfa9cbbe70a30749
&page=1
&offset=2
&apikey=YourApiKeyToken
Usage:
* For a single topic, specify the topic number such as `topic0`, `topic1`, `topic2`, `topic3`
* For multiple topics, specify the topic numbers **and** topic operator either `and` or `or` such as below topic0\_1\_opr (and|or between topic0 & topic1), topic1\_2\_opr (and|or between topic1 & topic2) topic2\_3\_opr (and|or between topic2 & topic3), topic0\_2\_opr (and|or between topic0 & topic2) topic0\_3\_opr (and|or between topic0 & topic3), topic1\_3\_opr (and|or between topic1 & topic3)
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=logs&action=getLogs&fromBlock=12878196&toBlock=12879196&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef&topic0_1_opr=and&topic1=0x0000000000000000000000000000000000000000000000000000000000000000&page=1&offset=1000&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
fromBlock
the `integer` block number to start searching for logs eg. `12878196`
toBlock
the `integer` block number to stop searching for logs eg. `12879196`
topic
the topic numbers to search for limited to`topic0`, `topic1`, `topic2`, `topic3`
topicOperator
the topic operator when multiple topic combinations are used limited to `and` or `or`
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page limited to **1000 records** per query, use the `page` parameter for subsequent records
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"address": "0x000000000000000000000000000000000000800a",\
"topics": [\
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",\
"0x000000000000000000000000339d413ccefd986b1b3647a9cfa9cbbe70a30749",\
"0x0000000000000000000000000000000000000000000000000000000000008001"\
],\
"data": "0x00000000000000000000000000000000000000000000000000000b1f02b04c40",\
"blockNumber": "0x754",\
"blockHash": "0x67cce6f72955b7df6921bf71e42d5f290841a42adadd7dbcacf9d61ecd762174",\
"timeStamp": "0x672aa02d",\
"gasPrice": "0x33c8d60",\
"gasUsed": "0x1e4e3",\
"logIndex": "0x",\
"transactionHash": "0xae29679e6c235a91c38c8e0425c954cb3600218c8f2985232e697c6382164ab9",\
"transactionIndex": "0x"\
},\
{\
"address": "0x000000000000000000000000000000000000800a",\
"topics": [\
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",\
"0x000000000000000000000000339d413ccefd986b1b3647a9cfa9cbbe70a30749",\
"0x0000000000000000000000000000000000000000000000000000000000008001"\
],\
"data": "0x00000000000000000000000000000000000000000000000000000c0191588c40",\
"blockNumber": "0x755",\
"blockHash": "0x2a9f0ff4ceee7638da0b9222596e622000925fd346dcdf92de8bab01d8549734",\
"timeStamp": "0x672aa036",\
"gasPrice": "0x33c8d60",\
"gasUsed": "0x1a91b",\
"logIndex": "0x",\
"transactionHash": "0x56b64efca0b73581b42cabb43746e58066ca6d864f8f354dcbb1d21421f3af4b",\
"transactionIndex": "0x"\
}\
]
}
[](#get-event-logs-by-address-filtered-by-topics)
Get Event Logs by Address filtered by Topics
---------------------------------------------------------------------------------------------------
Returns the event logs from an address, filtered by topics and block range.
Copy
https://api.abscan.org/api
?module=logs
&action=getLogs
&fromBlock=0
&toBlock=latest
&address=0x000000000000000000000000000000000000800A
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&topic0_1_opr=and
&topic1=0x000000000000000000000000339d413ccefd986b1b3647a9cfa9cbbe70a30749
&page=1
&offset=2
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=logs&action=getLogs&fromBlock=0&toBlock=latest&address=0x000000000000000000000000000000000000800A&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef&topic0_1_opr=and&topic1=0x000000000000000000000000339d413ccefd986b1b3647a9cfa9cbbe70a30749&page=1&offset=2&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
fromBlock
the `integer` block number to start searching for logs eg. `12878196`
toBlock
the `integer` block number to stop searching for logs eg. `12879196`
address
the `string` representing the address to check for logs
topic
the topic numbers to search for limited to`topic0`, `topic1`, `topic2`, `topic3`
topicOperator
the topic operator when multiple topic combinations are used limited to `and` or `or`
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page limited to **1000 records** per query, use the `page` parameter for subsequent records
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"address": "0x000000000000000000000000000000000000800a",\
"topics": [\
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",\
"0x000000000000000000000000339d413ccefd986b1b3647a9cfa9cbbe70a30749",\
"0x0000000000000000000000000000000000000000000000000000000000008001"\
],\
"data": "0x00000000000000000000000000000000000000000000000000000b1f02b04c40",\
"blockNumber": "0x754",\
"blockHash": "0x67cce6f72955b7df6921bf71e42d5f290841a42adadd7dbcacf9d61ecd762174",\
"timeStamp": "0x672aa02d",\
"gasPrice": "0x33c8d60",\
"gasUsed": "0x1e4e3",\
"logIndex": "0x",\
"transactionHash": "0xae29679e6c235a91c38c8e0425c954cb3600218c8f2985232e697c6382164ab9",\
"transactionIndex": "0x"\
},\
{\
"address": "0x000000000000000000000000000000000000800a",\
"topics": [\
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",\
"0x000000000000000000000000339d413ccefd986b1b3647a9cfa9cbbe70a30749",\
"0x0000000000000000000000000000000000000000000000000000000000008001"\
],\
"data": "0x00000000000000000000000000000000000000000000000000000c0191588c40",\
"blockNumber": "0x755",\
"blockHash": "0x2a9f0ff4ceee7638da0b9222596e622000925fd346dcdf92de8bab01d8549734",\
"timeStamp": "0x672aa036",\
"gasPrice": "0x33c8d60",\
"gasUsed": "0x1a91b",\
"logIndex": "0x",\
"transactionHash": "0x56b64efca0b73581b42cabb43746e58066ca6d864f8f354dcbb1d21421f3af4b",\
"transactionIndex": "0x"\
}\
]
}
[PreviousBlocks](/api-endpoints/blocks)
[NextGeth/Parity Proxy](/api-endpoints/geth-parity-proxy)
Last updated 2 months ago
---
# Blocks | Abscan
[](#get-block-and-uncle-rewards-by-blockno)
Get Block And Uncle Rewards by BlockNo
---------------------------------------------------------------------------------------
Returns the block reward and 'Uncle' block rewards.
Copy
https://api-sepolia.abscan.org/api
?module=block
&action=getblockreward
&blockno=1090932
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=block&action=getblockreward&blockno=1090932&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
blockno
the `integer` block number to check block rewards for eg. `12697906`
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":{
"blockNumber":"1090932",
"timeStamp":"1652449149",
"blockMiner":"0xd87def8bbd2c4d59494611ab259a2005c154212a",
"blockReward":"2000031500000000000",
"uncles":[\
\
],
"uncleInclusionReward":"0"
}
}
⏳ **Tip :** The `timestamp` field is denoted in [**Unix timestamp.**](https://www.unixtimestamp.com)
[](#get-estimated-block-countdown-time-by-blockno)
Get Estimated Block Countdown Time by BlockNo
-----------------------------------------------------------------------------------------------------
Returns the estimated time remaining, in seconds, until a certain block is mined.
Copy
https://api-sepolia.abscan.org/api
?module=block
&action=getblockcountdown
&blockno=1090932
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=block&action=getblockcountdown&blockno=9588666&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
blockno
the `integer` block number to estimate time remaining to be mined eg. `12697906`
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":{
"CurrentBlock":"9548810",
"CountdownBlock":"9588666",
"RemainingBlock":"39856",
"EstimateTimeInSec":"577927.0"
}
}
[](#get-block-number-by-timestamp)
Get Block Number by Timestamp
---------------------------------------------------------------------
Returns the block number that was mined at a certain timestamp.
Copy
https://api-sepolia.abscan.org/api
?module=block
&action=getblocknobytime
×tamp=1652459409
&closest=before
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=block&action=getblocknobytime×tamp=1652459409&closest=before&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
timestamp
the `integer` representing the Unix timestamp in **seconds**.
closest
the closest available block to the provided timestamp, either `before` or `after`
⏳ **Tip :** Convert a regular date-time to a [**Unix timestamp.**](https://www.unixtimestamp.com)
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":"1091685"
}
[PreviousTransactions](/testnet-abscan/api-endpoints/stats)
[NextLogs](/testnet-abscan/api-endpoints/logs)
Last updated 1 month ago
---
# Accounts | Abscan
[](#get-ether-balance-for-a-single-address)
Get Ether Balance for a Single Address
---------------------------------------------------------------------------------------
Returns the Ether balance of a given address.
Copy
https://api-sepolia.abscan.org/api
?module=account
&action=balance
&address=0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd
&tag=latest
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=account&action=balance&address=0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd&tag=latest&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to check for balance
tag
the `string` pre-defined block parameter, either `earliest`, `pending` or `latest`
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":"206796937658929992503000"
}
📖 **Tip:** The `result` is returned in [**wei.**](https://sepolia.abscan.org/unitconverter)
Convert Ethereum units using our [**Unit Converter.**](https://sepolia.abscan.org/unitconverter)
[](#get-ether-balance-for-multiple-addresses-in-a-single-call)
Get Ether Balance for Multiple Addresses in a Single Call
-----------------------------------------------------------------------------------------------------------------------------
Returns the balance of the accounts from a list of addresses.
Copy
https://api-sepolia.abscan.org/api
?module=account
&action=balancemulti
&address=https://api-sepolia.abscan.org/api?module=account&action=balance&address=0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd,0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd,0x8a5847fd0e592b058c026c5fdc322aee834b87f5&tag=latest&apikey=YourApiKeyToken,0x63a9dbCe75413036B2B778E670aaBd4493aAF9F3,0xd82b6aB1f20A21484fA5E28221B95425dddC5E8E
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=account&action=balancemulti&address=0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd,0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd,0x8a5847fd0e592b058c026c5fdc322aee834b87f5&tag=latest&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `strings` representing the addresses to check for balance, separated by `,` commas up to **20 addresses** per call
tag
the `integer` pre-defined block parameter, either `earliest`, `pending` or `latest`
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":[\
{\
"account":"0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd",\
"balance":"206796937658929992503000"\
},\
{\
"account":"0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd",\
"balance":"206796937658929992503000"\
},\
{\
"account":"0x8a5847fd0e592b058c026c5fdc322aee834b87f5",\
"balance":"16288712393992050891"\
}\
]
}
📖 **Tip:** The `result` is returned in [**wei.**](https://sepolia.abscan.org/unitconverter)
Convert Ethereum units using our [**Unit Converter.**](https://sepolia.abscan.org/unitconverter)
[](#get-a-list-of-normal-transactions-by-address)
Get a list of 'Normal' Transactions By Address
-----------------------------------------------------------------------------------------------------
Returns the list of transactions performed by an address, with optional pagination.
**** 📝 **Note :** This API endpoint returns a maximum of **10000 records** only.
Copy
https://api-sepolia.abscan.org/api
?module=account
&action=txlist
&address=0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd
&startblock=0
&endblock=99999999
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=account&action=txlist&address=0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd&startblock=0&endblock=99999999&page=1&offset=10&sort=asc&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the addresses to check for balance
startblock
the `integer` block number to start searching for transactions
endblock
the `integer` block number to stop searching for transactions
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
sort
the sorting preference, use `asc` to sort by ascending and `desc` to sort by descending
💡 **Tip:** Specify a smaller `startblock` and `endblock` range for faster search results.
Sample Response
Copy
{
"status":"1",
"message":"OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
"result":[\
{\
"blockNumber":"1037571",\
"timeStamp":"1651759857",\
"hash":"0x710e53707c79dd438a8bc3db2a45a123af6dba0d4a653a134035306d11f415fd",\
"nonce":"5",\
"blockHash":"0x64201f8940cee65186f64adb68a99fe3da0450bc9490617aeedd08f80cb8e29b",\
"transactionIndex":"0",\
"from":"0x10f5d45854e038071485ac9e402308cf80d2d2fe",\
"to":"0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd",\
"value":"50000000000000000000000",\
"gas":"21000",\
"gasPrice":"1500000007",\
"isError":"0",\
"txreceipt_status":"1",\
"input":"0x",\
"contractAddress":"",\
"cumulativeGasUsed":"21000",\
"gasUsed":"21000",\
"confirmations":"48476"\
},\
{\
"blockNumber":"1061942",\
"timeStamp":"1652077697",\
"hash":"0x7734cae034c8a7198a5988c5ae927adf30cf77d2cbb25ed996278e402c0e0032",\
"nonce":"0",\
"blockHash":"0xedc7119adb34edf5480fe52f090dedbef647948ffc91806afe7d8b0182781b40",\
"transactionIndex":"0",\
"from":"0x382b4ca2c4a7cd28c1c400c69d81ec2b2637f7dd",\
"to":"0x93e973436cd7757f21b1c947599f67082624a721",\
"value":"1000000000000000",\
"gas":"21000",\
"gasPrice":"2000000007",\
"isError":"0",\
"txreceipt_status":"1",\
"input":"0x",\
"contractAddress":"",\
"cumulativeGasUsed":"21000",\
"gasUsed":"21000",\
"confirmations":"24105"\
}\
]
}
[](#get-a-list-of-internal-transactions-by-address)
Get a list of 'Internal' Transactions by Address
---------------------------------------------------------------------------------------------------------
Returns the list of internal transactions performed by an address, with optional pagination.
📝 **Note :** This API endpoint returns a maximum of **10000 records** only.
Copy
https://api-sepolia.abscan.org/api
?module=account
&action=txlistinternal
&address=0xa4fadaa5e8577fee5799e2bd9615014013b45c5d
&startblock=0
&endblock=99999999
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=account&action=txlistinternal&address=0xa4fadaa5e8577fee5799e2bd9615014013b45c5d&startblock=0&endblock=99999999&page=1&offset=10&sort=asc&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the addresses to check for balance
startblock
the `integer` block number to start searching for transactions
endblock
the `integer` block number to stop searching for transactions
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
sort
the sorting preference, use `asc` to sort by ascending and `desc` to sort by descending
💡 **Tip:** Specify a smaller `startblock` and `endblock` range for faster search results
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":[\
{\
"blockNumber":"765371",\
"timeStamp":"1648218619",\
"hash":"0xcb6609b6f9133fc1bfd189fb52ed616968a5f7c56af8da3bd6724f7655fe5f78",\
"from":"0x02f11eabf51d28bb0bae795e256ce52161d65c2b",\
"to":"0xa4fadaa5e8577fee5799e2bd9615014013b45c5d",\
"value":"10000000000000000",\
"contractAddress":"",\
"input":"",\
"type":"call",\
"gas":"2300",\
"gasUsed":"0",\
"traceId":"0_1",\
"isError":"0",\
"errCode":""\
}\
]
}
[](#get-internal-transactions-by-transaction-hash)
Get 'Internal Transactions' by Transaction Hash
-------------------------------------------------------------------------------------------------------
Returns the list of internal transactions performed within a transaction.
**Note :** This API endpoint returns a maximum of **10000 records** only.
Copy
https://api-sepolia.abscan.org/api
?module=account
&action=txlistinternal
&txhash=0xb730ee4dc8d0274be31d1e31ed7fe9749d7a67c0e35b297f3c2d10b06c1f6f1e
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=account&action=txlistinternal&txhash=0xb730ee4dc8d0274be31d1e31ed7fe9749d7a67c0e35b297f3c2d10b06c1f6f1e&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
txhash
the `string` representing the transaction hash to check for internal transactions
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":[\
{\
"blockNumber":"312070",\
"timeStamp":"1639592011",\
"from":"0xa234eead085ac80a4f7cc5220789e048373f0f1e",\
"to":"",\
"value":"0",\
"contractAddress":"0x63a19c2868e469ffc2c8346c93f81ff6e140ffaf",\
"input":"",\
"type":"create",\
"gas":"8504616",\
"gasUsed":"134349",\
"isError":"0",\
"errCode":""\
},\
\
{\
"blockNumber":"312070",\
"timeStamp":"1639592011",\
"from":"0xa234eead085ac80a4f7cc5220789e048373f0f1e",\
"to":"",\
"value":"0",\
"contractAddress":"0xe05ba0186f4a5a5d0eb8a5394d8413411ffd321c",\
"input":"",\
"type":"create",\
"gas":"1119086",\
"gasUsed":"134349",\
"isError":"0",\
"errCode":""\
},\
{\
"blockNumber":"312070",\
"timeStamp":"1639592011",\
"from":"0xa234eead085ac80a4f7cc5220789e048373f0f1e",\
"to":"",\
"value":"0",\
"contractAddress":"0x7b99f4f6260c3cd12984e8d2b83eaf51d44e2254",\
"input":"",\
"type":"create",\
"gas":"134349",\
"gasUsed":"134349",\
"isError":"0",\
"errCode":""\
}\
]
}
The `isError` field returns `0` for **successful transactions** and `1` for **rejected/cancelled transactions.**
[](#get-internal-transactions-by-block-range)
Get "Internal Transactions" by Block Range
---------------------------------------------------------------------------------------------
Returns the list of internal transactions performed within a block range, with optional pagination.
📝 **Note :** This API endpoint returns a maximum of **10000 records** only.
Copy
https://api-sepolia.abscan.org/api
?module=account
&action=txlistinternal
&startblock=484887
&endblock=765371
&page=1
&offset=10
&sort=asc
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=account&action=txlistinternal&startblock=484887&endblock=765371&page=1&offset=10&sort=asc&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
startblock
the `integer` block number to start searching for transactions
endblock
the `integer` block number to stop searching for transactions
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
sort
the sorting preference, use `asc` to sort by ascending and `desc` to sort by descending
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":[\
{\
"blockNumber":"484887",\
"timeStamp":"1644613109",\
"hash":"0xc3ff81084b157b7d695f3df8636eebcacb6ca938c62c3102492978dbe8f5879b",\
"from":"0x9bcdb32c4d0f0992bfb926a28ee2cb7b9d9750cc",\
"to":"0x105083929bf9bb22c26cb1777ec92661170d4285",\
"value":"3906875000000000000000",\
"contractAddress":"",\
"input":"",\
"type":"call",\
"gas":"2300",\
"gasUsed":"0",\
"traceId":"0_1",\
"isError":"0",\
"errCode":""\
},\
{\
"blockNumber":"498080",\
"timeStamp":"1644787132",\
"hash":"0x1ab55087625084f2e1462a49f13a36d0996bff67da3cb4e7250e110e922274bd",\
"from":"0x9bcdb32c4d0f0992bfb926a28ee2cb7b9d9750cc",\
"to":"0x84e9304fa9aafc5e70090eadda9ac2c76d93ad51",\
"value":"1491314746532500000000",\
"contractAddress":"",\
"input":"",\
"type":"call",\
"gas":"2300",\
"gasUsed":"0",\
"traceId":"0_1",\
"isError":"0",\
"errCode":""\
},\
{\
"blockNumber":"518080",\
"timeStamp":"1645046610",\
"hash":"0x1b08041082471d96bbf5362db688f447ce8c775d242998a3b190211560911d86",\
"from":"0x9bcdb32c4d0f0992bfb926a28ee2cb7b9d9750cc",\
"to":"0x105083929bf9bb22c26cb1777ec92661170d4285",\
"value":"4250625000000000000000",\
"contractAddress":"",\
"input":"",\
"type":"call",\
"gas":"2300",\
"gasUsed":"0",\
"traceId":"0_1",\
"isError":"0",\
"errCode":""\
}\
]
}
The `isError` field returns `0` for **successful transactions** and `1` for **rejected/cancelled transactions.**
[](#get-a-list-of-erc20-token-transfer-events-by-address)
Get a list of 'ERC20 - Token Transfer Events' by Address
-----------------------------------------------------------------------------------------------------------------------
Returns the list of ERC-20 tokens transferred by an address, with optional filtering by token contract.
Copy
https://api-sepolia.abscan.org/api
?module=account
&action=tokentx
&contractaddress=0xa808b14492AC6E33419ac16112154D40D0A4AEBA
&address=0x105083929bf9bb22c26cb1777ec92661170d4285
&page=1
&offset=100
&startblock=0
&endblock=99999999
&sort=asc
&apikey=YourApiKeyToken
Usage:
* ERC-20 transfers from an **address**, specify the `address` parameter
* ERC-20 transfers from a **contract address**, specify the `contract address` parameter
* ERC-20 transfers from an **address** filtered by a **token contract**, specify both `address` and `contract address` parameters.
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=account&action=tokentx&contractaddress=0xa808b14492AC6E33419ac16112154D40D0A4AEBA&address=0x105083929bf9bb22c26cb1777ec92661170d4285&page=1&offset=100&startblock=0&endblock=99999999&sort=asc&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to check for balance
contractaddress
the `string` representing the token contract address to check for balance
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
startblock
the `integer` block number to start searching for transactions
endblock
the `integer` block number to stop searching for transactions
sort
the sorting preference, use `asc` to sort by ascending and `desc` to sort by descending
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":[\
{\
"blockNumber":"496492",\
"timeStamp":"1644767322",\
"hash":"0x433994d50986d0c021098adadac4f4a89249c51fb4ea372e553af6ee6fc0965c",\
"nonce":"20",\
"blockHash":"0x29394a72a707d77a167a1eec53d33940b5a366a2c01cd10094c18a15517ff44b",\
"from":"0x84e9304fa9aafc5e70090eadda9ac2c76d93ad51",\
"contractAddress":"0xa808b14492ac6e33419ac16112154d40d0a4aeba",\
"to":"0x105083929bf9bb22c26cb1777ec92661170d4285",\
"value":"100000000000000000000000",\
"tokenName":"Vitcoin",\
"tokenSymbol":"VTC",\
"tokenDecimal":"18",\
"transactionIndex":"0",\
"gas":"53517",\
"gasPrice":"1000000007",\
"gasUsed":"35678",\
"cumulativeGasUsed":"35678",\
"input":"deprecated",\
"confirmations":"589603"\
},\
{\
"blockNumber":"886779",\
"timeStamp":"1649789803",\
"hash":"0x1071238546873837a9b03736a8ca26ce379e66999f6e74748dd919890232e34a",\
"nonce":"28",\
"blockHash":"0xd1a3ad751eba89ac664e691844a5a44361d8c801ce6bbfe31c03f1d7970e28f7",\
"from":"0x84e9304fa9aafc5e70090eadda9ac2c76d93ad51",\
"contractAddress":"0xa808b14492ac6e33419ac16112154d40d0a4aeba",\
"to":"0x105083929bf9bb22c26cb1777ec92661170d4285",\
"value":"999900000000000000000000000",\
"tokenName":"Vitcoin",\
"tokenSymbol":"VTC",\
"tokenDecimal":"18",\
"transactionIndex":"0",\
"gas":"53553",\
"gasPrice":"1500000007",\
"gasUsed":"30902",\
"cumulativeGasUsed":"30902",\
"input":"deprecated",\
"confirmations":"199316"\
}\
]
}
[](#get-a-list-of-erc721-token-transfer-events-by-address)
Get a list of 'ERC721 - Token Transfer Events' by Address
-------------------------------------------------------------------------------------------------------------------------
Returns the list of ERC-721 ( NFT ) tokens transferred by an address, with optional filtering by token contract
Copy
https://api-sepolia.abscan.org/api
?module=account
&action=tokennfttx
&contractaddress=0x31225ffF34ebB599D018A22d2430c2e4fdE32eCa
&address=0x8a5847fd0e592b058c026c5fdc322aee834b87f5
&page=1
&offset=100
&startblock=0
&endblock=99999999
&sort=asc
&apikey=YourApiKeyToken
Usage:
* ERC-721 transfers from an **address**, specify the `address` parameter
* ERC-721 transfers from a **contract address**, specify the `contract address` parameter
* ERC-721 transfers from an **address** filtered by a **token contract**, specify both `address` and `contract address` parameters.
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=account&action=tokennfttx&contractaddress=0x31225ffF34ebB599D018A22d2430c2e4fdE32eCa&address=0x8a5847fd0e592b058c026c5fdc322aee834b87f5&page=1&offset=100&startblock=0&endblock=99999999&sort=asc&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to check for balance
contractaddress
the `string` representing the token contract address to check for balance
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
startblock
the `integer` block number to start searching for transactions
endblock
the `integer` block number to stop searching for transactions
sort
the sorting preference, use `asc` to sort by ascending and `desc` to sort by descending
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":[\
{\
"blockNumber":"922742",\
"timeStamp":"1650258658",\
"hash":"0xe2e18e8831556beff9e08a9f04e0fd38fe290c9b62a49021cfa6b23cbd8900a3",\
"nonce":"2",\
"blockHash":"0xd3e6974bd02372a60e60399fe71f9f3972b5cb1d409e7751abfcadb302655e19",\
"from":"0x0000000000000000000000000000000000000000",\
"contractAddress":"0x31225fff34ebb599d018a22d2430c2e4fde32eca",\
"to":"0x8a5847fd0e592b058c026c5fdc322aee834b87f5",\
"tokenID":"1",\
"tokenName":"Calcium",\
"tokenSymbol":"CALC",\
"tokenDecimal":"0",\
"transactionIndex":"0",\
"gas":"90805",\
"gasPrice":"2000000007",\
"gasUsed":"90805",\
"cumulativeGasUsed":"90805",\
"input":"deprecated",\
"confirmations":"193136"\
}\
]
}
[](#get-list-of-blocks-mined-by-address)
Get list of Blocks Mined by Address
---------------------------------------------------------------------------------
Returns the list of blocks mined by an address.
Copy
https://api-sepolia.abscan.org/api
?module=account
&action=getminedblocks
&address=0x3d080421c9DD5fB387d6e3124f7E1C241ADE9568
&blocktype=blocks
&page=1
&offset=10
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=account&action=getminedblocks&address=0x3d080421c9DD5fB387d6e3124f7E1C241ADE9568&blocktype=blocks&page=1&offset=10&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `string` representing the address to check for balance
blocktype
the `string` pre-defined block type, either `blocks` for canonical blocks or `uncles` for uncle blocks only
page
the `integer` page number, if pagination is enabled
offset
the number of transactions displayed per page
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":[\
{\
"blockNumber":"1088398",\
"timeStamp":"1652415312",\
"blockReward":"2000000000000000000"\
},\
{\
"blockNumber":"1088395",\
"timeStamp":"1652415289",\
"blockReward":"2000000000000000000"\
},\
{\
"blockNumber":"1088361",\
"timeStamp":"1652414946",\
"blockReward":"2000000000000000000"\
}\
]
}
⏳ **Note :** The `timeStamp` is represented in [**Unix timestamp.**](https://www.unixtimestamp.com)
[PreviousSepolia Testnet](/testnet-abscan)
[NextContracts](/testnet-abscan/api-endpoints/contracts)
Last updated 1 month ago
---
# Common Error Messages | Abscan
An API call that encounters an error ⚠️ will return 0 as its `status code` and display the cause of the error under the `result` field.
Copy
{
"status":"0",
"message":"NOTOK",
"result":"Max rate limit reached, please use API Key for higher rate limit"
}
###
[](#invalid-api-key)
Invalid API Key
> "Invalid API Key"
This error occurs when you specify an invalid API Key, or use a key from an explorer on a [**different chain**](/support/faq#can-the-same-api-keys-be-used-across-different-explorers)
.
To resolve, ensure that you have copy pasted the right key from the right explorer.
New API Keys may also take a moment to be fully activated, so if your fresh key is throwing an error consider waiting for a few minutes.
###
[](#max-rate-limit)
Max rate limit
> "Max rate limit reached, please use API Key for higher rate limit"
This error occurs when you **exceed the rate limit** assigned to your specific API key.
To resolve, adhere to the [**rate limits**](/support/rate-limits)
of your available plan by waiting for a certain amount of time before each request. If you are using a script or application, **apply throttling** to limit the frequency of calls.
###
[](#missing-or-invalid-action)
Missing or invalid action
> "Error! Missing Or invalid Action name"
This error occurs when you **do not specify**, or specify an **invalid** `module` and `action` name.
To resolve, **double check** your API query to use a valid module and action name.
If you require some help getting started, try copying the sample queries provided in the [**API Endpoints**](https://github.com/BlockSolutions/etherscan-api-docs/blob/master/support/broken-reference/README.md)
and pasting them into your browser.
###
[](#endpoint-specific-errors)
Endpoint-specific errors
> "Error! Block number already pass"
>
> "Error! Invalid address format"
>
> "Contract source code not verified"
These error messages returned are specific to certain endpoints and their **related parameters.**
To resolve, kindly refer to the specific endpoint's documentation, and check for the **correct format** or **values** to be specified as **parameters.**
###
[](#query-timeout)
**Query Timeout**
> "Query Timeout occured. Please select a smaller result dataset"
>
> "Unexpected err, timeout occurred or server too busy. Please try again later"
This error occurs when you have sent a particularly large query that did not manage to be completed in time.
To resolve, consider selecting a smaller date/block range, though you may [**ping us**](/support/getting-help)
if you think the issue may be performance related.
[PreviousRate Limits](/support/rate-limits)
[NextGetting Help](/support/getting-help)
---
# Logs | Abscan
The Event Log API was designed to provide an alternative to the native [**eth\_getLogs**](https://eth.wiki/json-rpc/API)
.
Below are the list of supported filter parameters:
* fromBlock, toBlock, address
* topic0, topic1, topic2, topic3 (32 Bytes per topic)
* topic0\_1\_opr (and|or between topic0 & topic1), topic1\_2\_opr (and|or between topic1 & topic2), topic2\_3\_opr (and|or between topic2 & topic3), topic0\_2\_opr (and|or between topic0 & topic2), topic0\_3\_opr (and|or between topic0 & topic3), topic1\_3\_opr (and|or between topic1 & topic3)
**Some parameters to take note of** 📝
* FromBlock & ToBlock accepts the blocknumber (integer, NOT hex) or 'latest' (earliest & pending is NOT supported yet)
* Topic Operator (opr) choices are either '**and**' or '**or**' and are restricted to the above choices only
* FromBlock & ToBlock parameters are required
* An address and/or topic(X) parameters are required, when multiple topic(X) parameters are used the topicX\_X\_opr (and|or operator) is also required
For performance & security considerations, only the first **1000 results** are return. So please narrow down the filter parameters.
[](#sample-log-api-queries)
Sample Log API Queries
-------------------------------------------------------
####
[](#get-event-logs-from-block-number-1092029-to-latest-where-log-address-0x639d4384b429ea4660f377b7a29da)
Get Event Logs from block number 1092029 to 'latest' , where log address = 0x639D4384b429ea4660f377B7A29dAe6d2255090f and topic\[0\] = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
Copy
https://api-sepolia.abscan.org/api
?module=logs
&action=getLogs
&fromBlock=1092029
&toBlock=latest
&address=0x639D4384b429ea4660f377B7A29dAe6d2255090f
&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=logs&action=getLogs&fromBlock=1092029&toBlock=latest&address=0x639D4384b429ea4660f377B7A29dAe6d2255090f&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef&apikey=YourApiKeyToken)
> 🔗
####
[](#get-event-logs-from-block-number-9433622-to-block-latest-where-log-address-0x5592ec0cfb4dbc12d3ab100)
Get Event Logs from block number 9433622 to block 'latest', where log address = 0x5592ec0cfb4dbc12d3ab100b257153436a1f0fea, topic\[0\] = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef 'AND' topic\[1\] = 0x0000000000000000000000008e811410ce01e0244808af95bba906b8ab77a40b
Copy
https://api-sepolia.abscan.org/api
?module=logs
&action=getLogs
&fromBlock=1089604
&toBlock=latest
&address=0x64A736Aa55958a41bC1B18590AB7dfCb78444Dd1
&topic0=0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62
&topic0_1_opr=and
&topic1=0x000000000000000000000000955866ee0bd3b8b0be4d4ea306670f34b90ef3ed
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=logs&action=getLogs&fromBlock=1089604&toBlock=latest&address=0x64A736Aa55958a41bC1B18590AB7dfCb78444Dd1&topic0=0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62&topic0_1_opr=and&topic1=0x000000000000000000000000955866ee0bd3b8b0be4d4ea306670f34b90ef3ed&apikey=YourApiKeyToken)
> 🔗
[PreviousBlocks](/testnet-abscan/api-endpoints/blocks)
[NextGeth/Parity Proxy](/testnet-abscan/api-endpoints/geth-parity-proxy)
Last updated 1 month ago
---
# Tokens | Abscan
[](#get-erc20-token-totalsupply-by-contractaddress)
Get ERC20-Token TotalSupply by ContractAddress
-------------------------------------------------------------------------------------------------------
Returns the current amount of an ERC-20 token in circulation.
Copy
https://api-sepolia.abscan.org/api
?module=stats
&action=tokensupply
&contractaddress=0x639d4384b429ea4660f377b7a29dae6d2255090f
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=stats&action=tokensupply&contractaddress=0x639d4384b429ea4660f377b7a29dae6d2255090f&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
contractaddress
the `contract address` of the ERC-20 token
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":"10000000000000000000000"
}
📈 **Tip** : The `result` is returned in the token's **smallest decimal representation.**
Eg. a token with a balance of `215.241526476136819398` and 18 decimal places will be returned as `215241526476136819398`
[](#get-erc20-token-account-balance-for-tokencontractaddress)
Get ERC20-Token Account Balance for TokenContractAddress
---------------------------------------------------------------------------------------------------------------------------
Returns the current balance of an ERC-20 token of an address.
Copy
https://api-sepolia.abscan.org/api
?module=account
&action=tokenbalance
&contractaddress=0x639d4384b429ea4660f377b7a29dae6d2255090f
&address=0x955866ee0bd3b8b0be4d4ea306670f34b90ef3ed
&tag=latest&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=account&action=tokenbalance&contractaddress=0x639d4384b429ea4660f377b7a29dae6d2255090f&address=0x955866ee0bd3b8b0be4d4ea306670f34b90ef3ed&tag=latest&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
contractaddress
the `contract address` of the ERC-20 token
address
the `string` representing the address to check for token balance
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":"10000000000000000000000"
}
📈 **Tip** : The `result` is returned in the token's **smallest decimal representation.**
Eg. a token with a balance of `215.241526476136819398` and 18 decimal places will be returned as `215241526476136819398`
[PreviousGeth/Parity Proxy](/testnet-abscan/api-endpoints/geth-parity-proxy)
[NextStats](/testnet-abscan/api-endpoints/stats-1)
Last updated 1 month ago
---
# Transactions | Abscan
[](#check-contract-execution-status)
Check Contract Execution Status
-------------------------------------------------------------------------
Returns the status code of a contract execution.
Copy
https://api-sepolia.abscan.org/api
?module=transaction
&action=getstatus
&txhash=0x5d329954fae7d19b2fb9abf0e6862735243b1079c58e0ea307d7e933657ac083
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=transaction&action=getstatus&txhash=0x5d329954fae7d19b2fb9abf0e6862735243b1079c58e0ea307d7e933657ac083&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
txhash
the `string` representing the transaction hash to check the execution status
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":{
"isError":"0",
"errDescription":""
}
}
📖 **Tip:** The `isError` field returns `0` for **successful transactions** and `1` for **failed transactions.**
[](#check-transaction-receipt-status)
Check Transaction Receipt Status
---------------------------------------------------------------------------
Returns the status code of a transaction execution.
📝 **Note:** Only applicable for post [**Byzantium Fork**](https://www.investopedia.com/news/what-byzantium-hard-fork-ethereum/)
transactions.
Copy
https://api-sepolia.abscan.org/api
?module=transaction
&action=gettxreceiptstatus
&txhash=0x13d297c02c1dd4ada29fa88e5d3dfa040c2f1d0d45802fb6b02ed95debdf2290
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=transaction&action=gettxreceiptstatus&txhash=0x13d297c02c1dd4ada29fa88e5d3dfa040c2f1d0d45802fb6b02ed95debdf2290&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
txhash
the `string` representing the transaction hash to check the execution status
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":{
"status":"1"
}
}
📖 **Tip:** The `status` field returns `0` for **failed transactions** and `1` for **successful transactions.**
[PreviousContracts](/testnet-abscan/api-endpoints/contracts)
[NextBlocks](/testnet-abscan/api-endpoints/blocks)
Last updated 1 month ago
---
# Contracts | Abscan
[](#get-contract-abi-for-verified-contract-source-codes)
Get Contract ABI for [Verified Contract Source Codes](https://sepolia.abscan.org/contractsVerified)
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Returns the Contract Application Binary Interface ( ABI ) of a verified smart contract.
Find verified contracts ✅on our [**Verified Contracts Source Code**](https://sepolia.abscan.org/contractsVerified)
page.
Copy
https://api-sepolia.abscan.org/api
?module=contract
&action=getabi
&address=0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=contract&action=getabi&address=0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `contract address` that has a verified source code
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":"[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"description\",\"type\":\"string\"},{\"name\":\"votingDeadline\",\"type\":\"uint256\"},{\"name\":\"open\",\"type\":\"bool\"},{\"name\":\"proposalPassed\",\"type\":\"bool\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"name\":\"proposalDeposit\",\"type\":\"uint256\"},{\"name\":\"newCurator\",\"type\":\"bool\"},{\"name\":\"yea\",\"type\":\"uint256\"},{\"name\":\"nay\",\"type\":\"uint256\"},{\"name\":\"creator\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minTokensToCreate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardAccount\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"daoCreator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"divisor\",\"outputs\":[{\"name\":\"divisor\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"extraBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_transactionData\",\"type\":\"bytes\"}],\"name\":\"executeProposal\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unblockMe\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalRewardToken\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"actualBalance\",\"outputs\":[{\"name\":\"_actualBalance\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"closingTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowedRecipients\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferWithoutReward\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"refund\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_recipient\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_description\",\"type\":\"string\"},{\"name\":\"_transactionData\",\"type\":\"bytes\"},{\"name\":\"_debatingPeriod\",\"type\":\"uint256\"},{\"name\":\"_newCurator\",\"type\":\"bool\"}],\"name\":\"newProposal\",\"outputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"DAOpaidOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minQuorumDivisor\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newContract\",\"type\":\"address\"}],\"name\":\"newContract\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_recipient\",\"type\":\"address\"},{\"name\":\"_allowed\",\"type\":\"bool\"}],\"name\":\"changeAllowedRecipients\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"halveMinQuorum\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"paidOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_newCurator\",\"type\":\"address\"}],\"name\":\"splitDAO\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DAOrewardAccount\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposalDeposit\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numberOfProposals\",\"outputs\":[{\"name\":\"_numberOfProposals\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeMinQuorumMet\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_toMembers\",\"type\":\"bool\"}],\"name\":\"retrieveDAOReward\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"receiveEther\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isFueled\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokenHolder\",\"type\":\"address\"}],\"name\":\"createTokenProxy\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"getNewDAOAddress\",\"outputs\":[{\"name\":\"_newDAO\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_supportsProposal\",\"type\":\"bool\"}],\"name\":\"vote\",\"outputs\":[{\"name\":\"_voteID\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getMyReward\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewardToken\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFromWithoutReward\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposalDeposit\",\"type\":\"uint256\"}],\"name\":\"changeProposalDeposit\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"blocked\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"curator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_recipient\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_transactionData\",\"type\":\"bytes\"}],\"name\":\"checkProposalCode\",\"outputs\":[{\"name\":\"_codeChecksOut\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"privateCreation\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"inputs\":[{\"name\":\"_curator\",\"type\":\"address\"},{\"name\":\"_daoCreator\",\"type\":\"address\"},{\"name\":\"_proposalDeposit\",\"type\":\"uint256\"},{\"name\":\"_minTokensToCreate\",\"type\":\"uint256\"},{\"name\":\"_closingTime\",\"type\":\"uint256\"},{\"name\":\"_privateCreation\",\"type\":\"address\"}],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"FuelingToDate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CreatedToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Refund\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"proposalID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"newCurator\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"description\",\"type\":\"string\"}],\"name\":\"ProposalAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"proposalID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"position\",\"type\":\"bool\"},{\"indexed\":true,\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"proposalID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"result\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"quorum\",\"type\":\"uint256\"}],\"name\":\"ProposalTallied\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_newCurator\",\"type\":\"address\"}],\"name\":\"NewCurator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_recipient\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_allowed\",\"type\":\"bool\"}],\"name\":\"AllowedRecipientChanged\",\"type\":\"event\"}]"
}
[](#get-contract-source-code-for-verified-contract-source-codes)
Get Contract Source Code for [Verified Contract Source Codes](https://sepolia.abscan.org/contractsVerified)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Returns the Solidity source code of a verified smart contract.
📩 **Tip :** You can also download a [**CSV list of verified contracts addresses**](https://sepolia.abscan.org/exportData?type=open-source-contract-codes)
of which the code publishers have provided a corresponding Open Source license for redistribution.
> Try this endpoint in your [**browser**](https://api-sepolia.abscan.org/api?module=contract&action=getsourcecode&address=0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413&apikey=YourApiKeyToken)
> 🔗
Copy
https://api-sepolia.abscan.org/api
?module=contract
&action=getsourcecode
&address=0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413
&apikey=YourApiKeyToken
RequestResponse
Query Parameters
Parameter
Description
address
the `contract address` that has a verified source code
Sample Response
Copy
{
"status":"1",
"message":"OK",
"result":[\
{\
"SourceCode":"/*\n\n- Bytecode Verification performed was compared on second iteration -\n\nThis file is part of the DAO.\n\nThe DAO is free software: you can redistribute it and/or modify\nit under the terms of the GNU lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThe DAO is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU lesser General Public License for more details.\n\nYou should have received a copy of the GNU lesser General Public License\nalong with the DAO. If not, see .\n*/\n\n\n/*\nBasic, standardized Token contract with no \"premine\". Defines the functions to\ncheck token balances, send tokens, send tokens on behalf of a 3rd party and the\ncorresponding approval process. Tokens need to be created by a derived\ncontract (e.g. TokenCreation.sol).\n\nThank you ConsenSys, this contract originated from:\nhttps://github.com/ConsenSys/Tokens/blob/master/Token_Contracts/contracts/Standard_Token.sol\nWhich is itself based on the Ethereum standardized contract APIs:\nhttps://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs\n*/\n\n/// @title Standard Token Contract.\n\ncontract TokenInterface {\n mapping (address => uint256) balances;\n mapping (address => mapping (address => uint256)) allowed;\n\n /// Total amount of tokens\n uint256 public totalSupply;\n\n /// @param _owner The address from which the balance will be retrieved\n /// @return The balance\n function balanceOf(address _owner) constant returns (uint256 balance);\n\n /// @notice Send `_amount` tokens to `_to` from `msg.sender`\n /// @param _to The address of the recipient\n /// @param _amount The amount of tokens to be transferred\n /// @return Whether the transfer was successful or not\n function transfer(address _to, uint256 _amount) returns (bool success);\n\n /// @notice Send `_amount` tokens to `_to` from `_from` on the condition it\n /// is approved by `_from`\n /// @param _from The address of the origin of the transfer\n /// @param _to The address of the recipient\n /// @param _amount The amount of tokens to be transferred\n /// @return Whether the transfer was successful or not\n function transferFrom(address _from, address _to, uint256 _amount) returns (bool success);\n\n /// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on\n /// its behalf\n /// @param _spender The address of the account able to transfer the tokens\n /// @param _amount The amount of tokens to be approved for transfer\n /// @return Whether the approval was successful or not\n function approve(address _spender, uint256 _amount) returns (bool success);\n\n /// @param _owner The address of the account owning tokens\n /// @param _spender The address of the account able to transfer the tokens\n /// @return Amount of remaining tokens of _owner that _spender is allowed\n /// to spend\n function allowance(\n address _owner,\n address _spender\n ) constant returns (uint256 remaining);\n\n event Transfer(address indexed _from, address indexed _to, uint256 _amount);\n event Approval(\n address indexed _owner,\n address indexed _spender,\n uint256 _amount\n );\n}\n\n\ncontract Token is TokenInterface {\n // Protects users by preventing the execution of method calls that\n // inadvertently also transferred ether\n modifier noEther() {if (msg.value > 0) throw; _}\n\n function balanceOf(address _owner) constant returns (uint256 balance) {\n return balances[_owner];\n }\n\n function transfer(address _to, uint256 _amount) noEther returns (bool success) {\n if (balances[msg.sender] >= _amount && _amount > 0) {\n balances[msg.sender] -= _amount;\n balances[_to] += _amount;\n Transfer(msg.sender, _to, _amount);\n return true;\n } else {\n return false;\n }\n }\n\n function transferFrom(\n address _from,\n address _to,\n uint256 _amount\n ) noEther returns (bool success) {\n\n if (balances[_from] >= _amount\n && allowed[_from][msg.sender] >= _amount\n && _amount > 0) {\n\n balances[_to] += _amount;\n balances[_from] -= _amount;\n allowed[_from][msg.sender] -= _amount;\n Transfer(_from, _to, _amount);\n return true;\n } else {\n return false;\n }\n }\n\n function approve(address _spender, uint256 _amount) returns (bool success) {\n allowed[msg.sender][_spender] = _amount;\n Approval(msg.sender, _spender, _amount);\n return true;\n }\n\n function allowance(address _owner, address _spender) constant returns (uint256 remaining) {\n return allowed[_owner][_spender];\n }\n}\n\n\n/*\nThis file is part of the DAO.\n\nThe DAO is free software: you can redistribute it and/or modify\nit under the terms of the GNU lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThe DAO is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU lesser General Public License for more details.\n\nYou should have received a copy of the GNU lesser General Public License\nalong with the DAO. If not, see .\n*/\n\n\n/*\nBasic account, used by the DAO contract to separately manage both the rewards \nand the extraBalance accounts. \n*/\n\ncontract ManagedAccountInterface {\n // The only address with permission to withdraw from this account\n address public owner;\n // If true, only the owner of the account can receive ether from it\n bool public payOwnerOnly;\n // The sum of ether (in wei) which has been sent to this contract\n uint public accumulatedInput;\n\n /// @notice Sends `_amount` of wei to _recipient\n /// @param _amount The amount of wei to send to `_recipient`\n /// @param _recipient The address to receive `_amount` of wei\n /// @return True if the send completed\n function payOut(address _recipient, uint _amount) returns (bool);\n\n event PayOut(address indexed _recipient, uint _amount);\n}\n\n\ncontract ManagedAccount is ManagedAccountInterface{\n\n // The constructor sets the owner of the account\n function ManagedAccount(address _owner, bool _payOwnerOnly) {\n owner = _owner;\n payOwnerOnly = _payOwnerOnly;\n }\n\n // When the contract receives a transaction without data this is called. \n // It counts the amount of ether it receives and stores it in \n // accumulatedInput.\n function() {\n accumulatedInput += msg.value;\n }\n\n function payOut(address _recipient, uint _amount) returns (bool) {\n if (msg.sender != owner || msg.value > 0 || (payOwnerOnly && _recipient != owner))\n throw;\n if (_recipient.call.value(_amount)()) {\n PayOut(_recipient, _amount);\n return true;\n } else {\n return false;\n }\n }\n}\n/*\nThis file is part of the DAO.\n\nThe DAO is free software: you can redistribute it and/or modify\nit under the terms of the GNU lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThe DAO is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU lesser General Public License for more details.\n\nYou should have received a copy of the GNU lesser General Public License\nalong with the DAO. If not, see .\n*/\n\n\n/*\n * Token Creation contract, used by the DAO to create its tokens and initialize\n * its ether. Feel free to modify the divisor method to implement different\n * Token Creation parameters\n*/\n\n\ncontract TokenCreationInterface {\n\n // End of token creation, in Unix time\n uint public closingTime;\n // Minimum fueling goal of the token creation, denominated in tokens to\n // be created\n uint public minTokensToCreate;\n // True if the DAO reached its minimum fueling goal, false otherwise\n bool public isFueled;\n // For DAO splits - if privateCreation is 0, then it is a public token\n // creation, otherwise only the address stored in privateCreation is\n // allowed to create tokens\n address public privateCreation;\n // hold extra ether which has been sent after the DAO token\n // creation rate has increased\n ManagedAccount public extraBalance;\n // tracks the amount of wei given from each contributor (used for refund)\n mapping (address => uint256) weiGiven;\n\n /// @dev Constructor setting the minimum fueling goal and the\n /// end of the Token Creation\n /// @param _minTokensToCreate Minimum fueling goal in number of\n /// Tokens to be created\n /// @param _closingTime Date (in Unix time) of the end of the Token Creation\n /// @param _privateCreation Zero means that the creation is public. A\n /// non-zero address represents the only address that can create Tokens\n /// (the address can also create Tokens on behalf of other accounts)\n // This is the constructor: it can not be overloaded so it is commented out\n // function TokenCreation(\n // uint _minTokensTocreate,\n // uint _closingTime,\n // address _privateCreation\n // );\n\n /// @notice Create Token with `_tokenHolder` as the initial owner of the Token\n /// @param _tokenHolder The address of the Tokens's recipient\n /// @return Whether the token creation was successful\n function createTokenProxy(address _tokenHolder) returns (bool success);\n\n /// @notice Refund `msg.sender` in the case the Token Creation did\n /// not reach its minimum fueling goal\n function refund();\n\n /// @return The divisor used to calculate the token creation rate during\n /// the creation phase\n function divisor() constant returns (uint divisor);\n\n event FuelingToDate(uint value);\n event CreatedToken(address indexed to, uint amount);\n event Refund(address indexed to, uint value);\n}\n\n\ncontract TokenCreation is TokenCreationInterface, Token {\n function TokenCreation(\n uint _minTokensToCreate,\n uint _closingTime,\n address _privateCreation) {\n\n closingTime = _closingTime;\n minTokensToCreate = _minTokensToCreate;\n privateCreation = _privateCreation;\n extraBalance = new ManagedAccount(address(this), true);\n }\n\n function createTokenProxy(address _tokenHolder) returns (bool success) {\n if (now < closingTime && msg.value > 0\n && (privateCreation == 0 || privateCreation == msg.sender)) {\n\n uint token = (msg.value * 20) / divisor();\n extraBalance.call.value(msg.value - token)();\n balances[_tokenHolder] += token;\n totalSupply += token;\n weiGiven[_tokenHolder] += msg.value;\n CreatedToken(_tokenHolder, token);\n if (totalSupply >= minTokensToCreate && !isFueled) {\n isFueled = true;\n FuelingToDate(totalSupply);\n }\n return true;\n }\n throw;\n }\n\n function refund() noEther {\n if (now > closingTime && !isFueled) {\n // Get extraBalance - will only succeed when called for the first time\n if (extraBalance.balance >= extraBalance.accumulatedInput())\n extraBalance.payOut(address(this), extraBalance.accumulatedInput());\n\n // Execute refund\n if (msg.sender.call.value(weiGiven[msg.sender])()) {\n Refund(msg.sender, weiGiven[msg.sender]);\n totalSupply -= balances[msg.sender];\n balances[msg.sender] = 0;\n weiGiven[msg.sender] = 0;\n }\n }\n }\n\n function divisor() constant returns (uint divisor) {\n // The number of (base unit) tokens per wei is calculated\n // as `msg.value` * 20 / `divisor`\n // The fueling period starts with a 1:1 ratio\n if (closingTime - 2 weeks > now) {\n return 20;\n // Followed by 10 days with a daily creation rate increase of 5%\n } else if (closingTime - 4 days > now) {\n return (20 + (now - (closingTime - 2 weeks)) / (1 days));\n // The last 4 days there is a constant creation rate ratio of 1:1.5\n } else {\n return 30;\n }\n }\n}\n/*\nThis file is part of the DAO.\n\nThe DAO is free software: you can redistribute it and/or modify\nit under the terms of the GNU lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThe DAO is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU lesser General Public License for more details.\n\nYou should have received a copy of the GNU lesser General Public License\nalong with the DAO. If not, see .\n*/\n\n\n/*\nStandard smart contract for a Decentralized Autonomous Organization (DAO)\nto automate organizational governance and decision-making.\n*/\n\n\ncontract DAOInterface {\n\n // The amount of days for which people who try to participate in the\n // creation by calling the fallback function will still get their ether back\n uint constant creationGracePeriod = 40 days;\n // The minimum debate period that a generic proposal can have\n uint constant minProposalDebatePeriod = 2 weeks;\n // The minimum debate period that a split proposal can have\n uint constant minSplitDebatePeriod = 1 weeks;\n // Period of days inside which it's possible to execute a DAO split\n uint constant splitExecutionPeriod = 27 days;\n // Period of time after which the minimum Quorum is halved\n uint constant quorumHalvingPeriod = 25 weeks;\n // Period after which a proposal is closed\n // (used in the case `executeProposal` fails because it throws)\n uint constant executeProposalPeriod = 10 days;\n // Denotes the maximum proposal deposit that can be given. It is given as\n // a fraction of total Ether spent plus balance of the DAO\n uint constant maxDepositDivisor = 100;\n\n // Proposals to spend the DAO's ether or to choose a new Curator\n Proposal[] public proposals;\n // The quorum needed for each proposal is partially calculated by\n // totalSupply / minQuorumDivisor\n uint public minQuorumDivisor;\n // The unix time of the last time quorum was reached on a proposal\n uint public lastTimeMinQuorumMet;\n\n // Address of the curator\n address public curator;\n // The whitelist: List of addresses the DAO is allowed to send ether to\n mapping (address => bool) public allowedRecipients;\n\n // Tracks the addresses that own Reward Tokens. Those addresses can only be\n // DAOs that have split from the original DAO. Conceptually, Reward Tokens\n // represent the proportion of the rewards that the DAO has the right to\n // receive. These Reward Tokens are generated when the DAO spends ether.\n mapping (address => uint) public rewardToken;\n // Total supply of rewardToken\n uint public totalRewardToken;\n\n // The account used to manage the rewards which are to be distributed to the\n // DAO Token Holders of this DAO\n ManagedAccount public rewardAccount;\n\n // The account used to manage the rewards which are to be distributed to\n // any DAO that holds Reward Tokens\n ManagedAccount public DAOrewardAccount;\n\n // Amount of rewards (in wei) already paid out to a certain DAO\n mapping (address => uint) public DAOpaidOut;\n\n // Amount of rewards (in wei) already paid out to a certain address\n mapping (address => uint) public paidOut;\n // Map of addresses blocked during a vote (not allowed to transfer DAO\n // tokens). The address points to the proposal ID.\n mapping (address => uint) public blocked;\n\n // The minimum deposit (in wei) required to submit any proposal that is not\n // requesting a new Curator (no deposit is required for splits)\n uint public proposalDeposit;\n\n // the accumulated sum of all current proposal deposits\n uint sumOfProposalDeposits;\n\n // Contract that is able to create a new DAO (with the same code as\n // this one), used for splits\n DAO_Creator public daoCreator;\n\n // A proposal with `newCurator == false` represents a transaction\n // to be issued by this DAO\n // A proposal with `newCurator == true` represents a DAO split\n struct Proposal {\n // The address where the `amount` will go to if the proposal is accepted\n // or if `newCurator` is true, the proposed Curator of\n // the new DAO).\n address recipient;\n // The amount to transfer to `recipient` if the proposal is accepted.\n uint amount;\n // A plain text description of the proposal\n string description;\n // A unix timestamp, denoting the end of the voting period\n uint votingDeadline;\n // True if the proposal's votes have yet to be counted, otherwise False\n bool open;\n // True if quorum has been reached, the votes have been counted, and\n // the majority said yes\n bool proposalPassed;\n // A hash to check validity of a proposal\n bytes32 proposalHash;\n // Deposit in wei the creator added when submitting their proposal. It\n // is taken from the msg.value of a newProposal call.\n uint proposalDeposit;\n // True if this proposal is to assign a new Curator\n bool newCurator;\n // Data needed for splitting the DAO\n SplitData[] splitData;\n // Number of Tokens in favor of the proposal\n uint yea;\n // Number of Tokens opposed to the proposal\n uint nay;\n // Simple mapping to check if a shareholder has voted for it\n mapping (address => bool) votedYes;\n // Simple mapping to check if a shareholder has voted against it\n mapping (address => bool) votedNo;\n // Address of the shareholder who created the proposal\n address creator;\n }\n\n // Used only in the case of a newCurator proposal.\n struct SplitData {\n // The balance of the current DAO minus the deposit at the time of split\n uint splitBalance;\n // The total amount of DAO Tokens in existence at the time of split.\n uint totalSupply;\n // Amount of Reward Tokens owned by the DAO at the time of split.\n uint rewardToken;\n // The new DAO contract created at the time of split.\n DAO newDAO;\n }\n\n // Used to restrict access to certain functions to only DAO Token Holders\n modifier onlyTokenholders {}\n\n /// @dev Constructor setting the Curator and the address\n /// for the contract able to create another DAO as well as the parameters\n /// for the DAO Token Creation\n /// @param _curator The Curator\n /// @param _daoCreator The contract able to (re)create this DAO\n /// @param _proposalDeposit The deposit to be paid for a regular proposal\n /// @param _minTokensToCreate Minimum required wei-equivalent tokens\n /// to be created for a successful DAO Token Creation\n /// @param _closingTime Date (in Unix time) of the end of the DAO Token Creation\n /// @param _privateCreation If zero the DAO Token Creation is open to public, a\n /// non-zero address means that the DAO Token Creation is only for the address\n // This is the constructor: it can not be overloaded so it is commented out\n // function DAO(\n // address _curator,\n // DAO_Creator _daoCreator,\n // uint _proposalDeposit,\n // uint _minTokensToCreate,\n // uint _closingTime,\n // address _privateCreation\n // );\n\n /// @notice Create Token with `msg.sender` as the beneficiary\n /// @return Whether the token creation was successful\n function () returns (bool success);\n\n\n /// @dev This function is used to send ether back\n /// to the DAO, it can also be used to receive payments that should not be\n /// counted as rewards (donations, grants, etc.)\n /// @return Whether the DAO received the ether successfully\n function receiveEther() returns(bool);\n\n /// @notice `msg.sender` creates a proposal to send `_amount` Wei to\n /// `_recipient` with the transaction data `_transactionData`. If\n /// `_newCurator` is true, then this is a proposal that splits the\n /// DAO and sets `_recipient` as the new DAO's Curator.\n /// @param _recipient Address of the recipient of the proposed transaction\n /// @param _amount Amount of wei to be sent with the proposed transaction\n /// @param _description String describing the proposal\n /// @param _transactionData Data of the proposed transaction\n /// @param _debatingPeriod Time used for debating a proposal, at least 2\n /// weeks for a regular proposal, 10 days for new Curator proposal\n /// @param _newCurator Bool defining whether this proposal is about\n /// a new Curator or not\n /// @return The proposal ID. Needed for voting on the proposal\n function newProposal(\n address _recipient,\n uint _amount,\n string _description,\n bytes _transactionData,\n uint _debatingPeriod,\n bool _newCurator\n ) onlyTokenholders returns (uint _proposalID);\n\n /// @notice Check that the proposal with the ID `_proposalID` matches the\n /// transaction which sends `_amount` with data `_transactionData`\n /// to `_recipient`\n /// @param _proposalID The proposal ID\n /// @param _recipient The recipient of the proposed transaction\n /// @param _amount The amount of wei to be sent in the proposed transaction\n /// @param _transactionData The data of the proposed transaction\n /// @return Whether the proposal ID matches the transaction data or not\n function checkProposalCode(\n uint _proposalID,\n address _recipient,\n uint _amount,\n bytes _transactionData\n ) constant returns (bool _codeChecksOut);\n\n /// @notice Vote on proposal `_proposalID` with `_supportsProposal`\n /// @param _proposalID The proposal ID\n /// @param _supportsProposal Yes/No - support of the proposal\n /// @return The vote ID.\n function vote(\n uint _proposalID,\n bool _supportsProposal\n ) onlyTokenholders returns (uint _voteID);\n\n /// @notice Checks whether proposal `_proposalID` with transaction data\n /// `_transactionData` has been voted for or rejected, and executes the\n /// transaction in the case it has been voted for.\n /// @param _proposalID The proposal ID\n /// @param _transactionData The data of the proposed transaction\n /// @return Whether the proposed transaction has been executed or not\n function executeProposal(\n uint _proposalID,\n bytes _transactionData\n ) returns (bool _success);\n\n /// @notice ATTENTION! I confirm to move my remaining ether to a new DAO\n /// with `_newCurator` as the new Curator, as has been\n /// proposed in proposal `_proposalID`. This will burn my tokens. This can\n /// not be undone and will split the DAO into two DAO's, with two\n /// different underlying tokens.\n /// @param _proposalID The proposal ID\n /// @param _newCurator The new Curator of the new DAO\n /// @dev This function, when called for the first time for this proposal,\n /// will create a new DAO and send the sender's portion of the remaining\n /// ether and Reward Tokens to the new DAO. It will also burn the DAO Tokens\n /// of the sender.\n function splitDAO(\n uint _proposalID,\n address _newCurator\n ) returns (bool _success);\n\n /// @dev can only be called by the DAO itself through a proposal\n /// updates the contract of the DAO by sending all ether and rewardTokens\n /// to the new DAO. The new DAO needs to be approved by the Curator\n /// @param _newContract the address of the new contract\n function newContract(address _newContract);\n\n\n /// @notice Add a new possible recipient `_recipient` to the whitelist so\n /// that the DAO can send transactions to them (using proposals)\n /// @param _recipient New recipient address\n /// @dev Can only be called by the current Curator\n /// @return Whether successful or not\n function changeAllowedRecipients(address _recipient, bool _allowed) external returns (bool _success);\n\n\n /// @notice Change the minimum deposit required to submit a proposal\n /// @param _proposalDeposit The new proposal deposit\n /// @dev Can only be called by this DAO (through proposals with the\n /// recipient being this DAO itself)\n function changeProposalDeposit(uint _proposalDeposit) external;\n\n /// @notice Move rewards from the DAORewards managed account\n /// @param _toMembers If true rewards are moved to the actual reward account\n /// for the DAO. If not then it's moved to the DAO itself\n /// @return Whether the call was successful\n function retrieveDAOReward(bool _toMembers) external returns (bool _success);\n\n /// @notice Get my portion of the reward that was sent to `rewardAccount`\n /// @return Whether the call was successful\n function getMyReward() returns(bool _success);\n\n /// @notice Withdraw `_account`'s portion of the reward from `rewardAccount`\n /// to `_account`'s balance\n /// @return Whether the call was successful\n function withdrawRewardFor(address _account) internal returns (bool _success);\n\n /// @notice Send `_amount` tokens to `_to` from `msg.sender`. Prior to this\n /// getMyReward() is called.\n /// @param _to The address of the recipient\n /// @param _amount The amount of tokens to be transfered\n /// @return Whether the transfer was successful or not\n function transferWithoutReward(address _to, uint256 _amount) returns (bool success);\n\n /// @notice Send `_amount` tokens to `_to` from `_from` on the condition it\n /// is approved by `_from`. Prior to this getMyReward() is called.\n /// @param _from The address of the sender\n /// @param _to The address of the recipient\n /// @param _amount The amount of tokens to be transfered\n /// @return Whether the transfer was successful or not\n function transferFromWithoutReward(\n address _from,\n address _to,\n uint256 _amount\n ) returns (bool success);\n\n /// @notice Doubles the 'minQuorumDivisor' in the case quorum has not been\n /// achieved in 52 weeks\n /// @return Whether the change was successful or not\n function halveMinQuorum() returns (bool _success);\n\n /// @return total number of proposals ever created\n function numberOfProposals() constant returns (uint _numberOfProposals);\n\n /// @param _proposalID Id of the new curator proposal\n /// @return Address of the new DAO\n function getNewDAOAddress(uint _proposalID) constant returns (address _newDAO);\n\n /// @param _account The address of the account which is checked.\n /// @return Whether the account is blocked (not allowed to transfer tokens) or not.\n function isBlocked(address _account) internal returns (bool);\n\n /// @notice If the caller is blocked by a proposal whose voting deadline\n /// has exprired then unblock him.\n /// @return Whether the account is blocked (not allowed to transfer tokens) or not.\n function unblockMe() returns (bool);\n\n event ProposalAdded(\n uint indexed proposalID,\n address recipient,\n uint amount,\n bool newCurator,\n string description\n );\n event Voted(uint indexed proposalID, bool position, address indexed voter);\n event ProposalTallied(uint indexed proposalID, bool result, uint quorum);\n event NewCurator(address indexed _newCurator);\n event AllowedRecipientChanged(address indexed _recipient, bool _allowed);\n}\n\n// The DAO contract itself\ncontract DAO is DAOInterface, Token, TokenCreation {\n\n // Modifier that allows only shareholders to vote and create new proposals\n modifier onlyTokenholders {\n if (balanceOf(msg.sender) == 0) throw;\n _\n }\n\n function DAO(\n address _curator,\n DAO_Creator _daoCreator,\n uint _proposalDeposit,\n uint _minTokensToCreate,\n uint _closingTime,\n address _privateCreation\n ) TokenCreation(_minTokensToCreate, _closingTime, _privateCreation) {\n\n curator = _curator;\n daoCreator = _daoCreator;\n proposalDeposit = _proposalDeposit;\n rewardAccount = new ManagedAccount(address(this), false);\n DAOrewardAccount = new ManagedAccount(address(this), false);\n if (address(rewardAccount) == 0)\n throw;\n if (address(DAOrewardAccount) == 0)\n throw;\n lastTimeMinQuorumMet = now;\n minQuorumDivisor = 5; // sets the minimal quorum to 20%\n proposals.length = 1; // avoids a proposal with ID 0 because it is used\n\n allowedRecipients[address(this)] = true;\n allowedRecipients[curator] = true;\n }\n\n function () returns (bool success) {\n if (now < closingTime + creationGracePeriod && msg.sender != address(extraBalance))\n return createTokenProxy(msg.sender);\n else\n return receiveEther();\n }\n\n\n function receiveEther() returns (bool) {\n return true;\n }\n\n\n function newProposal(\n address _recipient,\n uint _amount,\n string _description,\n bytes _transactionData,\n uint _debatingPeriod,\n bool _newCurator\n ) onlyTokenholders returns (uint _proposalID) {\n\n // Sanity check\n if (_newCurator && (\n _amount != 0\n || _transactionData.length != 0\n || _recipient == curator\n || msg.value > 0\n || _debatingPeriod < minSplitDebatePeriod)) {\n throw;\n } else if (\n !_newCurator\n && (!isRecipientAllowed(_recipient) || (_debatingPeriod < minProposalDebatePeriod))\n ) {\n throw;\n }\n\n if (_debatingPeriod > 8 weeks)\n throw;\n\n if (!isFueled\n || now < closingTime\n || (msg.value < proposalDeposit && !_newCurator)) {\n\n throw;\n }\n\n if (now + _debatingPeriod < now) // prevents overflow\n throw;\n\n // to prevent a 51% attacker to convert the ether into deposit\n if (msg.sender == address(this))\n throw;\n\n _proposalID = proposals.length++;\n Proposal p = proposals[_proposalID];\n p.recipient = _recipient;\n p.amount = _amount;\n p.description = _description;\n p.proposalHash = sha3(_recipient, _amount, _transactionData);\n p.votingDeadline = now + _debatingPeriod;\n p.open = true;\n //p.proposalPassed = False; // that's default\n p.newCurator = _newCurator;\n if (_newCurator)\n p.splitData.length++;\n p.creator = msg.sender;\n p.proposalDeposit = msg.value;\n\n sumOfProposalDeposits += msg.value;\n\n ProposalAdded(\n _proposalID,\n _recipient,\n _amount,\n _newCurator,\n _description\n );\n }\n\n\n function checkProposalCode(\n uint _proposalID,\n address _recipient,\n uint _amount,\n bytes _transactionData\n ) noEther constant returns (bool _codeChecksOut) {\n Proposal p = proposals[_proposalID];\n return p.proposalHash == sha3(_recipient, _amount, _transactionData);\n }\n\n\n function vote(\n uint _proposalID,\n bool _supportsProposal\n ) onlyTokenholders noEther returns (uint _voteID) {\n\n Proposal p = proposals[_proposalID];\n if (p.votedYes[msg.sender]\n || p.votedNo[msg.sender]\n || now >= p.votingDeadline) {\n\n throw;\n }\n\n if (_supportsProposal) {\n p.yea += balances[msg.sender];\n p.votedYes[msg.sender] = true;\n } else {\n p.nay += balances[msg.sender];\n p.votedNo[msg.sender] = true;\n }\n\n if (blocked[msg.sender] == 0) {\n blocked[msg.sender] = _proposalID;\n } else if (p.votingDeadline > proposals[blocked[msg.sender]].votingDeadline) {\n // this proposal's voting deadline is further into the future than\n // the proposal that blocks the sender so make it the blocker\n blocked[msg.sender] = _proposalID;\n }\n\n Voted(_proposalID, _supportsProposal, msg.sender);\n }\n\n\n function executeProposal(\n uint _proposalID,\n bytes _transactionData\n ) noEther returns (bool _success) {\n\n Proposal p = proposals[_proposalID];\n\n uint waitPeriod = p.newCurator\n ? splitExecutionPeriod\n : executeProposalPeriod;\n // If we are over deadline and waiting period, assert proposal is closed\n if (p.open && now > p.votingDeadline + waitPeriod) {\n closeProposal(_proposalID);\n return;\n }\n\n // Check if the proposal can be executed\n if (now < p.votingDeadline // has the voting deadline arrived?\n // Have the votes been counted?\n || !p.open\n // Does the transaction code match the proposal?\n || p.proposalHash != sha3(p.recipient, p.amount, _transactionData)) {\n\n throw;\n }\n\n // If the curator removed the recipient from the whitelist, close the proposal\n // in order to free the deposit and allow unblocking of voters\n if (!isRecipientAllowed(p.recipient)) {\n closeProposal(_proposalID);\n p.creator.send(p.proposalDeposit);\n return;\n }\n\n bool proposalCheck = true;\n\n if (p.amount > actualBalance())\n proposalCheck = false;\n\n uint quorum = p.yea + p.nay;\n\n // require 53% for calling newContract()\n if (_transactionData.length >= 4 && _transactionData[0] == 0x68\n && _transactionData[1] == 0x37 && _transactionData[2] == 0xff\n && _transactionData[3] == 0x1e\n && quorum < minQuorum(actualBalance() + rewardToken[address(this)])) {\n\n proposalCheck = false;\n }\n\n if (quorum >= minQuorum(p.amount)) {\n if (!p.creator.send(p.proposalDeposit))\n throw;\n\n lastTimeMinQuorumMet = now;\n // set the minQuorum to 20% again, in the case it has been reached\n if (quorum > totalSupply / 5)\n minQuorumDivisor = 5;\n }\n\n // Execute result\n if (quorum >= minQuorum(p.amount) && p.yea > p.nay && proposalCheck) {\n if (!p.recipient.call.value(p.amount)(_transactionData))\n throw;\n\n p.proposalPassed = true;\n _success = true;\n\n // only create reward tokens when ether is not sent to the DAO itself and\n // related addresses. Proxy addresses should be forbidden by the curator.\n if (p.recipient != address(this) && p.recipient != address(rewardAccount)\n && p.recipient != address(DAOrewardAccount)\n && p.recipient != address(extraBalance)\n && p.recipient != address(curator)) {\n\n rewardToken[address(this)] += p.amount;\n totalRewardToken += p.amount;\n }\n }\n\n closeProposal(_proposalID);\n\n // Initiate event\n ProposalTallied(_proposalID, _success, quorum);\n }\n\n\n function closeProposal(uint _proposalID) internal {\n Proposal p = proposals[_proposalID];\n if (p.open)\n sumOfProposalDeposits -= p.proposalDeposit;\n p.open = false;\n }\n\n function splitDAO(\n uint _proposalID,\n address _newCurator\n ) noEther onlyTokenholders returns (bool _success) {\n\n Proposal p = proposals[_proposalID];\n\n // Sanity check\n\n if (now < p.votingDeadline // has the voting deadline arrived?\n //The request for a split expires XX days after the voting deadline\n || now > p.votingDeadline + splitExecutionPeriod\n // Does the new Curator address match?\n || p.recipient != _newCurator\n // Is it a new curator proposal?\n || !p.newCurator\n // Have you voted for this split?\n || !p.votedYes[msg.sender]\n // Did you already vote on another proposal?\n || (blocked[msg.sender] != _proposalID && blocked[msg.sender] != 0) ) {\n\n throw;\n }\n\n // If the new DAO doesn't exist yet, create the new DAO and store the\n // current split data\n if (address(p.splitData[0].newDAO) == 0) {\n p.splitData[0].newDAO = createNewDAO(_newCurator);\n // Call depth limit reached, etc.\n if (address(p.splitData[0].newDAO) == 0)\n throw;\n // should never happen\n if (this.balance < sumOfProposalDeposits)\n throw;\n p.splitData[0].splitBalance = actualBalance();\n p.splitData[0].rewardToken = rewardToken[address(this)];\n p.splitData[0].totalSupply = totalSupply;\n p.proposalPassed = true;\n }\n\n // Move ether and assign new Tokens\n uint fundsToBeMoved =\n (balances[msg.sender] * p.splitData[0].splitBalance) /\n p.splitData[0].totalSupply;\n if (p.splitData[0].newDAO.createTokenProxy.value(fundsToBeMoved)(msg.sender) == false)\n throw;\n\n\n // Assign reward rights to new DAO\n uint rewardTokenToBeMoved =\n (balances[msg.sender] * p.splitData[0].rewardToken) /\n p.splitData[0].totalSupply;\n\n uint paidOutToBeMoved = DAOpaidOut[address(this)] * rewardTokenToBeMoved /\n rewardToken[address(this)];\n\n rewardToken[address(p.splitData[0].newDAO)] += rewardTokenToBeMoved;\n if (rewardToken[address(this)] < rewardTokenToBeMoved)\n throw;\n rewardToken[address(this)] -= rewardTokenToBeMoved;\n\n DAOpaidOut[address(p.splitData[0].newDAO)] += paidOutToBeMoved;\n if (DAOpaidOut[address(this)] < paidOutToBeMoved)\n throw;\n DAOpaidOut[address(this)] -= paidOutToBeMoved;\n\n // Burn DAO Tokens\n Transfer(msg.sender, 0, balances[msg.sender]);\n withdrawRewardFor(msg.sender); // be nice, and get his rewards\n totalSupply -= balances[msg.sender];\n balances[msg.sender] = 0;\n paidOut[msg.sender] = 0;\n return true;\n }\n\n function newContract(address _newContract){\n if (msg.sender != address(this) || !allowedRecipients[_newContract]) return;\n // move all ether\n if (!_newContract.call.value(address(this).balance)()) {\n throw;\n }\n\n //move all reward tokens\n rewardToken[_newContract] += rewardToken[address(this)];\n rewardToken[address(this)] = 0;\n DAOpaidOut[_newContract] += DAOpaidOut[address(this)];\n DAOpaidOut[address(this)] = 0;\n }\n\n\n function retrieveDAOReward(bool _toMembers) external noEther returns (bool _success) {\n DAO dao = DAO(msg.sender);\n\n if ((rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) /\n totalRewardToken < DAOpaidOut[msg.sender])\n throw;\n\n uint reward =\n (rewardToken[msg.sender] * DAOrewardAccount.accumulatedInput()) /\n totalRewardToken - DAOpaidOut[msg.sender];\n if(_toMembers) {\n if (!DAOrewardAccount.payOut(dao.rewardAccount(), reward))\n throw;\n }\n else {\n if (!DAOrewardAccount.payOut(dao, reward))\n throw;\n }\n DAOpaidOut[msg.sender] += reward;\n return true;\n }\n\n function getMyReward() noEther returns (bool _success) {\n return withdrawRewardFor(msg.sender);\n }\n\n\n function withdrawRewardFor(address _account) noEther internal returns (bool _success) {\n if ((balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply < paidOut[_account])\n throw;\n\n uint reward =\n (balanceOf(_account) * rewardAccount.accumulatedInput()) / totalSupply - paidOut[_account];\n if (!rewardAccount.payOut(_account, reward))\n throw;\n paidOut[_account] += reward;\n return true;\n }\n\n\n function transfer(address _to, uint256 _value) returns (bool success) {\n if (isFueled\n && now > closingTime\n && !isBlocked(msg.sender)\n && transferPaidOut(msg.sender, _to, _value)\n && super.transfer(_to, _value)) {\n\n return true;\n } else {\n throw;\n }\n }\n\n\n function transferWithoutReward(address _to, uint256 _value) returns (bool success) {\n if (!getMyReward())\n throw;\n return transfer(_to, _value);\n }\n\n\n function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {\n if (isFueled\n && now > closingTime\n && !isBlocked(_from)\n && transferPaidOut(_from, _to, _value)\n && super.transferFrom(_from, _to, _value)) {\n\n return true;\n } else {\n throw;\n }\n }\n\n\n function transferFromWithoutReward(\n address _from,\n address _to,\n uint256 _value\n ) returns (bool success) {\n\n if (!withdrawRewardFor(_from))\n throw;\n return transferFrom(_from, _to, _value);\n }\n\n\n function transferPaidOut(\n address _from,\n address _to,\n uint256 _value\n ) internal returns (bool success) {\n\n uint transferPaidOut = paidOut[_from] * _value / balanceOf(_from);\n if (transferPaidOut > paidOut[_from])\n throw;\n paidOut[_from] -= transferPaidOut;\n paidOut[_to] += transferPaidOut;\n return true;\n }\n\n\n function changeProposalDeposit(uint _proposalDeposit) noEther external {\n if (msg.sender != address(this) || _proposalDeposit > (actualBalance() + rewardToken[address(this)])\n / maxDepositDivisor) {\n\n throw;\n }\n proposalDeposit = _proposalDeposit;\n }\n\n\n function changeAllowedRecipients(address _recipient, bool _allowed) noEther external returns (bool _success) {\n if (msg.sender != curator)\n throw;\n allowedRecipients[_recipient] = _allowed;\n AllowedRecipientChanged(_recipient, _allowed);\n return true;\n }\n\n\n function isRecipientAllowed(address _recipient) internal returns (bool _isAllowed) {\n if (allowedRecipients[_recipient]\n || (_recipient == address(extraBalance)\n // only allowed when at least the amount held in the\n // extraBalance account has been spent from the DAO\n && totalRewardToken > extraBalance.accumulatedInput()))\n return true;\n else\n return false;\n }\n\n function actualBalance() constant returns (uint _actualBalance) {\n return this.balance - sumOfProposalDeposits;\n }\n\n\n function minQuorum(uint _value) internal constant returns (uint _minQuorum) {\n // minimum of 20% and maximum of 53.33%\n return totalSupply / minQuorumDivisor +\n (_value * totalSupply) / (3 * (actualBalance() + rewardToken[address(this)]));\n }\n\n\n function halveMinQuorum() returns (bool _success) {\n // this can only be called after `quorumHalvingPeriod` has passed or at anytime\n // by the curator with a delay of at least `minProposalDebatePeriod` between the calls\n if ((lastTimeMinQuorumMet < (now - quorumHalvingPeriod) || msg.sender == curator)\n && lastTimeMinQuorumMet < (now - minProposalDebatePeriod)) {\n lastTimeMinQuorumMet = now;\n minQuorumDivisor *= 2;\n return true;\n } else {\n return false;\n }\n }\n\n function createNewDAO(address _newCurator) internal returns (DAO _newDAO) {\n NewCurator(_newCurator);\n return daoCreator.createDAO(_newCurator, 0, 0, now + splitExecutionPeriod);\n }\n\n function numberOfProposals() constant returns (uint _numberOfProposals) {\n // Don't count index 0. It's used by isBlocked() and exists from start\n return proposals.length - 1;\n }\n\n function getNewDAOAddress(uint _proposalID) constant returns (address _newDAO) {\n return proposals[_proposalID].splitData[0].newDAO;\n }\n\n function isBlocked(address _account) internal returns (bool) {\n if (blocked[_account] == 0)\n return false;\n Proposal p = proposals[blocked[_account]];\n if (now > p.votingDeadline) {\n blocked[_account] = 0;\n return false;\n } else {\n return true;\n }\n }\n\n function unblockMe() returns (bool) {\n return isBlocked(msg.sender);\n }\n}\n\ncontract DAO_Creator {\n function createDAO(\n address _curator,\n uint _proposalDeposit,\n uint _minTokensToCreate,\n uint _closingTime\n ) returns (DAO _newDAO) {\n\n return new DAO(\n _curator,\n DAO_Creator(this),\n _proposalDeposit,\n _minTokensToCreate,\n _closingTime,\n msg.sender\n );\n }\n}\n",\
"ABI":"[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"description\",\"type\":\"string\"},{\"name\":\"votingDeadline\",\"type\":\"uint256\"},{\"name\":\"open\",\"type\":\"bool\"},{\"name\":\"proposalPassed\",\"type\":\"bool\"},{\"name\":\"proposalHash\",\"type\":\"bytes32\"},{\"name\":\"proposalDeposit\",\"type\":\"uint256\"},{\"name\":\"newCurator\",\"type\":\"bool\"},{\"name\":\"yea\",\"type\":\"uint256\"},{\"name\":\"nay\",\"type\":\"uint256\"},{\"name\":\"creator\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minTokensToCreate\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rewardAccount\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"daoCreator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"divisor\",\"outputs\":[{\"name\":\"divisor\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"extraBalance\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_transactionData\",\"type\":\"bytes\"}],\"name\":\"executeProposal\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unblockMe\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalRewardToken\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"actualBalance\",\"outputs\":[{\"name\":\"_actualBalance\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"closingTime\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowedRecipients\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferWithoutReward\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"refund\",\"outputs\":[],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_recipient\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_description\",\"type\":\"string\"},{\"name\":\"_transactionData\",\"type\":\"bytes\"},{\"name\":\"_debatingPeriod\",\"type\":\"uint256\"},{\"name\":\"_newCurator\",\"type\":\"bool\"}],\"name\":\"newProposal\",\"outputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"DAOpaidOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minQuorumDivisor\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newContract\",\"type\":\"address\"}],\"name\":\"newContract\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_recipient\",\"type\":\"address\"},{\"name\":\"_allowed\",\"type\":\"bool\"}],\"name\":\"changeAllowedRecipients\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"halveMinQuorum\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"paidOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_newCurator\",\"type\":\"address\"}],\"name\":\"splitDAO\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"DAOrewardAccount\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposalDeposit\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"numberOfProposals\",\"outputs\":[{\"name\":\"_numberOfProposals\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastTimeMinQuorumMet\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_toMembers\",\"type\":\"bool\"}],\"name\":\"retrieveDAOReward\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"receiveEther\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isFueled\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_tokenHolder\",\"type\":\"address\"}],\"name\":\"createTokenProxy\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"name\":\"getNewDAOAddress\",\"outputs\":[{\"name\":\"_newDAO\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_supportsProposal\",\"type\":\"bool\"}],\"name\":\"vote\",\"outputs\":[{\"name\":\"_voteID\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"getMyReward\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"rewardToken\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFromWithoutReward\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_proposalDeposit\",\"type\":\"uint256\"}],\"name\":\"changeProposalDeposit\",\"outputs\":[],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"blocked\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"curator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"},{\"name\":\"_recipient\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_transactionData\",\"type\":\"bytes\"}],\"name\":\"checkProposalCode\",\"outputs\":[{\"name\":\"_codeChecksOut\",\"type\":\"bool\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"privateCreation\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"type\":\"function\"},{\"inputs\":[{\"name\":\"_curator\",\"type\":\"address\"},{\"name\":\"_daoCreator\",\"type\":\"address\"},{\"name\":\"_proposalDeposit\",\"type\":\"uint256\"},{\"name\":\"_minTokensToCreate\",\"type\":\"uint256\"},{\"name\":\"_closingTime\",\"type\":\"uint256\"},{\"name\":\"_privateCreation\",\"type\":\"address\"}],\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"FuelingToDate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"CreatedToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Refund\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"proposalID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"newCurator\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"description\",\"type\":\"string\"}],\"name\":\"ProposalAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"proposalID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"position\",\"type\":\"bool\"},{\"indexed\":true,\"name\":\"voter\",\"type\":\"address\"}],\"name\":\"Voted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"proposalID\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"result\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"quorum\",\"type\":\"uint256\"}],\"name\":\"ProposalTallied\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_newCurator\",\"type\":\"address\"}],\"name\":\"NewCurator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_recipient\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_allowed\",\"type\":\"bool\"}],\"name\":\"AllowedRecipientChanged\",\"type\":\"event\"}]",\
"ContractName":"DAO",\
"CompilerVersion":"v0.3.1-2016-04-12-3ad5e82",\
"OptimizationUsed":"1",\
"Runs":"200",\
"ConstructorArguments":"000000000000000000000000da4a4626d3e16e094de3225a751aab7128e965260000000000000000000000004a574510c7014e4ae985403536074abe582adfc80000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000000000000000000000000a968163f0a57b4000000000000000000000000000000000000000000000000000000000000057495e100000000000000000000000000000000000000000000000000000000000000000",\
"EVMVersion":"Default",\
"Library":"",\
"LicenseType":"",\
"Proxy":"0",\
"Implementation":"",\
"SwarmSource":""\
}\
]
}
[](#verify-solidity-source-code)
Verify Solidity Source Code
-----------------------------------------------------------------
Submits a contract source code to the Sepolia Abstract explorer for verification.
Until mainnet launch, use this API key `TACK2D1RGYX9U7MC31SZWWQ7FCWRYQ96AD`
Copy
https://api-sepolia.abscan.org/api
?module=contract
&action=verifysourcecode
&apikey=YourApiKeyToken
RequestResponse
Query Parameters
Requests must be sent using **HTTP POST**
Parameter
Description
codeformat
single file, use `solidity-single-file` JSON file ( recommended ), use `solidity-standard-json-input`
sourceCode
the Solidity source code
constructorArguements
optional, include if your contract uses constructor arguments
contractaddress
the address your contract is deployed at
contractname
the name of your contract, such as `contracts/Verified.sol:Verified`
compilerversion
[**compiler version**](https://sepolia.abscan.org/solcversions)
used, such as `v0.8.24+commit.e11b9ed9`
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": "a7lpxkm9kpcpicx7daftmjifrfhiuhf5vqqnawhkfhzfrcpnxj"
}
[](#verify-proxy-contract)
Verify Proxy Contract
-----------------------------------------------------
Submits a proxy contract source code to Etherscan for verification.
1. Requires a valid Etherscan API key, it will be rejected otherwise
2. Current daily limit of 100 submissions per day per user (subject to change)
3. Only supports HTTP post
4. Upon successful submission you will receive a GUID (50 characters) as a receipt
5. You may use this GUID to track the status of your submission
6. Verified proxy contracts will display the "Read/Write as Proxy" of the implementation contract under the contract address's contract tab
###
[](#verifying-proxy-contract-using-curl)
Verifying Proxy Contract using cURL
RequestResponse
Copy
// example with only the mandatory contract address parameter
curl -d "address=0xcbdcd3815b5f975e1a2c944a9b2cd1c985a1cb7f" "https://api-sepolia.abscan.org/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"
// example using the expectedimplementation optional parameter
// the expectedimplementation enforces a check to ensure the returned implementation contract address == address picked up by the verifier
curl -d "address=0xbc46363a7669f6e12353fa95bb067aead3675c29&expectedimplementation=0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6" "https://api-sepolia.abscan.org/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"
Copy
// OK
{"status":"1","message":"OK","result":"gwgrrnfy56zf6vc1fljuejwg6pelnc5yns6fg6y2i6zfpgzquz"}
// NOTOK
{"status":"0","message":"NOTOK","result":"Invalid API Key"}
###
[](#checking-proxy-contract-verification-submission-status-using-curl)
Checking Proxy Contract Verification Submission Status using cURL
RequestResponse
Copy
curl "https://api-sepolia.abscan.org/api?module=contract&action=checkproxyverification&guid=gwgrrnfy56zf6vc1fljuejwg6pelnc5yns6fg6y2i6zfpgzquz&apikey=YourApiKeyToken"
Copy
// OK
{"status":"1","message":"OK","result":"The proxy's (0xbc46363a7669f6e12353fa95bb067aead3675c29) implementation contract is found at 0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6 and is successfully updated."}
// NOTOK
{"status":"0","message":"NOTOK","result":"A corresponding implementation contract was unfortunately not detected for the proxy address."}
[PreviousAccounts](/testnet-abscan/api-endpoints/accounts)
[NextTransactions](/testnet-abscan/api-endpoints/stats)
Last updated 1 month ago
---
# Contracts | Abscan
[](#get-contract-abi-for-verified-contract-source-codes)
Get Contract ABI for [Verified Contract Source Codes](https://abscan.org/contractsVerified)
----------------------------------------------------------------------------------------------------------------------------------------------------------
Returns the Contract Application Binary Interface ( ABI ) of a verified smart contract.
Find verified contracts ✅on our [**Verified Contracts Source Code**](https://abscan.org/contractsVerified)
page.
Copy
https://api.abscan.org/api
?module=contract
&action=getabi
&address=0x000000000000000000000000000000000000800B
&apikey=YourApiKeyToken
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=contract&action=getabi&address=0x000000000000000000000000000000000000800B&apikey=YourApiKeyToken)
> 🔗
RequestResponse
Query Parameters
Parameter
Description
address
the `contract address` that has a verified source code
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": "[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_txHash\",\"type\":\"bytes32\"}],\"name\":\"appendTransactionToCurrentL2Block\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blockGasLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"blockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"coinbase\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentBlockInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockInfo\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"difficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasPerPubdataByte\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_batchNumber\",\"type\":\"uint256\"}],\"name\":\"getBatchHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBatchNumberAndTimestamp\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"batchNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"batchTimestamp\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"getBlockHashEVM\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockNumber\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockNumberAndTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockTimestamp\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentPubdataCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentPubdataSpent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getL2BlockNumberAndTimestamp\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"blockNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"blockTimestamp\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"incrementTxNumberInBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"origin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publishTimestampDataToL1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resetTxNumberInBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newChainId\",\"type\":\"uint256\"}],\"name\":\"setChainId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_gasPrice\",\"type\":\"uint256\"}],\"name\":\"setGasPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_l2BlockNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_l2BlockTimestamp\",\"type\":\"uint128\"},{\"internalType\":\"bytes32\",\"name\":\"_expectedPrevL2BlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_isFirstInBatch\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"_maxVirtualBlocksToCreate\",\"type\":\"uint128\"}],\"name\":\"setL2Block\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_prevBatchHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint128\",\"name\":\"_newTimestamp\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_expectedNewNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"_baseFee\",\"type\":\"uint256\"}],\"name\":\"setNewBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_gasPerPubdataByte\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_basePubdataSpent\",\"type\":\"uint256\"}],\"name\":\"setPubdataInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOrigin\",\"type\":\"address\"}],\"name\":\"setTxOrigin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"txNumberInBlock\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_number\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_baseFee\",\"type\":\"uint256\"}],\"name\":\"unsafeOverrideBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
}
[](#get-contract-source-code-for-verified-contract-source-codes)
Get Contract Source Code for [Verified Contract Source Codes](https://abscan.org/contractsVerified)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Returns the Solidity source code of a verified smart contract.
📩 **Tip :** You can also download a [**CSV list of verified contracts addresses**](https://abscan.org/exportData?type=open-source-contract-codes)
of which the code publishers have provided a corresponding Open Source license for redistribution.
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=contract&action=getsourcecode&address=0x000000000000000000000000000000000000800B&apikey=YourApiKeyToken)
> 🔗
Copy
https://api.abscan.org/api
?module=contract
&action=getsourcecode
&address=0x000000000000000000000000000000000000800B
&apikey=YourApiKeyToken
RequestResponse
Query Parameters
Parameter
Description
address
the `contract address` that has a verified source code
Sample Response
Copy
{
"status": "1",
"message": "OK",
"result": [\
{\
"SourceCode": "{{\"language\":\"Solidity\",\"sources\":{\"contracts-preprocessed/SystemContext.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {ISystemContext} from \\\"./interfaces/ISystemContext.sol\\\";\\nimport {ISystemContract} from \\\"./interfaces/ISystemContract.sol\\\";\\nimport {ISystemContextDeprecated} from \\\"./interfaces/ISystemContextDeprecated.sol\\\";\\nimport {SystemContractHelper} from \\\"./libraries/SystemContractHelper.sol\\\";\\nimport {BOOTLOADER_FORMAL_ADDRESS, SystemLogKey} from \\\"./Constants.sol\\\";\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice Contract that stores some of the context variables, that may be either\\n * block-scoped, tx-scoped or system-wide.\\n */\\ncontract SystemContext is ISystemContext, ISystemContextDeprecated, ISystemContract {\\n /// @notice The number of latest L2 blocks to store.\\n /// @dev EVM requires us to be able to query the hashes of previous 256 blocks.\\n /// We could either:\\n /// - Store the latest 256 hashes (and strictly rely that we do not accidentally override the hash of the block 256 blocks ago)\\n /// - Store the latest 257 blocks' hashes.\\n uint256 internal constant MINIBLOCK_HASHES_TO_STORE = 257;\\n\\n /// @notice The chainId of the network. It is set at the genesis.\\n uint256 public chainId;\\n\\n /// @notice The `tx.origin` in the current transaction.\\n /// @dev It is updated before each transaction by the bootloader\\n address public origin;\\n\\n /// @notice The `tx.gasPrice` in the current transaction.\\n /// @dev It is updated before each transaction by the bootloader\\n uint256 public gasPrice;\\n\\n /// @notice The current block's gasLimit.\\n /// @dev The same limit is used for both batches and L2 blocks. At this moment this limit is not explicitly\\n /// forced by the system, rather it is the responsibility of the operator to ensure that this value is never achieved.\\n uint256 public blockGasLimit = (1 \u003C\u003C 50);\\n\\n /// @notice The `block.coinbase` in the current transaction.\\n /// @dev For the support of coinbase, we will use the bootloader formal address for now\\n address public coinbase = BOOTLOADER_FORMAL_ADDRESS;\\n\\n /// @notice Formal `block.difficulty` parameter.\\n uint256 public difficulty = 2.5e15;\\n\\n /// @notice The `block.basefee`.\\n /// @dev It is currently a constant.\\n uint256 public baseFee;\\n\\n /// @notice The number and the timestamp of the current L1 batch stored packed.\\n BlockInfo internal currentBatchInfo;\\n\\n /// @notice The hashes of batches.\\n /// @dev It stores batch hashes for all previous batches.\\n mapping(uint256 batchNumber =\u003E bytes32 batchHash) internal batchHashes;\\n\\n /// @notice The number and the timestamp of the current L2 block.\\n BlockInfo internal currentL2BlockInfo;\\n\\n /// @notice The rolling hash of the transactions in the current L2 block.\\n bytes32 internal currentL2BlockTxsRollingHash;\\n\\n /// @notice The hashes of L2 blocks.\\n /// @dev It stores block hashes for previous L2 blocks. Note, in order to make publishing the hashes\\n /// of the miniblocks cheaper, we only store the previous MINIBLOCK_HASHES_TO_STORE ones. Since whenever we need to publish a state\\n /// diff, a pair of \u003Ckey, value\u003E is published and for cached keys only 8-byte id is used instead of 32 bytes.\\n /// By having this data in a cyclic array of MINIBLOCK_HASHES_TO_STORE blocks, we bring the costs down by 40% (i.e. 40 bytes per miniblock instead of 64 bytes).\\n /// @dev The hash of a miniblock with number N would be stored under slot N%MINIBLOCK_HASHES_TO_STORE.\\n /// @dev Hashes of the blocks older than the ones which are stored here can be calculated as _calculateLegacyL2BlockHash(blockNumber).\\n bytes32[MINIBLOCK_HASHES_TO_STORE] internal l2BlockHash;\\n\\n /// @notice To make migration to L2 blocks smoother, we introduce a temporary concept of virtual L2 blocks, the data\\n /// about which will be returned by the EVM-like methods: block.number/block.timestamp/blockhash.\\n /// - Their number will start from being equal to the number of the batch and it will increase until it reaches the L2 block number.\\n /// - Their timestamp is updated each time a new virtual block is created.\\n /// - Their hash is calculated as `keccak256(uint256(number))`\\n BlockInfo internal currentVirtualL2BlockInfo;\\n\\n /// @notice The information about the virtual blocks upgrade, which tracks when the migration to the L2 blocks has started and finished.\\n VirtualBlockUpgradeInfo internal virtualBlockUpgradeInfo;\\n\\n /// @notice Set the chainId origin.\\n /// @param _newChainId The chainId\\n function setChainId(uint256 _newChainId) external onlyCallFromForceDeployer {\\n chainId = _newChainId;\\n }\\n\\n /// @notice Number of current transaction in block.\\n uint16 public txNumberInBlock;\\n\\n /// @notice The current gas per pubdata byte\\n uint256 public gasPerPubdataByte;\\n\\n /// @notice The number of pubdata spent as of the start of the transaction\\n uint256 internal basePubdataSpent;\\n\\n /// @notice Set the current tx origin.\\n /// @param _newOrigin The new tx origin.\\n function setTxOrigin(address _newOrigin) external onlyCallFromBootloader {\\n origin = _newOrigin;\\n }\\n\\n /// @notice Set the the current gas price.\\n /// @param _gasPrice The new tx gasPrice.\\n function setGasPrice(uint256 _gasPrice) external onlyCallFromBootloader {\\n gasPrice = _gasPrice;\\n }\\n\\n /// @notice Sets the number of L2 gas that is needed to pay a single byte of pubdata.\\n /// @dev This value does not have any impact on the execution and purely serves as a way for users\\n /// to access the current gas price for the pubdata.\\n /// @param _gasPerPubdataByte The amount L2 gas that the operator charge the user for single byte of pubdata.\\n /// @param _basePubdataSpent The number of pubdata spent as of the start of the transaction.\\n function setPubdataInfo(uint256 _gasPerPubdataByte, uint256 _basePubdataSpent) external onlyCallFromBootloader {\\n basePubdataSpent = _basePubdataSpent;\\n gasPerPubdataByte = _gasPerPubdataByte;\\n }\\n\\n function getCurrentPubdataSpent() public view returns (uint256) {\\n uint256 pubdataPublished = SystemContractHelper.getZkSyncMeta().pubdataPublished;\\n return pubdataPublished \u003E basePubdataSpent ? pubdataPublished - basePubdataSpent : 0;\\n }\\n\\n function getCurrentPubdataCost() external view returns (uint256) {\\n return gasPerPubdataByte * getCurrentPubdataSpent();\\n }\\n\\n /// @notice The method that emulates `blockhash` opcode in EVM.\\n /// @dev Just like the blockhash in the EVM, it returns bytes32(0),\\n /// when queried about hashes that are older than 256 blocks ago.\\n /// @dev Since zksolc compiler calls this method to emulate `blockhash`,\\n /// its signature can not be changed to `getL2BlockHashEVM`.\\n /// @return hash The blockhash of the block with the given number.\\n function getBlockHashEVM(uint256 _block) external view returns (bytes32 hash) {\\n uint128 blockNumber = currentVirtualL2BlockInfo.number;\\n\\n VirtualBlockUpgradeInfo memory currentVirtualBlockUpgradeInfo = virtualBlockUpgradeInfo;\\n\\n // Due to virtual blocks upgrade, we'll have to use the following logic for retrieving the blockhash:\\n // 1. If the block number is out of the 256-block supported range, return 0.\\n // 2. If the block was created before the upgrade for the virtual blocks (i.e. there we used to use hashes of the batches),\\n // we return the hash of the batch.\\n // 3. If the block was created after the day when the virtual blocks have caught up with the L2 blocks, i.e.\\n // all the information which is returned for users should be for L2 blocks, we return the hash of the corresponding L2 block.\\n // 4. If the block queried is a virtual blocks, calculate it on the fly.\\n if (blockNumber \u003C= _block || blockNumber - _block \u003E 256) {\\n hash = bytes32(0);\\n } else if (_block \u003C currentVirtualBlockUpgradeInfo.virtualBlockStartBatch) {\\n // Note, that we will get into this branch only for a brief moment of time, right after the upgrade\\n // for virtual blocks before 256 virtual blocks are produced.\\n hash = batchHashes[_block];\\n } else if (\\n _block \u003E= currentVirtualBlockUpgradeInfo.virtualBlockFinishL2Block &&\\n currentVirtualBlockUpgradeInfo.virtualBlockFinishL2Block \u003E 0\\n ) {\\n hash = _getLatest257L2blockHash(_block);\\n } else {\\n // Important: we do not want this number to ever collide with the L2 block hash (either new or old one) and so\\n // that's why the legacy L2 blocks' hashes are keccak256(abi.encodePacked(uint32(_block))), while these are equivalent to\\n // keccak256(abi.encodePacked(_block))\\n hash = keccak256(abi.encode(_block));\\n }\\n }\\n\\n /// @notice Returns the hash of the given batch.\\n /// @param _batchNumber The number of the batch.\\n /// @return hash The hash of the batch.\\n function getBatchHash(uint256 _batchNumber) external view returns (bytes32 hash) {\\n hash = batchHashes[_batchNumber];\\n }\\n\\n /// @notice Returns the current batch's number and timestamp.\\n /// @return batchNumber and batchTimestamp tuple of the current batch's number and the current batch's timestamp\\n function getBatchNumberAndTimestamp() public view returns (uint128 batchNumber, uint128 batchTimestamp) {\\n BlockInfo memory batchInfo = currentBatchInfo;\\n batchNumber = batchInfo.number;\\n batchTimestamp = batchInfo.timestamp;\\n }\\n\\n /// @notice Returns the current block's number and timestamp.\\n /// @return blockNumber and blockTimestamp tuple of the current L2 block's number and the current block's timestamp\\n function getL2BlockNumberAndTimestamp() public view returns (uint128 blockNumber, uint128 blockTimestamp) {\\n BlockInfo memory blockInfo = currentL2BlockInfo;\\n blockNumber = blockInfo.number;\\n blockTimestamp = blockInfo.timestamp;\\n }\\n\\n /// @notice Returns the current L2 block's number.\\n /// @dev Since zksolc compiler calls this method to emulate `block.number`,\\n /// its signature can not be changed to `getL2BlockNumber`.\\n /// @return blockNumber The current L2 block's number.\\n function getBlockNumber() public view returns (uint128) {\\n return currentVirtualL2BlockInfo.number;\\n }\\n\\n /// @notice Returns the current L2 block's timestamp.\\n /// @dev Since zksolc compiler calls this method to emulate `block.timestamp`,\\n /// its signature can not be changed to `getL2BlockTimestamp`.\\n /// @return timestamp The current L2 block's timestamp.\\n function getBlockTimestamp() public view returns (uint128) {\\n return currentVirtualL2BlockInfo.timestamp;\\n }\\n\\n /// @notice Assuming that block is one of the last MINIBLOCK_HASHES_TO_STORE ones, returns its hash.\\n /// @param _block The number of the block.\\n /// @return hash The hash of the block.\\n function _getLatest257L2blockHash(uint256 _block) internal view returns (bytes32) {\\n return l2BlockHash[_block % MINIBLOCK_HASHES_TO_STORE];\\n }\\n\\n /// @notice Assuming that the block is one of the last MINIBLOCK_HASHES_TO_STORE ones, sets its hash.\\n /// @param _block The number of the block.\\n /// @param _hash The hash of the block.\\n function _setL2BlockHash(uint256 _block, bytes32 _hash) internal {\\n l2BlockHash[_block % MINIBLOCK_HASHES_TO_STORE] = _hash;\\n }\\n\\n /// @notice Calculates the hash of an L2 block.\\n /// @param _blockNumber The number of the L2 block.\\n /// @param _blockTimestamp The timestamp of the L2 block.\\n /// @param _prevL2BlockHash The hash of the previous L2 block.\\n /// @param _blockTxsRollingHash The rolling hash of the transactions in the L2 block.\\n function _calculateL2BlockHash(\\n uint128 _blockNumber,\\n uint128 _blockTimestamp,\\n bytes32 _prevL2BlockHash,\\n bytes32 _blockTxsRollingHash\\n ) internal pure returns (bytes32) {\\n return keccak256(abi.encode(_blockNumber, _blockTimestamp, _prevL2BlockHash, _blockTxsRollingHash));\\n }\\n\\n /// @notice Calculates the legacy block hash of L2 block, which were used before the upgrade where\\n /// the advanced block hashes were introduced.\\n /// @param _blockNumber The number of the L2 block.\\n function _calculateLegacyL2BlockHash(uint128 _blockNumber) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(uint32(_blockNumber)));\\n }\\n\\n /// @notice Performs the upgrade where we transition to the L2 blocks.\\n /// @param _l2BlockNumber The number of the new L2 block.\\n /// @param _expectedPrevL2BlockHash The expected hash of the previous L2 block.\\n /// @param _isFirstInBatch Whether this method is called for the first time in the batch.\\n function _upgradeL2Blocks(uint128 _l2BlockNumber, bytes32 _expectedPrevL2BlockHash, bool _isFirstInBatch) internal {\\n require(_isFirstInBatch, \\\"Upgrade transaction must be first\\\");\\n\\n // This is how it will be commonly done in practice, but it will simplify some logic later\\n require(_l2BlockNumber \u003E 0, \\\"L2 block number is never expected to be zero\\\");\\n\\n unchecked {\\n bytes32 correctPrevBlockHash = _calculateLegacyL2BlockHash(_l2BlockNumber - 1);\\n require(correctPrevBlockHash == _expectedPrevL2BlockHash, \\\"The previous L2 block hash is incorrect\\\");\\n\\n // Whenever we'll be queried about the hashes of the blocks before the upgrade,\\n // we'll use batches' hashes, so we don't need to store 256 previous hashes.\\n // However, we do need to store the last previous hash in order to be able to correctly calculate the\\n // hash of the new L2 block.\\n _setL2BlockHash(_l2BlockNumber - 1, correctPrevBlockHash);\\n }\\n }\\n\\n /// @notice Creates new virtual blocks, while ensuring they don't exceed the L2 block number.\\n /// @param _l2BlockNumber The number of the new L2 block.\\n /// @param _maxVirtualBlocksToCreate The maximum number of virtual blocks to create with this L2 block.\\n /// @param _newTimestamp The timestamp of the new L2 block, which is also the timestamp of the new virtual block.\\n function _setVirtualBlock(\\n uint128 _l2BlockNumber,\\n uint128 _maxVirtualBlocksToCreate,\\n uint128 _newTimestamp\\n ) internal {\\n if (virtualBlockUpgradeInfo.virtualBlockFinishL2Block != 0) {\\n // No need to to do anything about virtual blocks anymore\\n // All the info is the same as for L2 blocks.\\n currentVirtualL2BlockInfo = currentL2BlockInfo;\\n return;\\n }\\n\\n BlockInfo memory virtualBlockInfo = currentVirtualL2BlockInfo;\\n\\n if (currentVirtualL2BlockInfo.number == 0 && virtualBlockInfo.timestamp == 0) {\\n uint128 currentBatchNumber = currentBatchInfo.number;\\n\\n // The virtual block is set for the first time. We can count it as 1 creation of a virtual block.\\n // Note, that when setting the virtual block number we use the batch number to make a smoother upgrade from batch number to\\n // the L2 block number.\\n virtualBlockInfo.number = currentBatchNumber;\\n // Remembering the batch number on which the upgrade to the virtual blocks has been done.\\n virtualBlockUpgradeInfo.virtualBlockStartBatch = currentBatchNumber;\\n\\n require(_maxVirtualBlocksToCreate \u003E 0, \\\"Can't initialize the first virtual block\\\");\\n _maxVirtualBlocksToCreate -= 1;\\n } else if (_maxVirtualBlocksToCreate == 0) {\\n // The virtual blocks have been already initialized, but the operator didn't ask to create\\n // any new virtual blocks. So we can just return.\\n return;\\n }\\n\\n virtualBlockInfo.number += _maxVirtualBlocksToCreate;\\n virtualBlockInfo.timestamp = _newTimestamp;\\n\\n // The virtual block number must never exceed the L2 block number.\\n // We do not use a `require` here, since the virtual blocks are a temporary solution to let the Solidity's `block.number`\\n // catch up with the L2 block number and so the situation where virtualBlockInfo.number starts getting larger\\n // than _l2BlockNumber is expected once virtual blocks have caught up the L2 blocks.\\n if (virtualBlockInfo.number \u003E= _l2BlockNumber) {\\n virtualBlockUpgradeInfo.virtualBlockFinishL2Block = _l2BlockNumber;\\n virtualBlockInfo.number = _l2BlockNumber;\\n }\\n\\n currentVirtualL2BlockInfo = virtualBlockInfo;\\n }\\n\\n /// @notice Sets the current block number and timestamp of the L2 block.\\n /// @param _l2BlockNumber The number of the new L2 block.\\n /// @param _l2BlockTimestamp The timestamp of the new L2 block.\\n /// @param _prevL2BlockHash The hash of the previous L2 block.\\n function _setNewL2BlockData(uint128 _l2BlockNumber, uint128 _l2BlockTimestamp, bytes32 _prevL2BlockHash) internal {\\n // In the unsafe version we do not check that the block data is correct\\n currentL2BlockInfo = BlockInfo({number: _l2BlockNumber, timestamp: _l2BlockTimestamp});\\n\\n // It is always assumed in production that _l2BlockNumber \u003E 0\\n _setL2BlockHash(_l2BlockNumber - 1, _prevL2BlockHash);\\n\\n // Resetting the rolling hash\\n currentL2BlockTxsRollingHash = bytes32(0);\\n }\\n\\n /// @notice Sets the current block number and timestamp of the L2 block.\\n /// @dev Called by the bootloader before each transaction. This is needed to ensure\\n /// that the data about the block is consistent with the sequencer.\\n /// @dev If the new block number is the same as the current one, we ensure that the block's data is\\n /// consistent with the one in the current block.\\n /// @dev If the new block number is greater than the current one by 1,\\n /// then we ensure that timestamp has increased.\\n /// @dev If the currently stored number is 0, we assume that it is the first upgrade transaction\\n /// and so we will fill up the old data.\\n /// @param _l2BlockNumber The number of the new L2 block.\\n /// @param _l2BlockTimestamp The timestamp of the new L2 block.\\n /// @param _expectedPrevL2BlockHash The expected hash of the previous L2 block.\\n /// @param _isFirstInBatch Whether this method is called for the first time in the batch.\\n /// @param _maxVirtualBlocksToCreate The maximum number of virtual block to create with this L2 block.\\n /// @dev It is a strict requirement that a new virtual block is created at the start of the batch.\\n /// @dev It is also enforced that the number of the current virtual L2 block can not exceed the number of the L2 block.\\n function setL2Block(\\n uint128 _l2BlockNumber,\\n uint128 _l2BlockTimestamp,\\n bytes32 _expectedPrevL2BlockHash,\\n bool _isFirstInBatch,\\n uint128 _maxVirtualBlocksToCreate\\n ) external onlyCallFromBootloader {\\n // We check that the timestamp of the L2 block is consistent with the timestamp of the batch.\\n if (_isFirstInBatch) {\\n uint128 currentBatchTimestamp = currentBatchInfo.timestamp;\\n require(\\n _l2BlockTimestamp \u003E= currentBatchTimestamp,\\n \\\"The timestamp of the L2 block must be greater than or equal to the timestamp of the current batch\\\"\\n );\\n require(_maxVirtualBlocksToCreate \u003E 0, \\\"There must be a virtual block created at the start of the batch\\\");\\n }\\n\\n (uint128 currentL2BlockNumber, uint128 currentL2BlockTimestamp) = getL2BlockNumberAndTimestamp();\\n\\n if (currentL2BlockNumber == 0 && currentL2BlockTimestamp == 0) {\\n // Since currentL2BlockNumber and currentL2BlockTimestamp are zero it means that it is\\n // the first ever batch with L2 blocks, so we need to initialize those.\\n _upgradeL2Blocks(_l2BlockNumber, _expectedPrevL2BlockHash, _isFirstInBatch);\\n\\n _setNewL2BlockData(_l2BlockNumber, _l2BlockTimestamp, _expectedPrevL2BlockHash);\\n } else if (currentL2BlockNumber == _l2BlockNumber) {\\n require(!_isFirstInBatch, \\\"Can not reuse L2 block number from the previous batch\\\");\\n require(currentL2BlockTimestamp == _l2BlockTimestamp, \\\"The timestamp of the same L2 block must be same\\\");\\n require(\\n _expectedPrevL2BlockHash == _getLatest257L2blockHash(_l2BlockNumber - 1),\\n \\\"The previous hash of the same L2 block must be same\\\"\\n );\\n require(_maxVirtualBlocksToCreate == 0, \\\"Can not create virtual blocks in the middle of the miniblock\\\");\\n } else if (currentL2BlockNumber + 1 == _l2BlockNumber) {\\n // From the checks in _upgradeL2Blocks it is known that currentL2BlockNumber can not be 0\\n bytes32 prevL2BlockHash = _getLatest257L2blockHash(currentL2BlockNumber - 1);\\n\\n bytes32 pendingL2BlockHash = _calculateL2BlockHash(\\n currentL2BlockNumber,\\n currentL2BlockTimestamp,\\n prevL2BlockHash,\\n currentL2BlockTxsRollingHash\\n );\\n\\n require(_expectedPrevL2BlockHash == pendingL2BlockHash, \\\"The current L2 block hash is incorrect\\\");\\n require(\\n _l2BlockTimestamp \u003E currentL2BlockTimestamp,\\n \\\"The timestamp of the new L2 block must be greater than the timestamp of the previous L2 block\\\"\\n );\\n\\n // Since the new block is created, we'll clear out the rolling hash\\n _setNewL2BlockData(_l2BlockNumber, _l2BlockTimestamp, _expectedPrevL2BlockHash);\\n } else {\\n revert(\\\"Invalid new L2 block number\\\");\\n }\\n\\n _setVirtualBlock(_l2BlockNumber, _maxVirtualBlocksToCreate, _l2BlockTimestamp);\\n }\\n\\n /// @notice Appends the transaction hash to the rolling hash of the current L2 block.\\n /// @param _txHash The hash of the transaction.\\n function appendTransactionToCurrentL2Block(bytes32 _txHash) external onlyCallFromBootloader {\\n currentL2BlockTxsRollingHash = keccak256(abi.encode(currentL2BlockTxsRollingHash, _txHash));\\n }\\n\\n /// @notice Publishes L2-\u003EL1 logs needed to verify the validity of this batch on L1.\\n /// @dev Should be called at the end of the current batch.\\n function publishTimestampDataToL1() external onlyCallFromBootloader {\\n (uint128 currentBatchNumber, uint128 currentBatchTimestamp) = getBatchNumberAndTimestamp();\\n (, uint128 currentL2BlockTimestamp) = getL2BlockNumberAndTimestamp();\\n\\n // The structure of the \\\"setNewBatch\\\" implies that currentBatchNumber \u003E 0, but we still double check it\\n require(currentBatchNumber \u003E 0, \\\"The current batch number must be greater than 0\\\");\\n\\n // In order to spend less pubdata, the packed version is published\\n uint256 packedTimestamps = (uint256(currentBatchTimestamp) \u003C\u003C 128) | currentL2BlockTimestamp;\\n\\n SystemContractHelper.toL1(\\n false,\\n bytes32(uint256(SystemLogKey.PACKED_BATCH_AND_L2_BLOCK_TIMESTAMP_KEY)),\\n bytes32(packedTimestamps)\\n );\\n }\\n\\n /// @notice Ensures that the timestamp of the batch is greater than the timestamp of the last L2 block.\\n /// @param _newTimestamp The timestamp of the new batch.\\n function _ensureBatchConsistentWithL2Block(uint128 _newTimestamp) internal view {\\n uint128 currentBlockTimestamp = currentL2BlockInfo.timestamp;\\n require(\\n _newTimestamp \u003E currentBlockTimestamp,\\n \\\"The timestamp of the batch must be greater than the timestamp of the previous block\\\"\\n );\\n }\\n\\n /// @notice Increments the current batch number and sets the new timestamp\\n /// @dev Called by the bootloader at the start of the batch.\\n /// @param _prevBatchHash The hash of the previous batch.\\n /// @param _newTimestamp The timestamp of the new batch.\\n /// @param _expectedNewNumber The new batch's number.\\n /// @param _baseFee The new batch's base fee\\n /// @dev While _expectedNewNumber can be derived as prevBatchNumber + 1, we still\\n /// manually supply it here for consistency checks.\\n /// @dev The correctness of the _prevBatchHash and _newTimestamp should be enforced on L1.\\n function setNewBatch(\\n bytes32 _prevBatchHash,\\n uint128 _newTimestamp,\\n uint128 _expectedNewNumber,\\n uint256 _baseFee\\n ) external onlyCallFromBootloader {\\n (uint128 previousBatchNumber, uint128 previousBatchTimestamp) = getBatchNumberAndTimestamp();\\n require(_newTimestamp \u003E previousBatchTimestamp, \\\"Timestamps should be incremental\\\");\\n require(previousBatchNumber + 1 == _expectedNewNumber, \\\"The provided batch number is not correct\\\");\\n\\n _ensureBatchConsistentWithL2Block(_newTimestamp);\\n\\n batchHashes[previousBatchNumber] = _prevBatchHash;\\n\\n // Setting new block number and timestamp\\n BlockInfo memory newBlockInfo = BlockInfo({number: previousBatchNumber + 1, timestamp: _newTimestamp});\\n\\n currentBatchInfo = newBlockInfo;\\n\\n baseFee = _baseFee;\\n\\n // The correctness of this block hash:\\n SystemContractHelper.toL1(false, bytes32(uint256(SystemLogKey.PREV_BATCH_HASH_KEY)), _prevBatchHash);\\n }\\n\\n /// @notice A testing method that manually sets the current blocks' number and timestamp.\\n /// @dev Should be used only for testing / ethCalls and should never be used in production.\\n function unsafeOverrideBatch(\\n uint256 _newTimestamp,\\n uint256 _number,\\n uint256 _baseFee\\n ) external onlyCallFromBootloader {\\n BlockInfo memory newBlockInfo = BlockInfo({number: uint128(_number), timestamp: uint128(_newTimestamp)});\\n currentBatchInfo = newBlockInfo;\\n\\n baseFee = _baseFee;\\n }\\n\\n function incrementTxNumberInBatch() external onlyCallFromBootloader {\\n txNumberInBlock += 1;\\n }\\n\\n function resetTxNumberInBatch() external onlyCallFromBootloader {\\n txNumberInBlock = 0;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPRECATED METHODS\\n //////////////////////////////////////////////////////////////*/\\n\\n /// @notice Returns the current batch's number and timestamp.\\n /// @dev Deprecated in favor of getBatchNumberAndTimestamp.\\n function currentBlockInfo() external view returns (uint256 blockInfo) {\\n (uint128 blockNumber, uint128 blockTimestamp) = getBatchNumberAndTimestamp();\\n blockInfo = (uint256(blockNumber) \u003C\u003C 128) | uint256(blockTimestamp);\\n }\\n\\n /// @notice Returns the current batch's number and timestamp.\\n /// @dev Deprecated in favor of getBatchNumberAndTimestamp.\\n function getBlockNumberAndTimestamp() external view returns (uint256 blockNumber, uint256 blockTimestamp) {\\n (blockNumber, blockTimestamp) = getBatchNumberAndTimestamp();\\n }\\n\\n /// @notice Returns the hash of the given batch.\\n /// @dev Deprecated in favor of getBatchHash.\\n function blockHash(uint256 _blockNumber) external view returns (bytes32 hash) {\\n hash = batchHashes[_blockNumber];\\n }\\n}\\n\"},\"contracts-preprocessed/interfaces/ISystemContext.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice Contract that stores some of the context variables, that may be either\\n * block-scoped, tx-scoped or system-wide.\\n */\\ninterface ISystemContext {\\n struct BlockInfo {\\n uint128 timestamp;\\n uint128 number;\\n }\\n\\n /// @notice A structure representing the timeline for the upgrade from the batch numbers to the L2 block numbers.\\n /// @dev It will be used for the L1 batch -\u003E L2 block migration in Q3 2023 only.\\n struct VirtualBlockUpgradeInfo {\\n /// @notice In order to maintain consistent results for `blockhash` requests, we'll\\n /// have to remember the number of the batch when the upgrade to the virtual blocks has been done.\\n /// The hashes for virtual blocks before the upgrade are identical to the hashes of the corresponding batches.\\n uint128 virtualBlockStartBatch;\\n /// @notice L2 block when the virtual blocks have caught up with the L2 blocks. Starting from this block,\\n /// all the information returned to users for block.timestamp/number, etc should be the information about the L2 blocks and\\n /// not virtual blocks.\\n uint128 virtualBlockFinishL2Block;\\n }\\n\\n function chainId() external view returns (uint256);\\n\\n function origin() external view returns (address);\\n\\n function gasPrice() external view returns (uint256);\\n\\n function blockGasLimit() external view returns (uint256);\\n\\n function coinbase() external view returns (address);\\n\\n function difficulty() external view returns (uint256);\\n\\n function baseFee() external view returns (uint256);\\n\\n function txNumberInBlock() external view returns (uint16);\\n\\n function getBlockHashEVM(uint256 _block) external view returns (bytes32);\\n\\n function getBatchHash(uint256 _batchNumber) external view returns (bytes32 hash);\\n\\n function getBlockNumber() external view returns (uint128);\\n\\n function getBlockTimestamp() external view returns (uint128);\\n\\n function getBatchNumberAndTimestamp() external view returns (uint128 blockNumber, uint128 blockTimestamp);\\n\\n function getL2BlockNumberAndTimestamp() external view returns (uint128 blockNumber, uint128 blockTimestamp);\\n\\n function gasPerPubdataByte() external view returns (uint256 gasPerPubdataByte);\\n\\n function getCurrentPubdataSpent() external view returns (uint256 currentPubdataSpent);\\n}\\n\"},\"contracts-preprocessed/interfaces/ISystemContract.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {SystemContractHelper} from \\\"../libraries/SystemContractHelper.sol\\\";\\nimport {BOOTLOADER_FORMAL_ADDRESS, FORCE_DEPLOYER} from \\\"../Constants.sol\\\";\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice An abstract contract that is used to reuse modifiers across the system contracts.\\n * @dev Solidity does not allow exporting modifiers via libraries, so\\n * the only way to do reuse modifiers is to have a base contract\\n * @dev Never add storage variables into this contract as some\\n * system contracts rely on this abstract contract as on interface!\\n */\\nabstract contract ISystemContract {\\n /// @notice Modifier that makes sure that the method\\n /// can only be called via a system call.\\n modifier onlySystemCall() {\\n require(\\n SystemContractHelper.isSystemCall() || SystemContractHelper.isSystemContract(msg.sender),\\n \\\"This method require system call flag\\\"\\n );\\n _;\\n }\\n\\n /// @notice Modifier that makes sure that the method\\n /// can only be called from a system contract.\\n modifier onlyCallFromSystemContract() {\\n require(\\n SystemContractHelper.isSystemContract(msg.sender),\\n \\\"This method require the caller to be system contract\\\"\\n );\\n _;\\n }\\n\\n /// @notice Modifier that makes sure that the method\\n /// can only be called from a special given address.\\n modifier onlyCallFrom(address caller) {\\n require(msg.sender == caller, \\\"Inappropriate caller\\\");\\n _;\\n }\\n\\n /// @notice Modifier that makes sure that the method\\n /// can only be called from the bootloader.\\n modifier onlyCallFromBootloader() {\\n require(msg.sender == BOOTLOADER_FORMAL_ADDRESS, \\\"Callable only by the bootloader\\\");\\n _;\\n }\\n\\n /// @notice Modifier that makes sure that the method\\n /// can only be called from the L1 force deployer.\\n modifier onlyCallFromForceDeployer() {\\n require(msg.sender == FORCE_DEPLOYER);\\n _;\\n }\\n}\\n\"},\"contracts-preprocessed/interfaces/ISystemContextDeprecated.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice The interface with deprecated functions of the SystemContext contract. It is aimed for backward compatibility.\\n */\\ninterface ISystemContextDeprecated {\\n function currentBlockInfo() external view returns (uint256);\\n\\n function getBlockNumberAndTimestamp() external view returns (uint256 blockNumber, uint256 blockTimestamp);\\n\\n function blockHash(uint256 _blockNumber) external view returns (bytes32 hash);\\n}\\n\"},\"contracts-preprocessed/libraries/SystemContractHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {MAX_SYSTEM_CONTRACT_ADDRESS} from \\\"../Constants.sol\\\";\\n\\nimport {CALLFLAGS_CALL_ADDRESS, CODE_ADDRESS_CALL_ADDRESS, EVENT_WRITE_ADDRESS, EVENT_INITIALIZE_ADDRESS, GET_EXTRA_ABI_DATA_ADDRESS, LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS, META_CODE_SHARD_ID_OFFSET, META_CALLER_SHARD_ID_OFFSET, META_SHARD_ID_OFFSET, META_AUX_HEAP_SIZE_OFFSET, META_HEAP_SIZE_OFFSET, META_PUBDATA_PUBLISHED_OFFSET, META_CALL_ADDRESS, PTR_CALLDATA_CALL_ADDRESS, PTR_ADD_INTO_ACTIVE_CALL_ADDRESS, PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS, PTR_PACK_INTO_ACTIVE_CALL_ADDRESS, PRECOMPILE_CALL_ADDRESS, SET_CONTEXT_VALUE_CALL_ADDRESS, TO_L1_CALL_ADDRESS} from \\\"./SystemContractsCaller.sol\\\";\\n\\nuint256 constant UINT32_MASK = type(uint32).max;\\nuint256 constant UINT64_MASK = type(uint64).max;\\nuint256 constant UINT128_MASK = type(uint128).max;\\nuint256 constant ADDRESS_MASK = type(uint160).max;\\n\\n/// @notice NOTE: The `getZkSyncMeta` that is used to obtain this struct will experience a breaking change in 2024.\\nstruct ZkSyncMeta {\\n uint32 pubdataPublished;\\n uint32 heapSize;\\n uint32 auxHeapSize;\\n uint8 shardId;\\n uint8 callerShardId;\\n uint8 codeShardId;\\n}\\n\\nenum Global {\\n CalldataPtr,\\n CallFlags,\\n ExtraABIData1,\\n ExtraABIData2,\\n ReturndataPtr\\n}\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice Library used for accessing zkEVM-specific opcodes, needed for the development\\n * of system contracts.\\n * @dev While this library will be eventually available to public, some of the provided\\n * methods won't work for non-system contracts and also breaking changes at short notice are possible.\\n * We do not recommend this library for external use.\\n */\\nlibrary SystemContractHelper {\\n /// @notice Send an L2Log to L1.\\n /// @param _isService The `isService` flag.\\n /// @param _key The `key` part of the L2Log.\\n /// @param _value The `value` part of the L2Log.\\n /// @dev The meaning of all these parameters is context-dependent, but they\\n /// have no intrinsic meaning per se.\\n function toL1(bool _isService, bytes32 _key, bytes32 _value) internal {\\n address callAddr = TO_L1_CALL_ADDRESS;\\n assembly {\\n // Ensuring that the type is bool\\n _isService := and(_isService, 1)\\n // This `success` is always 0, but the method always succeeds\\n // (except for the cases when there is not enough gas)\\n // solhint-disable-next-line no-unused-vars\\n let success := call(_isService, callAddr, _key, _value, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Get address of the currently executed code.\\n /// @dev This allows differentiating between `call` and `delegatecall`.\\n /// During the former `this` and `codeAddress` are the same, while\\n /// during the latter they are not.\\n function getCodeAddress() internal view returns (address addr) {\\n address callAddr = CODE_ADDRESS_CALL_ADDRESS;\\n assembly {\\n addr := staticcall(0, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Provide a compiler hint, by placing calldata fat pointer into virtual `ACTIVE_PTR`,\\n /// that can be manipulated by `ptr.add`/`ptr.sub`/`ptr.pack`/`ptr.shrink` later.\\n /// @dev This allows making a call by forwarding calldata pointer to the child call.\\n /// It is a much more efficient way to forward calldata, than standard EVM bytes copying.\\n function loadCalldataIntoActivePtr() internal view {\\n address callAddr = LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS;\\n assembly {\\n pop(staticcall(0, callAddr, 0, 0xFFFF, 0, 0))\\n }\\n }\\n\\n /// @notice Compiler simulation of the `ptr.pack` opcode for the virtual `ACTIVE_PTR` pointer.\\n /// @dev Do the concatenation between lowest part of `ACTIVE_PTR` and highest part of `_farCallAbi`\\n /// forming packed fat pointer for a far call or ret ABI when necessary.\\n /// Note: Panics if the lowest 128 bits of `_farCallAbi` are not zeroes.\\n function ptrPackIntoActivePtr(uint256 _farCallAbi) internal view {\\n address callAddr = PTR_PACK_INTO_ACTIVE_CALL_ADDRESS;\\n assembly {\\n pop(staticcall(_farCallAbi, callAddr, 0, 0xFFFF, 0, 0))\\n }\\n }\\n\\n /// @notice Compiler simulation of the `ptr.add` opcode for the virtual `ACTIVE_PTR` pointer.\\n /// @dev Transforms `ACTIVE_PTR.offset` into `ACTIVE_PTR.offset + u32(_value)`. If overflow happens then it panics.\\n function ptrAddIntoActive(uint32 _value) internal view {\\n address callAddr = PTR_ADD_INTO_ACTIVE_CALL_ADDRESS;\\n uint256 cleanupMask = UINT32_MASK;\\n assembly {\\n // Clearing input params as they are not cleaned by Solidity by default\\n _value := and(_value, cleanupMask)\\n pop(staticcall(_value, callAddr, 0, 0xFFFF, 0, 0))\\n }\\n }\\n\\n /// @notice Compiler simulation of the `ptr.shrink` opcode for the virtual `ACTIVE_PTR` pointer.\\n /// @dev Transforms `ACTIVE_PTR.length` into `ACTIVE_PTR.length - u32(_shrink)`. If underflow happens then it panics.\\n function ptrShrinkIntoActive(uint32 _shrink) internal view {\\n address callAddr = PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS;\\n uint256 cleanupMask = UINT32_MASK;\\n assembly {\\n // Clearing input params as they are not cleaned by Solidity by default\\n _shrink := and(_shrink, cleanupMask)\\n pop(staticcall(_shrink, callAddr, 0, 0xFFFF, 0, 0))\\n }\\n }\\n\\n /// @notice packs precompile parameters into one word\\n /// @param _inputMemoryOffset The memory offset in 32-byte words for the input data for calling the precompile.\\n /// @param _inputMemoryLength The length of the input data in words.\\n /// @param _outputMemoryOffset The memory offset in 32-byte words for the output data.\\n /// @param _outputMemoryLength The length of the output data in words.\\n /// @param _perPrecompileInterpreted The constant, the meaning of which is defined separately for\\n /// each precompile. For information, please read the documentation of the precompilecall log in\\n /// the VM.\\n function packPrecompileParams(\\n uint32 _inputMemoryOffset,\\n uint32 _inputMemoryLength,\\n uint32 _outputMemoryOffset,\\n uint32 _outputMemoryLength,\\n uint64 _perPrecompileInterpreted\\n ) internal pure returns (uint256 rawParams) {\\n rawParams = _inputMemoryOffset;\\n rawParams |= uint256(_inputMemoryLength) \u003C\u003C 32;\\n rawParams |= uint256(_outputMemoryOffset) \u003C\u003C 64;\\n rawParams |= uint256(_outputMemoryLength) \u003C\u003C 96;\\n rawParams |= uint256(_perPrecompileInterpreted) \u003C\u003C 192;\\n }\\n\\n /// @notice Call precompile with given parameters.\\n /// @param _rawParams The packed precompile params. They can be retrieved by\\n /// the `packPrecompileParams` method.\\n /// @param _gasToBurn The number of gas to burn during this call.\\n /// @param _pubdataToSpend The number of pubdata bytes to burn during the call.\\n /// @return success Whether the call was successful.\\n /// @dev The list of currently available precompiles sha256, keccak256, ecrecover.\\n /// NOTE: The precompile type depends on `this` which calls precompile, which means that only\\n /// system contracts corresponding to the list of precompiles above can do `precompileCall`.\\n /// @dev If used not in the `sha256`, `keccak256` or `ecrecover` contracts, it will just burn the gas provided.\\n /// @dev This method is `unsafe` because it does not check whether there is enough gas to burn.\\n function unsafePrecompileCall(\\n uint256 _rawParams,\\n uint32 _gasToBurn,\\n uint32 _pubdataToSpend\\n ) internal view returns (bool success) {\\n address callAddr = PRECOMPILE_CALL_ADDRESS;\\n\\n uint256 params = uint256(_gasToBurn) + (uint256(_pubdataToSpend) \u003C\u003C 32);\\n\\n uint256 cleanupMask = UINT64_MASK;\\n assembly {\\n // Clearing input params as they are not cleaned by Solidity by default\\n params := and(params, cleanupMask)\\n success := staticcall(_rawParams, callAddr, params, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Set `msg.value` to next far call.\\n /// @param _value The msg.value that will be used for the *next* call.\\n /// @dev If called not in kernel mode, it will result in a revert (enforced by the VM)\\n function setValueForNextFarCall(uint128 _value) internal returns (bool success) {\\n uint256 cleanupMask = UINT128_MASK;\\n address callAddr = SET_CONTEXT_VALUE_CALL_ADDRESS;\\n assembly {\\n // Clearing input params as they are not cleaned by Solidity by default\\n _value := and(_value, cleanupMask)\\n success := call(0, callAddr, _value, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Initialize a new event.\\n /// @param initializer The event initializing value.\\n /// @param value1 The first topic or data chunk.\\n function eventInitialize(uint256 initializer, uint256 value1) internal {\\n address callAddr = EVENT_INITIALIZE_ADDRESS;\\n assembly {\\n pop(call(initializer, callAddr, value1, 0, 0xFFFF, 0, 0))\\n }\\n }\\n\\n /// @notice Continue writing the previously initialized event.\\n /// @param value1 The first topic or data chunk.\\n /// @param value2 The second topic or data chunk.\\n function eventWrite(uint256 value1, uint256 value2) internal {\\n address callAddr = EVENT_WRITE_ADDRESS;\\n assembly {\\n pop(call(value1, callAddr, value2, 0, 0xFFFF, 0, 0))\\n }\\n }\\n\\n /// @notice Get the packed representation of the `ZkSyncMeta` from the current context.\\n /// @notice NOTE: The behavior of this function will experience a breaking change in 2024.\\n /// @return meta The packed representation of the ZkSyncMeta.\\n /// @dev The fields in ZkSyncMeta are NOT tightly packed, i.e. there is a special rule on how\\n /// they are packed. For more information, please read the documentation on ZkSyncMeta.\\n function getZkSyncMetaBytes() internal view returns (uint256 meta) {\\n address callAddr = META_CALL_ADDRESS;\\n assembly {\\n meta := staticcall(0, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Returns the bits [offset..offset+size-1] of the meta.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @param offset The offset of the bits.\\n /// @param size The size of the extracted number in bits.\\n /// @return result The extracted number.\\n function extractNumberFromMeta(uint256 meta, uint256 offset, uint256 size) internal pure returns (uint256 result) {\\n // Firstly, we delete all the bits after the field\\n uint256 shifted = (meta \u003C\u003C (256 - size - offset));\\n // Then we shift everything back\\n result = (shifted \u003E\u003E (256 - size));\\n }\\n\\n /// @notice Given the packed representation of `ZkSyncMeta`, retrieves the number of pubdata\\n /// bytes published in the batch so far.\\n /// @notice NOTE: The behavior of this function will experience a breaking change in 2024.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @return pubdataPublished The amount of pubdata published in the system so far.\\n function getPubdataPublishedFromMeta(uint256 meta) internal pure returns (uint32 pubdataPublished) {\\n pubdataPublished = uint32(extractNumberFromMeta(meta, META_PUBDATA_PUBLISHED_OFFSET, 32));\\n }\\n\\n /// @notice Given the packed representation of `ZkSyncMeta`, retrieves the number of the current size\\n /// of the heap in bytes.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @return heapSize The size of the memory in bytes byte.\\n /// @dev The following expression: getHeapSizeFromMeta(getZkSyncMetaBytes()) is\\n /// equivalent to the MSIZE in Solidity.\\n function getHeapSizeFromMeta(uint256 meta) internal pure returns (uint32 heapSize) {\\n heapSize = uint32(extractNumberFromMeta(meta, META_HEAP_SIZE_OFFSET, 32));\\n }\\n\\n /// @notice Given the packed representation of `ZkSyncMeta`, retrieves the number of the current size\\n /// of the auxiliary heap in bytes.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @return auxHeapSize The size of the auxiliary memory in bytes byte.\\n /// @dev You can read more on auxiliary memory in the VM1.2 documentation.\\n function getAuxHeapSizeFromMeta(uint256 meta) internal pure returns (uint32 auxHeapSize) {\\n auxHeapSize = uint32(extractNumberFromMeta(meta, META_AUX_HEAP_SIZE_OFFSET, 32));\\n }\\n\\n /// @notice Given the packed representation of `ZkSyncMeta`, retrieves the shardId of `this`.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @return shardId The shardId of `this`.\\n /// @dev Currently only shard 0 (zkRollup) is supported.\\n function getShardIdFromMeta(uint256 meta) internal pure returns (uint8 shardId) {\\n shardId = uint8(extractNumberFromMeta(meta, META_SHARD_ID_OFFSET, 8));\\n }\\n\\n /// @notice Given the packed representation of `ZkSyncMeta`, retrieves the shardId of\\n /// the msg.sender.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @return callerShardId The shardId of the msg.sender.\\n /// @dev Currently only shard 0 (zkRollup) is supported.\\n function getCallerShardIdFromMeta(uint256 meta) internal pure returns (uint8 callerShardId) {\\n callerShardId = uint8(extractNumberFromMeta(meta, META_CALLER_SHARD_ID_OFFSET, 8));\\n }\\n\\n /// @notice Given the packed representation of `ZkSyncMeta`, retrieves the shardId of\\n /// the currently executed code.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @return codeShardId The shardId of the currently executed code.\\n /// @dev Currently only shard 0 (zkRollup) is supported.\\n function getCodeShardIdFromMeta(uint256 meta) internal pure returns (uint8 codeShardId) {\\n codeShardId = uint8(extractNumberFromMeta(meta, META_CODE_SHARD_ID_OFFSET, 8));\\n }\\n\\n /// @notice Retrieves the ZkSyncMeta structure.\\n /// @notice NOTE: The behavior of this function will experience a breaking change in 2024.\\n /// @return meta The ZkSyncMeta execution context parameters.\\n function getZkSyncMeta() internal view returns (ZkSyncMeta memory meta) {\\n uint256 metaPacked = getZkSyncMetaBytes();\\n meta.pubdataPublished = getPubdataPublishedFromMeta(metaPacked);\\n meta.heapSize = getHeapSizeFromMeta(metaPacked);\\n meta.auxHeapSize = getAuxHeapSizeFromMeta(metaPacked);\\n meta.shardId = getShardIdFromMeta(metaPacked);\\n meta.callerShardId = getCallerShardIdFromMeta(metaPacked);\\n meta.codeShardId = getCodeShardIdFromMeta(metaPacked);\\n }\\n\\n /// @notice Returns the call flags for the current call.\\n /// @return callFlags The bitmask of the callflags.\\n /// @dev Call flags is the value of the first register\\n /// at the start of the call.\\n /// @dev The zero bit of the callFlags indicates whether the call is\\n /// a constructor call. The first bit of the callFlags indicates whether\\n /// the call is a system one.\\n function getCallFlags() internal view returns (uint256 callFlags) {\\n address callAddr = CALLFLAGS_CALL_ADDRESS;\\n assembly {\\n callFlags := staticcall(0, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Returns the current calldata pointer.\\n /// @return ptr The current calldata pointer.\\n /// @dev NOTE: This file is just an integer and it cannot be used\\n /// to forward the calldata to the next calls in any way.\\n function getCalldataPtr() internal view returns (uint256 ptr) {\\n address callAddr = PTR_CALLDATA_CALL_ADDRESS;\\n assembly {\\n ptr := staticcall(0, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Returns the N-th extraAbiParam for the current call.\\n /// @return extraAbiData The value of the N-th extraAbiParam for this call.\\n /// @dev It is equal to the value of the (N+2)-th register\\n /// at the start of the call.\\n function getExtraAbiData(uint256 index) internal view returns (uint256 extraAbiData) {\\n require(index \u003C 10, \\\"There are only 10 accessible registers\\\");\\n\\n address callAddr = GET_EXTRA_ABI_DATA_ADDRESS;\\n assembly {\\n extraAbiData := staticcall(index, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Returns whether the current call is a system call.\\n /// @return `true` or `false` based on whether the current call is a system call.\\n function isSystemCall() internal view returns (bool) {\\n uint256 callFlags = getCallFlags();\\n // When the system call is passed, the 2-bit is set to 1\\n return (callFlags & 2) != 0;\\n }\\n\\n /// @notice Returns whether the address is a system contract.\\n /// @param _address The address to test\\n /// @return `true` or `false` based on whether the `_address` is a system contract.\\n function isSystemContract(address _address) internal pure returns (bool) {\\n return uint160(_address) \u003C= uint160(MAX_SYSTEM_CONTRACT_ADDRESS);\\n }\\n\\n /// @notice Method used for burning a certain amount of gas.\\n /// @param _gasToPay The number of gas to burn.\\n /// @param _pubdataToSpend The number of pubdata bytes to burn during the call.\\n function burnGas(uint32 _gasToPay, uint32 _pubdataToSpend) internal view {\\n bool precompileCallSuccess = unsafePrecompileCall(\\n 0, // The precompile parameters are formal ones. We only need the precompile call to burn gas.\\n _gasToPay,\\n _pubdataToSpend\\n );\\n require(precompileCallSuccess, \\\"Failed to charge gas\\\");\\n }\\n}\\n\"},\"contracts-preprocessed/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {IAccountCodeStorage} from \\\"./interfaces/IAccountCodeStorage.sol\\\";\\nimport {INonceHolder} from \\\"./interfaces/INonceHolder.sol\\\";\\nimport {IContractDeployer} from \\\"./interfaces/IContractDeployer.sol\\\";\\nimport {IKnownCodesStorage} from \\\"./interfaces/IKnownCodesStorage.sol\\\";\\nimport {IImmutableSimulator} from \\\"./interfaces/IImmutableSimulator.sol\\\";\\nimport {IBaseToken} from \\\"./interfaces/IBaseToken.sol\\\";\\nimport {IL1Messenger} from \\\"./interfaces/IL1Messenger.sol\\\";\\nimport {ISystemContext} from \\\"./interfaces/ISystemContext.sol\\\";\\nimport {ICompressor} from \\\"./interfaces/ICompressor.sol\\\";\\nimport {IComplexUpgrader} from \\\"./interfaces/IComplexUpgrader.sol\\\";\\nimport {IBootloaderUtilities} from \\\"./interfaces/IBootloaderUtilities.sol\\\";\\nimport {IPubdataChunkPublisher} from \\\"./interfaces/IPubdataChunkPublisher.sol\\\";\\n\\n/// @dev All the system contracts introduced by zkSync have their addresses\\n/// started from 2^15 in order to avoid collision with Ethereum precompiles.\\nuint160 constant SYSTEM_CONTRACTS_OFFSET = 0x8000; // 2^15\\n\\n/// @dev Unlike the value above, it is not overridden for the purpose of testing and\\n/// is identical to the constant value actually used as the system contracts offset on\\n/// mainnet.\\nuint160 constant REAL_SYSTEM_CONTRACTS_OFFSET = 0x8000;\\n\\n/// @dev All the system contracts must be located in the kernel space,\\n/// i.e. their addresses must be below 2^16.\\nuint160 constant MAX_SYSTEM_CONTRACT_ADDRESS = 0xffff; // 2^16 - 1\\n\\naddress constant ECRECOVER_SYSTEM_CONTRACT = address(0x01);\\naddress constant SHA256_SYSTEM_CONTRACT = address(0x02);\\naddress constant ECADD_SYSTEM_CONTRACT = address(0x06);\\naddress constant ECMUL_SYSTEM_CONTRACT = address(0x07);\\naddress constant ECPAIRING_SYSTEM_CONTRACT = address(0x08);\\n\\n\\n/// @dev The number of ergs that need to be spent for a single byte of pubdata regardless of the pubdata price.\\n/// This variable is used to ensure the following:\\n/// - That the long-term storage of the operator is compensated properly.\\n/// - That it is not possible that the pubdata counter grows too high without spending proportional amount of computation.\\nuint256 constant COMPUTATIONAL_PRICE_FOR_PUBDATA = 80;\\n\\n/// @dev The maximal possible address of an L1-like precompie. These precompiles maintain the following properties:\\n/// - Their extcodehash is EMPTY_STRING_KECCAK\\n/// - Their extcodesize is 0 despite having a bytecode formally deployed there.\\nuint256 constant CURRENT_MAX_PRECOMPILE_ADDRESS = 0xff;\\n\\naddress payable constant BOOTLOADER_FORMAL_ADDRESS = payable(address(SYSTEM_CONTRACTS_OFFSET + 0x01));\\nIAccountCodeStorage constant ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT = IAccountCodeStorage(\\n address(SYSTEM_CONTRACTS_OFFSET + 0x02)\\n);\\nINonceHolder constant NONCE_HOLDER_SYSTEM_CONTRACT = INonceHolder(address(SYSTEM_CONTRACTS_OFFSET + 0x03));\\nIKnownCodesStorage constant KNOWN_CODE_STORAGE_CONTRACT = IKnownCodesStorage(address(SYSTEM_CONTRACTS_OFFSET + 0x04));\\nIImmutableSimulator constant IMMUTABLE_SIMULATOR_SYSTEM_CONTRACT = IImmutableSimulator(\\n address(SYSTEM_CONTRACTS_OFFSET + 0x05)\\n);\\nIContractDeployer constant DEPLOYER_SYSTEM_CONTRACT = IContractDeployer(address(SYSTEM_CONTRACTS_OFFSET + 0x06));\\nIContractDeployer constant REAL_DEPLOYER_SYSTEM_CONTRACT = IContractDeployer(address(REAL_SYSTEM_CONTRACTS_OFFSET + 0x06));\\n\\n// A contract that is allowed to deploy any codehash\\n// on any address. To be used only during an upgrade.\\naddress constant FORCE_DEPLOYER = address(SYSTEM_CONTRACTS_OFFSET + 0x07);\\nIL1Messenger constant L1_MESSENGER_CONTRACT = IL1Messenger(address(SYSTEM_CONTRACTS_OFFSET + 0x08));\\naddress constant MSG_VALUE_SYSTEM_CONTRACT = address(SYSTEM_CONTRACTS_OFFSET + 0x09);\\n\\nIBaseToken constant BASE_TOKEN_SYSTEM_CONTRACT = IBaseToken(address(SYSTEM_CONTRACTS_OFFSET + 0x0a));\\nIBaseToken constant REAL_BASE_TOKEN_SYSTEM_CONTRACT = IBaseToken(address(REAL_SYSTEM_CONTRACTS_OFFSET + 0x0a));\\n\\n// Hardcoded because even for tests we should keep the address. (Instead `SYSTEM_CONTRACTS_OFFSET + 0x10`)\\n// Precompile call depends on it.\\n// And we don't want to mock this contract.\\naddress constant KECCAK256_SYSTEM_CONTRACT = address(0x8010);\\n\\nISystemContext constant SYSTEM_CONTEXT_CONTRACT = ISystemContext(payable(address(SYSTEM_CONTRACTS_OFFSET + 0x0b)));\\nISystemContext constant REAL_SYSTEM_CONTEXT_CONTRACT = ISystemContext(payable(address(REAL_SYSTEM_CONTRACTS_OFFSET + 0x0b)));\\n\\nIBootloaderUtilities constant BOOTLOADER_UTILITIES = IBootloaderUtilities(address(SYSTEM_CONTRACTS_OFFSET + 0x0c));\\n\\n// It will be a different value for tests, while shouldn't. But for now, this constant is not used by other contracts, so that's fine.\\naddress constant EVENT_WRITER_CONTRACT = address(SYSTEM_CONTRACTS_OFFSET + 0x0d);\\n\\nICompressor constant COMPRESSOR_CONTRACT = ICompressor(address(SYSTEM_CONTRACTS_OFFSET + 0x0e));\\n\\nIComplexUpgrader constant COMPLEX_UPGRADER_CONTRACT = IComplexUpgrader(address(SYSTEM_CONTRACTS_OFFSET + 0x0f));\\n\\nIPubdataChunkPublisher constant PUBDATA_CHUNK_PUBLISHER = IPubdataChunkPublisher(\\n address(SYSTEM_CONTRACTS_OFFSET + 0x11)\\n);\\n\\n/// @dev If the bitwise AND of the extraAbi[2] param when calling the MSG_VALUE_SIMULATOR\\n/// is non-zero, the call will be assumed to be a system one.\\nuint256 constant MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT = 1;\\n\\n/// @dev The maximal msg.value that context can have\\nuint256 constant MAX_MSG_VALUE = type(uint128).max;\\n\\n/// @dev Prefix used during derivation of account addresses using CREATE2\\n/// @dev keccak256(\\\"zksyncCreate2\\\")\\nbytes32 constant CREATE2_PREFIX = 0x2020dba91b30cc0006188af794c2fb30dd8520db7e2c088b7fc7c103c00ca494;\\n/// @dev Prefix used during derivation of account addresses using CREATE\\n/// @dev keccak256(\\\"zksyncCreate\\\")\\nbytes32 constant CREATE_PREFIX = 0x63bae3a9951d38e8a3fbb7b70909afc1200610fc5bc55ade242f815974674f23;\\n\\n/// @dev Each state diff consists of 156 bytes of actual data and 116 bytes of unused padding, needed for circuit efficiency.\\nuint256 constant STATE_DIFF_ENTRY_SIZE = 272;\\n\\nenum SystemLogKey {\\n L2_TO_L1_LOGS_TREE_ROOT_KEY,\\n TOTAL_L2_TO_L1_PUBDATA_KEY,\\n STATE_DIFF_HASH_KEY,\\n PACKED_BATCH_AND_L2_BLOCK_TIMESTAMP_KEY,\\n PREV_BATCH_HASH_KEY,\\n CHAINED_PRIORITY_TXN_HASH_KEY,\\n NUMBER_OF_LAYER_1_TXS_KEY,\\n BLOB_ONE_HASH_KEY,\\n BLOB_TWO_HASH_KEY,\\n BLOB_THREE_HASH_KEY,\\n BLOB_FOUR_HASH_KEY,\\n BLOB_FIVE_HASH_KEY,\\n BLOB_SIX_HASH_KEY,\\n EXPECTED_SYSTEM_CONTRACT_UPGRADE_TX_HASH_KEY\\n}\\n\\n/// @dev The number of leaves in the L2-\u003EL1 log Merkle tree.\\n/// While formally a tree of any length is acceptable, the node supports only a constant length of 16384 leaves.\\nuint256 constant L2_TO_L1_LOGS_MERKLE_TREE_LEAVES = 16_384;\\n\\n/// @dev The length of the derived key in bytes inside compressed state diffs.\\nuint256 constant DERIVED_KEY_LENGTH = 32;\\n/// @dev The length of the enum index in bytes inside compressed state diffs.\\nuint256 constant ENUM_INDEX_LENGTH = 8;\\n/// @dev The length of value in bytes inside compressed state diffs.\\nuint256 constant VALUE_LENGTH = 32;\\n\\n/// @dev The length of the compressed initial storage write in bytes.\\nuint256 constant COMPRESSED_INITIAL_WRITE_SIZE = DERIVED_KEY_LENGTH + VALUE_LENGTH;\\n/// @dev The length of the compressed repeated storage write in bytes.\\nuint256 constant COMPRESSED_REPEATED_WRITE_SIZE = ENUM_INDEX_LENGTH + VALUE_LENGTH;\\n\\n/// @dev The position from which the initial writes start in the compressed state diffs.\\nuint256 constant INITIAL_WRITE_STARTING_POSITION = 4;\\n\\n/// @dev Each storage diffs consists of the following elements:\\n/// [20bytes address][32bytes key][32bytes derived key][8bytes enum index][32bytes initial value][32bytes final value]\\n/// @dev The offset of the derived key in a storage diff.\\nuint256 constant STATE_DIFF_DERIVED_KEY_OFFSET = 52;\\n/// @dev The offset of the enum index in a storage diff.\\nuint256 constant STATE_DIFF_ENUM_INDEX_OFFSET = 84;\\n/// @dev The offset of the final value in a storage diff.\\nuint256 constant STATE_DIFF_FINAL_VALUE_OFFSET = 124;\\n\\n/// @dev Total number of bytes in a blob. Blob = 4096 field elements * 31 bytes per field element\\n/// @dev EIP-4844 defines it as 131_072 but we use 4096 * 31 within our circuits to always fit within a field element\\n/// @dev Our circuits will prove that a EIP-4844 blob and our internal blob are the same.\\nuint256 constant BLOB_SIZE_BYTES = 126_976;\\n\\n/// @dev Max number of blobs currently supported\\nuint256 constant MAX_NUMBER_OF_BLOBS = 6;\\n\"},\"contracts-preprocessed/libraries/SystemContractsCaller.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {MSG_VALUE_SYSTEM_CONTRACT, MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT} from \\\"../Constants.sol\\\";\\nimport {Utils} from \\\"./Utils.sol\\\";\\n\\n// Addresses used for the compiler to be replaced with the\\n// zkSync-specific opcodes during the compilation.\\n// IMPORTANT: these are just compile-time constants and are used\\n// only if used in-place by Yul optimizer.\\naddress constant TO_L1_CALL_ADDRESS = address((1 \u003C\u003C 16) - 1);\\naddress constant CODE_ADDRESS_CALL_ADDRESS = address((1 \u003C\u003C 16) - 2);\\naddress constant PRECOMPILE_CALL_ADDRESS = address((1 \u003C\u003C 16) - 3);\\naddress constant META_CALL_ADDRESS = address((1 \u003C\u003C 16) - 4);\\naddress constant MIMIC_CALL_CALL_ADDRESS = address((1 \u003C\u003C 16) - 5);\\naddress constant SYSTEM_MIMIC_CALL_CALL_ADDRESS = address((1 \u003C\u003C 16) - 6);\\naddress constant MIMIC_CALL_BY_REF_CALL_ADDRESS = address((1 \u003C\u003C 16) - 7);\\naddress constant SYSTEM_MIMIC_CALL_BY_REF_CALL_ADDRESS = address((1 \u003C\u003C 16) - 8);\\naddress constant RAW_FAR_CALL_CALL_ADDRESS = address((1 \u003C\u003C 16) - 9);\\naddress constant RAW_FAR_CALL_BY_REF_CALL_ADDRESS = address((1 \u003C\u003C 16) - 10);\\naddress constant SYSTEM_CALL_CALL_ADDRESS = address((1 \u003C\u003C 16) - 11);\\naddress constant SYSTEM_CALL_BY_REF_CALL_ADDRESS = address((1 \u003C\u003C 16) - 12);\\naddress constant SET_CONTEXT_VALUE_CALL_ADDRESS = address((1 \u003C\u003C 16) - 13);\\naddress constant SET_PUBDATA_PRICE_CALL_ADDRESS = address((1 \u003C\u003C 16) - 14);\\naddress constant INCREMENT_TX_COUNTER_CALL_ADDRESS = address((1 \u003C\u003C 16) - 15);\\naddress constant PTR_CALLDATA_CALL_ADDRESS = address((1 \u003C\u003C 16) - 16);\\naddress constant CALLFLAGS_CALL_ADDRESS = address((1 \u003C\u003C 16) - 17);\\naddress constant PTR_RETURNDATA_CALL_ADDRESS = address((1 \u003C\u003C 16) - 18);\\naddress constant EVENT_INITIALIZE_ADDRESS = address((1 \u003C\u003C 16) - 19);\\naddress constant EVENT_WRITE_ADDRESS = address((1 \u003C\u003C 16) - 20);\\naddress constant LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS = address((1 \u003C\u003C 16) - 21);\\naddress constant LOAD_LATEST_RETURNDATA_INTO_ACTIVE_PTR_CALL_ADDRESS = address((1 \u003C\u003C 16) - 22);\\naddress constant PTR_ADD_INTO_ACTIVE_CALL_ADDRESS = address((1 \u003C\u003C 16) - 23);\\naddress constant PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS = address((1 \u003C\u003C 16) - 24);\\naddress constant PTR_PACK_INTO_ACTIVE_CALL_ADDRESS = address((1 \u003C\u003C 16) - 25);\\naddress constant MULTIPLICATION_HIGH_ADDRESS = address((1 \u003C\u003C 16) - 26);\\naddress constant GET_EXTRA_ABI_DATA_ADDRESS = address((1 \u003C\u003C 16) - 27);\\n\\n// All the offsets are in bits\\nuint256 constant META_PUBDATA_PUBLISHED_OFFSET = 0 * 8;\\nuint256 constant META_HEAP_SIZE_OFFSET = 8 * 8;\\nuint256 constant META_AUX_HEAP_SIZE_OFFSET = 12 * 8;\\nuint256 constant META_SHARD_ID_OFFSET = 28 * 8;\\nuint256 constant META_CALLER_SHARD_ID_OFFSET = 29 * 8;\\nuint256 constant META_CODE_SHARD_ID_OFFSET = 30 * 8;\\n\\n/// @notice The way to forward the calldata:\\n/// - Use the current heap (i.e. the same as on EVM).\\n/// - Use the auxiliary heap.\\n/// - Forward via a pointer\\n/// @dev Note, that currently, users do not have access to the auxiliary\\n/// heap and so the only type of forwarding that will be used by the users\\n/// are UseHeap and ForwardFatPointer for forwarding a slice of the current calldata\\n/// to the next call.\\nenum CalldataForwardingMode {\\n UseHeap,\\n ForwardFatPointer,\\n UseAuxHeap\\n}\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice A library that allows calling contracts with the `isSystem` flag.\\n * @dev It is needed to call ContractDeployer and NonceHolder.\\n */\\nlibrary SystemContractsCaller {\\n /// @notice Makes a call with the `isSystem` flag.\\n /// @param gasLimit The gas limit for the call.\\n /// @param to The address to call.\\n /// @param value The value to pass with the transaction.\\n /// @param data The calldata.\\n /// @return success Whether the transaction has been successful.\\n /// @dev Note, that the `isSystem` flag can only be set when calling system contracts.\\n function systemCall(uint32 gasLimit, address to, uint256 value, bytes memory data) internal returns (bool success) {\\n address callAddr = SYSTEM_CALL_CALL_ADDRESS;\\n\\n uint32 dataStart;\\n assembly {\\n dataStart := add(data, 0x20)\\n }\\n uint32 dataLength = uint32(Utils.safeCastToU32(data.length));\\n\\n uint256 farCallAbi = SystemContractsCaller.getFarCallABI({\\n dataOffset: 0,\\n memoryPage: 0,\\n dataStart: dataStart,\\n dataLength: dataLength,\\n gasPassed: gasLimit,\\n // Only rollup is supported for now\\n shardId: 0,\\n forwardingMode: CalldataForwardingMode.UseHeap,\\n isConstructorCall: false,\\n isSystemCall: true\\n });\\n\\n if (value == 0) {\\n // Doing the system call directly\\n assembly {\\n success := call(to, callAddr, 0, 0, farCallAbi, 0, 0)\\n }\\n } else {\\n address msgValueSimulator = MSG_VALUE_SYSTEM_CONTRACT;\\n // We need to supply the mask to the MsgValueSimulator to denote\\n // that the call should be a system one.\\n uint256 forwardMask = MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT;\\n\\n assembly {\\n success := call(msgValueSimulator, callAddr, value, to, farCallAbi, forwardMask, 0)\\n }\\n }\\n }\\n\\n /// @notice Makes a call with the `isSystem` flag.\\n /// @param gasLimit The gas limit for the call.\\n /// @param to The address to call.\\n /// @param value The value to pass with the transaction.\\n /// @param data The calldata.\\n /// @return success Whether the transaction has been successful.\\n /// @return returnData The returndata of the transaction (revert reason in case the transaction has failed).\\n /// @dev Note, that the `isSystem` flag can only be set when calling system contracts.\\n function systemCallWithReturndata(\\n uint32 gasLimit,\\n address to,\\n uint128 value,\\n bytes memory data\\n ) internal returns (bool success, bytes memory returnData) {\\n success = systemCall(gasLimit, to, value, data);\\n\\n uint256 size;\\n assembly {\\n size := returndatasize()\\n }\\n\\n returnData = new bytes(size);\\n assembly {\\n returndatacopy(add(returnData, 0x20), 0, size)\\n }\\n }\\n\\n /// @notice Makes a call with the `isSystem` flag.\\n /// @param gasLimit The gas limit for the call.\\n /// @param to The address to call.\\n /// @param value The value to pass with the transaction.\\n /// @param data The calldata.\\n /// @return returnData The returndata of the transaction. In case the transaction reverts, the error\\n /// bubbles up to the parent frame.\\n /// @dev Note, that the `isSystem` flag can only be set when calling system contracts.\\n function systemCallWithPropagatedRevert(\\n uint32 gasLimit,\\n address to,\\n uint128 value,\\n bytes memory data\\n ) internal returns (bytes memory returnData) {\\n bool success;\\n (success, returnData) = systemCallWithReturndata(gasLimit, to, value, data);\\n\\n if (!success) {\\n assembly {\\n let size := mload(returnData)\\n revert(add(returnData, 0x20), size)\\n }\\n }\\n }\\n\\n /// @notice Calculates the packed representation of the FarCallABI.\\n /// @param dataOffset Calldata offset in memory. Provide 0 unless using custom pointer.\\n /// @param memoryPage Memory page to use. Provide 0 unless using custom pointer.\\n /// @param dataStart The start of the calldata slice. Provide the offset in memory\\n /// if not using custom pointer.\\n /// @param dataLength The calldata length. Provide the length of the calldata in bytes\\n /// unless using custom pointer.\\n /// @param gasPassed The gas to pass with the call.\\n /// @param shardId Of the account to call. Currently only 0 is supported.\\n /// @param forwardingMode The forwarding mode to use:\\n /// - provide CalldataForwardingMode.UseHeap when using your current memory\\n /// - provide CalldataForwardingMode.ForwardFatPointer when using custom pointer.\\n /// @param isConstructorCall Whether the call will be a call to the constructor\\n /// (ignored when the caller is not a system contract).\\n /// @param isSystemCall Whether the call will have the `isSystem` flag.\\n /// @return farCallAbi The far call ABI.\\n /// @dev The `FarCallABI` has the following structure:\\n /// pub struct FarCallABI {\\n /// pub memory_quasi_fat_pointer: FatPointer,\\n /// pub gas_passed: u32,\\n /// pub shard_id: u8,\\n /// pub forwarding_mode: FarCallForwardPageType,\\n /// pub constructor_call: bool,\\n /// pub to_system: bool,\\n /// }\\n ///\\n /// The FatPointer struct:\\n ///\\n /// pub struct FatPointer {\\n /// pub offset: u32, // offset relative to `start`\\n /// pub memory_page: u32, // memory page where slice is located\\n /// pub start: u32, // absolute start of the slice\\n /// pub length: u32, // length of the slice\\n /// }\\n ///\\n /// @dev Note, that the actual layout is the following:\\n ///\\n /// [0..32) bits -- the calldata offset\\n /// [32..64) bits -- the memory page to use. Can be left blank in most of the cases.\\n /// [64..96) bits -- the absolute start of the slice\\n /// [96..128) bits -- the length of the slice.\\n /// [128..192) bits -- empty bits.\\n /// [192..224) bits -- gasPassed.\\n /// [224..232) bits -- forwarding_mode\\n /// [232..240) bits -- shard id.\\n /// [240..248) bits -- constructor call flag\\n /// [248..256] bits -- system call flag\\n function getFarCallABI(\\n uint32 dataOffset,\\n uint32 memoryPage,\\n uint32 dataStart,\\n uint32 dataLength,\\n uint32 gasPassed,\\n uint8 shardId,\\n CalldataForwardingMode forwardingMode,\\n bool isConstructorCall,\\n bool isSystemCall\\n ) internal pure returns (uint256 farCallAbi) {\\n // Fill in the call parameter fields\\n farCallAbi = getFarCallABIWithEmptyFatPointer({\\n gasPassed: gasPassed,\\n shardId: shardId,\\n forwardingMode: forwardingMode,\\n isConstructorCall: isConstructorCall,\\n isSystemCall: isSystemCall\\n });\\n\\n // Fill in the fat pointer fields\\n farCallAbi |= dataOffset;\\n farCallAbi |= (uint256(memoryPage) \u003C\u003C 32);\\n farCallAbi |= (uint256(dataStart) \u003C\u003C 64);\\n farCallAbi |= (uint256(dataLength) \u003C\u003C 96);\\n }\\n\\n /// @notice Calculates the packed representation of the FarCallABI with zero fat pointer fields.\\n /// @param gasPassed The gas to pass with the call.\\n /// @param shardId Of the account to call. Currently only 0 is supported.\\n /// @param forwardingMode The forwarding mode to use:\\n /// - provide CalldataForwardingMode.UseHeap when using your current memory\\n /// - provide CalldataForwardingMode.ForwardFatPointer when using custom pointer.\\n /// @param isConstructorCall Whether the call will be a call to the constructor\\n /// (ignored when the caller is not a system contract).\\n /// @param isSystemCall Whether the call will have the `isSystem` flag.\\n /// @return farCallAbiWithEmptyFatPtr The far call ABI with zero fat pointer fields.\\n function getFarCallABIWithEmptyFatPointer(\\n uint32 gasPassed,\\n uint8 shardId,\\n CalldataForwardingMode forwardingMode,\\n bool isConstructorCall,\\n bool isSystemCall\\n ) internal pure returns (uint256 farCallAbiWithEmptyFatPtr) {\\n farCallAbiWithEmptyFatPtr |= (uint256(gasPassed) \u003C\u003C 192);\\n farCallAbiWithEmptyFatPtr |= (uint256(forwardingMode) \u003C\u003C 224);\\n farCallAbiWithEmptyFatPtr |= (uint256(shardId) \u003C\u003C 232);\\n if (isConstructorCall) {\\n farCallAbiWithEmptyFatPtr |= (1 \u003C\u003C 240);\\n }\\n if (isSystemCall) {\\n farCallAbiWithEmptyFatPtr |= (1 \u003C\u003C 248);\\n }\\n }\\n}\\n\"},\"contracts-preprocessed/interfaces/IAccountCodeStorage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\ninterface IAccountCodeStorage {\\n function storeAccountConstructingCodeHash(address _address, bytes32 _hash) external;\\n\\n function storeAccountConstructedCodeHash(address _address, bytes32 _hash) external;\\n\\n function markAccountCodeHashAsConstructed(address _address) external;\\n\\n function getRawCodeHash(address _address) external view returns (bytes32 codeHash);\\n\\n function getCodeHash(uint256 _input) external view returns (bytes32 codeHash);\\n\\n function getCodeSize(uint256 _input) external view returns (uint256 codeSize);\\n}\\n\"},\"contracts-preprocessed/interfaces/INonceHolder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @dev Interface of the nonce holder contract -- a contract used by the system to ensure\\n * that there is always a unique identifier for a transaction with a particular account (we call it nonce).\\n * In other words, the pair of (address, nonce) should always be unique.\\n * @dev Custom accounts should use methods of this contract to store nonces or other possible unique identifiers\\n * for the transaction.\\n */\\ninterface INonceHolder {\\n event ValueSetUnderNonce(address indexed accountAddress, uint256 indexed key, uint256 value);\\n\\n /// @dev Returns the current minimal nonce for account.\\n function getMinNonce(address _address) external view returns (uint256);\\n\\n /// @dev Returns the raw version of the current minimal nonce\\n /// (equal to minNonce + 2^128 * deployment nonce).\\n function getRawNonce(address _address) external view returns (uint256);\\n\\n /// @dev Increases the minimal nonce for the msg.sender.\\n function increaseMinNonce(uint256 _value) external returns (uint256);\\n\\n /// @dev Sets the nonce value `key` as used.\\n function setValueUnderNonce(uint256 _key, uint256 _value) external;\\n\\n /// @dev Gets the value stored inside a custom nonce.\\n function getValueUnderNonce(uint256 _key) external view returns (uint256);\\n\\n /// @dev A convenience method to increment the minimal nonce if it is equal\\n /// to the `_expectedNonce`.\\n function incrementMinNonceIfEquals(uint256 _expectedNonce) external;\\n\\n /// @dev Returns the deployment nonce for the accounts used for CREATE opcode.\\n function getDeploymentNonce(address _address) external view returns (uint256);\\n\\n /// @dev Increments the deployment nonce for the account and returns the previous one.\\n function incrementDeploymentNonce(address _address) external returns (uint256);\\n\\n /// @dev Determines whether a certain nonce has been already used for an account.\\n function validateNonceUsage(address _address, uint256 _key, bool _shouldBeUsed) external view;\\n\\n /// @dev Returns whether a nonce has been used for an account.\\n function isNonceUsed(address _address, uint256 _nonce) external view returns (bool);\\n}\\n\"},\"contracts-preprocessed/interfaces/IContractDeployer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\ninterface IContractDeployer {\\n /// @notice Defines the version of the account abstraction protocol\\n /// that a contract claims to follow.\\n /// - `None` means that the account is just a contract and it should never be interacted\\n /// with as a custom account\\n /// - `Version1` means that the account follows the first version of the account abstraction protocol\\n enum AccountAbstractionVersion {\\n None,\\n Version1\\n }\\n\\n /// @notice Defines the nonce ordering used by the account\\n /// - `Sequential` means that it is expected that the nonces are monotonic and increment by 1\\n /// at a time (the same as EOAs).\\n /// - `Arbitrary` means that the nonces for the accounts can be arbitrary. The operator\\n /// should serve the transactions from such an account on a first-come-first-serve basis.\\n /// @dev This ordering is more of a suggestion to the operator on how the AA expects its transactions\\n /// to be processed and is not considered as a system invariant.\\n enum AccountNonceOrdering {\\n Sequential,\\n Arbitrary\\n }\\n\\n struct AccountInfo {\\n AccountAbstractionVersion supportedAAVersion;\\n AccountNonceOrdering nonceOrdering;\\n }\\n\\n event ContractDeployed(\\n address indexed deployerAddress,\\n bytes32 indexed bytecodeHash,\\n address indexed contractAddress\\n );\\n\\n event AccountNonceOrderingUpdated(address indexed accountAddress, AccountNonceOrdering nonceOrdering);\\n\\n event AccountVersionUpdated(address indexed accountAddress, AccountAbstractionVersion aaVersion);\\n\\n function getNewAddressCreate2(\\n address _sender,\\n bytes32 _bytecodeHash,\\n bytes32 _salt,\\n bytes calldata _input\\n ) external view returns (address newAddress);\\n\\n function getNewAddressCreate(address _sender, uint256 _senderNonce) external pure returns (address newAddress);\\n\\n function create2(\\n bytes32 _salt,\\n bytes32 _bytecodeHash,\\n bytes calldata _input\\n ) external payable returns (address newAddress);\\n\\n function create2Account(\\n bytes32 _salt,\\n bytes32 _bytecodeHash,\\n bytes calldata _input,\\n AccountAbstractionVersion _aaVersion\\n ) external payable returns (address newAddress);\\n\\n /// @dev While the `_salt` parameter is not used anywhere here,\\n /// it is still needed for consistency between `create` and\\n /// `create2` functions (required by the compiler).\\n function create(\\n bytes32 _salt,\\n bytes32 _bytecodeHash,\\n bytes calldata _input\\n ) external payable returns (address newAddress);\\n\\n /// @dev While `_salt` is never used here, we leave it here as a parameter\\n /// for the consistency with the `create` function.\\n function createAccount(\\n bytes32 _salt,\\n bytes32 _bytecodeHash,\\n bytes calldata _input,\\n AccountAbstractionVersion _aaVersion\\n ) external payable returns (address newAddress);\\n\\n /// @notice Returns the information about a certain AA.\\n function getAccountInfo(address _address) external view returns (AccountInfo memory info);\\n\\n /// @notice Can be called by an account to update its account version\\n function updateAccountVersion(AccountAbstractionVersion _version) external;\\n\\n /// @notice Can be called by an account to update its nonce ordering\\n function updateNonceOrdering(AccountNonceOrdering _nonceOrdering) external;\\n}\\n\"},\"contracts-preprocessed/interfaces/IKnownCodesStorage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice The interface for the KnownCodesStorage contract, which is responsible\\n * for storing the hashes of the bytecodes that have been published to the network.\\n */\\ninterface IKnownCodesStorage {\\n event MarkedAsKnown(bytes32 indexed bytecodeHash, bool indexed sendBytecodeToL1);\\n\\n function markFactoryDeps(bool _shouldSendToL1, bytes32[] calldata _hashes) external;\\n\\n function markBytecodeAsPublished(bytes32 _bytecodeHash) external;\\n\\n function getMarker(bytes32 _hash) external view returns (uint256);\\n}\\n\"},\"contracts-preprocessed/interfaces/IImmutableSimulator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nstruct ImmutableData {\\n uint256 index;\\n bytes32 value;\\n}\\n\\ninterface IImmutableSimulator {\\n function getImmutable(address _dest, uint256 _index) external view returns (bytes32);\\n\\n function setImmutables(address _dest, ImmutableData[] calldata _immutables) external;\\n}\\n\"},\"contracts-preprocessed/interfaces/IBaseToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\ninterface IBaseToken {\\n function balanceOf(uint256) external view returns (uint256);\\n\\n function transferFromTo(address _from, address _to, uint256 _amount) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function name() external pure returns (string memory);\\n\\n function symbol() external pure returns (string memory);\\n\\n function decimals() external pure returns (uint8);\\n\\n function mint(address _account, uint256 _amount) external;\\n\\n function withdraw(address _l1Receiver) external payable;\\n\\n function withdrawWithMessage(address _l1Receiver, bytes calldata _additionalData) external payable;\\n\\n event Mint(address indexed account, uint256 amount);\\n\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n event Withdrawal(address indexed _l2Sender, address indexed _l1Receiver, uint256 _amount);\\n\\n event WithdrawalWithMessage(\\n address indexed _l2Sender,\\n address indexed _l1Receiver,\\n uint256 _amount,\\n bytes _additionalData\\n );\\n}\\n\"},\"contracts-preprocessed/interfaces/IL1Messenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/// @dev The log passed from L2\\n/// @param l2ShardId The shard identifier, 0 - rollup, 1 - porter. All other values are not used but are reserved for the future\\n/// @param isService A boolean flag that is part of the log along with `key`, `value`, and `sender` address.\\n/// This field is required formally but does not have any special meaning.\\n/// @param txNumberInBlock The L2 transaction number in a block, in which the log was sent\\n/// @param sender The L2 address which sent the log\\n/// @param key The 32 bytes of information that was sent in the log\\n/// @param value The 32 bytes of information that was sent in the log\\n// Both `key` and `value` are arbitrary 32-bytes selected by the log sender\\nstruct L2ToL1Log {\\n uint8 l2ShardId;\\n bool isService;\\n uint16 txNumberInBlock;\\n address sender;\\n bytes32 key;\\n bytes32 value;\\n}\\n\\n/// @dev Bytes in raw L2 to L1 log\\n/// @dev Equal to the bytes size of the tuple - (uint8 ShardId, bool isService, uint16 txNumberInBlock, address sender, bytes32 key, bytes32 value)\\nuint256 constant L2_TO_L1_LOG_SERIALIZE_SIZE = 88;\\n\\n/// @dev The value of default leaf hash for L2 to L1 logs Merkle tree\\n/// @dev An incomplete fixed-size tree is filled with this value to be a full binary tree\\n/// @dev Actually equal to the `keccak256(new bytes(L2_TO_L1_LOG_SERIALIZE_SIZE))`\\nbytes32 constant L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH = 0x72abee45b59e344af8a6e520241c4744aff26ed411f4c4b00f8af09adada43ba;\\n\\n/// @dev The current version of state diff compression being used.\\nuint256 constant STATE_DIFF_COMPRESSION_VERSION_NUMBER = 1;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice The interface of the L1 Messenger contract, responsible for sending messages to L1.\\n */\\ninterface IL1Messenger {\\n // Possibly in the future we will be able to track the messages sent to L1 with\\n // some hooks in the VM. For now, it is much easier to track them with L2 events.\\n event L1MessageSent(address indexed _sender, bytes32 indexed _hash, bytes _message);\\n\\n event L2ToL1LogSent(L2ToL1Log _l2log);\\n\\n event BytecodeL1PublicationRequested(bytes32 _bytecodeHash);\\n\\n function sendToL1(bytes memory _message) external returns (bytes32);\\n\\n function sendL2ToL1Log(bool _isService, bytes32 _key, bytes32 _value) external returns (uint256 logIdInMerkleTree);\\n\\n // This function is expected to be called only by the KnownCodesStorage system contract\\n function requestBytecodeL1Publication(bytes32 _bytecodeHash) external;\\n}\\n\"},\"contracts-preprocessed/interfaces/ICompressor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n// The bitmask by applying which to the compressed state diff metadata we retrieve its operation.\\nuint8 constant OPERATION_BITMASK = 7;\\n// The number of bits shifting the compressed state diff metadata by which we retrieve its length.\\nuint8 constant LENGTH_BITS_OFFSET = 3;\\n// The maximal length in bytes that an enumeration index can have.\\nuint8 constant MAX_ENUMERATION_INDEX_SIZE = 8;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice The interface for the Compressor contract, responsible for verifying the correctness of\\n * the compression of the state diffs and bytecodes.\\n */\\ninterface ICompressor {\\n function publishCompressedBytecode(\\n bytes calldata _bytecode,\\n bytes calldata _rawCompressedData\\n ) external returns (bytes32 bytecodeHash);\\n\\n function verifyCompressedStateDiffs(\\n uint256 _numberOfStateDiffs,\\n uint256 _enumerationIndexSize,\\n bytes calldata _stateDiffs,\\n bytes calldata _compressedStateDiffs\\n ) external returns (bytes32 stateDiffHash);\\n}\\n\"},\"contracts-preprocessed/interfaces/IComplexUpgrader.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice The interface for the ComplexUpgrader contract.\\n */\\ninterface IComplexUpgrader {\\n function upgrade(address _delegateTo, bytes calldata _calldata) external payable;\\n}\\n\"},\"contracts-preprocessed/interfaces/IBootloaderUtilities.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {Transaction} from \\\"../libraries/TransactionHelper.sol\\\";\\n\\ninterface IBootloaderUtilities {\\n function getTransactionHashes(\\n Transaction calldata _transaction\\n ) external view returns (bytes32 txHash, bytes32 signedTxHash);\\n}\\n\"},\"contracts-preprocessed/interfaces/IPubdataChunkPublisher.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice Interface for contract responsible chunking pubdata into the appropriate size for EIP-4844 blobs.\\n */\\ninterface IPubdataChunkPublisher {\\n /// @notice Chunks pubdata into pieces that can fit into blobs.\\n /// @param _pubdata The total l2 to l1 pubdata that will be sent via L1 blobs.\\n function chunkAndPublishPubdata(bytes calldata _pubdata) external;\\n}\\n\"},\"contracts-preprocessed/libraries/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.20;\\n\\nimport {EfficientCall} from \\\"./EfficientCall.sol\\\";\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @dev Common utilities used in zkSync system contracts\\n */\\nlibrary Utils {\\n /// @dev Bit mask of bytecode hash \\\"isConstructor\\\" marker\\n bytes32 constant IS_CONSTRUCTOR_BYTECODE_HASH_BIT_MASK =\\n 0x00ff000000000000000000000000000000000000000000000000000000000000;\\n\\n /// @dev Bit mask to set the \\\"isConstructor\\\" marker in the bytecode hash\\n bytes32 constant SET_IS_CONSTRUCTOR_MARKER_BIT_MASK =\\n 0x0001000000000000000000000000000000000000000000000000000000000000;\\n\\n function safeCastToU128(uint256 _x) internal pure returns (uint128) {\\n require(_x \u003C= type(uint128).max, \\\"Overflow\\\");\\n\\n return uint128(_x);\\n }\\n\\n function safeCastToU32(uint256 _x) internal pure returns (uint32) {\\n require(_x \u003C= type(uint32).max, \\\"Overflow\\\");\\n\\n return uint32(_x);\\n }\\n\\n function safeCastToU24(uint256 _x) internal pure returns (uint24) {\\n require(_x \u003C= type(uint24).max, \\\"Overflow\\\");\\n\\n return uint24(_x);\\n }\\n\\n /// @return codeLength The bytecode length in bytes\\n function bytecodeLenInBytes(bytes32 _bytecodeHash) internal pure returns (uint256 codeLength) {\\n codeLength = bytecodeLenInWords(_bytecodeHash) \u003C\u003C 5; // _bytecodeHash * 32\\n }\\n\\n /// @return codeLengthInWords The bytecode length in machine words\\n function bytecodeLenInWords(bytes32 _bytecodeHash) internal pure returns (uint256 codeLengthInWords) {\\n unchecked {\\n codeLengthInWords = uint256(uint8(_bytecodeHash[2])) * 256 + uint256(uint8(_bytecodeHash[3]));\\n }\\n }\\n\\n /// @notice Denotes whether bytecode hash corresponds to a contract that already constructed\\n function isContractConstructed(bytes32 _bytecodeHash) internal pure returns (bool) {\\n return _bytecodeHash[1] == 0x00;\\n }\\n\\n /// @notice Denotes whether bytecode hash corresponds to a contract that is on constructor or has already been constructed\\n function isContractConstructing(bytes32 _bytecodeHash) internal pure returns (bool) {\\n return _bytecodeHash[1] == 0x01;\\n }\\n\\n /// @notice Sets \\\"isConstructor\\\" flag to TRUE for the bytecode hash\\n /// @param _bytecodeHash The bytecode hash for which it is needed to set the constructing flag\\n /// @return The bytecode hash with \\\"isConstructor\\\" flag set to TRUE\\n function constructingBytecodeHash(bytes32 _bytecodeHash) internal pure returns (bytes32) {\\n // Clear the \\\"isConstructor\\\" marker and set it to 0x01.\\n return constructedBytecodeHash(_bytecodeHash) | SET_IS_CONSTRUCTOR_MARKER_BIT_MASK;\\n }\\n\\n /// @notice Sets \\\"isConstructor\\\" flag to FALSE for the bytecode hash\\n /// @param _bytecodeHash The bytecode hash for which it is needed to set the constructing flag\\n /// @return The bytecode hash with \\\"isConstructor\\\" flag set to FALSE\\n function constructedBytecodeHash(bytes32 _bytecodeHash) internal pure returns (bytes32) {\\n return _bytecodeHash & ~IS_CONSTRUCTOR_BYTECODE_HASH_BIT_MASK;\\n }\\n\\n /// @notice Validate the bytecode format and calculate its hash.\\n /// @param _bytecode The bytecode to hash.\\n /// @return hashedBytecode The 32-byte hash of the bytecode.\\n /// Note: The function reverts the execution if the bytecode has non expected format:\\n /// - Bytecode bytes length is not a multiple of 32\\n /// - Bytecode bytes length is not less than 2^21 bytes (2^16 words)\\n /// - Bytecode words length is not odd\\n function hashL2Bytecode(bytes calldata _bytecode) internal view returns (bytes32 hashedBytecode) {\\n // Note that the length of the bytecode must be provided in 32-byte words.\\n require(_bytecode.length % 32 == 0, \\\"po\\\");\\n\\n uint256 lengthInWords = _bytecode.length / 32;\\n require(lengthInWords \u003C 2 ** 16, \\\"pp\\\"); // bytecode length must be less than 2^16 words\\n require(lengthInWords % 2 == 1, \\\"pr\\\"); // bytecode length in words must be odd\\n hashedBytecode =\\n EfficientCall.sha(_bytecode) &\\n 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\\n // Setting the version of the hash\\n hashedBytecode = (hashedBytecode | bytes32(uint256(1 \u003C\u003C 248)));\\n // Setting the length\\n hashedBytecode = hashedBytecode | bytes32(lengthInWords \u003C\u003C 224);\\n }\\n}\\n\"},\"contracts-preprocessed/libraries/TransactionHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {IERC20} from \\\"../openzeppelin/token/ERC20/IERC20.sol\\\";\\nimport {SafeERC20} from \\\"../openzeppelin/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport {IPaymasterFlow} from \\\"../interfaces/IPaymasterFlow.sol\\\";\\nimport {BASE_TOKEN_SYSTEM_CONTRACT, BOOTLOADER_FORMAL_ADDRESS} from \\\"../Constants.sol\\\";\\nimport {RLPEncoder} from \\\"./RLPEncoder.sol\\\";\\nimport {EfficientCall} from \\\"./EfficientCall.sol\\\";\\n\\n/// @dev The type id of zkSync's EIP-712-signed transaction.\\nuint8 constant EIP_712_TX_TYPE = 0x71;\\n\\n/// @dev The type id of legacy transactions.\\nuint8 constant LEGACY_TX_TYPE = 0x0;\\n/// @dev The type id of legacy transactions.\\nuint8 constant EIP_2930_TX_TYPE = 0x01;\\n/// @dev The type id of EIP1559 transactions.\\nuint8 constant EIP_1559_TX_TYPE = 0x02;\\n\\n/// @notice Structure used to represent a zkSync transaction.\\nstruct Transaction {\\n // The type of the transaction.\\n uint256 txType;\\n // The caller.\\n uint256 from;\\n // The callee.\\n uint256 to;\\n // The gasLimit to pass with the transaction.\\n // It has the same meaning as Ethereum's gasLimit.\\n uint256 gasLimit;\\n // The maximum amount of gas the user is willing to pay for a byte of pubdata.\\n uint256 gasPerPubdataByteLimit;\\n // The maximum fee per gas that the user is willing to pay.\\n // It is akin to EIP1559's maxFeePerGas.\\n uint256 maxFeePerGas;\\n // The maximum priority fee per gas that the user is willing to pay.\\n // It is akin to EIP1559's maxPriorityFeePerGas.\\n uint256 maxPriorityFeePerGas;\\n // The transaction's paymaster. If there is no paymaster, it is equal to 0.\\n uint256 paymaster;\\n // The nonce of the transaction.\\n uint256 nonce;\\n // The value to pass with the transaction.\\n uint256 value;\\n // In the future, we might want to add some\\n // new fields to the struct. The `txData` struct\\n // is to be passed to account and any changes to its structure\\n // would mean a breaking change to these accounts. In order to prevent this,\\n // we should keep some fields as \\\"reserved\\\".\\n // It is also recommended that their length is fixed, since\\n // it would allow easier proof integration (in case we will need\\n // some special circuit for preprocessing transactions).\\n uint256[4] reserved;\\n // The transaction's calldata.\\n bytes data;\\n // The signature of the transaction.\\n bytes signature;\\n // The properly formatted hashes of bytecodes that must be published on L1\\n // with the inclusion of this transaction. Note, that a bytecode has been published\\n // before, the user won't pay fees for its republishing.\\n bytes32[] factoryDeps;\\n // The input to the paymaster.\\n bytes paymasterInput;\\n // Reserved dynamic type for the future use-case. Using it should be avoided,\\n // But it is still here, just in case we want to enable some additional functionality.\\n bytes reservedDynamic;\\n}\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice Library is used to help custom accounts to work with common methods for the Transaction type.\\n */\\nlibrary TransactionHelper {\\n using SafeERC20 for IERC20;\\n\\n /// @notice The EIP-712 typehash for the contract's domain\\n bytes32 constant EIP712_DOMAIN_TYPEHASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId)\\\");\\n\\n bytes32 constant EIP712_TRANSACTION_TYPE_HASH =\\n keccak256(\\n \\\"Transaction(uint256 txType,uint256 from,uint256 to,uint256 gasLimit,uint256 gasPerPubdataByteLimit,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,uint256 paymaster,uint256 nonce,uint256 value,bytes data,bytes32[] factoryDeps,bytes paymasterInput)\\\"\\n );\\n\\n /// @notice Whether the token is Ethereum.\\n /// @param _addr The address of the token\\n /// @return `true` or `false` based on whether the token is Ether.\\n /// @dev This method assumes that address is Ether either if the address is 0 (for convenience)\\n /// or if the address is the address of the L2BaseToken system contract.\\n function isEthToken(uint256 _addr) internal pure returns (bool) {\\n return _addr == uint256(uint160(address(BASE_TOKEN_SYSTEM_CONTRACT))) || _addr == 0;\\n }\\n\\n /// @notice Calculate the suggested signed hash of the transaction,\\n /// i.e. the hash that is signed by EOAs and is recommended to be signed by other accounts.\\n function encodeHash(Transaction calldata _transaction) internal view returns (bytes32 resultHash) {\\n if (_transaction.txType == LEGACY_TX_TYPE) {\\n resultHash = _encodeHashLegacyTransaction(_transaction);\\n } else if (_transaction.txType == EIP_712_TX_TYPE) {\\n resultHash = _encodeHashEIP712Transaction(_transaction);\\n } else if (_transaction.txType == EIP_1559_TX_TYPE) {\\n resultHash = _encodeHashEIP1559Transaction(_transaction);\\n } else if (_transaction.txType == EIP_2930_TX_TYPE) {\\n resultHash = _encodeHashEIP2930Transaction(_transaction);\\n } else {\\n // Currently no other transaction types are supported.\\n // Any new transaction types will be processed in a similar manner.\\n revert(\\\"Encoding unsupported tx\\\");\\n }\\n }\\n\\n /// @notice Encode hash of the zkSync native transaction type.\\n /// @return keccak256 hash of the EIP-712 encoded representation of transaction\\n function _encodeHashEIP712Transaction(Transaction calldata _transaction) private view returns (bytes32) {\\n bytes32 structHash = keccak256(\\n // solhint-disable-next-line func-named-parameters\\n abi.encode(\\n EIP712_TRANSACTION_TYPE_HASH,\\n _transaction.txType,\\n _transaction.from,\\n _transaction.to,\\n _transaction.gasLimit,\\n _transaction.gasPerPubdataByteLimit,\\n _transaction.maxFeePerGas,\\n _transaction.maxPriorityFeePerGas,\\n _transaction.paymaster,\\n _transaction.nonce,\\n _transaction.value,\\n EfficientCall.keccak(_transaction.data),\\n keccak256(abi.encodePacked(_transaction.factoryDeps)),\\n EfficientCall.keccak(_transaction.paymasterInput)\\n )\\n );\\n\\n bytes32 domainSeparator = keccak256(\\n abi.encode(EIP712_DOMAIN_TYPEHASH, keccak256(\\\"zkSync\\\"), keccak256(\\\"2\\\"), block.chainid)\\n );\\n\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n\\n /// @notice Encode hash of the legacy transaction type.\\n /// @return keccak256 of the serialized RLP encoded representation of transaction\\n function _encodeHashLegacyTransaction(Transaction calldata _transaction) private view returns (bytes32) {\\n // Hash of legacy transactions are encoded as one of the:\\n // - RLP(nonce, gasPrice, gasLimit, to, value, data, chainId, 0, 0)\\n // - RLP(nonce, gasPrice, gasLimit, to, value, data)\\n //\\n // In this RLP encoding, only the first one above list appears, so we encode each element\\n // inside list and then concatenate the length of all elements with them.\\n\\n bytes memory encodedNonce = RLPEncoder.encodeUint256(_transaction.nonce);\\n // Encode `gasPrice` and `gasLimit` together to prevent \\\"stack too deep error\\\".\\n bytes memory encodedGasParam;\\n {\\n bytes memory encodedGasPrice = RLPEncoder.encodeUint256(_transaction.maxFeePerGas);\\n bytes memory encodedGasLimit = RLPEncoder.encodeUint256(_transaction.gasLimit);\\n encodedGasParam = bytes.concat(encodedGasPrice, encodedGasLimit);\\n }\\n\\n bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to)));\\n bytes memory encodedValue = RLPEncoder.encodeUint256(_transaction.value);\\n // Encode only the length of the transaction data, and not the data itself,\\n // so as not to copy to memory a potentially huge transaction data twice.\\n bytes memory encodedDataLength;\\n {\\n // Safe cast, because the length of the transaction data can't be so large.\\n uint64 txDataLen = uint64(_transaction.data.length);\\n if (txDataLen != 1) {\\n // If the length is not equal to one, then only using the length can it be encoded definitely.\\n encodedDataLength = RLPEncoder.encodeNonSingleBytesLen(txDataLen);\\n } else if (_transaction.data[0] \u003E= 0x80) {\\n // If input is a byte in [0x80, 0xff] range, RLP encoding will concatenates 0x81 with the byte.\\n encodedDataLength = hex\\\"81\\\";\\n }\\n // Otherwise the length is not encoded at all.\\n }\\n\\n // Encode `chainId` according to EIP-155, but only if the `chainId` is specified in the transaction.\\n bytes memory encodedChainId;\\n if (_transaction.reserved[0] != 0) {\\n encodedChainId = bytes.concat(RLPEncoder.encodeUint256(block.chainid), hex\\\"80_80\\\");\\n }\\n\\n bytes memory encodedListLength;\\n unchecked {\\n uint256 listLength = encodedNonce.length +\\n encodedGasParam.length +\\n encodedTo.length +\\n encodedValue.length +\\n encodedDataLength.length +\\n _transaction.data.length +\\n encodedChainId.length;\\n\\n // Safe cast, because the length of the list can't be so large.\\n encodedListLength = RLPEncoder.encodeListLen(uint64(listLength));\\n }\\n\\n return\\n keccak256(\\n // solhint-disable-next-line func-named-parameters\\n bytes.concat(\\n encodedListLength,\\n encodedNonce,\\n encodedGasParam,\\n encodedTo,\\n encodedValue,\\n encodedDataLength,\\n _transaction.data,\\n encodedChainId\\n )\\n );\\n }\\n\\n /// @notice Encode hash of the EIP2930 transaction type.\\n /// @return keccak256 of the serialized RLP encoded representation of transaction\\n function _encodeHashEIP2930Transaction(Transaction calldata _transaction) private view returns (bytes32) {\\n // Hash of EIP2930 transactions is encoded the following way:\\n // H(0x01 || RLP(chain_id, nonce, gas_price, gas_limit, destination, amount, data, access_list))\\n //\\n // Note, that on zkSync access lists are not supported and should always be empty.\\n\\n // Encode all fixed-length params to avoid \\\"stack too deep error\\\"\\n bytes memory encodedFixedLengthParams;\\n {\\n bytes memory encodedChainId = RLPEncoder.encodeUint256(block.chainid);\\n bytes memory encodedNonce = RLPEncoder.encodeUint256(_transaction.nonce);\\n bytes memory encodedGasPrice = RLPEncoder.encodeUint256(_transaction.maxFeePerGas);\\n bytes memory encodedGasLimit = RLPEncoder.encodeUint256(_transaction.gasLimit);\\n bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to)));\\n bytes memory encodedValue = RLPEncoder.encodeUint256(_transaction.value);\\n // solhint-disable-next-line func-named-parameters\\n encodedFixedLengthParams = bytes.concat(\\n encodedChainId,\\n encodedNonce,\\n encodedGasPrice,\\n encodedGasLimit,\\n encodedTo,\\n encodedValue\\n );\\n }\\n\\n // Encode only the length of the transaction data, and not the data itself,\\n // so as not to copy to memory a potentially huge transaction data twice.\\n bytes memory encodedDataLength;\\n {\\n // Safe cast, because the length of the transaction data can't be so large.\\n uint64 txDataLen = uint64(_transaction.data.length);\\n if (txDataLen != 1) {\\n // If the length is not equal to one, then only using the length can it be encoded definitely.\\n encodedDataLength = RLPEncoder.encodeNonSingleBytesLen(txDataLen);\\n } else if (_transaction.data[0] \u003E= 0x80) {\\n // If input is a byte in [0x80, 0xff] range, RLP encoding will concatenates 0x81 with the byte.\\n encodedDataLength = hex\\\"81\\\";\\n }\\n // Otherwise the length is not encoded at all.\\n }\\n\\n // On zkSync, access lists are always zero length (at least for now).\\n bytes memory encodedAccessListLength = RLPEncoder.encodeListLen(0);\\n\\n bytes memory encodedListLength;\\n unchecked {\\n uint256 listLength = encodedFixedLengthParams.length +\\n encodedDataLength.length +\\n _transaction.data.length +\\n encodedAccessListLength.length;\\n\\n // Safe cast, because the length of the list can't be so large.\\n encodedListLength = RLPEncoder.encodeListLen(uint64(listLength));\\n }\\n\\n return\\n keccak256(\\n // solhint-disable-next-line func-named-parameters\\n bytes.concat(\\n \\\"\\\\x01\\\",\\n encodedListLength,\\n encodedFixedLengthParams,\\n encodedDataLength,\\n _transaction.data,\\n encodedAccessListLength\\n )\\n );\\n }\\n\\n /// @notice Encode hash of the EIP1559 transaction type.\\n /// @return keccak256 of the serialized RLP encoded representation of transaction\\n function _encodeHashEIP1559Transaction(Transaction calldata _transaction) private view returns (bytes32) {\\n // Hash of EIP1559 transactions is encoded the following way:\\n // H(0x02 || RLP(chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas, gas_limit, destination, amount, data, access_list))\\n //\\n // Note, that on zkSync access lists are not supported and should always be empty.\\n\\n // Encode all fixed-length params to avoid \\\"stack too deep error\\\"\\n bytes memory encodedFixedLengthParams;\\n {\\n bytes memory encodedChainId = RLPEncoder.encodeUint256(block.chainid);\\n bytes memory encodedNonce = RLPEncoder.encodeUint256(_transaction.nonce);\\n bytes memory encodedMaxPriorityFeePerGas = RLPEncoder.encodeUint256(_transaction.maxPriorityFeePerGas);\\n bytes memory encodedMaxFeePerGas = RLPEncoder.encodeUint256(_transaction.maxFeePerGas);\\n bytes memory encodedGasLimit = RLPEncoder.encodeUint256(_transaction.gasLimit);\\n bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to)));\\n bytes memory encodedValue = RLPEncoder.encodeUint256(_transaction.value);\\n // solhint-disable-next-line func-named-parameters\\n encodedFixedLengthParams = bytes.concat(\\n encodedChainId,\\n encodedNonce,\\n encodedMaxPriorityFeePerGas,\\n encodedMaxFeePerGas,\\n encodedGasLimit,\\n encodedTo,\\n encodedValue\\n );\\n }\\n\\n // Encode only the length of the transaction data, and not the data itself,\\n // so as not to copy to memory a potentially huge transaction data twice.\\n bytes memory encodedDataLength;\\n {\\n // Safe cast, because the length of the transaction data can't be so large.\\n uint64 txDataLen = uint64(_transaction.data.length);\\n if (txDataLen != 1) {\\n // If the length is not equal to one, then only using the length can it be encoded definitely.\\n encodedDataLength = RLPEncoder.encodeNonSingleBytesLen(txDataLen);\\n } else if (_transaction.data[0] \u003E= 0x80) {\\n // If input is a byte in [0x80, 0xff] range, RLP encoding will concatenates 0x81 with the byte.\\n encodedDataLength = hex\\\"81\\\";\\n }\\n // Otherwise the length is not encoded at all.\\n }\\n\\n // On zkSync, access lists are always zero length (at least for now).\\n bytes memory encodedAccessListLength = RLPEncoder.encodeListLen(0);\\n\\n bytes memory encodedListLength;\\n unchecked {\\n uint256 listLength = encodedFixedLengthParams.length +\\n encodedDataLength.length +\\n _transaction.data.length +\\n encodedAccessListLength.length;\\n\\n // Safe cast, because the length of the list can't be so large.\\n encodedListLength = RLPEncoder.encodeListLen(uint64(listLength));\\n }\\n\\n return\\n keccak256(\\n // solhint-disable-next-line func-named-parameters\\n bytes.concat(\\n \\\"\\\\x02\\\",\\n encodedListLength,\\n encodedFixedLengthParams,\\n encodedDataLength,\\n _transaction.data,\\n encodedAccessListLength\\n )\\n );\\n }\\n\\n /// @notice Processes the common paymaster flows, e.g. setting proper allowance\\n /// for tokens, etc. For more information on the expected behavior, check out\\n /// the \\\"Paymaster flows\\\" section in the documentation.\\n function processPaymasterInput(Transaction calldata _transaction) internal {\\n require(_transaction.paymasterInput.length \u003E= 4, \\\"The standard paymaster input must be at least 4 bytes long\\\");\\n\\n bytes4 paymasterInputSelector = bytes4(_transaction.paymasterInput[0:4]);\\n if (paymasterInputSelector == IPaymasterFlow.approvalBased.selector) {\\n require(\\n _transaction.paymasterInput.length \u003E= 68,\\n \\\"The approvalBased paymaster input must be at least 68 bytes long\\\"\\n );\\n\\n // While the actual data consists of address, uint256 and bytes data,\\n // the data is needed only for the paymaster, so we ignore it here for the sake of optimization\\n (address token, uint256 minAllowance) = abi.decode(_transaction.paymasterInput[4:68], (address, uint256));\\n address paymaster = address(uint160(_transaction.paymaster));\\n\\n uint256 currentAllowance = IERC20(token).allowance(address(this), paymaster);\\n if (currentAllowance \u003C minAllowance) {\\n // Some tokens, e.g. USDT require that the allowance is firsty set to zero\\n // and only then updated to the new value.\\n\\n IERC20(token).safeApprove(paymaster, 0);\\n IERC20(token).safeApprove(paymaster, minAllowance);\\n }\\n } else if (paymasterInputSelector == IPaymasterFlow.general.selector) {\\n // Do nothing. general(bytes) paymaster flow means that the paymaster must interpret these bytes on his own.\\n } else {\\n revert(\\\"Unsupported paymaster flow\\\");\\n }\\n }\\n\\n /// @notice Pays the required fee for the transaction to the bootloader.\\n /// @dev Currently it pays the maximum amount \\\"_transaction.maxFeePerGas * _transaction.gasLimit\\\",\\n /// it will change in the future.\\n function payToTheBootloader(Transaction calldata _transaction) internal returns (bool success) {\\n address bootloaderAddr = BOOTLOADER_FORMAL_ADDRESS;\\n uint256 amount = _transaction.maxFeePerGas * _transaction.gasLimit;\\n\\n assembly {\\n success := call(gas(), bootloaderAddr, amount, 0, 0, 0, 0)\\n }\\n }\\n\\n // Returns the balance required to process the transaction.\\n function totalRequiredBalance(Transaction calldata _transaction) internal pure returns (uint256 requiredBalance) {\\n if (address(uint160(_transaction.paymaster)) != address(0)) {\\n // Paymaster pays for the fee\\n requiredBalance = _transaction.value;\\n } else {\\n // The user should have enough balance for both the fee and the value of the transaction\\n requiredBalance = _transaction.maxFeePerGas * _transaction.gasLimit + _transaction.value;\\n }\\n }\\n}\\n\"},\"contracts-preprocessed/libraries/EfficientCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {SystemContractHelper, ADDRESS_MASK} from \\\"./SystemContractHelper.sol\\\";\\nimport {SystemContractsCaller, CalldataForwardingMode, RAW_FAR_CALL_BY_REF_CALL_ADDRESS, SYSTEM_CALL_BY_REF_CALL_ADDRESS, MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT, MIMIC_CALL_BY_REF_CALL_ADDRESS} from \\\"./SystemContractsCaller.sol\\\";\\nimport {Utils} from \\\"./Utils.sol\\\";\\nimport {SHA256_SYSTEM_CONTRACT, KECCAK256_SYSTEM_CONTRACT, MSG_VALUE_SYSTEM_CONTRACT} from \\\"../Constants.sol\\\";\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice This library is used to perform ultra-efficient calls using zkEVM-specific features.\\n * @dev EVM calls always accept a memory slice as input and return a memory slice as output.\\n * Therefore, even if the user has a ready-made calldata slice, they still need to copy it to memory\\n * before calling. This is especially inefficient for large inputs (proxies, multi-calls, etc.).\\n * In turn, zkEVM operates over a fat pointer, which is a set of (memory page, offset, start, length) in the memory/calldata/returndata.\\n * This allows forwarding the calldata slice as is, without copying it to memory.\\n * @dev Fat pointer is not just an integer, it is an extended data type supported on the VM level.\\n * zkEVM creates the wellformed fat pointers for all the calldata/returndata regions, later\\n * the contract may manipulate the already created fat pointers to forward a slice of the data, but not\\n * to create new fat pointers!\\n * @dev The allowed operation on fat pointers are:\\n * 1. `ptr.add` - Transforms `ptr.offset` into `ptr.offset + u32(_value)`. If overflow happens then it panics.\\n * 2. `ptr.sub` - Transforms `ptr.offset` into `ptr.offset - u32(_value)`. If underflow happens then it panics.\\n * 3. `ptr.pack` - Do the concatenation between the lowest 128 bits of the pointer itself and the highest 128 bits of `_value`. It is typically used to prepare the ABI for external calls.\\n * 4. `ptr.shrink` - Transforms `ptr.length` into `ptr.length - u32(_shrink)`. If underflow happens then it panics.\\n * @dev The call opcodes accept the fat pointer and change it to its canonical form before passing it to the child call\\n * 1. `ptr.start` is transformed into `ptr.offset + ptr.start`\\n * 2. `ptr.length` is transformed into `ptr.length - ptr.offset`\\n * 3. `ptr.offset` is transformed into `0`\\n */\\nlibrary EfficientCall {\\n /// @notice Call the `keccak256` without copying calldata to memory.\\n /// @param _data The preimage data.\\n /// @return The `keccak256` hash.\\n function keccak(bytes calldata _data) internal view returns (bytes32) {\\n bytes memory returnData = staticCall(gasleft(), KECCAK256_SYSTEM_CONTRACT, _data);\\n require(returnData.length == 32, \\\"keccak256 returned invalid data\\\");\\n return bytes32(returnData);\\n }\\n\\n /// @notice Call the `sha256` precompile without copying calldata to memory.\\n /// @param _data The preimage data.\\n /// @return The `sha256` hash.\\n function sha(bytes calldata _data) internal view returns (bytes32) {\\n bytes memory returnData = staticCall(gasleft(), SHA256_SYSTEM_CONTRACT, _data);\\n require(returnData.length == 32, \\\"sha returned invalid data\\\");\\n return bytes32(returnData);\\n }\\n\\n /// @notice Perform a `call` without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _value The `msg.value` to send.\\n /// @param _data The calldata to use for the call.\\n /// @param _isSystem Whether the call should contain the `isSystem` flag.\\n /// @return returnData The copied to memory return data.\\n function call(\\n uint256 _gas,\\n address _address,\\n uint256 _value,\\n bytes calldata _data,\\n bool _isSystem\\n ) internal returns (bytes memory returnData) {\\n bool success = rawCall({_gas: _gas, _address: _address, _value: _value, _data: _data, _isSystem: _isSystem});\\n returnData = _verifyCallResult(success);\\n }\\n\\n /// @notice Perform a `staticCall` without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _data The calldata to use for the call.\\n /// @return returnData The copied to memory return data.\\n function staticCall(\\n uint256 _gas,\\n address _address,\\n bytes calldata _data\\n ) internal view returns (bytes memory returnData) {\\n bool success = rawStaticCall(_gas, _address, _data);\\n returnData = _verifyCallResult(success);\\n }\\n\\n /// @notice Perform a `delegateCall` without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _data The calldata to use for the call.\\n /// @return returnData The copied to memory return data.\\n function delegateCall(\\n uint256 _gas,\\n address _address,\\n bytes calldata _data\\n ) internal returns (bytes memory returnData) {\\n bool success = rawDelegateCall(_gas, _address, _data);\\n returnData = _verifyCallResult(success);\\n }\\n\\n /// @notice Perform a `mimicCall` (a call with custom msg.sender) without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _data The calldata to use for the call.\\n /// @param _whoToMimic The `msg.sender` for the next call.\\n /// @param _isConstructor Whether the call should contain the `isConstructor` flag.\\n /// @param _isSystem Whether the call should contain the `isSystem` flag.\\n /// @return returnData The copied to memory return data.\\n function mimicCall(\\n uint256 _gas,\\n address _address,\\n bytes calldata _data,\\n address _whoToMimic,\\n bool _isConstructor,\\n bool _isSystem\\n ) internal returns (bytes memory returnData) {\\n bool success = rawMimicCall({\\n _gas: _gas,\\n _address: _address,\\n _data: _data,\\n _whoToMimic: _whoToMimic,\\n _isConstructor: _isConstructor,\\n _isSystem: _isSystem\\n });\\n\\n returnData = _verifyCallResult(success);\\n }\\n\\n /// @notice Perform a `call` without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _value The `msg.value` to send.\\n /// @param _data The calldata to use for the call.\\n /// @param _isSystem Whether the call should contain the `isSystem` flag.\\n /// @return success whether the call was successful.\\n function rawCall(\\n uint256 _gas,\\n address _address,\\n uint256 _value,\\n bytes calldata _data,\\n bool _isSystem\\n ) internal returns (bool success) {\\n if (_value == 0) {\\n _loadFarCallABIIntoActivePtr(_gas, _data, false, _isSystem);\\n\\n address callAddr = RAW_FAR_CALL_BY_REF_CALL_ADDRESS;\\n assembly {\\n success := call(_address, callAddr, 0, 0, 0xFFFF, 0, 0)\\n }\\n } else {\\n _loadFarCallABIIntoActivePtr(_gas, _data, false, true);\\n\\n // If there is provided `msg.value` call the `MsgValueSimulator` to forward ether.\\n address msgValueSimulator = MSG_VALUE_SYSTEM_CONTRACT;\\n address callAddr = SYSTEM_CALL_BY_REF_CALL_ADDRESS;\\n // We need to supply the mask to the MsgValueSimulator to denote\\n // that the call should be a system one.\\n uint256 forwardMask = _isSystem ? MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT : 0;\\n\\n assembly {\\n success := call(msgValueSimulator, callAddr, _value, _address, 0xFFFF, forwardMask, 0)\\n }\\n }\\n }\\n\\n /// @notice Perform a `staticCall` without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _data The calldata to use for the call.\\n /// @return success whether the call was successful.\\n function rawStaticCall(uint256 _gas, address _address, bytes calldata _data) internal view returns (bool success) {\\n _loadFarCallABIIntoActivePtr(_gas, _data, false, false);\\n\\n address callAddr = RAW_FAR_CALL_BY_REF_CALL_ADDRESS;\\n assembly {\\n success := staticcall(_address, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Perform a `delegatecall` without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _data The calldata to use for the call.\\n /// @return success whether the call was successful.\\n function rawDelegateCall(uint256 _gas, address _address, bytes calldata _data) internal returns (bool success) {\\n _loadFarCallABIIntoActivePtr(_gas, _data, false, false);\\n\\n address callAddr = RAW_FAR_CALL_BY_REF_CALL_ADDRESS;\\n assembly {\\n success := delegatecall(_address, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Perform a `mimicCall` (call with custom msg.sender) without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _data The calldata to use for the call.\\n /// @param _whoToMimic The `msg.sender` for the next call.\\n /// @param _isConstructor Whether the call should contain the `isConstructor` flag.\\n /// @param _isSystem Whether the call should contain the `isSystem` flag.\\n /// @return success whether the call was successful.\\n /// @dev If called not in kernel mode, it will result in a revert (enforced by the VM)\\n function rawMimicCall(\\n uint256 _gas,\\n address _address,\\n bytes calldata _data,\\n address _whoToMimic,\\n bool _isConstructor,\\n bool _isSystem\\n ) internal returns (bool success) {\\n _loadFarCallABIIntoActivePtr(_gas, _data, _isConstructor, _isSystem);\\n\\n address callAddr = MIMIC_CALL_BY_REF_CALL_ADDRESS;\\n uint256 cleanupMask = ADDRESS_MASK;\\n assembly {\\n // Clearing values before usage in assembly, since Solidity\\n // doesn't do it by default\\n _whoToMimic := and(_whoToMimic, cleanupMask)\\n\\n success := call(_address, callAddr, 0, 0, _whoToMimic, 0, 0)\\n }\\n }\\n\\n /// @dev Verify that a low-level call was successful, and revert if it wasn't, by bubbling the revert reason.\\n /// @param _success Whether the call was successful.\\n /// @return returnData The copied to memory return data.\\n function _verifyCallResult(bool _success) private pure returns (bytes memory returnData) {\\n if (_success) {\\n uint256 size;\\n assembly {\\n size := returndatasize()\\n }\\n\\n returnData = new bytes(size);\\n assembly {\\n returndatacopy(add(returnData, 0x20), 0, size)\\n }\\n } else {\\n propagateRevert();\\n }\\n }\\n\\n /// @dev Propagate the revert reason from the current call to the caller.\\n function propagateRevert() internal pure {\\n assembly {\\n let size := returndatasize()\\n returndatacopy(0, 0, size)\\n revert(0, size)\\n }\\n }\\n\\n /// @dev Load the far call ABI into active ptr, that will be used for the next call by reference.\\n /// @param _gas The gas to be passed to the call.\\n /// @param _data The calldata to be passed to the call.\\n /// @param _isConstructor Whether the call is a constructor call.\\n /// @param _isSystem Whether the call is a system call.\\n function _loadFarCallABIIntoActivePtr(\\n uint256 _gas,\\n bytes calldata _data,\\n bool _isConstructor,\\n bool _isSystem\\n ) private view {\\n SystemContractHelper.loadCalldataIntoActivePtr();\\n\\n uint256 dataOffset;\\n assembly {\\n dataOffset := _data.offset\\n }\\n\\n // Safe to cast, offset is never bigger than `type(uint32).max`\\n SystemContractHelper.ptrAddIntoActive(uint32(dataOffset));\\n // Safe to cast, `data.length` is never bigger than `type(uint32).max`\\n uint32 shrinkTo = uint32(msg.data.length - (_data.length + dataOffset));\\n SystemContractHelper.ptrShrinkIntoActive(shrinkTo);\\n\\n uint32 gas = Utils.safeCastToU32(_gas);\\n uint256 farCallAbi = SystemContractsCaller.getFarCallABIWithEmptyFatPointer({\\n gasPassed: gas,\\n // Only rollup is supported for now\\n shardId: 0,\\n forwardingMode: CalldataForwardingMode.ForwardFatPointer,\\n isConstructorCall: _isConstructor,\\n isSystemCall: _isSystem\\n });\\n SystemContractHelper.ptrPackIntoActivePtr(farCallAbi);\\n }\\n}\\n\"},\"contracts-preprocessed/openzeppelin/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\"},\"contracts-preprocessed/openzeppelin/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC20Permit} from \\\"../extensions/IERC20Permit.sol\\\";\\nimport {Address} from \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(\\n token,\\n abi.encodeWithSelector(token.transfer.selector, to, value)\\n );\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(\\n token,\\n abi.encodeWithSelector(token.transferFrom.selector, from, to, value)\\n );\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(\\n token,\\n abi.encodeWithSelector(token.approve.selector, spender, value)\\n );\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(\\n token,\\n abi.encodeWithSelector(\\n token.approve.selector,\\n spender,\\n newAllowance\\n )\\n );\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(\\n oldAllowance \u003E= value,\\n \\\"SafeERC20: decreased allowance below zero\\\"\\n );\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(\\n token,\\n abi.encodeWithSelector(\\n token.approve.selector,\\n spender,\\n newAllowance\\n )\\n );\\n }\\n }\\n\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit({owner: owner, spender: spender, value: value, deadline : deadline, v: v, r: r, s: s});\\n uint256 nonceAfter = token.nonces(owner);\\n require(\\n nonceAfter == nonceBefore + 1,\\n \\\"SafeERC20: permit did not succeed\\\"\\n );\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(\\n data,\\n \\\"SafeERC20: low-level call failed\\\"\\n );\\n if (returndata.length \u003E 0) {\\n // Return data is optional\\n require(\\n abi.decode(returndata, (bool)),\\n \\\"SafeERC20: ERC20 operation did not succeed\\\"\\n );\\n }\\n }\\n}\\n\"},\"contracts-preprocessed/interfaces/IPaymasterFlow.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @dev The interface that is used for encoding/decoding of\\n * different types of paymaster flows.\\n * @notice This is NOT an interface to be implemented\\n * by contracts. It is just used for encoding.\\n */\\ninterface IPaymasterFlow {\\n function general(bytes calldata input) external;\\n\\n function approvalBased(address _token, uint256 _minAllowance, bytes calldata _innerInput) external;\\n}\\n\"},\"contracts-preprocessed/libraries/RLPEncoder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice This library provides RLP encoding functionality.\\n */\\nlibrary RLPEncoder {\\n function encodeAddress(address _val) internal pure returns (bytes memory encoded) {\\n // The size is equal to 20 bytes of the address itself + 1 for encoding bytes length in RLP.\\n encoded = new bytes(0x15);\\n\\n bytes20 shiftedVal = bytes20(_val);\\n assembly {\\n // In the first byte we write the encoded length as 0x80 + 0x14 == 0x94.\\n mstore(add(encoded, 0x20), 0x9400000000000000000000000000000000000000000000000000000000000000)\\n // Write address data without stripping zeros.\\n mstore(add(encoded, 0x21), shiftedVal)\\n }\\n }\\n\\n function encodeUint256(uint256 _val) internal pure returns (bytes memory encoded) {\\n unchecked {\\n if (_val \u003C 128) {\\n encoded = new bytes(1);\\n // Handle zero as a non-value, since stripping zeroes results in an empty byte array\\n encoded[0] = (_val == 0) ? bytes1(uint8(128)) : bytes1(uint8(_val));\\n } else {\\n uint256 hbs = _highestByteSet(_val);\\n\\n encoded = new bytes(hbs + 2);\\n encoded[0] = bytes1(uint8(hbs + 0x81));\\n\\n uint256 lbs = 31 - hbs;\\n uint256 shiftedVal = _val \u003C\u003C (lbs * 8);\\n\\n assembly {\\n mstore(add(encoded, 0x21), shiftedVal)\\n }\\n }\\n }\\n }\\n\\n /// @notice Encodes the size of bytes in RLP format.\\n /// @param _len The length of the bytes to encode. It has a `uint64` type since as larger values are not supported.\\n /// NOTE: panics if the length is 1 since the length encoding is ambiguous in this case.\\n function encodeNonSingleBytesLen(uint64 _len) internal pure returns (bytes memory) {\\n assert(_len != 1);\\n return _encodeLength(_len, 0x80);\\n }\\n\\n /// @notice Encodes the size of list items in RLP format.\\n /// @param _len The length of the bytes to encode. It has a `uint64` type since as larger values are not supported.\\n function encodeListLen(uint64 _len) internal pure returns (bytes memory) {\\n return _encodeLength(_len, 0xc0);\\n }\\n\\n function _encodeLength(uint64 _len, uint256 _offset) private pure returns (bytes memory encoded) {\\n unchecked {\\n if (_len \u003C 56) {\\n encoded = new bytes(1);\\n encoded[0] = bytes1(uint8(_len + _offset));\\n } else {\\n uint256 hbs = _highestByteSet(uint256(_len));\\n\\n encoded = new bytes(hbs + 2);\\n encoded[0] = bytes1(uint8(_offset + hbs + 56));\\n\\n uint256 lbs = 31 - hbs;\\n uint256 shiftedVal = uint256(_len) \u003C\u003C (lbs * 8);\\n\\n assembly {\\n mstore(add(encoded, 0x21), shiftedVal)\\n }\\n }\\n }\\n }\\n\\n /// @notice Computes the index of the highest byte set in number.\\n /// @notice Uses little endian ordering (The least significant byte has index `0`).\\n /// NOTE: returns `0` for `0`\\n function _highestByteSet(uint256 _number) private pure returns (uint256 hbs) {\\n unchecked {\\n if (_number \u003E type(uint128).max) {\\n _number \u003E\u003E= 128;\\n hbs += 16;\\n }\\n if (_number \u003E type(uint64).max) {\\n _number \u003E\u003E= 64;\\n hbs += 8;\\n }\\n if (_number \u003E type(uint32).max) {\\n _number \u003E\u003E= 32;\\n hbs += 4;\\n }\\n if (_number \u003E type(uint16).max) {\\n _number \u003E\u003E= 16;\\n hbs += 2;\\n }\\n if (_number \u003E type(uint8).max) {\\n hbs += 1;\\n }\\n }\\n }\\n}\\n\"},\"contracts-preprocessed/openzeppelin/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\"},\"contracts-preprocessed/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length \u003E 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(\\n address(this).balance \u003E= amount,\\n \\\"Address: insufficient balance\\\"\\n );\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(\\n success,\\n \\\"Address: unable to send value, recipient may have reverted\\\"\\n );\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data)\\n internal\\n returns (bytes memory)\\n {\\n return\\n functionCallWithValue(\\n target,\\n data,\\n 0,\\n \\\"Address: low-level call failed\\\"\\n );\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return\\n functionCallWithValue(\\n target,\\n data,\\n value,\\n \\\"Address: low-level call with value failed\\\"\\n );\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(\\n address(this).balance \u003E= value,\\n \\\"Address: insufficient balance for call\\\"\\n );\\n (bool success, bytes memory returndata) = target.call{value: value}(\\n data\\n );\\n return\\n verifyCallResultFromTarget(\\n target,\\n success,\\n returndata,\\n errorMessage\\n );\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data)\\n internal\\n view\\n returns (bytes memory)\\n {\\n return\\n functionStaticCall(\\n target,\\n data,\\n \\\"Address: low-level static call failed\\\"\\n );\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return\\n verifyCallResultFromTarget(\\n target,\\n success,\\n returndata,\\n errorMessage\\n );\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data)\\n internal\\n returns (bytes memory)\\n {\\n return\\n functionDelegateCall(\\n target,\\n data,\\n \\\"Address: low-level delegate call failed\\\"\\n );\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return\\n verifyCallResultFromTarget(\\n target,\\n success,\\n returndata,\\n errorMessage\\n );\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage)\\n private\\n pure\\n {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length \u003E 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\"}},\"settings\":{\"optimizer\":{\"enabled\":true,\"mode\":\"3\"},\"outputSelection\":{\"*\":{\"*\":[\"storageLayout\",\"abi\",\"evm.methodIdentifiers\",\"metadata\"],\"\":[\"ast\"]}},\"evmVersion\":\"paris\",\"libraries\":{}}}}",\
"ABI": "[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_txHash\",\"type\":\"bytes32\"}],\"name\":\"appendTransactionToCurrentL2Block\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blockGasLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"blockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"coinbase\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentBlockInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockInfo\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"difficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasPerPubdataByte\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_batchNumber\",\"type\":\"uint256\"}],\"name\":\"getBatchHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBatchNumberAndTimestamp\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"batchNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"batchTimestamp\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"getBlockHashEVM\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockNumber\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockNumberAndTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockTimestamp\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentPubdataCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentPubdataSpent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getL2BlockNumberAndTimestamp\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"blockNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"blockTimestamp\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"incrementTxNumberInBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"origin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publishTimestampDataToL1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resetTxNumberInBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newChainId\",\"type\":\"uint256\"}],\"name\":\"setChainId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_gasPrice\",\"type\":\"uint256\"}],\"name\":\"setGasPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_l2BlockNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_l2BlockTimestamp\",\"type\":\"uint128\"},{\"internalType\":\"bytes32\",\"name\":\"_expectedPrevL2BlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_isFirstInBatch\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"_maxVirtualBlocksToCreate\",\"type\":\"uint128\"}],\"name\":\"setL2Block\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_prevBatchHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint128\",\"name\":\"_newTimestamp\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_expectedNewNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"_baseFee\",\"type\":\"uint256\"}],\"name\":\"setNewBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_gasPerPubdataByte\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_basePubdataSpent\",\"type\":\"uint256\"}],\"name\":\"setPubdataInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOrigin\",\"type\":\"address\"}],\"name\":\"setTxOrigin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"txNumberInBlock\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_number\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_baseFee\",\"type\":\"uint256\"}],\"name\":\"unsafeOverrideBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",\
"ContractName": "SystemContext",\
"CompilerVersion": "v0.8.20+commit.a1b79de6",\
"OptimizationUsed": "1",\
"Runs": "200",\
"ConstructorArguments": "",\
"EVMVersion": "Default",\
"Library": "",\
"LicenseType": "MIT",\
"Proxy": "0",\
"Implementation": "",\
"SwarmSource": ""\
}\
]\
}\
\
[](#get-contract-creator-and-creation-tx-hash)\
\
Get Contract Creator and Creation Tx Hash\
\
\
---------------------------------------------------------------------------------------------\
\
Returns a contract's deployer address and transaction hash it was created, up to 5 at a time.\
\
Copy\
\
https://api.abscan.org/api\
?module=contract\
&action=getcontractcreation\
&contractaddresses=0x000000000000000000000000000000000000800B,0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45,0xe4462eb568E2DFbb5b0cA2D3DbB1A35C9Aa98aad,0xdAC17F958D2ee523a2206206994597C13D831ec7,0xf5b969064b91869fBF676ecAbcCd1c5563F591d0\
&apikey=YourApiKeyToken \
\
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=contract&action=getcontractcreation&contractaddresses=0x000000000000000000000000000000000000800B,0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45,0xe4462eb568E2DFbb5b0cA2D3DbB1A35C9Aa98aad,0xdAC17F958D2ee523a2206206994597C13D831ec7,0xf5b969064b91869fBF676ecAbcCd1c5563F591d0&apikey=YourApiKeyToken)\
> 🔗\
\
RequestResponse\
\
Query Parameters\
\
Parameter\
\
Description\
\
contractaddresses\
\
the `contract address` , up to 5 at a time\
\
Sample Response\
\
Copy\
\
{\
"status": "1",\
"message": "OK",\
"result": [\
{\
"contractAddress": "0x000000000000000000000000000000000000800b",\
"contractCreator": "GENESIS",\
"txHash": "GENESIS_000000000000000000000000000000000000800b",\
"blockNumber": "0",\
"timestamp": "1729881083",\
"contractFactory": "",\
"creationBytecode": "0x0001000000000002000600000000000200000000000103550000008004000039000000400040043f000000000301001900000060033002700000013c033001970000000102200190000000210000c13d000000040230008c000003fc0000413d000000000201043b000000e002200270000001410520009c000000340000a13d000001420420009c000000680000213d0000014e0420009c000000a30000213d000001540420009c0000010c0000213d000001570420009c000000df0000613d000001580120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d0000010e01000039000000000101041a0000ffff0110018f000002700000013d0000000001000416000000000101004b000003fc0000c13d0000013d010000410000000302000039000000000012041b0000000401000039000000000201041a0000013e0220019700008001022001bf000000000021041b0000013f010000410000000502000039000000000012041b0000002001000039000001000010044300000120000004430000014001000041000004eb0001042e000001590520009c000000800000a13d0000015a0420009c000000b10000213d000001600120009c000001150000213d000001630120009c0000017b0000613d000001640120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d0000010f01000039000000000101041a0000014002000039000000400020043f00000000020004130000013c03200197000000800030043f00000040042002700000013c04400197000000a00040043f00000060042002700000013c04400197000000c00040043f000000e004200270000000ff0440018f000000e00040043f000000e804200270000000ff0440018f000001000040043f000000f002200270000000ff0220018f000001200020043f0000011002000039000000000202041a0000000002230049000000000332004b00000000030000190000000103002039000000000303004b000000000200c01900000000431200a9000000000401004b000000650000613d00000000411300d9000000000112004b0000024f0000c13d000001400030043f0000017a01000041000004eb0001042e000001430420009c000000d90000213d000001490420009c0000011e0000213d0000014c0420009c000001820000613d0000014d0120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d000000040130008a000000200110008c000003fc0000413d0000000001000411000080010110008c0000000001000019000000010100603904ea045e0000040f00000004010000390000000001100367000000000101043b0000000202000039000002680000013d000001650520009c000000ee0000a13d000001660120009c000001270000213d000001690120009c000001970000613d0000016a0120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d000000040130008a000000600110008c000003fc0000413d0000000001000411000080010110008c0000000001000019000000010100603904ea045e0000040f000000400100043d04ea049e0000040f00000000010003670000002402100370000000000202043b00000080022002100000000403100370000000000303043b0000016f03300197000000000223019f0000000703000039000000000023041b0000004401100370000000000101043b0000000602000039000002680000013d0000014f0120009c000001370000213d000001520120009c0000019c0000613d000001530120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d04ea04a90000040f0000016f022001970000008001100210000000000121019f0000023c0000013d0000015b0420009c000001420000213d0000015e0120009c000001a10000613d0000015f0120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d0000000001000411000080010110008c000002810000c13d0000000701000039000000000301041a0000016f01300197000000800010043f0000008002300270000000a00020043f0000010002000039000000400020043f0000000902000039000000000402041a0000016f02400197000000c00020043f0000008004400270000000e00040043f0000016f0330009c0000028b0000213d0000017601000041000001000010043f0000002001000039000001040010043f0000002f01000039000001240010043f0000017701000041000001440010043f0000017801000041000001640010043f0000017901000041000004ec00010430000001440420009c000001720000213d000001470420009c000001220000613d000001480220009c000003fc0000c13d0000000002000416000000000202004b000003fc0000c13d000000040230008a000000200220008c000003fc0000413d0000000401100370000000000101043b00000000001004350000000801000039000000200010043f0000004002000039000000000100001904ea04cf0000040f0000026f0000013d0000016b0520009c000001a80000613d0000016c0520009c000001ea0000613d0000016d0220009c000003fc0000c13d0000000002000416000000000202004b000003fc0000c13d000000040230008a000000200220008c000003fc0000413d0000000002000411000080010220008c000002810000c13d0000000a02000039000600000002001d000000000202041a000000a00020043f0000000401100370000000000101043b000000c00010043f0000004002000039000000800020043f000000e001000039000000400010043f000000a00100003904ea04cf0000040f0000000602000029000002680000013d000001550120009c000002230000613d000001560120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d00000001010000390000013f0000013d000001610120009c000002330000613d000001620120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d00000003010000390000026f0000013d0000014a0120009c000002380000613d0000014b0120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d04ea04a90000040f000002270000013d000001670120009c000002440000613d000001680120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d0000000001000411000080010110008c0000000001000019000000010100603904ea045e0000040f0000010e01000039000000000201041a0000017b022001970000029c0000013d000001500120009c000002550000613d000001510120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d0000000401000039000000000101041a0000017201100197000002700000013d0000015c0420009c0000026b0000613d0000015d0220009c000003fc0000c13d0000000002000416000000000202004b000003fc0000c13d000000040230008a000000200220008c000003fc0000413d0000000401100370000000000101043b0000010c02000039000000000202041a000000c003000039000000400030043f00000080062002700000010d02000039000000000302041a0000016f05300197000000800050043f0000008002300270000000a00020043f000000000416004b0000000004000019000002af0000a13d0000000004160049000001010440008c0000000004000019000002af0000813d000000000451004b000002910000813d00000000001004350000000801000039000000200010043f0000013c0100004100000000020004140000013c0320009c0000000002018019000000c00120021000000175011001c7000080100200003904ea04e50000040f0000000102200190000003fc0000613d000000000101043b000000000401041a000002af0000013d000001450420009c000002730000613d000001460120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d00000002010000390000026f0000013d0000000001000416000000000101004b000003fc0000c13d0000010c01000039000000000101041a0000008001100270000002700000013d0000000002000416000000000202004b000003fc0000c13d000000040230008a000000200220008c000003fc0000413d0000000401100370000000000101043b000600000001001d000001720110009c000003fc0000213d0000000001000411000080010110008c0000000001000019000000010100603904ea045e0000040f0000000101000039000000000201041a0000013e0220019700000006022001af0000029c0000013d0000000001000416000000000101004b000003fc0000c13d00000005010000390000026f0000013d0000000001000416000000000101004b000003fc0000c13d000000000100041a000002700000013d0000000001000416000000000101004b000003fc0000c13d0000010c01000039000000000101041a0000016f01100197000002700000013d0000000002000416000000000202004b000003fc0000c13d000000040230008a000000800220008c000003fc0000413d0000000402100370000000000202043b000500000002001d0000002402100370000000000202043b000600000002001d0000016f0220009c000003fc0000213d0000004401100370000000000101043b000400000001001d0000016f0110009c000003fc0000213d0000000001000411000080010110008c000002810000c13d000000c001000039000000400010043f0000000704000039000000000104041a0000016f02100197000000800020043f0000008001100270000000a00010043f000000060220006b000002b70000a13d0000016f0210009c0000024f0000613d0000000102100039000000040220006c000002c00000c13d000300000004001d0000000902000039000000000202041a0000016f02200197000000060220006b000002cc0000a13d00000000001004350000000801000039000000200010043f0000013c0100004100000000020004140000013c0320009c0000000002018019000000c00120021000000175011001c7000080100200003904ea04e50000040f0000000102200190000003fc0000613d000000000101043b0000000502000029000000000021041b000000400100043d0000018e0210009c000003780000a13d000001ab0100004100000000001004350000004101000039000002520000013d0000000002000416000000000202004b000003fc0000c13d000000040230008a000000a00220008c000003fc0000413d0000000402100370000000000202043b000600000002001d0000016f0220009c000003fc0000213d0000002402100370000000000202043b000500000002001d0000016f0220009c000003fc0000213d0000004402100370000000000202043b000400000002001d0000006402100370000000000202043b000000000302004b0000000003000019000000010300c039000000000332004b000003fc0000c13d0000008401100370000000000101043b000300000001001d0000016f0110009c000003fc0000213d0000000001000411000080010110008c000002810000c13d000000000102004b000002e80000613d0000000701000039000000000101041a0000016f01100197000000050110006b000002da0000813d0000017601000041000000800010043f0000002001000039000000840010043f0000006101000039000000a40010043f0000017f01000041000000c40010043f0000018001000041000000e40010043f0000018101000041000001040010043f0000018201000041000001240010043f0000018301000041000004ec000104300000000001000416000000000101004b000003fc0000c13d04ea04bc0000040f0000016f02200197000000400300043d000000200430003900000000002404350000016f0110019700000000001304350000013c010000410000013c0230009c0000000003018019000000400130021000000170011001c7000004eb0001042e0000000001000416000000000101004b000003fc0000c13d00000006010000390000026f0000013d0000000001000416000000000101004b000003fc0000c13d04ea04730000040f000000400200043d00000000001204350000013c010000410000013c0320009c0000000002018019000000400120021000000171011001c7000004eb0001042e0000000001000416000000000101004b000003fc0000c13d0000000001000411000080010110008c000002810000c13d0000010e01000039000000000201041a0000ffff0320018f0000ffff0430008c000002990000c13d000001ab0100004100000000001004350000001101000039000000040010043f000001ac01000041000004ec000104300000000001000416000000000101004b000003fc0000c13d000000040130008a000000400110008c000003fc0000413d0000000001000411000080010110008c0000000001000019000000010100603904ea045e0000040f00000000010003670000002402100370000000000202043b0000011003000039000000000023041b0000000401100370000000000101043b0000010f02000039000000000012041b0000000001000019000004eb0001042e0000000001000416000000000101004b000003fc0000c13d0000010f01000039000000000101041a000000800010043f0000016e01000041000004eb0001042e0000000002000416000000000202004b000003fc0000c13d000000040230008a000000200220008c000003fc0000413d0000000002000411000080070220008c000003fc0000c13d0000000401100370000000000101043b000000000010041b0000000001000019000004eb0001042e0000017601000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000001a201000041000000c40010043f000001a301000041000004ec000104300000008001100210000000000112019f0000000302000039000000000012041c0000000001000019000004eb0001042e000001730330009c0000029f0000413d000000000221004b0000029f0000413d000001012110011a0000000b01200039000000000401041a000002af0000013d0000017b022001970000000103300039000000000223019f000000000021041b0000000001000019000004eb0001042e000000e00010043f0000002001000039000000c00010043f0000010001000039000000400010043f0000013c0100004100000000020004140000013c0320009c0000000002018019000000c00120021000000174011001c7000080100200003904ea04e50000040f0000000102200190000003fc0000613d000000000401043b000000400100043d00000000004104350000013c020000410000013c0310009c0000000001028019000000400110021000000171011001c7000004eb0001042e0000017601000041000000c00010043f0000002001000039000000c40010043f000000e40010043f000001a401000041000001040010043f0000018501000041000004ec000104300000017601000041000000c00010043f0000002001000039000000c40010043f0000002801000039000000e40010043f000001a501000041000001040010043f000001a601000041000001240010043f0000019101000041000004ec000104300000017601000041000000c00010043f0000002001000039000000c40010043f0000005301000039000000e40010043f000001a701000041000001040010043f000001a801000041000001240010043f000001a901000041000001440010043f000001aa01000041000004ec00010430000000030100006b000002e80000c13d0000017601000041000000800010043f0000002001000039000000840010043f0000003f01000039000000a40010043f0000017c01000041000000c40010043f0000017d01000041000000e40010043f0000017e01000041000004ec00010430000000c001000039000000400010043f0000000901000039000100000001001d000000000301041a0000016f01300197000200000001001d000000800010043f0000008001300270000000a00010043f0000016f0330009c000003020000213d000000020300006b000003070000c13d000000000102004b000003640000c13d0000017601000041000000c00010043f0000002001000039000000c40010043f0000002101000039000000e40010043f000001a001000041000001040010043f000001a101000041000002c90000013d000000060310006c000003090000613d0000016f0210009c0000024f0000613d000003240000013d000000060310006c000003240000c13d000000000102004b0000035a0000c13d0000000202000029000000050120006c0000038e0000c13d0000000601000029000000010110008a0000016f0210009c0000024f0000213d0000016f01100197000001012110011a0000000b01200039000000000101041a000000040110006b000003fe0000c13d000000030100006b000003ca0000613d0000017601000041000000c00010043f0000002001000039000000c40010043f0000003c01000039000000e40010043f0000019601000041000001040010043f0000019701000041000002c90000013d0000000102100039000000060220006c000003700000c13d000000010210008a0000016f0320009c0000024f0000213d0000000a03000039000000000303041a0000016f02200197000001015220011a0000000b02500039000000000202041a000000e00010043f0000000201000029000001000010043f000001200020043f000001400030043f000000c00040043f0000016001000039000000400010043f0000013c0100004100000000020004140000013c0320009c0000000002018019000000c00120021000000186011001c7000080100200003904ea04e50000040f0000000102200190000003fc0000613d000000400200043d000000000101043b000000040110006b000004080000c13d0000000203000029000000050130006b0000042b0000a13d0000018e0120009c000001e60000213d0000004001200039000000400010043f000000200120003900000006040000290000000000410435000000050300002900000000003204350000008001400210000000000113019f0000000102000029000000000012041b000000010140008a0000016f0210009c0000024f0000213d000003c30000013d0000017601000041000000c00010043f0000002001000039000000c40010043f0000003501000039000000e40010043f0000018f01000041000001040010043f0000019001000041000002c90000013d000000060100006b000003980000c13d0000017601000041000000c00010043f0000002001000039000000c40010043f0000002c01000039000000e40010043f0000019e01000041000001040010043f0000019f01000041000002c90000013d0000017601000041000000c00010043f0000002001000039000000c40010043f0000001b01000039000000e40010043f0000018401000041000002bd0000013d0000004002100039000000400020043f0000002002100039000000040300002900000000003204350000000602000029000000000021043500000080013002100000016f02200197000000000112019f0000000302000029000000000012041b00000064010000390000000001100367000000000101043b0000000602000039000000000012041b00000004010000390000000502000029000000000021041c0000000001000019000004eb0001042e0000017601000041000000c00010043f0000002001000039000000c40010043f0000002f01000039000000e40010043f0000019201000041000001040010043f0000019301000041000002c90000013d00000006010000290000016f01100041000200000001001d000000e001100210000000e00010043f0000000401000039000000c00010043f0000010001000039000000400010043f0000013c0100004100000000020004140000013c0320009c0000000002018019000000c00120021000000198011001c7000080100200003904ea04e50000040f0000000102200190000003fc0000613d000000400200043d000000000101043b000000040110006c000004110000c13d00000002010000290000016f01100197000001013110011a0000000b013000390000000403000029000000000031041b0000018e0120009c000001e60000213d0000004001200039000000400010043f000000200120003900000006040000290000000000410435000000050300002900000000003204350000008001400210000000000113019f0000000102000029000000000012041b000000010140008a0000016f01100197000001012110011a0000000b012000390000000402000029000000000021041b0000000a01000039000000000001041b0000010d01000039000000000201041a000001730320009c000004250000813d000000400300043d0000018e0430009c000001e60000213d0000004004300039000000400040043f0000010c04000039000000000604041a0000016f046001970000000004430436000000800560027000000000005404350000016f0660009c000004420000213d00000000060304330000016f06600198000004420000c13d0000000705000039000000000505041a000000800550027000000000005404350000019b02200197000000000225019f000000000021041b000000030600006b000004450000c13d000000400100043d00000064021000390000019c03000041000000000032043500000044021000390000019d030000410000000000320435000000240210003900000028030000390000000000320435000001760200004100000000002104350000000402100039000000200300003900000000003204350000013c020000410000013c0310009c0000000001028019000000400110021000000189011001c7000004ec000104300000000001000019000004ec000104300000017601000041000000c00010043f0000002001000039000000c40010043f0000003301000039000000e40010043f0000019401000041000001040010043f0000019501000041000002c90000013d00000064012000390000018703000041000000000031043500000044012000390000018803000041000000000031043500000024012000390000002603000039000004190000013d00000064012000390000019903000041000000000031043500000044012000390000019a030000410000000000310435000000240120003900000027030000390000000000310435000001760100004100000000001204350000000401200039000000200300003900000000003104350000013c010000410000013c0320009c0000000002018019000000400120021000000189011001c7000004ec000104300000000101000029000000000101041a0000010c02000039000000000012041b0000000001000019000004eb0001042e00000084012000390000018a03000041000000000031043500000064012000390000018b03000041000000000031043500000044012000390000018c03000041000000000031043500000024012000390000005d030000390000000000310435000001760100004100000000001204350000000401200039000000200300003900000000003104350000013c010000410000013c0320009c000000000201801900000040012002100000018d011001c7000004ec00010430000000030600006b000004470000c13d000004290000013d0000000306000029000300010060009200000003055000290000016f0650009c0000024f0000213d00000000005404350000000505000029000000000053043500000000050404330000016f06500197000000060660006c000004530000813d00000080055002100000045a0000013d00000006060000290000008005600210000000000252019f000000000021041b00000000006404350000000001030433000500000001001d00000005010000290000016f01100197000000000151019f000004270000013d000000000101004b000004610000613d000000000001042d000000400100043d0000004402100039000001a203000041000000000032043500000024021000390000001f030000390000000000320435000001760200004100000000002104350000000402100039000000200300003900000000003204350000013c020000410000013c0310009c00000000010280190000004001100210000001ad011001c7000004ec00010430000000400100043d000001ae0210009c000004980000813d000000c002100039000000400020043f0000000002000413000000f003200270000000ff0330018f000000a0041000390000000000340435000000e803200270000000ff0330018f00000080041000390000000000340435000000e003200270000000ff0330018f0000006004100039000000000034043500000060032002700000013c033001970000004004100039000000000034043500000040032002700000013c03300197000000200410003900000000003404350000013c0220019700000000002104350000011001000039000000000101041a0000000001120049000000000221004b00000000020000190000000102002039000000000202004b000000000100c019000000000001042d000001ab0100004100000000001004350000004101000039000000040010043f000001ac01000041000004ec00010430000001af0210009c000004a30000813d0000004001100039000000400010043f000000000001042d000001ab0100004100000000001004350000004101000039000000040010043f000001ac01000041000004ec00010430000000400300043d000001af0130009c000004b60000813d0000004001300039000000400010043f0000000701000039000000000201041a0000002004300039000000800120027000000000001404350000016f022001970000000000230435000000000001042d000001ab0100004100000000001004350000004101000039000000040010043f000001ac01000041000004ec00010430000000400300043d000001af0130009c000004c90000813d0000004001300039000000400010043f0000000901000039000000000201041a0000002004300039000000800120027000000000001404350000016f022001970000000000230435000000000001042d000001ab0100004100000000001004350000004101000039000000040010043f000001ac01000041000004ec000104300000013c030000410000013c0410009c000000000103801900000040011002100000013c0420009c00000000020380190000006002200210000000000112019f00000000020004140000013c0420009c0000000002038019000000c002200210000000000112019f000001b0011001c7000080100200003904ea04e50000040f0000000102200190000004e30000613d000000000101043b000000000001042d0000000001000019000004ec00010430000004e8002104230000000102000039000000000001042d0000000002000019000000000001042d000004ea00000432000004eb0001042e000004ec0001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff0000000000000000000000000000000000000000000000000004000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008e1bc9bf0400000000002000000000000000000000000000000400000010000000000000000000000000000000000000000000000000000000000000000000000000085df51fc00000000000000000000000000000000000000000000000000000000a851ae7700000000000000000000000000000000000000000000000000000000d4a4ca0c00000000000000000000000000000000000000000000000000000000ef0e2ff300000000000000000000000000000000000000000000000000000000ef0e2ff400000000000000000000000000000000000000000000000000000000fe173b9700000000000000000000000000000000000000000000000000000000d4a4ca0d00000000000000000000000000000000000000000000000000000000ddeaa8e600000000000000000000000000000000000000000000000000000000c0d5b94800000000000000000000000000000000000000000000000000000000c0d5b94900000000000000000000000000000000000000000000000000000000d0f2c66300000000000000000000000000000000000000000000000000000000a851ae7800000000000000000000000000000000000000000000000000000000bf1fe420000000000000000000000000000000000000000000000000000000009a8a059100000000000000000000000000000000000000000000000000000000a225efca00000000000000000000000000000000000000000000000000000000a225efcb00000000000000000000000000000000000000000000000000000000a6ae0aac000000000000000000000000000000000000000000000000000000009a8a059200000000000000000000000000000000000000000000000000000000a0803ef7000000000000000000000000000000000000000000000000000000008e8acf86000000000000000000000000000000000000000000000000000000008e8acf8700000000000000000000000000000000000000000000000000000000938b5f320000000000000000000000000000000000000000000000000000000085df51fd000000000000000000000000000000000000000000000000000000008ac84c0e0000000000000000000000000000000000000000000000000000000042cbb15b00000000000000000000000000000000000000000000000000000000796b89b8000000000000000000000000000000000000000000000000000000007cb9357d000000000000000000000000000000000000000000000000000000007cb9357e0000000000000000000000000000000000000000000000000000000080b4124600000000000000000000000000000000000000000000000000000000796b89b9000000000000000000000000000000000000000000000000000000007c9bd1f3000000000000000000000000000000000000000000000000000000006ef25c39000000000000000000000000000000000000000000000000000000006ef25c3a000000000000000000000000000000000000000000000000000000007877a7970000000000000000000000000000000000000000000000000000000042cbb15c000000000000000000000000000000000000000000000000000000004be99e1d0000000000000000000000000000000000000000000000000000000019cae4610000000000000000000000000000000000000000000000000000000030e5ccbc0000000000000000000000000000000000000000000000000000000030e5ccbd000000000000000000000000000000000000000000000000000000003635f3e60000000000000000000000000000000000000000000000000000000019cae4620000000000000000000000000000000000000000000000000000000029f172ad0000000000000000000000000000000000000000000000000000000002fa57790000000000000000000000000000000000000000000000000000000006bed0360000000000000000000000000000000000000000000000000000000006e7517b000000000000000000000000000000000000002000000080000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000001000000000000000000000000000000000200000000000000000000000000000000000020000000e00000000000000000020000000000000000000000000000000000004000000000000000000000000008c379a0000000000000000000000000000000000000000000000000000000005468652063757272656e74206261746368206e756d626572206d7573742062652067726561746572207468616e2030000000000000000000000000000000000000000000000000000000000000000000000000840000010000000000000000000000000000000000000000000000000000000020000001400000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00005468657265206d7573742062652061207669727475616c20626c6f636b206372656174656420617420746865207374617274206f66207468652062617463680000000000000000000000000000000000000000840000008000000000000000005468652074696d657374616d70206f6620746865204c3220626c6f636b206d7573742062652067726561746572207468616e206f7220657175616c20746f207468652074696d657374616d70206f66207468652063757272656e742062617463680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c4000000800000000000000000496e76616c6964206e6577204c3220626c6f636b206e756d62657200000000000000000000000000000000000000000000000064000000c000000000000000000200000000000000000000000000000000000080000000e000000000000000006f727265637400000000000000000000000000000000000000000000000000005468652063757272656e74204c3220626c6f636b206861736820697320696e63000000000000000000000000000000000000008400000000000000000000000074616d70206f66207468652070726576696f7573204c3220626c6f636b0000006b206d7573742062652067726561746572207468616e207468652074696d65735468652074696d657374616d70206f6620746865206e6577204c3220626c6f6300000000000000000000000000000000000000a4000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffbf43616e206e6f74207265757365204c3220626c6f636b206e756d6265722066726f6d207468652070726576696f757320626174636800000000000000000000000000000000000000000000000000000000000084000000c000000000000000005468652074696d657374616d70206f66207468652073616d65204c3220626c6f636b206d7573742062652073616d6500000000000000000000000000000000005468652070726576696f75732068617368206f66207468652073616d65204c3220626c6f636b206d7573742062652073616d650000000000000000000000000043616e206e6f7420637265617465207669727475616c20626c6f636b7320696e20746865206d6964646c65206f6620746865206d696e69626c6f636b000000000200000000000000000000000000000000000004000000e00000000000000000636f7272656374000000000000000000000000000000000000000000000000005468652070726576696f7573204c3220626c6f636b206861736820697320696effffffffffffffffffffffffffffffff00000000000000000000000000000000616c20626c6f636b00000000000000000000000000000000000000000000000043616e277420696e697469616c697a65207468652066697273742076697274754c3220626c6f636b206e756d626572206973206e6576657220657870656374656420746f206265207a65726f000000000000000000000000000000000000000055706772616465207472616e73616374696f6e206d7573742062652066697273740000000000000000000000000000000000000000000000000000000000000043616c6c61626c65206f6e6c792062792074686520626f6f746c6f6164657200000000000000000000000000000000000000006400000080000000000000000054696d657374616d70732073686f756c6420626520696e6372656d656e74616c5468652070726f7669646564206261746368206e756d626572206973206e6f7420636f72726563740000000000000000000000000000000000000000000000005468652074696d657374616d70206f6620746865206261746368206d7573742062652067726561746572207468616e207468652074696d657374616d70206f66207468652070726576696f757320626c6f636b0000000000000000000000000000000000000000000000000000000000000000a4000000c000000000000000004e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff40000000000000000000000000000000000000000000000000ffffffffffffffc0020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003056e37dc174c0b32f5f5cfbc8be779b031b1d10b06fbead692692d7f40ce69b"\
}\
]\
}\
\
[](#verify-solidity-source-code)\
\
Verify Solidity Source Code\
\
\
-----------------------------------------------------------------\
\
Submits a contract source code to an [**Abscan-like**](/contract-verification/supported-chains)\
explorer for verification.\
\
🌐 **Tutorial :** A full walk through of submitting [**multichain contract verification**](/contract-verification/multichain-verification)\
.\
\
📝 **Note :** This endpoint is limited to **100 verifications/day**, regardless of API PRO tier.\
\
Copy\
\
https://api.abscan.org/api\
?module=contract\
&action=verifysourcecode\
&apikey=YourApiKeyToken \
\
RequestResponse\
\
Query Parameters\
\
Requests must be sent using **HTTP POST**\
\
Parameter\
\
Description\
\
chainId\
\
the [**chain**](/contract-verification/supported-chains)\
to submit verification, such as `1` for mainnet\
\
codeformat\
\
single file, use `solidity-single-file` JSON file ( recommended ), use `solidity-standard-json-input`\
\
sourceCode\
\
the Solidity source code\
\
constructorArguements\
\
optional, include if your contract uses constructor arguments\
\
contractaddress\
\
the address your contract is deployed at\
\
contractname\
\
the name of your contract, such as `contracts/Verified.sol:Verified`\
\
compilerversion\
\
[**compiler version**](https://abscan.org/solcversions)\
used, such as `v0.8.24+commit.e11b9ed9`\
\
Sample Response\
\
Copy\
\
{\
"status": "1",\
"message": "OK",\
"result": "a7lpxkm9kpcpicx7daftmjifrfhiuhf5vqqnawhkfhzfrcpnxj"\
}\
\
[](#verify-vyper-source-code)\
\
Verify Vyper Source Code\
\
\
-----------------------------------------------------------\
\
Submits a Vyper contract source code to Abscan for verification.\
\
📝 **Note :** This endpoint is limited to **100 verifications/day**, regardless of API PRO tier.\
\
Copy\
\
https://api.abscan.org/api\
?module=contract\
&action=verifysourcecode\
&apikey=YourApiKeyToken \
\
RequestResponse\
\
Query Parameters\
\
Requests must be sent using **HTTP POST**\
\
Parameter\
\
Description\
\
codeformat\
\
use `vyper-json`\
\
sourceCode\
\
the Vyper source code, in [**JSON format**](https://docs.vyperlang.org/en/stable/compiling-a-contract.html#compiler-input-and-output-json-description)\
\
constructorArguments\
\
optional, include if your contract uses constructor arguments\
\
contractaddress\
\
the address your contract is deployed at\
\
contractname\
\
the name of your contract, such as `contracts/Verified.vy:Verified`\
\
compilerversion\
\
compiler version used, such as `vyper:0.4.0`\
\
optimizationUsed\
\
use `0` for no optimisation and `1` for optimisation used\
\
Sample Response\
\
Copy\
\
{\
"status": "1",\
"message": "OK",\
"result": "a7lpxkm9kpcpicx7daftmjifrfhiuhf5vqqnawhkfhzfrcpnxj"\
}\
\
[](#check-source-code-verification-status)\
\
Check Source Code Verification Status\
\
\
-------------------------------------------------------------------------------------\
\
Returns the success or error status of a contract verification request.\
\
Copy\
\
https://api.abscan.org/api\
?module=contract\
&action=checkverifystatus\
&guid=x3ryqcqr1zdknhfhkimqmizlcqpxncqc6nrvp3pgrcpfsqedqi\
&apikey=YourApiKeyToken \
\
> Try this endpoint in your [**browser**](https://api.abscan.org/api?module=contract&action=checkverifystatus&guid=x3ryqcqr1zdknhfhkimqmizlcqpxncqc6nrvp3pgrcpfsqedqi&apikey=YourApiKeyToken)\
> 🔗\
\
RequestResponse\
\
Query Parameters\
\
Parameter\
\
Description\
\
guid\
\
the unique `guid` received from the verification request\
\
Sample Response\
\
If your encounter an error, reference our [**error list**](/contract-verification/common-verification-errors)\
\
Copy\
\
{\
"status": "1",\
"message": "OK",\
"result": "Pass - Verified"\
}\
\
[](#verify-proxy-contract)\
\
Verify Proxy Contract\
\
\
-----------------------------------------------------\
\
Submits a proxy contract source code to Abscan for verification.\
\
1. Requires a valid Abscan API key, it will be rejected otherwise\
\
2. Current daily limit of 100 submissions per day per user (subject to change)\
\
3. Only supports HTTP post\
\
4. Upon successful submission you will receive a GUID (50 characters) as a receipt\
\
5. You may use this GUID to track the status of your submission\
\
6. Verified proxy contracts will display the "Read/Write as Proxy" of the implementation contract under the contract address's contract tab\
\
\
### \
\
[](#verifying-proxy-contract-using-curl)\
\
Verifying Proxy Contract using cURL\
\
RequestResponse\
\
Copy\
\
// example with only the mandatory contract address parameter\
curl -d "address=0xcbdcd3815b5f975e1a2c944a9b2cd1c985a1cb7f" "https://api.abscan.org/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"\
\
// example using the expectedimplementation optional parameter\
// the expectedimplementation enforces a check to ensure the returned implementation contract address == address picked up by the verifier\
curl -d "address=0xbc46363a7669f6e12353fa95bb067aead3675c29&expectedimplementation=0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6" "https://api.abscan.org/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"\
\
Copy\
\
// OK\
{"status":"1","message":"OK","result":"gwgrrnfy56zf6vc1fljuejwg6pelnc5yns6fg6y2i6zfpgzquz"}\
\
// NOTOK\
{"status":"0","message":"NOTOK","result":"Invalid API Key"}\
\
### \
\
[](#checking-proxy-contract-verification-submission-status-using-curl)\
\
Checking Proxy Contract Verification Submission Status using cURL\
\
RequestResponse\
\
Copy\
\
curl "https://api.abscan.org/api?module=contract&action=checkproxyverification&guid=gwgrrnfy56zf6vc1fljuejwg6pelnc5yns6fg6y2i6zfpgzquz&apikey=YourApiKeyToken"\
\
Copy\
\
// OK\
{"status":"1","message":"OK","result":"The proxy's (0xbc46363a7669f6e12353fa95bb067aead3675c29) implementation contract is found at 0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6 and is successfully updated."}\
\
// NOTOK\
{"status":"0","message":"NOTOK","result":"A corresponding implementation contract was unfortunately not detected for the proxy address."}\
\
[PreviousAccounts](/api-endpoints/accounts)\
[NextTransactions](/api-endpoints/stats)\
\
Last updated 2 months ago
---