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
https://api.expand.network/chain/getbalance/?address=0x2571abBe2e5DdaE6043ef59153E76Ae3aA14Be70&chainId=324{
    "status": 200,
    "msg": "success",
    "data": {
        "balance": "33852722303674668"
    }
}/getblock
Get details of a block.
GET https://api.expand.network/chain/getblock
Query Parameters
https://api.expand.network/chain/getblock?blockNumber=696293&chainId=324{
    "status": 200,
    "msg": "success",
    "data": {
        "difficulty": "0",
        "gasLimit": 4294967295,
        "gasUsed": 3273403,
        "hash": "0x978dd7094735b8621254f26a875f020413ef7a498ad5dce79ab322bf5c4e5313",
        "miner": "0x0000000000000000000000000000000000000000",
        "nonce": "0x0000000000000000",
        "number": 696293,
        "parentHash": "0x0019d93c7755306ee4861d6e203fe3bf754fab46c24d74f9a700a46b236c023f",
        "size": 0,
        "timestamp": 1680490794,
        "totalDifficulty": "0",
        "transactions": [
            "0x638118f1c0ee1ec486d54e3928839380cac1c32952b9938c6ce83ec068bb4552",
            "0x3fe45d5c3d918d07e090f8f31b207d181ce6efd9032d013941303117722ad0ca",
            "0x6f77fd8b4f58d843d43a41437cc31f02ad26c5593c52d2c0bd88bbcfc641d89a",
            "0xdbf67fea5c4838ee5b4a4703fbe21975a810097a2aaa395bef68c5eeff40aa82",
            "0x2747b2e2db61814ef366c335ba25bb35c440aa304ffaac3e5050300ea3df5ec3",
            "0x4c88d08864543d2bda36087244336994f7e5b5b463a1270532175ad4c4563ac5"
        ],
        "transactionsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "uncles": []
    }
}/getgasprice
Get the current gas price from the network.
GET https://api.expand.network/chain/getgasprice
Query Parameters
https://api.expand.network/chain/getgasprice?chainId=324{
    "status": 200,
    "msg": "success",
    "data": {
        "gasPrice": "100000000"
    }
}/getstorage
Get data stored in the given slot.
GET https://api.expand.network/chain/getstorage
Query Parameters
https://api.expand.network/chain/getstorage?address=0x32Fd44bB869620C0EF993754c8a00Be67C464806&chainId=324&index=0{
    "status": 200,
    "msg": "success",
    "data": {
        "data": "0x0000000000000000000000000000000000000000000000000000000000000001"
    }
}/gettransaction
Get details of a transaction.
GET https://api.expand.network/chain/gettransaction
Query Parameters
https://api.expand.network/chain/gettransaction?chainId=324&transactionHash=0xe43b77386a5e5bdffaa62b347044cfd28b71947b6c9869046a1df644a3b83bb0{
    "status": 200,
    "msg": "success",
    "data": {
        "hash": "0xe43b77386a5e5bdffaa62b347044cfd28b71947b6c9869046a1df644a3b83bb0",
        "transactionStatus": true,
        "blockNumber": "26972503",
        "timestamp": null,
        "from": "0xBf1C2eD425398FD04ecf319BEbd39EC487eEFeDF",
        "to": "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4",
        "value": "0",
        "transactionFees": "47253200000000",
        "gas": "1056669",
        "gasPrice": "100000000",
        "input": "0x095ea7b3000000000000000000000000f8b59f3c3ab33200ec80a8a58b2aa5f5d2a8944cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
        "nonce": 50,
        "network": null
    }
}/sendtransaction
Send transaction on the chain.
POST https://api.expand.network/chain/sendtransaction
Request Body
{
    "rawTransaction": "0xf86d0d8405f5e100830927c0946fb447ae94f5180254d436a693907a1f5769690087038d7ea4c680008082027ba0d73a953d53eb64f90c7c91273df70074021ec9d6aa2280ba53527086a5d45f65a0273ee55497b2374af9b244af11a2e5a02f94137385fac51ef51f21908a18ca57",
    "chainId": "324"
}{
    "status": 200,
    "msg": "success",
    "data": {
        "chainId": "324",
        "transactionHash": "0x7d987e52e0b106a2171919775970089b052857046fbf32137c8c445f10d6d69f" 
    }
}/decodetransaction
Get the decoded transaction for the provided raw transaction. 
POST https://api.expand.network/chain/decodetransaction
Request Body
{
    "rawTransaction": "0xf86d808405f5e100830927c0946fb447ae94f5180254d436a693907a1f5769690087038d7ea4c68000808202aca0535316a857d5c6f59ee228509cf9eb638905250548c7a7effcc6ebff22bca4dea012a9859bf2f663521c9832f1d118de7d548e119b5d9b07ff6d6d349025b3f8b2"
}{
    "status": 200,
    "msg": "success",
    "data": {
        "parsedTx": {
            "nonce": 0,
            "gasPrice": {
                "type": "BigNumber",
                "hex": "0x05f5e100"
            },
            "gasLimit": {
                "type": "BigNumber",
                "hex": "0x0927c0"
            },
            "to": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
            "value": {
                "type": "BigNumber",
                "hex": "0x038d7ea4c68000"
            },
            "data": "0x",
            "chainId": 324,
            "v": 684,
            "r": "0x535316a857d5c6f59ee228509cf9eb638905250548c7a7effcc6ebff22bca4de",
            "s": "0x12a9859bf2f663521c9832f1d118de7d548e119b5d9b07ff6d6d349025b3f8b2",
            "from": "0x56D2208EfD27Fe9C67e3879DeBCe35833B9D4cC7",
            "hash": "0x90521267c0d1e6f72398e1bc1d45552415145126656a385c07494c56832ea3c9",
            "type": null
        },
        "assetChanges": {
            "from": "0x56D2208EfD27Fe9C67e3879DeBCe35833B9D4cC7",
            "to": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
            "value": {
                "type": "BigNumber",
                "hex": "0x038d7ea4c68000"
            }
        }
    }
}Last updated

