zkSync Era

/getbalance

Get the balance or number of the given token in the requested public address.

GET https://api.expand.network/chain/getbalance

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL

chainId*

String

chainSymbol

String

blockNumber

String

Block number for which the balance needs to be retrieved.

By default, it will pick the latest block number when not specified.

address*

String

The public address to get the balance of.

tokenAddress

String

The address of token to get the balance of.

https://api.expand.network/chain/getbalance?chainId=324&blockNumber=35710825&address=0x5f5BB2b9A16d48541d38E048E94a9CD713bD6Cb7&tokenAddress=0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4

/getblock

Get details of a block.

GET https://historicallp.api.expand.network/chain/getblock

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId*

String

chainSymbol

String

blockNumber*

String

The block number or block hash.

https://historicallp.api.expand.network/chain/getblock?blockNumber=696293&chainId=324

/getgasprice

Get the current gas price from the network.

GET https://api.expand.network/chain/getgasprice

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId*

String

chainSymbol

String

https://api.expand.network/chain/getgasprice?chainId=324

/getstorage

Get data stored in the given slot.

GET https://api.expand.network/chain/getstorage

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId*

String

chainSymbol

String

address*

String

Contract address whose storage is needed.

index

String

Slot index on the smart contract. By default, it is taken as 0.

https://api.expand.network/chain/getstorage?address=0x32Fd44bB869620C0EF993754c8a00Be67C464806&chainId=324&index=0

/gettransaction

Get details of a transaction.

GET https://api.expand.network/chain/gettransaction

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId*

String

chainSymbol

String

transactionHash*

String

The transaction hash.

https://api.expand.network/chain/gettransaction?chainId=324&transactionHash=0xe43b77386a5e5bdffaa62b347044cfd28b71947b6c9869046a1df644a3b83bb0

/sendtransaction

Send transaction on the chain.

POST https://api.expand.network/chain/sendtransaction

Request Body

Name
Type
Description

rpc

String

Remote procedural call URL.

chainId*

String

chainSymbol

String

rawTransaction*

String

The encoded transaction, obtained from the signed transaction.

{
    "rawTransaction": "0xf86d0d8405f5e100830927c0946fb447ae94f5180254d436a693907a1f5769690087038d7ea4c680008082027ba0d73a953d53eb64f90c7c91273df70074021ec9d6aa2280ba53527086a5d45f65a0273ee55497b2374af9b244af11a2e5a02f94137385fac51ef51f21908a18ca57",
    "chainId": "324"
}

/decodetransaction

Get the decoded transaction for the provided raw transaction.

POST https://api.expand.network/chain/decodetransaction

Request Body

Name
Type
Description

chainId

String

chainSymbol

String

rawTransaction*

String

The raw transaction to be given for decoding.

{
    "rawTransaction": "0xf86d808405f5e100830927c0946fb447ae94f5180254d436a693907a1f5769690087038d7ea4c68000808202aca0535316a857d5c6f59ee228509cf9eb638905250548c7a7effcc6ebff22bca4dea012a9859bf2f663521c9832f1d118de7d548e119b5d9b07ff6d6d349025b3f8b2"
}

Last updated