Avalanche - C
/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 | Refer to the Chain ID page for details. |
chainSymbol | String | Refer to the Chain ID page for details. |
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/?address=0x4dd1fed9BeE6eD79088093d55d7fCb8490CDf7Ea&chainId=43114
{
"status": 200,
"msg": "success",
"data": {
"balance": "67665156116856663"
}
}
/getblock
Get details of a block.
GET
https://api.expand.network/chain/getblock
Query Parameters
Name | Type | Description |
---|---|---|
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://api.expand.network/chain/getblock?blockNumber=33058810&chainId=43114
{
"status": 200,
"msg": "success",
"data": {
"difficulty": "1",
"gasLimit": 8000000,
"gasUsed": 2327118,
"hash": "0x0ae0aacb219dab7fe5574966eaca9e92698049148174a15484b51dc4ee6cec88",
"miner": "0x0100000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": 25255572,
"parentHash": "0x260bb0454ac742687e101eb638e3f69633fa12829e967b7f2dca3f6eec3e4e4a",
"size": 7844,
"timestamp": 1674363743,
"totalDifficulty": "25255572",
"transactions": [
"0x7d2692db5cddb2a717f31d6608a5708ec42c3f82cfa321065b3f389dc9542145",
"0xe1979d6eac109509b853d91fa7c309cd2a0ca3524102baa9be40f89151128ed1"
],
"transactionsRoot": "0xab77441ac18ab2ee0dbd96152e43730aa8b8bd3a1e3a65ddf442d0f755a3b78f",
"uncles": []
}
}
/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 | 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=43114
{
"status": 200,
"msg": "success",
"data": {
"gasPrice": "25000000000"
}
}
/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 | 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?chainId=43114&address=0x919dF3aDbF5cfC9fcfd43198EDFe5aA5561CB456
{
"status": 200,
"msg": "success",
"data": {
"data": "0x0000000000000000000000002313f80d53c649c7b2c9c4d101b796f34cbe80f3"
}
}
/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 | 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=43114&transactionHash=0x832963961420faccbce52926d3dbe27e435ea916ccc7debb65c855cd18120143
{
"status": 200,
"msg": "success",
"data": {
"hash": "0xc5739294762ea30306d2891210fc997e50e8d9a146c3bc9049b05694a2577873",
"transactionStatus": null,
"blockNumber": 25638459,
"timestamp": null,
"from": "0x2313f80D53c649c7B2c9c4D101b796F34cBE80F3",
"to": null,
"value": "0",
"transactionFees": "69359125000000000",
"gas": 2774365,
"gasPrice": "25000000000",
"input": "0x60c06040523480156200001157600080fd5b5060405162003189380380620031898339810160408190526200003491620001a2565b6200003f3362000127565b600180556001600160a01b038216158015906200006457506001600160a01b03811615155b620000b55760405162461bcd60e51b815260206004820181905260248201527f4164647265737365732063616e6e6f74206265207a65726f2061646472657373604482015260640160405180910390fd5b606082901b6001600160601b031916608052600380546001600160a01b0319166001600160a01b038316179055604051620000f09062000177565b604051809103906000f0801580156200010d573d6000803e3d6000fd5b5060601b6001600160601b03191660a05250620001da9050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6105cd8062002bbc83390190565b80516001600160a01b03811681146200019d57600080fd5b919050565b60008060408385031215620001b657600080fd5b620001c18362000185565b9150620001d16020840162000185565b90509250929050565b60805160601c60a05160601c6129a8620002146000396000818161015c01528181610e9e01526118c00152600061010b01526129a86000f3fe6080604052600436106100cb5760003560e01c80637ecebe0011610074578063e58610841161004e578063e58610841461024f578063f2fde38b1461026f578063fc171d911461028f57600080fd5b80637ecebe00146101e35780638da5cb5b1461021e578063916a3bd91461023c57600080fd5b80633967048b116100a55780633967048b1461017e578063715018a6146101ae57806376cdb03b146101c357600080fd5b8063090d23b9146100d757806317fcb39b146100f95780631802553e1461014a57600080fd5b366100d257005b600080fd5b3480156100e357600080fd5b506100f76100f2366004612025565b6102a2565b005b34801561010557600080fd5b5061012d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561015657600080fd5b5061012d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561018a57600080fd5b5061019e6101993660046122be565b6103ae565b6040519015158152602001610141565b3480156101ba57600080fd5b506100f761076b565b3480156101cf57600080fd5b5060035461012d906001600160a01b031681565b3480156101ef57600080fd5b506102106101fe366004612025565b60026020526000908152604090205481565b604051908152602001610141565b34801561022a57600080fd5b506000546001600160a01b031661012d565b6100f761024a366004612192565b61077f565b34801561025b57600080fd5b506100f761026a366004612216565b6108c3565b34801561027b57600080fd5b506100f761028a366004612025565b610a2d565b6100f761029d3660046120fe565b610abd565b6102aa610bed565b6001600160a01b038116158015906102cb57506001600160a01b0381163014155b6103425760405162461bcd60e51b815260206004820152603a60248201527f42616e6b20616464726573732063616e6e6f74206265207a65726f206164647260448201527f657373206f72205769646f20526f75746572206164647265737300000000000060648201526084015b60405180910390fd5b600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f10f5824683d64a0712038f2244e046b174a1cc57fbb8556bfda5ffb2612440679060200160405180910390a150565b600080604051602001610430907f454950373132446f6d61696e28737472696e67206e616d652c737472696e672081527f76657273696f6e2c75696e7432353620636861696e49642c616464726573732060208201527f766572696679696e67436f6e7472616374290000000000000000000000000000604082015260520190565b60408051601f198184030181528282528051602091820120908301527fe18799aceb0d5c1134b671173b8112a3ebcbe15aaef1b5bf23f47082a09df0ec908201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c001604051602081830303815290604052805190602001209050600061052d826104d6896104d1906127cf565b610c47565b6040517f190100000000000000000000000000000000000000000000000000000000000060208201526022810192909252604282015260620160405160208183030381529060405280519060200120878787610e04565b90506001600160a01b0381161580159061056757506001600160a01b03811661055c6060890160408a01612025565b6001600160a01b0316145b6105b35760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610339565b600260006105c760608a0160408b01612025565b6001600160a01b031681526020810191909152604001600020546105f16080890160608a01612334565b63ffffffff16146106445760405162461bcd60e51b815260206004820152600d60248201527f496e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610339565b61065460a0880160808901612334565b63ffffffff16158061067b575061067160a0880160808901612334565b63ffffffff164211155b6106c75760405162461bcd60e51b815260206004820152600f60248201527f45787069726564207265717565737400000000000000000000000000000000006044820152606401610339565b60005b6106d488806125c0565b905081101561075d57366106e889806125c0565b838181106106f8576106f8612946565b905060400201905060008160200135116107545760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e742073686f756c642062652067726561746572207468616e2030006044820152606401610339565b506001016106ca565b506001979650505050505050565b610773610bed565b61077d6000610e2c565b565b600260015414156107d25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610339565b60026001556107e76060860160408701612025565b6001600160a01b0316336001600160a01b0316146108475760405162461bcd60e51b815260206004820152601260248201527f496e76616c6964206f72646572207573657200000000000000000000000000006044820152606401610339565b61086385858561085d6060840160408501612025565b86610e94565b6001600160a01b038116337f1ac24a2fc0a341cfcb02105ee08de6110d72cdf0d2b78fe9136f5da301eb9091876108a06060820160408301612025565b866040516108b0939291906124b8565b60405180910390a3505060018055505050565b600260015414156109165760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610339565b6002600155610927888686866103ae565b6109735760405162461bcd60e51b815260206004820152600d60248201527f496e76616c6964206f72646572000000000000000000000000000000000000006044820152606401610339565b6002600061098760608b0160408c01612025565b6001600160a01b03168152602081019190915260400160009081208054916109ae836128ff565b909155506109ca905088888861085d6060840160408501612025565b6001600160a01b038116337f1ac24a2fc0a341cfcb02105ee08de6110d72cdf0d2b78fe9136f5da301eb90918a610a076060820160408301612025565b86604051610a17939291906124b8565b60405180910390a3505060018055505050505050565b610a35610bed565b6001600160a01b038116610ab15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610339565b610aba81610e2c565b50565b60026001541415610b105760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610339565b6002600155610b256060870160408801612025565b6001600160a01b0316336001600160a01b031614610b855760405162461bcd60e51b815260206004820152601260248201527f496e76616c6964206f72646572207573657200000000000000000000000000006044820152606401610339565b610b928686868686610e94565b806001600160a01b0316336001600160a01b03167f1ac24a2fc0a341cfcb02105ee08de6110d72cdf0d2b78fe9136f5da301eb9091888686604051610bd9939291906124b8565b60405180910390a350506001805550505050565b6000546001600160a01b0316331461077d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610339565b6000604051602001610d60907f4f72646572284f72646572496e7075745b5d20696e707574732c4f726465724f81527f75747075745b5d206f7574707574732c6164647265737320757365722c75696e60208201527f743332206e6f6e63652c75696e7433322065787069726174696f6e294f72646560408201527f72496e707574286164647265737320746f6b656e416464726573732c75696e7460608201527f32353620616d6f756e74294f726465724f75747075742861646472657373207460808201527f6f6b656e416464726573732c75696e74323536206d696e4f7574707574416d6f60a08201527f756e74290000000000000000000000000000000000000000000000000000000060c082015260c40190565b60405160208183030381529060405280519060200120610d838360000151611267565b610d9084602001516113c1565b604080860151606087015160808801519251610de79695949390602001958652602086019490945260408501929092526001600160a01b0316606084015263ffffffff90811660808401521660a082015260c00190565b604051602081830303815290604052805190602001209050919050565b6000806000610e15878787876114eb565b91509150610e22816115d8565b5095945050505050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166377fc3fa8610ed36060880160408901612025565b610edd88806125c0565b6040518463ffffffff1660e01b8152600401610efb93929190612432565b600060405180830381600087803b158015610f1557600080fd5b505af1158015610f29573d6000803e3d6000fd5b5050505060005b610f3a86806125c0565b905081101561108d5736610f4e87806125c0565b83818110610f5e57610f5e612946565b6040029190910191506000905080610f796020840184612025565b6001600160a01b03161415610f8f575047611018565b610f9c6020830183612025565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015610fdd57600080fd5b505afa158015610ff1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611015919061231b565b90505b816020013581101561106c5760405162461bcd60e51b815260206004820152601f60248201527f42616c616e6365206c6f776572207468616e206f7264657220616d6f756e74006044820152606401610339565b61108361107c6020840184612025565b82866117c9565b5050600101610f30565b506110988484611884565b60005b6110a860208701876125c0565b905081101561125f57366110bf60208801886125c0565b838181106110cf576110cf612946565b604002919091019150600090506110e96020830183612025565b6001600160a01b0316141561115d57476020820135811015611144576040517f76baadda0000000000000000000000000000000000000000000000000000000081526020830135600482015260248101829052604401610339565b6111576001600160a01b03861682611c60565b50611256565b600061116c6020830183612025565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b1580156111ad57600080fd5b505afa1580156111c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e5919061231b565b90508160200135811015611232576040517f76baadda0000000000000000000000000000000000000000000000000000000081526020830135600482015260248101829052604401610339565b61125485826112446020860186612025565b6001600160a01b03169190611cbb565b505b5060010161109b565b505050505050565b600080825167ffffffffffffffff8111156112845761128461295c565b6040519080825280602002602001820160405280156112ad578160200160208202803683370190505b50905060005b835181101561139157604051602001611315907f4f72646572496e707574286164647265737320746f6b656e416464726573732c81527f75696e7432353620616d6f756e742900000000000000000000000000000000006020820152602f0190565b6040516020818303038152906040528051906020012084828151811061133d5761133d612946565b602002602001015160405160200161135692919061245e565b6040516020818303038152906040528051906020012082828151811061137e5761137e612946565b60209081029190910101526001016112b3565b50806040516020016113a391906123ac565b60405160208183030381529060405280519060200120915050919050565b600080825167ffffffffffffffff8111156113de576113de61295c565b604051908082528060200260200182016040528015611407578160200160208202803683370190505b50905060005b83518110156113915760405160200161146f907f4f726465724f7574707574286164647265737320746f6b656e4164647265737381527f2c75696e74323536206d696e4f7574707574416d6f756e742900000000000000602082015260390190565b6040516020818303038152906040528051906020012084828151811061149757611497612946565b60200260200101516040516020016114b092919061245e565b604051602081830303815290604052805190602001208282815181106114d8576114d8612946565b602090810291909101015260010161140d565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561152257506000905060036115cf565b8460ff16601b1415801561153a57508460ff16601c14155b1561154b57506000905060046115cf565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561159f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166115c8576000600192509250506115cf565b9150600090505b94509492505050565b60008160048111156115ec576115ec612930565b14156115f55750565b600181600481111561160957611609612930565b14156116575760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610339565b600281600481111561166b5761166b612930565b14156116b95760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610339565b60038160048111156116cd576116cd612930565b14156117415760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610339565b600481600481111561175557611755612930565b1415610aba5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610339565b606481111561181a5760405162461bcd60e51b815260206004820152601060248201527f466565206f7574206f662072616e6765000000000000000000000000000000006044820152606401610339565b600061271061182983856127b0565b611833919061278e565b9050801561187e576001600160a01b0384166118645760035461185f906001600160a01b031682611c60565b61187e565b60035461187e906001600160a01b03868116911683611cbb565b50505050565b60005b81811015611c5b57368383838181106118a2576118a2612946565b90506020028101906118b49190612651565b90506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166118f06040830160208401612025565b6001600160a01b0316141561196d5760405162461bcd60e51b815260206004820152602860248201527f5769646f3a20666f7262696464656e2063616c6c20746f205769646f546f6b6560448201527f6e4d616e616765720000000000000000000000000000000000000000000000006064820152608401610339565b6000808061197e6020850185612025565b6001600160a01b03161415611994575047611a95565b5060006119a46020840184612025565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b1580156119e557600080fd5b505afa1580156119f9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a1d919061231b565b915060008211611a6f5760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f7567682062616c616e636520666f72207468652073746570006044820152606401610339565b611a95611a7f6020850185612025565b611a8f6040860160208701612025565b84611d5a565b60606000611aa860808601868401612047565b60030b12611b4b576000611ac26080860160608701612047565b60030b9050611ad4604086018661260a565b611ae291839160009161274c565b60408051602081018890520160408051601f19818403018152918152611b0a9089018961260a565b611b15866020612776565b611b2092829061274c565b604051602001611b349594939291906123e2565b604051602081830303815290604052915050611b90565b611b58604085018561260a565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509293505050505b600080611ba36040870160208801612025565b6001600160a01b03168484604051611bbb9190612416565b60006040518083038185875af1925050503d8060008114611bf8576040519150601f19603f3d011682016040523d82523d6000602084013e611bfd565b606091505b509150915081611c4957604481511015611c1657600080fd5b60048101905080806020019051810190611c30919061206a565b60405162461bcd60e51b81526004016103399190612485565b50506001909401935061188792505050565b505050565b600080600080600085875af1905080611c5b5760405162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152606401610339565b60006040517fa9059cbb000000000000000000000000000000000000000000000000000000008152836004820152826024820152602060006044836000895af13d15601f3d116001600051141617169150508061187e5760405162461bcd60e51b815260206004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152606401610339565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0383811660248301528491839183169063dd62ed3e9060440160206040518083038186803b158015611dbe57600080fd5b505afa158015611dd2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df6919061231b565b101561187e5761187e6001600160a01b0382168460001960006040517f095ea7b3000000000000000000000000000000000000000000000000000000008152836004820152826024820152602060006044836000895af13d15601f3d116001600051141617169150508061187e5760405162461bcd60e51b815260206004820152600e60248201527f415050524f56455f4641494c45440000000000000000000000000000000000006044820152606401610339565b80356001600160a01b0381168114611ec357600080fd5b919050565b600082601f830112611ed957600080fd5b81356020611eee611ee9836126df565b6126ae565b80838252828201915082860187848660061b8901011115611f0e57600080fd5b60005b85811015611f3857611f238983611f91565b84529284019260409190910190600101611f11565b5090979650505050505050565b60008083601f840112611f5757600080fd5b50813567ffffffffffffffff811115611f6f57600080fd5b6020830191508360208260051b8501011115611f8a57600080fd5b9250929050565b600060408284031215611fa357600080fd5b6040516040810181811067ffffffffffffffff82111715611fc657611fc661295c565b604052905080611fd583611eac565b8152602083013560208201525092915050565b600060a08284031215611ffa57600080fd5b50919050565b803563ffffffff81168114611ec357600080fd5b803560ff81168114611ec357600080fd5b60006020828403121561203757600080fd5b61204082611eac565b9392505050565b60006020828403121561205957600080fd5b81358060030b811461204057600080fd5b60006020828403121561207c57600080fd5b815167ffffffffffffffff8082111561209457600080fd5b818401915084601f8301126120a857600080fd5b8151818111156120ba576120ba61295c565b6120cd6020601f19601f840116016126ae565b91508082528560208285010111156120e457600080fd5b6120f58160208401602086016128d3565b50949350505050565b60008060008060008060a0878903121561211757600080fd5b863567ffffffffffffffff8082111561212f57600080fd5b61213b8a838b01611fe8565b9750602089013591508082111561215157600080fd5b5061215e89828a01611f45565b9096509450612171905060408801611eac565b92506060870135915061218660808801611eac565b90509295509295509295565b6000806000806000608086880312156121aa57600080fd5b853567ffffffffffffffff808211156121c257600080fd5b6121ce89838a01611fe8565b965060208801359150808211156121e457600080fd5b506121f188828901611f45565b9095509350506040860135915061220a60608701611eac565b90509295509295909350565b60008060008060008060008060e0898b03121561223257600080fd5b883567ffffffffffffffff8082111561224a57600080fd5b6122568c838d01611fe8565b995060208b013591508082111561226c57600080fd5b506122798b828c01611f45565b909850965061228c905060408a01612014565b9450606089013593506080890135925060a089013591506122af60c08a01611eac565b90509295985092959890939650565b600080600080608085870312156122d457600080fd5b843567ffffffffffffffff8111156122eb57600080fd5b6122f787828801611fe8565b94505061230660208601612014565b93969395505050506040820135916060013590565b60006020828403121561232d57600080fd5b5051919050565b60006020828403121561234657600080fd5b61204082612000565b81835260208301925060008160005b8481101561238357612370868361238d565b604095860195919091019060010161235e565b5093949350505050565b6001600160a01b0361239e82611eac565b168252602090810135910152565b815160009082906020808601845b838110156123d6578151855293820193908201906001016123ba565b50929695505050505050565b8486823760008582016000815285516123ff818360208a016128d3565b018385823760009301928352509095945050505050565b600082516124288184602087016128d3565b9190910192915050565b6001600160a01b038416815260406020820152600061245560408301848661234f565b95945050505050565b82815260608101612040602083018480516001600160a01b03168252602090810151910152565b60208152600082518060208401526124a48160408501602087016128d3565b601f01601f19169190910160400192915050565b6060815260006124c88586612703565b60a060608501526124de6101008501828461234f565b9150506124ee6020870187612703565b8483037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa00160808601528083529091600091906020015b8183101561254a57612537818561238d565b6040938401936001939093019201612525565b61255660408a01611eac565b6001600160a01b03811660a0880152935061257360608a01612000565b63ffffffff811660c0880152935061258d60808a01612000565b63ffffffff1660e08701526001600160a01b038816602087015293506125b292505050565b826040830152949350505050565b6000808335601e198436030181126125d757600080fd5b83018035915067ffffffffffffffff8211156125f257600080fd5b6020019150600681901b3603821315611f8a57600080fd5b6000808335601e1984360301811261262157600080fd5b83018035915067ffffffffffffffff82111561263c57600080fd5b602001915036819003821315611f8a57600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261242857600080fd5b60405160a0810167ffffffffffffffff811182821017156126a8576126a861295c565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156126d7576126d761295c565b604052919050565b600067ffffffffffffffff8211156126f9576126f961295c565b5060051b60200190565b6000808335601e1984360301811261271a57600080fd5b830160208101925035905067ffffffffffffffff81111561273a57600080fd5b8060061b3603831315611f8a57600080fd5b6000808585111561275c57600080fd5b8386111561276957600080fd5b5050820193919092039150565b600082198211156127895761278961291a565b500190565b6000826127ab57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156127ca576127ca61291a565b500290565b600060a082360312156127e157600080fd5b6127e9612685565b823567ffffffffffffffff8082111561280157600080fd5b9084019036601f83011261281457600080fd5b81356020612824611ee9836126df565b8281528181019085830136600686901b88018501111561284357600080fd5b600096505b8487101561286f5761285a3682611f91565b83526001969096019591830191604001612848565b508652508681013593508284111561288657600080fd5b61289236858901611ec8565b81860152505050506128a660408401611eac565b60408201526128b760608401612000565b60608201526128c860808401612000565b608082015292915050565b60005b838110156128ee5781810151838201526020016128d6565b8381111561187e5750506000910152565b60006000198214156129135761291361291a565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea264697066735822122050ff5cabe47edd9569ce89e0ba0f68eff813e85d665e712a723440f1d6f5cc4564736f6c63430008070033608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61054f8061007e6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063715018a61461005157806377fc3fa81461005b5780638da5cb5b1461006e578063f2fde38b1461009a575b600080fd5b6100596100ad565b005b610059610069366004610404565b6100c1565b6000546040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100596100a83660046103e2565b61018f565b6100b5610231565b6100bf6000610298565b565b6100c9610231565b60005b8181101561018957368383838181106100e7576100e76104ea565b6040029190910191506000905061010160208301836103e2565b73ffffffffffffffffffffffffffffffffffffffff1614156101235750610177565b6101758561014660005473ffffffffffffffffffffffffffffffffffffffff1690565b6020840180359061015790866103e2565b73ffffffffffffffffffffffffffffffffffffffff1692919061030d565b505b806101818161048a565b9150506100cc565b50505050565b610197610231565b73ffffffffffffffffffffffffffffffffffffffff81166102255760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b61022e81610298565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146100bf5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161021c565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006040517f23b872dd0000000000000000000000000000000000000000000000000000000081528460048201528360248201528260448201526020600060648360008a5af13d15601f3d11600160005114161716915050806103b25760405162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c4544000000000000000000000000604482015260640161021c565b5050505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146103dd57600080fd5b919050565b6000602082840312156103f457600080fd5b6103fd826103b9565b9392505050565b60008060006040848603121561041957600080fd5b610422846103b9565b9250602084013567ffffffffffffffff8082111561043f57600080fd5b818601915086601f83011261045357600080fd5b81358181111561046257600080fd5b8760208260061b850101111561047757600080fd5b6020830194508093505050509250925092565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156104e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea26469706673582212204dd1f47161d778557eea8c911bac4fd310ad7cc96f57ff7b36fb2fe38010b82464736f6c63430008070033000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c70000000000000000000000005ef7f250f74d4f11a68054ae4e150705474a6d4a",
"nonce": 0,
"network": null
}
}
/portfolio
Get detailed information about the verified assets or tokens currently associated with a user's wallet address.
GET
https://api.expand.network/chain/portfolio
Query Parameters
Name | Type | Description |
---|---|---|
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 | Public addess of the user. |
tokens | String | Comma-separated value of ERC-20 tokens to get value of. Maximum 10 at a time. |
availableOnly | Boolean | By default, false. If true, tokens with balance > 0 will be listed. |
pageToken | String | Present at the end of a lengthy response to fetch the next page. |
assetType | String |
|
https://api.expand.network/chain/portfolio?chainId=43114&address=0x341dc441D0540166A26b98d1960DD2f997e378eA&availableOnly=true
{
"status": 200,
"msg": "success",
"data": {
"native": "183750000000000",
"evmTokens": [
{
"name": "Lava Degen ID",
"symbol": "SDD",
"decimals": "0",
"address": "0xb8ee8ce133100033b1bdd03cb4cc2bdebf781b6d",
"balance": "1",
"assetType": "ERC721",
"tokenId": "4227"
}
]
}
}
/getusertransactions
Get the historical transaction details for a specific user address.
GET
https://api.expand.network/chain/getusertransactions
Query Parameters
Name | Type | Description |
---|---|---|
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 | Comma-separated value of user addresses. |
endBlock | String | Last block of the range. |
startBlock | String | Starting block of the range. |
pageToken | String | The next page's token. Can be found at the end of the response. |
sortOrder | String | The transaction sorting order. asc or desc. |
https://api.expand.network/chain/getusertransactions?startBlock=37838200&endBlock=37838250&chainSymbol=c-avax&address=0xBEBA4cE6DfC24820a994eCE4e25f023976Dcd979
{
"status": 200,
"msg": "success",
"data": {
"transactions": [
{
"nativeTransaction": {
"blockNumber": "37838218",
"blockIndex": 1,
"blockHash": "0xa90a9fae3b80de5ada2baa9313d5f22a36f9bcac4ab85e926d5af53f0017bea9",
"txHash": "0x54852168aec81e25228077a05ccb2717a102df5ddac44a9148323bd557a5a92e",
"txStatus": "1",
"txType": 2,
"gasLimit": "300000",
"gasUsed": "133593",
"gasPrice": "81000000000",
"nonce": "4249",
"blockTimestamp": 1700136217,
"from": {
"address": "0xBEBA4cE6DfC24820a994eCE4e25f023976Dcd979"
},
"to": {
"address": "0x60aE616a2155Ee3d9A68541Ba4544862310933d4"
},
"method": {
"callType": "CONTRACT_CALL",
"methodHash": "0x8a657e67",
"methodName": "swapAVAXForExactTokens(uint256,address[],address,uint256)"
},
"value": "1640955933498300000"
},
"erc20Transfers": [
{
"from": {
"address": "0xCDFD91eEa657cc2701117fe9711C9a4F61FEED23"
},
"to": {
"address": "0xBEBA4cE6DfC24820a994eCE4e25f023976Dcd979"
},
"logIndex": 6,
"value": "1623065279150000000000",
"erc20Token": {
"ercType": "ERC-20",
"address": "0x22d4002028f537599bE9f666d1c4Fa138522f9c8",
"name": "Platypus",
"symbol": "PTP",
"decimals": 18,
"logoUri": "https://images.ctfassets.net/gcj8jwzm6086/06600fa5-b70b-48c7-a3bb-437d70952216/fa231762bdbc2c0b391f885d89e32d02/43114-0x22d4002028f537599bE9f666d1c4Fa138522f9c8.png",
"price": {
"value": 0.014573,
"currencyCode": "usd"
}
}
}
],
"internalTransactions": [
{
"from": {
"address": "0x60aE616a2155Ee3d9A68541Ba4544862310933d4"
},
"to": {
"address": "0xBEBA4cE6DfC24820a994eCE4e25f023976Dcd979"
},
"internalTxType": "CALL",
"value": "102213470370951213",
"isReverted": false,
"gasUsed": "0",
"gasLimit": "164253"
}
]
}
]
}
}
/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 | 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. |
{
"chainId" : "43114",
"rawTransaction": "0xf86f048433918fbe830493e0949b79d6dfe4650d70f35dbb80f7d1ec0cf7f823fd87038d7ea4c6800084022794382da0c9bd6b5c7e18a258b04039d524a3e1382ec0f522d160dc027428933f520b6868a07332736f1df297842299230820626f1fc5b8d4cdd602ade55e3ba02c63e756ce"
}
{
"status": 200,
"msg": "success",
"data": {
"chainId" : "43114",
"transactionHash": "0x8375c5eedd17609292cecc051c18e180fa970b32a77011c48d3725e45e46e7b3"
}
}
/decodetransaction
Get the decoded transaction for the provided raw transaction.
POST
https://api.expand.network/chain/decodetransaction
Request Body
Name | Type | Description |
---|---|---|
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. |
{
"chainId": "43114",
"rawTransaction": "0xf86c808505d21dba00830a3d8794f73ee0e06a1b8ec3a7ff860d766e75f3eea7b985843b9aca0080830150f7a084e67381cbe0ef549cba454b7b252b324cc5d7a05be4e67a8f8242e71ec0bc39a07cd18e29ccc04a5cc34c886a8df02400c5432341a99559fcaed8bad622450b70"
}
{
"status": 200,
"msg": "success",
"data": {
"parsedTx": {
"nonce": 0,
"gasPrice": {
"type": "BigNumber",
"hex": "0x05d21dba00"
},
"gasLimit": {
"type": "BigNumber",
"hex": "0x0a3d87"
},
"to": "0xF73eE0e06a1B8Ec3A7Ff860D766E75f3EEA7b985",
"value": {
"type": "BigNumber",
"hex": "0x3b9aca00"
},
"data": "0x",
"chainId": 43114,
"v": 86263,
"r": "0x84e67381cbe0ef549cba454b7b252b324cc5d7a05be4e67a8f8242e71ec0bc39",
"s": "0x7cd18e29ccc04a5cc34c886a8df02400c5432341a99559fcaed8bad622450b70",
"from": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
"hash": "0x9a0f46a0d7adbfc10fa6eb0bf6b625472f59d02ebc1288f64f50ec4bb005c1ba",
"type": null
},
"assetChanges": {
"from": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
"to": "0xF73eE0e06a1B8Ec3A7Ff860D766E75f3EEA7b985",
"value": {
"type": "BigNumber",
"hex": "0x3b9aca00"
}
}
}
}
Last updated