zkSync

/getbalance

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

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

Query Parameters

NameTypeDescription

rpc

String

Remote procedural call URL

chainId*

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

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=8453&blockNumber=15351657&address=0x20FE51A9229EEf2cF8Ad9E89d91CAb9312cF3b7A&tokenAddress=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913

/getblock

Get details of a block.

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

Query Parameters

NameTypeDescription

rpc

String

Remote procedural call URL.

chainId*

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

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

NameTypeDescription

rpc

String

Remote procedural call URL.

chainId*

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

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

NameTypeDescription

rpc

String

Remote procedural call URL.

chainId*

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

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

NameTypeDescription

rpc

String

Remote procedural call URL.

chainId*

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

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

NameTypeDescription

rpc

String

Remote procedural call URL.

chainId*

String

Refer to the Chain ID page for details.

chainSymbol

String

Refer to the Chain ID page for details.

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

NameTypeDescription

chainId

String

Refer to the Chain ID page for details. By default, Ethereum.

chainSymbol

String

Refer to the Chain ID page for details.

rawTransaction*

String

The raw transaction to be given for decoding.

{
    "rawTransaction": "0xf86d808405f5e100830927c0946fb447ae94f5180254d436a693907a1f5769690087038d7ea4c68000808202aca0535316a857d5c6f59ee228509cf9eb638905250548c7a7effcc6ebff22bca4dea012a9859bf2f663521c9832f1d118de7d548e119b5d9b07ff6d6d349025b3f8b2"
}

Last updated