post http://zetachain-athens-3.unifra.io/v1/
Returns code at a given address.
This method can be used to distinguish between contract addresses and wallet addresses.
Parameters
- DATA, 20 Bytes - address
- QUANTITY|TAG - Integer block number, or the string "latest", "earliest" or "pending", see the default block parameter.
params: ["0x678Aa4bF4E210cf2166753e054d5b7c31cc7fa86", "latest"];
Returns
- DATA - The code from the given address.
Example
Request
curl --location 'http://zetachain-athens-3.unifra.io/v1/{your-api-key}' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": [
"0x44D1F1f9289DBA1Cf5824bd667184cEBE020aA1c",
"latest"
],
"id": 0
}'
Result
{
"jsonrpc": "2.0",
"id": 0,
"result": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063bb88b7691461003b578063de43156e14610059575b600080fd5b610043610075565b6040516100509190611257565b60405180910390f35b610073600480360381019061006e9190610f07565b610099565b005b7f000000000000000000000000edf1c3275d13489acdc6cd6ed246e72458b8795b81565b7f000000000000000000000000edf1c3275d13489acdc6cd6ed246e72458b8795b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610127576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011e90611272565b60405180910390fd5b6000806000848481019061013b9190610dfe565b92509250925060006103297f000000000000000000000000edf1c3275d13489acdc6cd6ed246e72458b8795b73ffffffffffffffffffffffffffffffffffffffff1663569541b96040518163ffffffff1660e01b815260040160206040518083038186803b1580156101ac57600080fd5b505afa1580156101c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e49190610dd1565b7f000000000000000000000000edf1c3275d13489acdc6cd6ed246e72458b8795b73ffffffffffffffffffffffffffffffffffffffff1663d936a0126040518163ffffffff1660e01b815260040160206040518083038186803b15801561024a57600080fd5b505afa15801561025e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102829190610dd1565b7f000000000000000000000000edf1c3275d13489acdc6cd6ed246e72458b8795b73ffffffffffffffffffffffffffffffffffffffff1663842da36d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102e857600080fd5b505afa1580156102fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103209190610dd1565b8b8b8988610341565b90506103368482856106f4565b505050505050505050565b60008061034f888786610963565b90506060811561044857600267ffffffffffffffff811115610374576103736115c2565b5b6040519080825280602002602001820160405280156103a25781602001602082028036833780820191505090505b50905086816000815181106103ba576103b9611593565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050848160018151811061040957610408611593565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610582565b600367ffffffffffffffff811115610463576104626115c2565b5b6040519080825280602002602001820160405280156104915781602001602082028036833780820191505090505b50905086816000815181106104a9576104a8611593565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505089816001815181106104f8576104f7611593565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050848160028151811061054757610546611593565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250505b8673ffffffffffffffffffffffffffffffffffffffff1663095ea7b389886040518363ffffffff1660e01b81526004016105bd9291906111fe565b602060405180830381600087803b1580156105d757600080fd5b505af11580156105eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060f9190610eda565b5060008873ffffffffffffffffffffffffffffffffffffffff166338ed17398887853060c861ffff164261064391906113ae565b6040518663ffffffff1660e01b8152600401610663959493929190611292565b600060405180830381600087803b15801561067d57600080fd5b505af1158015610691573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906106ba9190610e91565b905080600183516106cb9190611404565b815181106106dc576106db611593565b5b60200260200101519350505050979650505050505050565b6000808473ffffffffffffffffffffffffffffffffffffffff1663d9eeebed6040518163ffffffff1660e01b8152600401604080518083038186803b15801561073c57600080fd5b505afa158015610750573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107749190610e51565b915091508473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146107dd576040517fcaaa35e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838110610816576040517fd0c279a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff1663095ea7b386836040518363ffffffff1660e01b81526004016108519291906111fe565b602060405180830381600087803b15801561086b57600080fd5b505af115801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a39190610eda565b508473ffffffffffffffffffffffffffffffffffffffff1663c7012626846040516020016108d19190611186565b60405160208183030381529060405283876108ec9190611404565b6040518363ffffffff1660e01b8152600401610909929190611227565b602060405180830381600087803b15801561092357600080fd5b505af1158015610937573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095b9190610eda565b505050505050565b600080610971858585610a9d565b905060008473ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b81526004016109ae91906111e3565b60206040518083038186803b1580156109c657600080fd5b505afa1580156109da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fe9190610fab565b118015610a93575060008373ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401610a4191906111e3565b60206040518083038186803b158015610a5957600080fd5b505afa158015610a6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a919190610fab565b115b9150509392505050565b6000806000610aac8585610b0f565b91509150858282604051602001610ac492919061115a565b60405160208183030381529060405280519060200120604051602001610aeb9291906111a1565b6040516020818303038152906040528051906020012060001c925050509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610b78576040517fcb1e7cfe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1610610bb2578284610bb5565b83835b8092508193505050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c24576040517f78b507da00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9250929050565b6000610c3e610c3984611311565b6112ec565b90508083825260208201905082856020860282011115610c6157610c60611600565b5b60005b85811015610c915781610c778882610dbc565b845260208401935060208301925050600181019050610c64565b5050509392505050565b600081359050610caa816116ce565b92915050565b600081519050610cbf816116ce565b92915050565b600081359050610cd4816116e5565b92915050565b600082601f830112610cef57610cee6115f6565b5b8151610cff848260208601610c2b565b91505092915050565b600081519050610d17816116fc565b92915050565b600081359050610d2c81611713565b92915050565b60008083601f840112610d4857610d476115f6565b5b8235905067ffffffffffffffff811115610d6557610d646115f1565b5b602083019150836001820283011115610d8157610d80611600565b5b9250929050565b600060608284031215610d9e57610d9d6115fb565b5b81905092915050565b600081359050610db68161172a565b92915050565b600081519050610dcb8161172a565b92915050565b600060208284031215610de757610de661160a565b5b6000610df584828501610cb0565b91505092915050565b600080600060608486031215610e1757610e1661160a565b5b6000610e2586828701610cc5565b9350506020610e3686828701610d1d565b9250506040610e4786828701610da7565b9150509250925092565b60008060408385031215610e6857610e6761160a565b5b6000610e7685828601610cb0565b9250506020610e8785828601610dbc565b9150509250929050565b600060208284031215610ea757610ea661160a565b5b600082015167ffffffffffffffff811115610ec557610ec4611605565b5b610ed184828501610cda565b91505092915050565b600060208284031215610ef057610eef61160a565b5b6000610efe84828501610d08565b91505092915050565b600080600080600060808688031215610f2357610f2261160a565b5b600086013567ffffffffffffffff811115610f4157610f40611605565b5b610f4d88828901610d88565b9550506020610f5e88828901610c9b565b9450506040610f6f88828901610da7565b935050606086013567ffffffffffffffff811115610f9057610f8f611605565b5b610f9c88828901610d32565b92509250509295509295909350565b600060208284031215610fc157610fc061160a565b5b6000610fcf84828501610dbc565b91505092915050565b6000610fe48383610ff0565b60208301905092915050565b610ff981611438565b82525050565b61100881611438565b82525050565b61101f61101a82611438565b611536565b82525050565b60006110308261134d565b61103a8185611370565b93506110458361133d565b8060005b8381101561107657815161105d8882610fd8565b975061106883611363565b925050600181019050611049565b5085935050505092915050565b61109461108f82611468565b611548565b82525050565b60006110a582611358565b6110af8185611381565b93506110bf8185602086016114d2565b6110c88161160f565b840191505092915050565b6110dc8161149c565b82525050565b60006110ef602b83611392565b91506110fa8261162d565b604082019050919050565b60006111126020836113a3565b915061111d8261167c565b602082019050919050565b60006111356001836113a3565b9150611140826116a5565b600182019050919050565b61115481611492565b82525050565b6000611166828561100e565b601482019150611176828461100e565b6014820191508190509392505050565b60006111928284611083565b60208201915081905092915050565b60006111ac82611128565b91506111b8828561100e565b6014820191506111c88284611083565b6020820191506111d782611105565b91508190509392505050565b60006020820190506111f86000830184610fff565b92915050565b60006040820190506112136000830185610fff565b611220602083018461114b565b9392505050565b60006040820190508181036000830152611241818561109a565b9050611250602083018461114b565b9392505050565b600060208201905061126c60008301846110d3565b92915050565b6000602082019050818103600083015261128b816110e2565b9050919050565b600060a0820190506112a7600083018861114b565b6112b4602083018761114b565b81810360408301526112c68186611025565b90506112d56060830185610fff565b6112e2608083018461114b565b9695505050505050565b60006112f6611307565b90506113028282611505565b919050565b6000604051905090565b600067ffffffffffffffff82111561132c5761132b6115c2565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b60006113b982611492565b91506113c483611492565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156113f9576113f8611564565b5b828201905092915050565b600061140f82611492565b915061141a83611492565b92508282101561142d5761142c611564565b5b828203905092915050565b600061144382611472565b9050919050565b600061145582611472565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006114a7826114ae565b9050919050565b60006114b9826114c0565b9050919050565b60006114cb82611472565b9050919050565b60005b838110156114f05780820151818401526020810190506114d5565b838111156114ff576000848401525b50505050565b61150e8261160f565b810181811067ffffffffffffffff8211171561152d5761152c6115c2565b5b80604052505050565b600061154182611552565b9050919050565b6000819050919050565b600061155d82611620565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f4f6e6c792073797374656d20636f6e74726163742063616e2063616c6c20746860008201527f69732066756e6374696f6e000000000000000000000000000000000000000000602082015250565b7f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f600082015250565b7fff00000000000000000000000000000000000000000000000000000000000000600082015250565b6116d781611438565b81146116e257600080fd5b50565b6116ee8161144a565b81146116f957600080fd5b50565b6117058161145c565b811461171057600080fd5b50565b61171c81611468565b811461172757600080fd5b50565b61173381611492565b811461173e57600080fd5b5056fea2646970667358221220d0c5ebc4cc007da2f2f0f419b122509471451a62d4146845a0a0435a9c041b0564736f6c63430008070033"
}