# Authentication Source: https://docs.autheo.com/apis/json-rpc/authentication How to authenticate requests to the Autheo Chain JSON-RPC API. ## Public endpoints The public Autheo Testnet JSON-RPC endpoints do not require authentication: ```bash theme={null} curl -X POST https://rpc1.autheo.com \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' ``` No API key or authorization header is required for public testnet access. ## Rate limits Public endpoints enforce per-IP rate limits to ensure fair access. If you encounter `429 Too Many Requests` responses, see the [Rate limits](/apis/json-rpc/rate-limits) page for strategies to stay within limits. ## Managed node access For production applications that require guaranteed uptime, dedicated rate limits, or private node access, connect through an approved managed provider (InfStones, Zeeve). These providers offer authenticated endpoints with SLA guarantees. When connecting to a managed node, the provider will supply you with an authenticated endpoint URL in the format: ``` https://./api/v1/ ``` Use this URL as the `--node` flag value in CLI commands or as the `JsonRpcProvider` URL in ethers.js. ## ethers.js example ```javascript theme={null} import { ethers } from "ethers"; // Public endpoint (no auth) const provider = new ethers.JsonRpcProvider("https://rpc1.autheo.com"); // Managed endpoint (if applicable) const managedProvider = new ethers.JsonRpcProvider( "https://" ); ``` ## Security recommendations * Never expose RPC endpoints directly in client-side JavaScript for production applications * Route RPC calls through your own backend to hide provider URLs * Use HTTPS endpoints only — never plain HTTP in production # JSON-RPC error codes Source: https://docs.autheo.com/apis/json-rpc/errors Standard and Autheo-specific JSON-RPC error codes and how to handle them. JSON-RPC errors are returned as objects with a `code` and `message` field inside the `error` key of the response. ```json theme={null} { "jsonrpc": "2.0", "id": 1, "error": { "code": -32601, "message": "Method not found" } } ``` ## Standard JSON-RPC error codes | Code | Name | Description | | -------------------- | ---------------- | ------------------------------------------- | | `-32700` | Parse error | Invalid JSON was received | | `-32600` | Invalid request | The JSON is not a valid request object | | `-32601` | Method not found | The method does not exist or is unsupported | | `-32602` | Invalid params | Invalid method parameters | | `-32603` | Internal error | Internal JSON-RPC server error | | `-32000` to `-32099` | Server error | Implementation-defined server errors | ## Ethereum execution errors | Code | Message | Description | | -------- | -------------------------------------------- | -------------------------------------------------------------------------- | | `-32000` | `execution reverted` | Contract execution reverted — check the `data` field for the revert reason | | `-32000` | `insufficient funds for gas * price + value` | Sender balance too low | | `-32000` | `nonce too low` | Transaction nonce is lower than the account's current nonce | | `-32000` | `nonce too high` | Transaction nonce is too far ahead of the current nonce | | `-32000` | `gas limit reached` | Block gas limit exceeded | | `-32000` | `already known` | Transaction already in mempool | ## Decoding revert reasons When a transaction reverts, the `data` field may contain an ABI-encoded revert reason: ```javascript theme={null} import { ethers } from "ethers"; try { await contract.myFunction(args); } catch (err) { if (err.data) { // Try to decode as a standard Error(string) revert try { const decoded = ethers.toUtf8String("0x" + err.data.slice(138)); console.error("Revert reason:", decoded); } catch { console.error("Raw revert data:", err.data); } } } ``` ## Common causes and fixes | Error | Likely cause | Fix | | --------------------------- | -------------------------------------------- | --------------------------------------------------- | | `-32601 Method not found` | Method not supported by this node | Check [supported methods](/apis/json-rpc/overview) | | `-32000 execution reverted` | Contract `require()` or `revert()` triggered | Simulate with `eth_call` first to get revert reason | | `-32000 insufficient funds` | Low balance | Fund the sender account | | `-32000 nonce too low` | Stale nonce in client | Refresh nonce with `eth_getTransactionCount` | # ETH Source: https://docs.autheo.com/apis/json-rpc/methods/eth/eth ## `eth_syncing` Returns an object with data about the sync status or false. **Parameters** None **Returns** The precise return data varies between client implementations. All clients return False when the node is not syncing, and all clients return the following fields: * `Object`: \[Boolean], An object with sync status data or FALSE, when not syncing. * `startingBlock`: QUANTITY - The block at which the import started (will only be reset, after the sync reached his head) * `currentBlock`: QUANTITY - The current block, same as eth\_blockNumber * `highestBlock`: QUANTITY - The estimated highest block **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' // Result {"jsonrpc":"2.0","id":1,"result":false} ``` ## `eth_chainId` Returns the chain ID used for signing replay-protected transactions. **Parameters** None **Returns** `chainId`: hexadecimal value as a string representing the integer of the current chain ID. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":67}' // Result {"jsonrpc":"2.0","id":67,"result":"0x311"} ``` ## `eth_accounts` Returns a list of addresses owned by client. **Parameters** None **Returns** `DATA`, 20 Bytes - \[Array] of addresses owned by the client. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' // Result {"jsonrpc":"2.0","id":1,"result":[]} ``` ## `eth_getBalance` Returns the balance of the account of given address. **Parameters** * `DATA`, 20 Bytes - address to check for balance. * `QUANTITY|TAG` - integer block number, or the string "latest", "earliest", "pending", "safe", or "finalized", see the default block parameter * `params`: `["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest"]` **Returns** `QUANTITY` - integer of the current balance in wei. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xeeCC2FA50180e7c929C814a8bD65e45f81994327", "latest"],"id":1}' // Response {"jsonrpc":"2.0","id":1,"result":"0xc75d5bd30345f400"} ``` ## `eth_getStorageAt` Returns the value from a storage position at a given address. **Parameters** * `DATA`, 20 Bytes - address of the storage. * `QUANTITY` - integer of the position in the storage. * `QUANTITY|TAG` - integer block number, or the string "latest", "earliest", "pending", "safe", "finalized", see the default block parameter **Returns** `DATA` - the value at this storage position. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method": "eth_getStorageAt", "params": ["0x295a70b2de5e39532 354a6a8344e616ed314d7251", "0x0", "latest"], "id": 1}' // Response {"jsonrpc":"2.0","id":1,"result":"0x0000000000000000000000000000000000000000000000000000000000000000"} ``` ## `eth_getCode` Returns code at a given address. **Parameters** * `DATA`, 20 Bytes - address * `QUANTITY|TAG` - integer block number, or the string "latest", "earliest", "pending", "safe" or "finalized", see the default block parameter * `params`: `["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "0x5daf3b", // 6139707]` **Returns** `DATA` - the code from the given address. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getCode","params":["0x412d0675cae6C384629Ad47EA74eA4747375B09b", "0xa8bdd"],"id":1}' // Response Either the returns the representation of the smart contract or if no smart contract found: {"jsonrpc": "2.0", "id": 1, "result": "0x"} ``` ## `eth_sign` The sign method calculates an Ethereum specific signature with: `sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`. By adding a prefix to the message it makes the calculated signature recognizable as an Ethereum specific signature. This prevents misuse where a malicious dApp can sign arbitrary data (e.g. transactions) and use the signature to impersonate the victim. Note: the address to sign with must be unlocked. **Parameters** * `DATA`, 20 Bytes - address * `DATA`, N Bytes - message to sign **Returns** `DATA`: Signature **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_sign","params":["0x9b2055d370f73ec7d8a03e965129118dc8f5bf83", "0xdeadbeaf"],"id":1}' // Result {"id":1, "jsonrpc": "2.0", "result": "0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b"} ``` ## `eth_call` Executes a new message call immediately without creating a transaction on the blockchain. Often used for executing read-only smart contract functions, for example the balanceOf for an ERC-20 contract. **Parameters** * `Object` - The transaction call object * `from`: `DATA`, 20 Bytes - (optional) The address the transaction is sent from. * `to`: `DATA`, 20 Bytes - The address the transaction is directed to. * `gas`: `QUANTITY` - (optional) Integer of the gas provided for the transaction execution. eth\_call consumes zero gas, but this parameter may be needed by some executions. * `gasPrice`: `QUANTITY` - (optional) Integer of the gasPrice used for each paid gas * `value`: `QUANTITY` - (optional) Integer of the value sent with this transaction * `input`: `DATA` - (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI in the Solidity documentation. * `QUANTITY|TAG` - integer block number, or the string "latest", "earliest", "pending", "safe" or "finalized", see the default block parameter **Returns** `DATA` - the return value of executed contract. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_call", "params": [{"to": "0x89A7EF2F08B1c018D5Cc88836249b84Dd5392905", "data": "0x18160ddd"}, "latest"], "id": 1}' // Result { "id":1, "jsonrpc": "2.0", "result": "0x" } ``` # Block methods Source: https://docs.autheo.com/apis/json-rpc/methods/eth/eth_block_methods ## `eth_blockNumber` Returns the number of most recent block. **Parameters** None **Returns** `QUANTITY` - integer of the current block number the client is on. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":83}' // Result {"jsonrpc":"2.0","id":83,"result":"0xa638a"} ``` ## `eth_getBlockTransactionCountByHash` Returns the number of transactions in a block from a block matching the given block hash. **Parameters** * `DATA`, 32 Bytes - hash of a block * `params`: `["0xd03ededb7415d22ae8bac30f96b2d1de83119632693b963642318d87d1bece5b"]` **Returns** `QUANTITY` - integer of the number of transactions in this block. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0x613aca96ec73b0c4395130088dd21c3813d923c7fe6a4650ae3ef30dbcd350e4"],"id":1}' // Response {"jsonrpc":"2.0","id":1,"result":"0x1"} ``` ## `eth_getBlockTransactionCountByNumber` Returns the number of transactions in a block matching the given block number. **Parameters** * `QUANTITY|TAG` - integer of a block number, or the string "earliest", "latest", "pending", "safe" or "finalized", as in the default block parameter. * `params`: `["0x13738ca", // 20396234]` **Returns** `QUANTITY` - integer of the number of transactions in this block. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params":["0xa8f35"],"id":1}' // Response {"jsonrpc":"2.0","id":1,"result":"0x1"} ``` ## `eth_getBlockByHash` Returns information about a block by hash. **Parameters** * `DATA`, 32 Bytes - Hash of a block. * \[Boolean] - If true it returns the full transaction objects, if false only the hashes of the transactions. * params: `["0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae", false,]` **Returns** * `Object` - A block object, or null when no block was found: * `number`: `QUANTITY` - the block number. null when its pending block. * `hash`: `DATA`, 32 Bytes - hash of the block. null when its pending block. * `parentHash`: `DATA`, 32 Bytes - hash of the parent block. * `nonce`: `DATA`, 8 Bytes - hash of the generated proof-of-work. null when its pending block. * `sha3Uncles`: `DATA`, 32 Bytes - SHA3 of the uncles data in the block. * `logsBloom`: `DATA`, 256 Bytes - the bloom filter for the logs of the block. null when its pending block. * `transactionsRoot`: `DATA`, 32 Bytes - the root of the transaction trie of the block. * `stateRoot`: `DATA`, 32 Bytes - the root of the final state trie of the block. * `receiptsRoot`: `DATA`, 32 Bytes - the root of the receipts trie of the block. * `miner`: `DATA`, 20 Bytes - the address of the beneficiary to whom the mining rewards were given. * `difficulty`: `QUANTITY` - integer of the difficulty for this block. * `totalDifficulty`: `QUANTITY` - integer of the total difficulty of the chain until this block. * `extraData`: `DATA` - the "extra data" field of this block. * `size`: `QUANTITY` - integer the size of this block in bytes. * `gasLimit`: `QUANTITY` - the maximum gas allowed in this block. * `gasUsed`: `QUANTITY` - the total used gas by all transactions in this block. * `timestamp`: `QUANTITY` - the unix timestamp for when the block was collated. * `transactions`: \[Array] - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter. * `uncles`: \[Array] - Array of uncle hashes. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", false],"id":1}' // Response {"jsonrpc":"2.0","id":1,"result": {"baseFeePerGas":"0x7","difficulty":"0x0","extraData":"0x","gasLimit":"0x1c9c380","gasUsed":"0x0","hash":"0x03daacfe2396e87aeda0bc854f2917fc59b79a88274a6dfee625f8fef0667703","logsBloom":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x1b4","parentHash":"0x88f44eeffcf00a761fdfd739428d925be152eb7c13799985c1d81a7f68f508a5","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x38d","stateRoot":"0x3466bd727e1986f9a612df6b891b26bf9bc6087e49cc8733f0648bb629b0a3c","timestamp":"0x679cebb2","totalDifficulty":"0x0","transactions":[],"transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","uncles":[]}} ``` ## `eth_getBlockByNumber` Returns information about a block by block number. **Parameters** * `QUANTITY|TAG` - integer of a block number, or the string "earliest", "latest", "pending", "safe" or "finalized", as in the default block parameter. * \[Boolean] - If true it returns the full transaction objects, if false only the hashes of the transactions. * `params`: `["0x1b4", // 436 true,]` **Returns** See `eth_getBlockByHash`. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x1b4", true],"id":1}' // Response {"jsonrpc":"2.0","id":1,"result": {"baseFeePerGas":"0x7","difficulty":"0x0","extraData":"0x","gasLimit":"0x1c9c380","gasUsed":"0x0","hash":"0x03daacfe2396e87aeda0bc854f2917fc59b79a88274a6dfee625f8fef0667703","logsBloom":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","miner":"0x0000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","number":"0x1b4","parentHash":"0x88f44eeffcf00a761fdfd739428d925be152eb7c13799985c1d81a7f68f508a5","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","size":"0x38d","stateRoot":"0x3466bd727e1986f9a612df6b891b26bf9bc6087e49cc8733f0648bb629b0a3c","timestamp":"0x679cebb2","totalDifficulty":"0x0","transactions":[],"transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","uncles":[]}} ``` # Filter methods Source: https://docs.autheo.com/apis/json-rpc/methods/eth/eth_filter_methods ## `eth_newFilter` Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call eth\_getFilterChanges. A note on specifying topic filters: Topics are order-dependent. A transaction with a log with topics \[A, B] will be matched by the following topic filters: * `[]` "anything" * `[A]` "A in first position (and anything after)" * `[null, B]` "anything in first position AND B in second position (and anything after)" * `[A, B]` "A in first position AND B in second position (and anything after)" * `[[A, B], [A, B]]` "(A OR B) in first position AND (A OR B) in second position (and anything after)" **Parameters** `Object` - The filter options: * `fromBlock`: `QUANTITY|TAG` - (optional, default: "latest") Integer block number, or "latest" for the last proposed block, "safe" for the latest safe block, "finalized" for the latest finalized block, or "pending", "earliest" for transactions not yet in a block. * `toBlock`: `QUANTITY|TAG` - (optional, default: "latest") Integer block number, or "latest" for the last proposed block, "safe" for the latest safe block, "finalized" for the latest finalized block, or "pending", "earliest" for transactions not yet in a block. * `address`: `DATA`|Array, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate. * `topics`: \[Array] of DATA, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. * `params`: ``` [ { fromBlock: "0x1", toBlock: "0x2", address: "0x8888f1f195afa192cfee860698584c030f4c9db1", topics: [ "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", null, [ "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x0000000000000000000000000aff3454fce5edbc8cca8697c15331677e6ebccc", ], ], }, ] ``` **Returns** `QUANTITY` - A filter id. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"topics":["0xe83e89c6fac48fc02fea39ded109236ef1b5991dd6924248a5e05bce6ee3f756"]}],"id":73}' // Response {"jsonrpc":"2.0","id":73,"result":"0xcbf874231dca43f89bced1ab2d7e326e"} ``` ## `eth_newBlockFilter` Creates a filter in the node, to notify when a new block arrives. To check if the state has changed, call `eth_getFilterChanges`. **Parameters** None **Returns** `QUANTITY` - A filter id. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_newBlockFilter","params":[],"id":73}' // Response {"jsonrpc":"2.0","id":73,"result":"0x9d88bf098c4a6346e868966502e7e110"} ``` ## `eth_newPendingTransactionFilter` Creates a filter in the node, to notify when new pending transactions arrive. To check if the state has changed, call `eth_getFilterChanges`. **Parameters** None **Returns** `QUANTITY` - A filter id. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_newPendingTransactionFilter","params":[],"id":73}' // Response {"jsonrpc":"2.0","id":73,"result":"0xe623e6bc2cd77083bdf2b45f95500f31"} ``` ## `eth_uninstallFilter` Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additionally Filters timeout when they aren't requested with eth\_getFilterChanges for a period of time. **Parameters** \*`QUANTITY` - The filter id. * `params`: `["0xb", // 11]` **Returns** \[Boolean] - true if the filter was successfully uninstalled, otherwise false. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_uninstallFilter","params":["0xb"],"id":73}' // Response {"jsonrpc":"2.0","id":73,"result":false} ``` ## `eth_getFilterChanges` Polling method for a filter, which returns an array of logs which occurred since last poll. **Parameters** * `QUANTITY` - the filter id. * `params`: `["0x16", // 22]` **Returns** \[Array] - Array of log objects, or an empty array if nothing has changed since last poll. * For filters created with `eth_newBlockFilter` the return are block hashes (DATA, 32 Bytes), e.g. \["0x3454645634534..."]. * For filters created with `eth_newPendingTransactionFilter` the return are transaction hashes (DATA, 32 Bytes), e.g. \["0x6345343454645..."]. * For filters created with `eth_newFilter` logs are objects with following params: * `removed`: `TAG` - true when the log was removed, due to a chain reorganization. false if its a valid log. * `logIndex`: `QUANTITY` - integer of the log index position in the block. null when its pending log. * `transactionIndex`: `QUANTITY` - integer of the transactions index position log was created from. null when its pending log. * `transactionHash`: `DATA`, 32 Bytes - hash of the transactions this log was created from. null when its pending log. * `blockHash`: `DATA`, 32 Bytes - hash of the block where this log was in. null when its pending. null when its pending log. * `blockNumber`: `QUANTITY` - the block number where this log was in. null when its pending. null when its pending log. * `address`: `DATA`, 20 Bytes - address from which this log originated. * `data`: `DATA` - contains zero or more 32 Bytes non-indexed arguments of the log. * `topics`: \[Array] of `DATA` - Array of 0 to 4 32 Bytes DATA of indexed log arguments. (In solidity: The first topic is the hash of the signature of the event (e.g. Deposit(address,bytes32,uint256)), except you declared the event with the anonymous specifier.) **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_getFilterChanges", "params": ["0x44ff3a54d0a2c4c06c4684d596b285e7"], "id": 2}' // Response {"jsonrpc":"2.0","id":2,"result":["0x4b6e9ec012547409ef92cac06dcdb8b1411f6da3b20562b1826b3d2536c4670b","0xb261150727058ac5cc5e2533c89b0365a39f953b409259e74744e36abe4b48a9","0xe98c58235984f9d783d9388138f2ebea823ffa5b6a936305a7fe880f15b7e264","0x1fc59fd431bbfabfd245158911fcf0ec58a5b0093794d0c11bd940b849600267","0xdc2c9af8dbd23c5a574cb529267b2d1a69c6368ed82f12aba3a1968bb23fed20","0x268125f8c23d29ae80f7aa1d7d6903f54fd555931902159290b06e8f667aadb","0x7201af68b4c027a355679a66e340c0e7b53e6e60be08f18f14054ad577cd80ee"]} ``` ## `eth_getFilterLogs` Returns an array of all logs matching filter with given id. **Parameters** * `QUANTITY` - The filter id. * `params`: `["0x16", // 22]` **Returns** See `eth_getFilterChanges`. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_getFilterLogs", "params": ["0x44ff3a54d0a2c4c06c4684d596b285e7"], "id": 2}' ``` **Result** See `eth_getFilterChanges`. ## `eth_getLogs` Returns an array of all logs matching a given filter object. **Parameters** Object - The filter options: * `fromBlock`: `QUANTITY|TAG` - (optional, default: "latest") Integer block number, or "latest" for the last proposed block, "safe" for the latest safe block, "finalized" for the latest finalized block, or "pending", "earliest" for transactions not yet in a block. * `toBlock`: `QUANTITY|TAG` - (optional, default: "latest") Integer block number, or "latest" for the last proposed block, "safe" for the latest safe block, "finalized" for the latest finalized block, or "pending", "earliest" for transactions not yet in a block. * `address`: `DATA`|Array, 20 Bytes - (optional) Contract address or a list of addresses from which logs should originate. * `topics`: Array of `DATA`, - (optional) Array of 32 Bytes DATA topics. Topics are order-dependent. Each topic can also be an array of DATA with "or" options. * `blockhash`: `DATA`, 32 Bytes - (optional, future) With the addition of EIP-234, blockHash will be a new filter option which restricts the logs returned to the single block with the 32-byte hash blockHash. Using blockHash is equivalent to fromBlock = toBlock = the block number with hash blockHash. If blockHash is present in the filter criteria, then neither fromBlock nor toBlock are allowed. * `params`: ``` [ { topics: [ "0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b", ], }, ] ``` **Returns** See `eth_getFilterChanges`. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": ["0x44ff3a54d0a2c4c06c4684d596b285e7"], "id": 2}' ``` **Result** See `eth_getFilterChanges`. # Gas methods Source: https://docs.autheo.com/apis/json-rpc/methods/eth/eth_gas_methods ## `eth_gasPrice` Returns an estimate of the current price per gas in wei. **Parameters** None **Returns** `QUANTITY` - integer of the current gas price in wei. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":73}' // Result {"jsonrpc":"2.0","id":73,"result":"0x7"} ``` ## `eth_estimateGas` Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance. **Parameters** See `eth_call` parameters, except that all properties are optional. If no gas limit is specified geth uses the block gas limit from the pending block as an upper bound. As a result the returned estimate might not be enough to executed the call/transaction when the amount of gas is higher than the pending block gas limit. **Returns** `QUANTITY` - the amount of gas used. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"to": "0x89A7EF2F08B1c018D5Cc88836249b84Dd5392905", "data": "0x18160ddd"}, "latest"], "id": 1}' // Result {"jsonrpc":"2.0","id":1,"result":"0x5248"} ``` # Transaction methods Source: https://docs.autheo.com/apis/json-rpc/methods/eth/eth_transaction_methods ## `eth_getTransactionCount` Returns the number of transactions sent from an address. **Parameters** * `DATA`, 20 Bytes - address. * `QUANTITY|TAG` - integer block number, or the string "latest", "earliest", "pending", "safe" or "finalized", see the default block parameter * `params`: `["0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest", // state at the latest block] ` **Returns** `QUANTITY` - integer of the number of transactions send from this address. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0xC08bA0F9E8a976d2DF3eC899E2F5dff6336549C8","latest"],"id":1}' // Response {"jsonrpc":"2.0","id":1,"result":"0xd83"} ``` ## `eth_signTransaction` Signs a transaction that can be submitted to the network at a later time using with eth\_sendRawTransaction. **Parameters** * `Object` - The transaction object * `Content-Type` * `from`: `DATA`, 20 Bytes - The address the transaction is sent from. * `to`: `DATA`, 20 Bytes - (optional when creating new contract) The address the transaction is directed to. * `gas`: `QUANTITY` - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas. * `gasPrice`: `QUANTITY` - (optional, default: 0x9184e72a000) Integer of the gasPrice used for each paid gas, in Wei. * `value`: `QUANTITY` - (optional) Integer of the value sent with this transaction, in Wei. * `data`: `DATA` - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. * `nonce`: `QUANTITY` - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce. **Returns** `DATA`, The RLP-encoded transaction object signed by the specified account. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"id": 1,"jsonrpc":"2.0","method": "eth_signTransaction","params":[{"data":"0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675","from":"0xb60e8dd61c5d32be8058bb8eb970870f07233155","gas": "0x76c0","gasPrice": "0x9184e72a000","to":"0xd46e8dd67c5d32be8058bb8eb970870f07244567","value": "0x9184e72a"}]}' // Result {"id": 1, "jsonrpc": "2.0", "result":"0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b"} ``` ## `eth_sendTransaction` Creates new message call transaction or a contract creation, if the data field contains code, and signs it using the account specified in from. **Parameters** * `Object` - The transaction object * `from`: `DATA`, 20 Bytes - The address the transaction is sent from. * `to`: `DATA`, 20 Bytes - (optional when creating new contract) The address the transaction is directed to. * `gas`: `QUANTITY` - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas. * `gasPrice`: `QUANTITY` - (optional, default: 0x9184e72a000) Integer of the gasPrice used for each paid gas. * `value`: `QUANTITY` - (optional) Integer of the value sent with this transaction. * `input`: `DATA` - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. * `nonce`: `QUANTITY` - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce. * `params`: ``` [ { from: "0xb60e8dd61c5d32be8058bb8eb970870f07233155", to: "0xd46e8dd67c5d32be8058bb8eb970870f07244567", gas: "0x76c0", // 30400 gasPrice: "0x9184e72a000", // 10000000000000 value: "0x9184e72a", // 2441406250 input: "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675", }, ] ``` **Returns** * `DATA`, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available. Use `eth_getTransactionReceipt` to get the contract address, after the transaction was proposed in a block, when you created a contract. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": [{"to": "0x89A7EF2F08B1c018D5Cc88836249b84Dd5392905", "data": "0x18160ddd"}, "latest"], "id": 1}' // Result { "id":1, "jsonrpc": "2.0", "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331" } ``` ## `eth_sendRawTransaction` Creates new message call transaction or a contract creation for signed transactions. **Parameters** * `DATA`, The signed transaction data. * `params`: `["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",]` **Returns** * `DATA`, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available. Use `eth_getTransactionReceipt` to get the contract address, after the transaction was proposed in a block, when you created a contract. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": [{"to": "0x89A7EF2F08B1c018D5Cc88836249b84Dd5392905", "data": "0x18160ddd"}, "latest"], "id": 1}' // Result { "id":1, "jsonrpc": "2.0", "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331" } ``` ## `eth_getTransactionByHash` Returns the information about a transaction requested by transaction hash. **Parameters** * `DATA`, 32 Bytes - hash of a transaction * `params`: `["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"]` **Returns** * `Object` - A transaction object, or null when no transaction was found: * `blockHash`: `DATA`, 32 Bytes - hash of the block where this transaction was in. null when its pending. * `blockNumber`: `QUANTITY` - block number where this transaction was in. null when its pending. * `from`: `DATA`, 20 Bytes - address of the sender. * `gas`: `QUANTITY` - gas provided by the sender. * `gasPrice`: `QUANTITY` - gas price provided by the sender in Wei. * `hash`: `DATA`, 32 Bytes - hash of the transaction. * `input`: `DATA` - the data send along with the transaction. * `nonce`: `QUANTITY` - the number of transactions made by the sender prior to this one. * `to`: `DATA`, 20 Bytes - address of the receiver. null when its a contract creation transaction. * `transactionIndex`: `QUANTITY` - integer of the transactions index position in the block. null when its pending. * `value`: `QUANTITY` - value transferred in Wei. * `v`: `QUANTITY` - ECDSA recovery id * `r`: `QUANTITY` - ECDSA signature r * `s`: `QUANTITY` - ECDSA signature s **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x150dfcd895b2856f2418564aae294c1e37346734e29617b3a29b15f7facb50d6"],"id":1}' // Response {"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x6f9ccc098b4f2f56154d3ad12df650a253d9c8bb5e6e28c5d92ae51a935af5bd","blockNumber":"0xaa19b","from":"0xeecc2fa50180e7c929c814a8bd65e45f81994327","gas":"0x5208","gasPrice":"0x7","hash":"0x150dfcd895b2856f2418564aae294c1e37346734e29617b3a29b15f7facb50d6","input":"0x","nonce":"0x1a5b","to":"0x65925ceb2e33bb7fde5f1c7488bbe8cca6c4e177","transactionIndex":"0x0","value":"0x5497acb9bd0b","type":"0x0","chainId":"0x311","v":"0x646","r":"0xa8c2b5d2d2c95eb58274e1a1c90626964e6ea3ae9ee8103769f34f2d83f83e26","s":"0x5ebebaf19ade625611bf30575e4503e9611ff561d0d88bb5872eb1cf457e411d"}} ``` ## `eth_getTransactionByBlockHashAndIndex` Returns information about a transaction by block hash and transaction index position. **Parameters** * `DATA`, 32 Bytes - hash of a block. * `QUANTITY` - integer of the transaction index position. * `params`: `["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2","0x0", // 0] ` **Returns** See `eth_getTransactionByHash`. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"],"id":1}' // Response {"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x6f9ccc098b4f2f56154d3ad12df650a253d9c8bb5e6e28c5d92ae51a935af5bd","blockNumber":"0xaa19b","from":"0xeecc2fa50180e7c929c814a8bd65e45f81994327","gas":"0x5208","gasPrice":"0x7","hash":"0x150dfcd895b2856f2418564aae294c1e37346734e29617b3a29b15f7facb50d6","input":"0x","nonce":"0x1a5b","to":"0x65925ceb2e33bb7fde5f1c7488bbe8cca6c4e177","transactionIndex":"0x0","value":"0x5497acb9bd0b","type":"0x0","chainId":"0x311","v":"0x646","r":"0xa8c2b5d2d2c95eb58274e1a1c90626964e6ea3ae9ee8103769f34f2d83f83e26","s":"0x5ebebaf19ade625611bf30575e4503e9611ff561d0d88bb5872eb1cf457e411d"}} ``` ## `eth_getTransactionByBlockNumberAndIndex` Returns information about a transaction by block number and transaction index position. **Parameters** * `QUANTITY|TAG` - a block number, or the string "earliest", "latest", "pending", "safe" or "finalized", as in the default block parameter. * `QUANTITY` - the transaction index position. * `params`: `[ "0x9c47cf", // 10241999 "0x24", // 36 ]` **Returns** See `eth_getTransactionByHash`. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params":["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"],"id":1}' // Response {"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x6f9ccc098b4f2f56154d3ad12df650a253d9c8bb5e6e28c5d92ae51a935af5bd","blockNumber":"0xaa19b","from":"0xeecc2fa50180e7c929c814a8bd65e45f81994327","gas":"0x5208","gasPrice":"0x7","hash":"0x150dfcd895b2856f2418564aae294c1e37346734e29617b3a29b15f7facb50d6","input":"0x","nonce":"0x1a5b","to":"0x65925ceb2e33bb7fde5f1c7488bbe8cca6c4e177","transactionIndex":"0x0","value":"0x5497acb9bd0b","type":"0x0","chainId":"0x311","v":"0x646","r":"0xa8c2b5d2d2c95eb58274e1a1c90626964e6ea3ae9ee8103769f34f2d83f83e26","s":"0x5ebebaf19ade625611bf30575e4503e9611ff561d0d88bb5872eb1cf457e411d"}} ``` ## `eth_getTransactionReceipt` Returns the receipt of a transaction by transaction hash. Note: The receipt is not available for pending transactions. **Parameters** * `DATA`, 32 Bytes - hash of a transaction * `params`: `["0x85d995eba9763907fdf35cd2034144dd9d53ce32cbec21349d4b12823c6860c5"]` **Returns** * `Object` - A transaction receipt object, or null when no receipt was found: * `transactionHash`: `DATA`, 32 Bytes - hash of the transaction. * `transactionIndex`: `QUANTITY` - integer of the transactions index position in the block. * `blockHash`: `DATA`, 32 Bytes - hash of the block where this transaction was in. * `blockNumber`: `QUANTITY` - block number where this transaction was in. * `from`: `DATA`, 20 Bytes - address of the sender. * `to`: `DATA`, 20 Bytes - address of the receiver. null when its a contract creation transaction. * `cumulativeGasUsed`: `QUANTITY` - The total amount of gas used when this transaction was executed in the block. * `effectiveGasPrice`: `QUANTITY` - The sum of the base fee and tip paid per unit of gas. * `gasUsed`: `QUANTITY` - The amount of gas used by this specific transaction alone. * `contractAddress`: `DATA`, 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null. * `logs`: \[Array] of log objects, which this transaction generated. * `logsBloom`: `DATA`, 256 Bytes - Bloom filter for light clients to quickly retrieve related logs. * `type`: `QUANTITY` - integer of the transaction type, 0x0 for legacy transactions, 0x1 for access list types, 0x2 for dynamic fees. It also returns either: * `root`: `DATA` 32 bytes of post-transaction stateroot (pre Byzantium) * `status`: `QUANTITY` either 1 (success) or 0 (failure) **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0xe83e89c6fac48fc02fea39ded109236ef1b5991dd6924248a5e05bce6ee3f756"],"id":1}' // Response {"jsonrpc":"2.0","id":1,"result":{"blockHash":"0x97a7578df5a69f09417328638c428389b92283427ff62febee6888eb1c11a1dc","blockNumber":"0xa63d8","contractAddress":null,"cumulativeGasUsed":"0xf618","from":"0xeecc2fa50180e7c929c814a8bd65e45f81994327","gasUsed":"0x5208","logs":[],"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","status":"0x1","to":"0xfb937e6e8aec33e64672d83b58e0e7ff8feaf74b","transactionHash":"0xe83e89c6fac48fc02fea39ded109236ef1b5991dd6924248a5e05bce6ee3f756","transactionIndex":"0x2","type":"0x0"}} ``` # Uncle methods Source: https://docs.autheo.com/apis/json-rpc/methods/eth/eth_uncle_methods ## `eth_getUncleCountByBlockHash` Returns the number of uncles in a block from a block matching the given block hash. **Parameters** * `DATA`, 32 Bytes - hash of a block * `params`: `["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"]` **Returns** `QUANTITY` - integer of the number of uncles in this block. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params":["0x613aca96ec73b0c4395130088dd21c3813d923c7fe6a4650ae3ef30dbcd350e4"],"id":1}' // Response {"jsonrpc":"2.0","id":1,"result":"0x0"} ``` A result of 0x0 means that the block does not have uncle blocks. ## `eth_getUncleCountByBlockNumber` Returns the number of uncles in a block from a block matching the given block number. **Parameters** * `QUANTITY|TAG` - integer of a block number, or the string "latest", "earliest", "pending", "safe" or "finalized", see the default block parameter * `params`: `["0xe8", // 232] ` **Returns** `QUANTITY` - integer of the number of uncles in this block. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params":["0xa8fa0"],"id":1}' // Response {"jsonrpc":"2.0","id":1,"result":"0x0"} ``` A result of 0x0 means that the block does not have uncle blocks. ## `eth_getUncleByBlockHashAndIndex` Returns information about a uncle of a block by hash and uncle index position. **Parameters** * `DATA`, 32 Bytes - The hash of a block. * `QUANTITY` - The uncle's index position. * `params`: `["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2","0x0", // 0]` **Returns** See `eth_getBlockByHash`. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data'{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params":["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2", "0x0"],"id":1}' ``` **Result** See `eth_getBlockByHash`. Note: An uncle doesn't contain individual transactions. ## `eth_getUncleByBlockNumberAndIndex` Returns information about a uncle of a block by number and uncle index position. **Parameters** * `QUANTITY|TAG` - a block number, or the string "earliest", "latest", "pending", "safe", "finalized", as in the default block parameter. * `QUANTITY` - the uncle's index position. * `params`: `["0x29c", // 668 "0x0", // 0]` **Returns** See `eth_getBlockByHash`. Note: An uncle doesn't contain individual transactions. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params":["0x29c", "0x0"],"id":1}' ``` **Result** See `eth_getBlockByHash`. # Net version Source: https://docs.autheo.com/apis/json-rpc/methods/net/net_version ## `net_version` Returns the current network id. **Parameters** None **Returns** \[String] - The current network id. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":67}' // Result {"jsonrpc":"2.0","id":67,"result":"785"} ``` ## `net_listening` Returns true if client is actively listening for network connections. **Parameters** None **Returns** \[Boolean] - true when listening, otherwise false. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":67}' // Result {"jsonrpc":"2.0","id":67,"result":true} ``` ## `net_peerCount` Returns number of peers currently connected to the client. **Parameters** None **Returns** QUANTITY - integer of the number of connected peers. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":74}' // Result {"jsonrpc":"2.0","id":74,"result":3} ``` # Web3 client version Source: https://docs.autheo.com/apis/json-rpc/methods/web3/web3_clientVersion ## `web3_clientVersion` Returns the current client version. **Parameters** None **Returns** \[String] - The current client version **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' // Response {"jsonrpc":"2.0","id":67,"result":"Version dev () Compiled at using Go go1.23.3 (amd64)"} ``` ## `web3_sha3` Returns Keccak-256 (not the standardized SHA3-256) of the given data. **Parameters** DATA - The data to convert into a SHA3 hash ``` params: ["0x68656c6c6f20776f726c64"] ``` **Returns** DATA - The SHA3 result of the given string. **Example** ``` // Request curl -X POST https://rpc1.autheo.com -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_sha3","params":["0x68656c6c6f20776f726c64"],"id":64}' // Result {"jsonrpc":"2.0","id":64,"result":"0x5b2c76da96136d193336fad3fbc049867b8ca157da22f69ae0e4923648250acc"}} ``` # Overview Source: https://docs.autheo.com/apis/json-rpc/overview As Autheo is built on the Cosmos EVM model, our JSON-RPC API closely mimics that of Ethereum. Developers familiar with Ethereum architecture should find Autheo familiar, and the following API matches those of most EVM compatible Layer-1 blockchains. This document contains information on the JSON-RPC API endpoints that external applications can use to interact with the Autheo platform. Examples below use `https://rpc1.autheo.com` (mainnet). For testnet, substitute `https://testnet-rpc1.autheo.com` or `https://testnet-rpc2.autheo.com`. See [Network endpoints](/getting-started/network/endpoints) for the full list. # Rate limits Source: https://docs.autheo.com/apis/json-rpc/rate-limits Rate limiting on Autheo Chain public JSON-RPC endpoints and strategies for staying within limits. The public Autheo Testnet JSON-RPC endpoints enforce per-IP rate limits to ensure fair access for all developers. ## What triggers rate limiting * High-frequency polling (e.g., checking balance every 100ms) * Large `eth_getLogs` queries spanning many blocks * Burst traffic from scripts without backoff logic ## Handling 429 responses When you receive a `429 Too Many Requests` HTTP response, implement exponential backoff: ```javascript theme={null} async function rpcWithRetry(provider, method, params, maxRetries = 5) { for (let attempt = 0; attempt < maxRetries; attempt++) { try { return await provider.send(method, params); } catch (err) { if (err.status === 429 || err.code === "SERVER_ERROR") { const delay = Math.min(1000 * 2 ** attempt, 30_000); console.warn(`Rate limited, retrying in ${delay}ms...`); await new Promise(r => setTimeout(r, delay)); } else { throw err; } } } throw new Error("Max retries exceeded"); } ``` ## Best practices to reduce API usage **Use WebSocket subscriptions instead of polling** Instead of calling `eth_getBlockNumber` every few seconds, subscribe to new blocks: ```javascript theme={null} const wsProvider = new ethers.WebSocketProvider("wss://rpc1.autheo.com:8546"); wsProvider.on("block", (blockNumber) => { console.log("New block:", blockNumber); }); ``` **Paginate eth\_getLogs in reasonably sized chunks** ```javascript theme={null} // Instead of one huge query from block 0 to latest: const logs = await contract.queryFilter("Transfer", 0, "latest"); // ❌ may hit limits // Use paginated chunks: for (let from = 0; from < currentBlock; from += 5000) { const to = Math.min(from + 4999, currentBlock); const chunk = await contract.queryFilter("Transfer", from, to); // ✅ } ``` **Cache immutable data** Contract ABIs, deployed addresses, and historical block data don't change. Cache them locally rather than re-fetching on every request. **Load balance across endpoints** Distribute requests between the two public endpoints: ```javascript theme={null} const endpoints = [ "https://rpc1.autheo.com", "https://testnet-rpc2.autheo.com" ]; let index = 0; function getProvider() { const url = endpoints[index % endpoints.length]; index++; return new ethers.JsonRpcProvider(url); } ``` ## Production workloads For applications that require consistent high-volume access, use a managed node provider (InfStones, Zeeve) which offers dedicated capacity with SLA guarantees. See [hosting options](/validator-program/hosting-options) for details. # APIs overview Source: https://docs.autheo.com/apis/overview Autheo Chain exposes two public API interfaces: an Ethereum-compatible JSON-RPC API and a block explorer REST API. Autheo Chain exposes two public API interfaces for interacting with the network programmatically. | API | Best for | Docs | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | | JSON-RPC | EVM interactions — deploying contracts, sending transactions, querying balances, subscribing to events. Compatible with ethers.js, viem, web3.js, and any standard Ethereum client library. | [JSON-RPC overview](/apis/json-rpc/overview) | | REST | Read-only data access — blocks, transactions, addresses, token balances. Simple HTTP requests, no library required. | [REST overview](/apis/rest/overview) | ## Endpoints See [Network endpoints](/getting-started/network/endpoints) for the full list of RPC and API URLs for both mainnet and testnet. # REST API errors Source: https://docs.autheo.com/apis/rest/errors HTTP error codes returned by the Autheo Chain REST API and how to handle them. ## HTTP status codes | Code | Meaning | Common cause | | --------------------------- | ------------------ | ----------------------------------------------------------------------- | | `200 OK` | Success | Request completed successfully | | `400 Bad Request` | Invalid parameters | Malformed address, invalid block number, or missing required parameter | | `404 Not Found` | Resource not found | Address has no data, block doesn't exist, or transaction hash not found | | `422 Unprocessable Entity` | Validation error | Parameter value is out of range or wrong type | | `429 Too Many Requests` | Rate limited | Too many requests in a short period | | `500 Internal Server Error` | Server error | Retry with backoff | ## Error response format All error responses return a JSON body with a `message` field: ```json theme={null} { "message": "Not found" } ``` ## Common errors ### 400 — Invalid address format ```json theme={null} {"message": "Invalid address hash"} ``` **Fix**: Ensure the address is a valid EIP-55 checksummed hex address (`0x...`, 40 hex characters). Use `ethers.getAddress(address)` to checksum an address. *** ### 404 — Address or transaction not found ```json theme={null} {"message": "Not found"} ``` **Fix**: The address may have no on-chain activity, or the transaction hash may be incorrect. Verify on the [block explorer](https://evm-explorer.autheo.com/). *** ### 429 — Rate limited **Fix**: Reduce request frequency and implement exponential backoff. See [JSON-RPC rate limits](/apis/json-rpc/rate-limits) for backoff strategies — the same approach applies to REST requests. ## Example error handling in JavaScript ```javascript theme={null} async function apiRequest(path) { const response = await fetch(`https://evm-explorer.autheo.com/api/v2${path}`); if (!response.ok) { const error = await response.json().catch(() => ({ message: "Unknown error" })); throw new Error(`API error ${response.status}: ${error.message}`); } return response.json(); } try { const data = await apiRequest("/addresses/0x
"); console.log(data); } catch (err) { console.error(err.message); } ``` # cURL examples Source: https://docs.autheo.com/apis/rest/examples/curl cURL request examples for common Autheo Chain REST API operations. All examples use the Autheo Testnet base URL: `https://evm-explorer.autheo.com/api/v2` ## Get address information ```bash theme={null} curl -X GET \ "https://evm-explorer.autheo.com/api/v2/addresses/0x
" \ -H "accept: application/json" ``` ## Get transactions for an address ```bash theme={null} curl -X GET \ "https://evm-explorer.autheo.com/api/v2/addresses/0x
/transactions" \ -H "accept: application/json" ``` ## Get a specific transaction ```bash theme={null} curl -X GET \ "https://evm-explorer.autheo.com/api/v2/transactions/0x" \ -H "accept: application/json" ``` ## Get a specific block ```bash theme={null} # By block number curl -X GET \ "https://evm-explorer.autheo.com/api/v2/blocks/12345" \ -H "accept: application/json" # Latest block curl -X GET \ "https://evm-explorer.autheo.com/api/v2/blocks?type=block" \ -H "accept: application/json" ``` ## Get token balances for an address ```bash theme={null} curl -X GET \ "https://evm-explorer.autheo.com/api/v2/addresses/0x
/token-balances" \ -H "accept: application/json" ``` ## Get token transfers for an address ```bash theme={null} curl -X GET \ "https://evm-explorer.autheo.com/api/v2/addresses/0x
/token-transfers" \ -H "accept: application/json" ``` ## Get a smart contract ```bash theme={null} curl -X GET \ "https://evm-explorer.autheo.com/api/v2/smart-contracts/0x" \ -H "accept: application/json" ``` ## Search ```bash theme={null} # Search by address, tx hash, or block number curl -X GET \ "https://evm-explorer.autheo.com/api/v2/search?q=0x" \ -H "accept: application/json" ``` ## Paginating results Pass `next_page_params` from the previous response as query parameters: ```bash theme={null} # Get the first page RESPONSE=$(curl -s "https://evm-explorer.autheo.com/api/v2/addresses/0x
/transactions") # Extract next_page_params and use them for the next page curl -X GET \ "https://evm-explorer.autheo.com/api/v2/addresses/0x
/transactions?block_number=12345&index=10&items_count=50" \ -H "accept: application/json" ``` See [Pagination](/apis/rest/pagination) for a full explanation. # JavaScript examples Source: https://docs.autheo.com/apis/rest/examples/javascript JavaScript (fetch/node-fetch) request examples for common Autheo Chain REST API operations. All examples use the Autheo Testnet base URL. Set up a base client first: ```javascript theme={null} const BASE_URL = "https://evm-explorer.autheo.com/api/v2"; async function get(path) { const response = await fetch(`${BASE_URL}${path}`, { headers: { Accept: "application/json" } }); if (!response.ok) { const err = await response.json().catch(() => ({})); throw new Error(`${response.status}: ${err.message ?? "Unknown error"}`); } return response.json(); } ``` ## Get address information ```javascript theme={null} const address = "0x"; const info = await get(`/addresses/${address}`); console.log("Balance:", info.coin_balance); console.log("Transaction count:", info.tx_count); console.log("Is contract:", info.is_contract); ``` ## Get transactions for an address ```javascript theme={null} const txs = await get(`/addresses/${address}/transactions`); txs.items.forEach(tx => { console.log(`Hash: ${tx.hash}`); console.log(`Block: ${tx.block}`); console.log(`From: ${tx.from.hash}`); console.log(`To: ${tx.to?.hash}`); console.log(`Value: ${tx.value}`); console.log("---"); }); // Check for more pages if (txs.next_page_params) { const query = new URLSearchParams(txs.next_page_params).toString(); const nextPage = await get(`/addresses/${address}/transactions?${query}`); } ``` ## Get all transactions (paginated) ```javascript theme={null} async function getAllTransactions(address) { const results = []; let params = null; do { const query = params ? "?" + new URLSearchParams(params).toString() : ""; const page = await get(`/addresses/${address}/transactions${query}`); results.push(...page.items); params = page.next_page_params; } while (params !== null); return results; } const allTxs = await getAllTransactions("0x
"); console.log("Total transactions:", allTxs.length); ``` ## Get a specific block ```javascript theme={null} // By block number const block = await get("/blocks/12345"); console.log("Hash:", block.hash); console.log("Transactions:", block.tx_count); console.log("Gas used:", block.gas_used); // Latest blocks const latestBlocks = await get("/blocks?type=block"); console.log("Latest block:", latestBlocks.items[0].height); ``` ## Get token transfers ```javascript theme={null} const transfers = await get(`/addresses/${address}/token-transfers`); transfers.items.forEach(transfer => { console.log(`Token: ${transfer.token.symbol}`); console.log(`From: ${transfer.from.hash}`); console.log(`To: ${transfer.to.hash}`); console.log(`Amount: ${transfer.total?.value}`); }); ``` ## Get smart contract details ```javascript theme={null} const contract = await get(`/smart-contracts/${contractAddress}`); console.log("Name:", contract.name); console.log("Verified:", contract.is_verified); console.log("Compiler:", contract.compiler_version); ``` # Overview Source: https://docs.autheo.com/apis/rest/overview This document outlines the various endpoints available through the Autheo REST API. More information can be found at the [API Documentation Page](https://evm-explorer.autheo.com/api-docs) on the Autheo block explorer. ## Address methods Details for `address` methods can be found on the [address methods](resources/addresses) page. ## Block methods Details for `block` methods can be found on the [block methods](resources/blocks) page. ## Main page methods Details for `main-page` methods can be found on the [main page methods](resources/main-page-stats) page. ## Search methods `/search` Returns any entities that correspond with the provided query string. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/search?q=tst' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "address": "0xfeeE0ece0903D0E3fcE990a2975C6d103bEb80cb", "address_url": "/address/0xfeeE0ece0903D0E3fcE990a2975C6d103bEb80cb", "certified": false, "circulating_market_cap": null, "exchange_rate": null, "icon_url": null, "is_smart_contract_verified": false, "is_verified_via_admin_panel": false, "name": "Testing Token", "priority": 0, "symbol": "TST", "token_type": "ERC-20", "token_url": "/token/0xfeeE0ece0903D0E3fcE990a2975C6d103bEb80cb", "total_supply": "10000000000000000000000", "type": "token" } ], "next_page_params": null } ``` `/search/check-redirect` Returns a boolean indicating whether the queried address is redirected or not. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/search/check-redirect?q=USDT' \ -H 'accept: application/json' ``` **Response** ``` { "parameter": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "redirect": true, "type": "address | block | transaction" } ``` ## Smart contract methods Details for `smart-contracts` methods can be found on the [smart contract methods](resources/smart-contracts) page. ## Stats methods `/stats` Returns statistic counters **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/stats' \ -H 'accept: application/json' ``` **Response** ``` { "average_block_time": 1313, "coin_image": null, "coin_price": null, "coin_price_change_percentage": null, "gas_price_updated_at": "2024-11-12T22:58:04.049085Z", "gas_prices": { "slow": null, "average": null, "fast": null }, "gas_prices_update_in": 15702, "gas_used_today": "12963689", "market_cap": "0", "network_utilization_percentage": 0, "secondary_coin_image": null, "secondary_coin_price": null, "static_gas_price": null, "total_addresses": "14", "total_blocks": "99886", "total_gas_used": "0", "total_transactions": "16", "transactions_today": "14", "tvl": null } ``` `/stats/charts/transactions` Returns a chart of transactions by date. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/stats/charts/transactions' \ -H 'accept: application/json' ``` **Response** ``` { "chart_data": [ { "date": "2024-11-12", "tx_count": 2 }, { "date": "2024-11-11", "tx_count": 14 }, { "date": "2024-11-10", "tx_count": 0 }, { "date": "2024-11-09", "tx_count": 0 }, { "date": "2024-11-08", "tx_count": 0 }, { "date": "2024-11-07", "tx_count": 0 }, { "date": "2024-11-06", "tx_count": 0 }, { "date": "2024-11-05", "tx_count": 0 }, { "date": "2024-11-04", "tx_count": 0 }, { "date": "2024-11-03", "tx_count": 0 }, { "date": "2024-11-02", "tx_count": 0 } ] } ``` `/stats/charts/market` Returns a chart of market data. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/stats/charts/market' \ -H 'accept: application/json' ``` **Response** ``` { "available_supply": "164918857.718061", "chart_data": [ { "date": "2022-10-31", "closing_price": "0.00254915", "market_cap": "420471.10604559750644" } ] } ``` ## Token methods Details for `tokens` methods can be found on the [token methods](resources/tokens) page. ## Transaction methods Details for `transaction` methods can be found on the [transaction methods](resources/transactions) page. ## Additional methods `/config/json-rpc-url` Returns the url for the JSON-RPC endpoint **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/config/json-rpc-url' \ -H 'accept: application/json' ``` **Response** ``` { "json_rpc_url": "https://core.poa.network" } ``` `/withdrawals` Returns withdrawals. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/withdrawals' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "index": 1, "amount": "1000000000000000000", "validator_index": 1, "receiver": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "block_number": 1, "timestamp": "2023-06-20T07:55:00.000000Z" } ], "next_page_params": { "index": 1, "items_count": 50 } } ``` # Pagination Source: https://docs.autheo.com/apis/rest/pagination How pagination works in the Autheo Chain REST API. The Autheo REST API returns paginated results for endpoints that can return large collections of data. All paginated responses follow a consistent format. ## Response format Paginated endpoints return a JSON object with an `items` array and a `next_page_params` object: ```json theme={null} { "items": [ { "...": "..." } ], "next_page_params": { "block_number": 12345, "index": 10, "items_count": 50 } } ``` When `next_page_params` is `null`, you have reached the last page. ## Fetching the next page Pass `next_page_params` as query parameters to retrieve the next page: ```bash theme={null} # Initial request curl "https://evm-explorer.autheo.com/api/v2/addresses/0x
/transactions" # Next page — pass the params from next_page_params curl "https://evm-explorer.autheo.com/api/v2/addresses/0x
/transactions?block_number=12345&index=10&items_count=50" ``` ## JavaScript pagination helper ```javascript theme={null} async function fetchAllPages(url) { const allItems = []; let nextParams = null; do { const queryString = nextParams ? "?" + new URLSearchParams(nextParams).toString() : ""; const response = await fetch(url + queryString); const data = await response.json(); allItems.push(...data.items); nextParams = data.next_page_params; } while (nextParams !== null); return allItems; } const transactions = await fetchAllPages( "https://evm-explorer.autheo.com/api/v2/addresses/0x
/transactions" ); console.log("Total transactions:", transactions.length); ``` ## Page size The default page size is **50 items**. This is fixed per endpoint and cannot be changed via query parameters. ## Rate limiting Paginating through large datasets with many sequential requests can trigger rate limits. Add a small delay between pages for large backfills: ```javascript theme={null} await new Promise(r => setTimeout(r, 100)); // 100ms between pages ``` # Address methods Source: https://docs.autheo.com/apis/rest/resources/addresses This document outlines Autheo methods pertaining to `addresses`. ## Get all addresses `/addresses` Returns a list of native coin holders. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/addresses' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "coin_balance": "9000000000000000000000000", "tx_count": "", "ens_domain_name": null, "hash": "0x38B4089F7762E0C20E9BeD8e991E074550Ef5a52", "implementations": [], "is_contract": false, "is_verified": false, "metadata": null, "name": null, "private_tags": [], "proxy_type": null, "public_tags": [], "watchlist_names": [] }, { "coin_balance": "8999985999915999999413000", "tx_count": "", "ens_domain_name": null, "hash": "0x57f96e6B86CdeFdB3d412547816a82E3E0EbF9D2", "implementations": [], "is_contract": false, "is_verified": false, "metadata": null, "name": null, "private_tags": [], "proxy_type": null, "public_tags": [], "watchlist_names": [] }, { "coin_balance": "10000000000000000000", "tx_count": "", "ens_domain_name": null, "hash": "0x599E364e2f22bDB6135797d864B1bC559719312B", "implementations": [], "is_contract": false, "is_verified": false, "metadata": null, "name": null, "private_tags": [], "proxy_type": null, "public_tags": [], "watchlist_names": [] }, { "coin_balance": "2000000000000000000", "tx_count": "", "ens_domain_name": null, "hash": "0x3BCc6a2f85c3D0870D2A14d31bBaC9C3F9839BbF", "implementations": [], "is_contract": false, "is_verified": false, "metadata": null, "name": null, "private_tags": [], "proxy_type": null, "public_tags": [], "watchlist_names": [] }, { "coin_balance": "1999999999909548177", "tx_count": "2", "ens_domain_name": null, "hash": "0x576dBb6e5E0F77A3Ae59C983B4304E6aD9D8999f", "implementations": [], "is_contract": false, "is_verified": false, "metadata": null, "name": null, "private_tags": [], "proxy_type": null, "public_tags": [], "watchlist_names": [] } ], "total_supply": "0", "exchange_rate": null, "next_page_params": null } ``` ## Get specific address `/addresses/{address_hash}` Returns info for the given address hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/addresses/0x3BCc6a2f85c3D0870D2A14d31bBaC9C3F9839BbF' \ -H 'accept: application/json' ``` **Response** ``` { "block_number_balance_updated_at": 78458, "coin_balance": "2000000000000000000", "creation_tx_hash": null, "creator_address_hash": null, "ens_domain_name": null, "exchange_rate": null, "has_beacon_chain_withdrawals": false, "has_decompiled_code": false, "has_logs": false, "has_token_transfers": false, "has_tokens": false, "has_validated_blocks": false, "hash": "0x3BCc6a2f85c3D0870D2A14d31bBaC9C3F9839BbF", "implementations": [], "is_contract": false, "is_verified": false, "metadata": null, "name": null, "private_tags": [], "proxy_type": null, "public_tags": [], "token": null, "watchlist_address_id": null, "watchlist_names": [] } ``` ## Get counters for a specific address `/addresses/{address_hash}/counters` Returns any counters for the given address. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/addresses/0x3BCc6a2f85c3D0870D2A14d31bBaC9C3F9839BbF/counters' \ -H 'accept: application/json' ``` **Response** ``` { "transactions_count": "0", "token_transfers_count": "0", "gas_usage_count": "0", "validations_count": "0" } ``` ## Get transactions for a specific address `/addresses/{address_hash}/transactions` Returns transactions involving this address. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/addresses/0x3BCc6a2f85c3D0870D2A14d31bBaC9C3F9839BbF/transactions' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "timestamp": "2024-11-12T14:36:25.000000Z", "fee": { "type": "actual", "value": "42000000147000" }, "gas_limit": "21000", "block": 78458, "status": "ok", "method": null, "confirmations": 17845, "type": 2, "exchange_rate": null, "to": { "ens_domain_name": null, "hash": "0x3BCc6a2f85c3D0870D2A14d31bBaC9C3F9839BbF", "implementations": [], "is_contract": false, "is_verified": false, "metadata": null, "name": null, "private_tags": [], "proxy_type": null, "public_tags": [], "watchlist_names": [] }, "tx_burnt_fee": "147000", "max_fee_per_gas": "100000000000", "result": "success", "hash": "0x49ac4a5d6fe76422abeaff480b8dee5104721b00f85cd36bdb0878d38c219f4f", "gas_price": "2000000007", "priority_fee": "42000000000000", "base_fee_per_gas": "7", "from": { "ens_domain_name": null, "hash": "0x57f96e6B86CdeFdB3d412547816a82E3E0EbF9D2", "implementations": [], "is_contract": false, "is_verified": false, "metadata": null, "name": null, "private_tags": [], "proxy_type": null, "public_tags": [], "watchlist_names": [] }, "token_transfers": null, "tx_types": [ "coin_transfer" ], "gas_used": "21000", "created_contract": null, "position": 0, "nonce": 4, "has_error_in_internal_txs": false, "actions": [], "decoded_input": null, "token_transfers_overflow": null, "raw_input": "0x", "value": "2000000000000000000", "max_priority_fee_per_gas": "2000000000", "revert_reason": null, "confirmation_duration": [ 0, 1323 ], "tx_tag": null } ], "next_page_params": null } ``` ## Get all token transfers for a specific address `/address/{address_hash}/token-transfers` Returns all token transfers involving this address. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/addresses/0xEb533ee5687044E622C69c58B1B12329F56eD9ad/token-transfers?type=ERC-20%2CERC-721%2CERC-1155&filter=to%20%7C%20from&token=0xEb533ee5687044E622C69c58B1B12329F56eD9ad' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "block_hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "log_index": "243", "method": "transfer", "timestamp": "2023-07-03T20:09:59.000000Z", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token": { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" }, "total": { "decimals": "18", "value": "1000" }, "tx_hash": "0x6662ad1ad2ea899e9e27832dc202fd2ef915a5d2816c1142e6933cff93f7c592", "type": "token_transfer" } ], "next_page_params": { "block_number": 27736955, "index": 4 } } ``` ## Get all internal transactions for a specific address `/addresses/{address_hash}/internal-transactions` Returns the requested address' internal transactions. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/addresses/0x599E364e2f22bDB6135797d864B1bC559719312B/internal-transactions?filter=to%20%7C%20from' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "block": 8844586, "created_contract": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "error": "reverted", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "gas_limit": "351759", "index": 1, "success": true, "timestamp": "2023-04-17T10:37:12.000000Z", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "transaction_hash": "0x08ea4d75ad0abe327a7fd368733eaeac43077989e635d800530d7906ebf3bd54", "type": "call", "value": "30000000000000000" } ], "next_page_params": { "block_number": 27625575, "index": 0, "items_count": 50, "transaction_index": 0 } } ``` # Block methods Source: https://docs.autheo.com/apis/rest/resources/blocks This document outlines Autheo methods pertaining to `blocks`. ## Get all blocks `/blocks` Returns all blocks of the given type. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/blocks' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "base_fee_per_gas": "26618801760", "burnt_fees": "261263193229977120", "burnt_fees_percentage": 85.19028810863084, "difficulty": "0", "extra_data": "0x", "gas_limit": "30000000", "gas_target_percentage": -34.56675333333333, "gas_used": "9814987", "gas_used_percentage": 32.71662333333333, "hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a", "height": 17615720, "miner": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "nonce": "0x0000000000000000", "parent_hash": "0xd464e02d81e2bdf6bc5fa9b8e33f0b564c464a82d821a3e56531f8636dc00dfa", "priority_fee": "45418705646601378", "rewards": [ { "reward": 0, "type": "Miner Reward | Emission Reward | Chore Reward | Uncle Reward" } ], "size": 49997, "state_root": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544", "timestamp": "2023-07-03T20:09:59.000000Z", "total_difficulty": "58750003716598352816469", "tx_count": 120, "tx_fees": "306681898876578498", "type": "block", "uncles_hashes": [ "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" ], "withdrawals_count": 16 } ], "next_page_params": { "block_number": 27729304, "items_count": 50 } } ``` ## Get information for a specific block `/blocks/{block_number_or_hash}` Returns block information. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/blocks/0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a' \ -H 'accept: application/json' ``` **Response** ``` { "base_fee_per_gas": "26618801760", "burnt_fees": "261263193229977120", "burnt_fees_percentage": 85.19028810863084, "difficulty": "0", "extra_data": "0x", "gas_limit": "30000000", "gas_target_percentage": -34.56675333333333, "gas_used": "9814987", "gas_used_percentage": 32.71662333333333, "hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a", "height": 17615720, "miner": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "nonce": "0x0000000000000000", "parent_hash": "0xd464e02d81e2bdf6bc5fa9b8e33f0b564c464a82d821a3e56531f8636dc00dfa", "priority_fee": "45418705646601378", "rewards": [ { "reward": 0, "type": "Miner Reward | Emission Reward | Chore Reward | Uncle Reward" } ], "size": 49997, "state_root": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544", "timestamp": "2023-07-03T20:09:59.000000Z", "total_difficulty": "58750003716598352816469", "tx_count": 120, "tx_fees": "306681898876578498", "type": "block", "uncles_hashes": [ "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" ], "withdrawals_count": 16 } ``` ## Get all transactions for a specific block `/blocks/{block_number_or_hash}/transactions` Returns all transactions from the given block number or hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/blocks/0x5d90a9da2b8da402b11bc92c8011ec8a62a2d59da5c7ac4ae0f73ec51bb73368/transactions' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "timestamp": "2022-08-02T07:18:05.000000Z", "fee": { "type": "maximum | actual", "value": "9853224000000000" }, "gas_limit": 0, "block": 23484035, "status": "ok | error", "method": "transferFrom", "confirmations": 1035, "type": 2, "exchange_rate": "1866.51", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "tx_burnt_fee": "1099596081903840", "max_fee_per_gas": "55357460102", "result": "Error: (Awaiting internal transactions for reason)", "hash": "0x5d90a9da2b8da402b11bc92c8011ec8a62a2d59da5c7ac4ae0f73ec51bb73368", "gas_price": "26668595172", "priority_fee": "2056916056308", "base_fee_per_gas": "26618801760", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token_transfers": [ { "block_hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "log_index": "243", "method": "transfer", "timestamp": "2023-07-03T20:09:59.000000Z", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token": { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" }, "total": { "decimals": "18", "value": "1000" }, "tx_hash": "0x6662ad1ad2ea899e9e27832dc202fd2ef915a5d2816c1142e6933cff93f7c592", "type": "token_transfer" } ], "tx_types": [ "token_transfer", "contract_creation", "contract_call", "token_creation", "coin_transfer" ], "gas_used": "41309", "created_contract": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "position": 117, "nonce": 115, "has_error_in_internal_txs": false, "actions": [ { "data": { "debt_amount": "1.289548595490270429", "debt_symbol": "AAVE", "debt_address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "collateral_amount": "110.824768", "collateral_symbol": "USDC", "collateral_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "block_number": 1 }, "protocol": "aave_v3", "type": "liquidation_call" }, { "data": { "amount": "1.289548595490270429", "symbol": "AAVE", "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "block_number": 1 }, "protocol": "aave_v3", "type": "borrow | supply | withdraw | repay | flash_loan" }, { "data": { "symbol": "AAVE", "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "block_number": 1 }, "protocol": "aave_v3", "type": "enable_collateral | disable_collateral" }, { "data": { "name": "Uniswap V3: Positions NFT", "symbol": "UNI-V3-POS", "address": "0x1F98431c8aD98523631AE4a59f267346ea31F984", "to": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "ids": [ "1", "2" ], "block_number": 1 }, "protocol": "uniswap_v3", "type": "mint_nft" }, { "data": { "address0": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "address1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "amount0": "1.289548595490270429", "amount1": "110.824768", "symbol0": "AAVE", "symbol1": "USDC" }, "protocol": "uniswap_v3", "type": "burn | collect | swap" } ], "decoded_input": { "method_call": "transferFrom(address _from, address _to, uint256 _value)", "method_id": "23b872dd", "parameters": [ { "name": "signature", "type": "bytes", "value": "0x0" } ] }, "token_transfers_overflow": false, "raw_input": "0xa9059cbb000000000000000000000000ef8801eaf234ff82801821ffe2d78d60a0237f97000000000000000000000000000000000000000000000000000000003178cb80", "value": "0", "max_priority_fee_per_gas": "49793412", "revert_reason": "Error: (Awaiting internal transactions for reason)", "confirmation_duration": [ 0, 17479 ], "tx_tag": "private_tx_tag" } ], "next_page_params": { "block_number": 27736955, "index": 4, "items_count": 50 } } ``` ## Get all withdrawals for a specific block `/blocks/{block_number_or_hash}/withdrawals` Returns all withdrawals for the given block number or hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/blocks/0x5d90a9da2b8da402b11bc92c8011ec8a62a2d59da5c7ac4ae0f73ec51bb73368/withdrawals' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "index": 1, "amount": "1000000000000000000", "validator_index": 1, "receiver": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "block_number": 1, "timestamp": "2023-06-20T07:55:00.000000Z" } ], "next_page_params": { "index": 1, "items_count": 50 } } ``` # Main page methods Source: https://docs.autheo.com/apis/rest/resources/main-page-stats This document outlines Autheo methods pertaining to `main-page`. ## Get all main page transactions `/main-page/transactions` Return main page transactions. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/main-page/transactions' \ -H 'accept: application/json' ``` **Response** ``` [ { "timestamp": "2022-08-02T07:18:05.000000Z", "fee": { "type": "maximum | actual", "value": "9853224000000000" }, "gas_limit": 0, "block": 23484035, "status": "ok | error", "method": "transferFrom", "confirmations": 1035, "type": 2, "exchange_rate": "1866.51", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "tx_burnt_fee": "1099596081903840", "max_fee_per_gas": "55357460102", "result": "Error: (Awaiting internal transactions for reason)", "hash": "0x5d90a9da2b8da402b11bc92c8011ec8a62a2d59da5c7ac4ae0f73ec51bb73368", "gas_price": "26668595172", "priority_fee": "2056916056308", "base_fee_per_gas": "26618801760", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token_transfers": [ { "block_hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "log_index": "243", "method": "transfer", "timestamp": "2023-07-03T20:09:59.000000Z", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token": { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" }, "total": { "decimals": "18", "value": "1000" }, "tx_hash": "0x6662ad1ad2ea899e9e27832dc202fd2ef915a5d2816c1142e6933cff93f7c592", "type": "token_transfer" } ], "tx_types": [ "token_transfer", "contract_creation", "contract_call", "token_creation", "coin_transfer" ], "gas_used": "41309", "created_contract": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "position": 117, "nonce": 115, "has_error_in_internal_txs": false, "actions": [ { "data": { "debt_amount": "1.289548595490270429", "debt_symbol": "AAVE", "debt_address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "collateral_amount": "110.824768", "collateral_symbol": "USDC", "collateral_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "block_number": 1 }, "protocol": "aave_v3", "type": "liquidation_call" }, { "data": { "amount": "1.289548595490270429", "symbol": "AAVE", "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "block_number": 1 }, "protocol": "aave_v3", "type": "borrow | supply | withdraw | repay | flash_loan" }, { "data": { "symbol": "AAVE", "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "block_number": 1 }, "protocol": "aave_v3", "type": "enable_collateral | disable_collateral" }, { "data": { "name": "Uniswap V3: Positions NFT", "symbol": "UNI-V3-POS", "address": "0x1F98431c8aD98523631AE4a59f267346ea31F984", "to": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "ids": [ "1", "2" ], "block_number": 1 }, "protocol": "uniswap_v3", "type": "mint_nft" }, { "data": { "address0": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "address1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "amount0": "1.289548595490270429", "amount1": "110.824768", "symbol0": "AAVE", "symbol1": "USDC" }, "protocol": "uniswap_v3", "type": "burn | collect | swap" } ], "decoded_input": { "method_call": "transferFrom(address _from, address _to, uint256 _value)", "method_id": "23b872dd", "parameters": [ { "name": "signature", "type": "bytes", "value": "0x0" } ] }, "token_transfers_overflow": false, "raw_input": "0xa9059cbb000000000000000000000000ef8801eaf234ff82801821ffe2d78d60a0237f97000000000000000000000000000000000000000000000000000000003178cb80", "value": "0", "max_priority_fee_per_gas": "49793412", "revert_reason": "Error: (Awaiting internal transactions for reason)", "confirmation_duration": [ 0, 17479 ], "tx_tag": "private_tx_tag" } ] ``` ## Get all main page blocks `/main-page/blocks` Returns all main page blocks. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/main-page/blocks' \ -H 'accept: application/json' ``` **Response** ``` [ { "base_fee_per_gas": "26618801760", "burnt_fees": "261263193229977120", "burnt_fees_percentage": 85.19028810863084, "difficulty": "0", "extra_data": "0x", "gas_limit": "30000000", "gas_target_percentage": -34.56675333333333, "gas_used": "9814987", "gas_used_percentage": 32.71662333333333, "hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a", "height": 17615720, "miner": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "nonce": "0x0000000000000000", "parent_hash": "0xd464e02d81e2bdf6bc5fa9b8e33f0b564c464a82d821a3e56531f8636dc00dfa", "priority_fee": "45418705646601378", "rewards": [ { "reward": 0, "type": "Miner Reward | Emission Reward | Chore Reward | Uncle Reward" } ], "size": 49997, "state_root": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544", "timestamp": "2023-07-03T20:09:59.000000Z", "total_difficulty": "58750003716598352816469", "tx_count": 120, "tx_fees": "306681898876578498", "type": "block", "uncles_hashes": [ "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" ], "withdrawals_count": 16 } ] ``` ## Get main page indexing status `/main-page/indexing-status` Returns the indexing status of the main page. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/main-page/indexing-status' \ -H 'accept: application/json' ``` **Response** ``` { "finished_indexing": true, "finished_indexing_blocks": true, "indexed_blocks_ratio": "1.0", "indexed_internal_transactions_ratio": "1.0" } ``` # Smart contract methods Source: https://docs.autheo.com/apis/rest/resources/smart-contracts This document outlines Autheo methods pertaining to `smart-contracts`. ## Get all verified smart contracts `/smart-contracts` Returns a list of all verified smart contracts that match a given search query and filter type (Vyper/Solidity/Yul). **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/smart-contracts?q=proxy&filter=vyper%20%7C%20solidity%20%7C%20yul' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "address": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "coin_balance": "10000", "compiler_version": "v0.5.10+commit.5a6ea5b1", "language": "vyper | yul | solidity", "has_constructor_args": true, "optimization_enabled": true, "tx_count": 0, "verified_at": "2022-03-05T11:40:29.087000Z", "market_cap": 1000000000.0001 } ], "next_page_params": { "items_count": 50, "smart_contract_id": 46 } } ``` ## Get count of smart contracts `/smart-contracts/counters` Returns a counter describing the number of smart contracts on-chain. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/smart-contracts/counters' \ -H 'accept: application/json' ``` **Response** ``` { "new_smart_contracts_24h": "7", "new_verified_smart_contracts_24h": "0", "smart_contracts": "15", "verified_smart_contracts": "0" } ``` ## Get specific smart contract `/smart-contracts/{address_hash}` Returns the smart contract information for a given address hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/smart-contracts/0x394c399dbA25B99Ab7708EdB505d755B3aa29997' \ -H 'accept: application/json' ``` **Response** ``` { "verified_twin_address_hash": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "is_verified": true, "is_changed_bytecode": true, "is_partially_verified": true, "is_fully_verified": true, "is_verified_via_sourcify": true, "is_verified_via_eth_bytecode_db": true, "is_vyper_contract": true, "is_self_destructed": true, "can_be_visualized_via_sol2uml": true, "minimal_proxy_address_hash": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "sourcify_repo_url": "https://sourcify.repo.com/100/link_to_a_contract_at_sourcify", "name": "Cryptostamp3L2", "optimization_enabled": false, "optimizations_runs": 200, "compiler_version": "v0.8.4+commit.c7e474f2", "evm_version": "default", "verified_at": "2021-06-02T17:54:17.116055Z", "abi": "[{\"type\":\"constructor\",\"stateMutability\":\"nonpayable\",\"inputs\":[{\"type\":\"address\",\"name\":\"_bridgeDataAddress\",\"internalType\":\"address\"},{\"type\":\"uint256\",\"name\":\"_finalSupply\",\"internalType\":\"uint256\"},{\"type\":\"uint256[5]\",\"name\":\"_totalColorSupply\",\"internalType\":\"uint256[5]\"}]}]", "source_code": "contract A {}", "file_path": "contract.sol", "compiler_settings": { "compilationTarget": { "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": "ERC1967Proxy" }, "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs" }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [] }, "constructor_args": "0x01", "additional_sources": [ { "file_path": "contracts/erc-20.sol", "source_code": "pragma solidity ^0.8.0; contract A {}" } ], "decoded_constructor_args": [ [ "0x2a3885b3f0c98f3e36334d4fa7beda53cb0ae095", { "internalType": "address", "name": "_logic", "type": "address" } ] ], "deployed_bytecode": "0x01", "creation_bytecode": "0x02", "external_libraries": [ { "name": "MathLib", "address_hash": "0xF61f5c4a3664501F499A9289AaEe76a709CE536e" } ], "language": "solidity | vyper | yul" } ``` ## Get read methods for a specific address `/smart-contracts/{address_hash}/methods-read` Returns read methods from the given address hash that match a provided query string. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/smart-contracts/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/methods-read?is_custom_abi=true&from=0xF61f5c4a3664501F499A9289AaEe76a709CE536e' \ -H 'accept: application/json' ``` **Response** ``` [ { "inputs": [], "method_id": "2e64cec1", "name": "retrieve", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256", "value": 0 } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "method_id": "f851a440", "name": "admin", "outputs": [ { "internalType": "address", "name": "admin_", "type": "address" } ], "stateMutability": "nonpayable", "type": "function" } ] ``` ## Get all proxy read methods for a given address `/smart-contracts/{address_hash}/methods-read-proxy` Returns all proxy read methods for a given address hash and query string. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/smart-contracts/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/methods-read-proxy?is_custom_abi=true&from=0xF61f5c4a3664501F499A9289AaEe76a709CE536e' \ -H 'accept: application/json' ``` **Response** ``` [ { "inputs": [], "method_id": "2e64cec1", "name": "retrieve", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256", "value": 0 } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "method_id": "f851a440", "name": "admin", "outputs": [ { "internalType": "address", "name": "admin_", "type": "address" } ], "stateMutability": "nonpayable", "type": "function" } ] ``` ## Get write methods for a specific address `/smart-contracts/{address_hash}/methods-write` Returns write methods for the given address hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/smart-contracts/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/methods-write?is_custom_abi=true' \ -H 'accept: application/json' ``` **Response** ``` [ { "inputs": [ { "internalType": "uint256", "name": "num", "type": "uint256" } ], "name": "store", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ] ``` ## Get proxy write methods for a specific address `/smart-contracts/{address_hash}/methods-write-proxy` Returns proxy write methods for the given address hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/smart-contracts/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/methods-write-proxy?is_custom_abi=true' \ -H 'accept: application/json' ``` **Response** ``` [ { "inputs": [ { "internalType": "uint256", "name": "num", "type": "uint256" } ], "name": "store", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ] ``` ## Query a read method for a specific address `/smart-contracts/{address_hash}/query-read-method` Queries a read method at the given address hash. **Request** ``` curl -X 'POST' \ 'https://evm-explorer.autheo.com/api/v2/smart-contracts/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/query-read-method' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "args": [ 1123, "0xBb36c792B9B45Aaf8b848A1392B0d6559202729E" ], "method_id": "ab470f05", "from": "0xBb36c792B9B45Aaf8b848A1392B0d6559202729E", "contract_type": "proxy | regular" }' ``` **Response** ``` [ { "is_error": true, "result": { "raw": "4b415032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365", "code": 0, "message": "Reverted" } } ] ``` # Token methods Source: https://docs.autheo.com/apis/rest/resources/tokens This document outlines Autheo methods pertaining to `tokens`. ## Get all tokens `/tokens` Returns a list of all tokens that match a given string query or of a certain type (ERC-20/721/1155). **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/tokens?q=USDT&type=ERC-20%2CERC-721%2CERC-1155' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" } ], "next_page_params": { "contract_address_hash": "0x68749665ff8d2d112fa859aa293f07a622782f38", "holder_count": 1011, "is_name_null": false, "items_count": 50, "market_cap": "482534473.2170469", "name": "Tether Gold" } } ``` ## Get all tokens for a specific address `/tokens/{address_hash}` Returns info on all tokens held by the given address hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/tokens/0x394c399dbA25B99Ab7708EdB505d755B3aa29997' \ -H 'accept: application/json' ``` **Response** ``` { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" } ``` ## Get all transfers for a specific address `/tokens/{address_hash}/transfers` Returns all token transfers performed by the given address hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/tokens/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/transfers' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "block_hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "log_index": "243", "method": "transfer", "timestamp": "2023-07-03T20:09:59.000000Z", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token": { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" }, "total": { "decimals": "18", "value": "1000" }, "tx_hash": "0x6662ad1ad2ea899e9e27832dc202fd2ef915a5d2816c1142e6933cff93f7c592", "type": "token_transfer" } ], "next_page_params": { "block_number": 27736955, "index": 61 } } ``` ## Get all token holders for a specific address `/tokens/{address_hash}/holders` Returns all token holders for the given address. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/tokens/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/holders' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "address": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "value": "10000", "token_id": "10000", "token": { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" } } ], "next_page_params": { "items_count": 2, "value": 790000000000000000000 } } ``` ## Get count of token holders and transfers for a specific address `/tokens/{address_hash}/counters` Returns a counter for token holders and transfers for the given address hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/tokens/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/counters' \ -H 'accept: application/json' ``` **Response** ``` { "token_holders_count": "100", "transfers_count": "1000" } ``` ## Get all NFT instances for a specific address `/tokens/{address_hash}/instances` Returns all non-fungible token (NFT) instances for the given address hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/tokens/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/instances' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "is_unique": true, "id": "431", "holder_address_hash": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "image_url": "example.com/picture.png", "animation_url": "example.com/video.mp4", "external_app_url": "d-app.com", "metadata": { "year": 2023, "tags": [ "poap", "event" ], "name": "Social Listening Committee #2 Attendees", "image_url": "https://assets.poap.xyz/chanel-poap-4c-2023-logo-1675083420470.png", "home_url": "https://app.poap.xyz/token/6292128", "external_url": "https://api.poap.tech/metadata/99010/6292128", "description": "This is the POAP for attendees of the second Social Listening Committee.", "attributes": [ { "value": "01-Feb-2023", "trait_type": "startDate" }, { "value": "01-Feb-2023", "trait_type": "endDate" }, { "value": "false", "trait_type": "virtualEvent" }, { "value": "Paris", "trait_type": "city" }, { "value": "France", "trait_type": "country" }, { "value": "https://www.chanel.com", "trait_type": "eventURL" } ] }, "owner": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token": { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" } } ], "next_page_params": { "unique_token": 97464 } } ``` ## Get specific NFT instance for a specific address `/tokens/{address_hash}/instances/{id}` Returns an NFT instance by id from a the given address hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/tokens/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/instances/431' \ -H 'accept: application/json' ``` **Response** ``` { "is_unique": true, "id": "431", "holder_address_hash": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "image_url": "example.com/picture.png", "animation_url": "example.com/video.mp4", "external_app_url": "d-app.com", "metadata": { "year": 2023, "tags": [ "poap", "event" ], "name": "Social Listening Committee #2 Attendees", "image_url": "https://assets.poap.xyz/chanel-poap-4c-2023-logo-1675083420470.png", "home_url": "https://app.poap.xyz/token/6292128", "external_url": "https://api.poap.tech/metadata/99010/6292128", "description": "This is the POAP for attendees of the second Social Listening Committee.", "attributes": [ { "value": "01-Feb-2023", "trait_type": "startDate" }, { "value": "01-Feb-2023", "trait_type": "endDate" }, { "value": "false", "trait_type": "virtualEvent" }, { "value": "Paris", "trait_type": "city" }, { "value": "France", "trait_type": "country" }, { "value": "https://www.chanel.com", "trait_type": "eventURL" } ] }, "owner": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token": { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" } } ``` ## Get transfers for a specific NFT instance in a specific address `/tokens/{address_hash}/instances/{id}/transfers` Returns transfers of the specified NFT instance for the given address hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/tokens/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/instances/431/transfers' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "block_hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "log_index": "243", "method": "transfer", "timestamp": "2023-07-03T20:09:59.000000Z", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token": { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" }, "total": { "decimals": "18", "value": "1000" }, "tx_hash": "0x6662ad1ad2ea899e9e27832dc202fd2ef915a5d2816c1142e6933cff93f7c592", "type": "token_transfer" } ], "next_page_params": { "block_number": 27736955, "index": 61, "token_id": 50 } } ``` ## Get token holders for a specific NFT instance and address `/tokens/{address_hash}/instances/{id}/holders` Returns token holders for a specific NFT instance and address hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/tokens/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/instances/431/holders' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "address": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "value": "10000", "token_id": "10000", "token": { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" } } ], "next_page_params": { "value": 790000000000000000000, "token_id": "953848", "items_count": 50 } } ``` ## Get count of transfers for a specific NFT instance and address `/tokens/{address_hash}/instances/{id}/transfers-count` Returns a transfer counter for the specific NFT instance and address hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/tokens/0x394c399dbA25B99Ab7708EdB505d755B3aa29997/instances/431/transfers-count' \ -H 'accept: application/json' ``` **Response** ``` { "transfers_count": 10 } ``` # Transaction methods Source: https://docs.autheo.com/apis/rest/resources/transactions This document outlines Autheo methods pertaining to `transactions`. ## Get transactions `/transactions` Returns transactions of the specified queries: * `filter` - Either pending or validated * `type` - The type of transaction, i.e., `token_transfer`, `contract_call`, `coin_transfer` or `token_creation`. * `method` - The method used for the transaction, i.e., `approve`, `transfer`, `multicall`, `mint` or `commit`. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/transactions?filter=pending&type=token_transfer&method=transfer' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "timestamp": "2022-08-02T07:18:05.000000Z", "fee": { "type": "maximum | actual", "value": "9853224000000000" }, "gas_limit": 0, "block": 23484035, "status": "ok | error", "method": "transferFrom", "confirmations": 1035, "type": 2, "exchange_rate": "1866.51", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "tx_burnt_fee": "1099596081903840", "max_fee_per_gas": "55357460102", "result": "Error: (Awaiting internal transactions for reason)", "hash": "0x5d90a9da2b8da402b11bc92c8011ec8a62a2d59da5c7ac4ae0f73ec51bb73368", "gas_price": "26668595172", "priority_fee": "2056916056308", "base_fee_per_gas": "26618801760", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token_transfers": [ { "block_hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "log_index": "243", "method": "transfer", "timestamp": "2023-07-03T20:09:59.000000Z", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token": { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" }, "total": { "decimals": "18", "value": "1000" }, "tx_hash": "0x6662ad1ad2ea899e9e27832dc202fd2ef915a5d2816c1142e6933cff93f7c592", "type": "token_transfer" } ], "tx_types": [ "token_transfer", "contract_creation", "contract_call", "token_creation", "coin_transfer" ], "gas_used": "41309", "created_contract": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "position": 117, "nonce": 115, "has_error_in_internal_txs": false, "actions": [ { "data": { "debt_amount": "1.289548595490270429", "debt_symbol": "AAVE", "debt_address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "collateral_amount": "110.824768", "collateral_symbol": "USDC", "collateral_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "block_number": 1 }, "protocol": "aave_v3", "type": "liquidation_call" }, { "data": { "amount": "1.289548595490270429", "symbol": "AAVE", "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "block_number": 1 }, "protocol": "aave_v3", "type": "borrow | supply | withdraw | repay | flash_loan" }, { "data": { "symbol": "AAVE", "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "block_number": 1 }, "protocol": "aave_v3", "type": "enable_collateral | disable_collateral" }, { "data": { "name": "Uniswap V3: Positions NFT", "symbol": "UNI-V3-POS", "address": "0x1F98431c8aD98523631AE4a59f267346ea31F984", "to": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "ids": [ "1", "2" ], "block_number": 1 }, "protocol": "uniswap_v3", "type": "mint_nft" }, { "data": { "address0": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "address1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "amount0": "1.289548595490270429", "amount1": "110.824768", "symbol0": "AAVE", "symbol1": "USDC" }, "protocol": "uniswap_v3", "type": "burn | collect | swap" } ], "decoded_input": { "method_call": "transferFrom(address _from, address _to, uint256 _value)", "method_id": "23b872dd", "parameters": [ { "name": "signature", "type": "bytes", "value": "0x0" } ] }, "token_transfers_overflow": false, "raw_input": "0xa9059cbb000000000000000000000000ef8801eaf234ff82801821ffe2d78d60a0237f97000000000000000000000000000000000000000000000000000000003178cb80", "value": "0", "max_priority_fee_per_gas": "49793412", "revert_reason": "Error: (Awaiting internal transactions for reason)", "confirmation_duration": [ 0, 17479 ], "tx_tag": "private_tx_tag" } ], "next_page_params": { "block_number": 27170298, "index": 0, "items_count": 50 } } ``` ## Get information for a specific transaction `/transactions/{transaction_hash}` Returns information for the given transaction hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/transactions/0x5d90a9da2b8da402b11bc92c8011ec8a62a2d59da5c7ac4ae0f73ec51bb73368' \ -H 'accept: application/json' ``` **Response** ``` { "timestamp": "2022-08-02T07:18:05.000000Z", "fee": { "type": "maximum | actual", "value": "9853224000000000" }, "gas_limit": 0, "block": 23484035, "status": "ok | error", "method": "transferFrom", "confirmations": 1035, "type": 2, "exchange_rate": "1866.51", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "tx_burnt_fee": "1099596081903840", "max_fee_per_gas": "55357460102", "result": "Error: (Awaiting internal transactions for reason)", "hash": "0x5d90a9da2b8da402b11bc92c8011ec8a62a2d59da5c7ac4ae0f73ec51bb73368", "gas_price": "26668595172", "priority_fee": "2056916056308", "base_fee_per_gas": "26618801760", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token_transfers": [ { "block_hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "log_index": "243", "method": "transfer", "timestamp": "2023-07-03T20:09:59.000000Z", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "token": { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" }, "total": { "decimals": "18", "value": "1000" }, "tx_hash": "0x6662ad1ad2ea899e9e27832dc202fd2ef915a5d2816c1142e6933cff93f7c592", "type": "token_transfer" } ], "tx_types": [ "token_transfer", "contract_creation", "contract_call", "token_creation", "coin_transfer" ], "gas_used": "41309", "created_contract": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "position": 117, "nonce": 115, "has_error_in_internal_txs": false, "actions": [ { "data": { "debt_amount": "1.289548595490270429", "debt_symbol": "AAVE", "debt_address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "collateral_amount": "110.824768", "collateral_symbol": "USDC", "collateral_address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "block_number": 1 }, "protocol": "aave_v3", "type": "liquidation_call" }, { "data": { "amount": "1.289548595490270429", "symbol": "AAVE", "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "block_number": 1 }, "protocol": "aave_v3", "type": "borrow | supply | withdraw | repay | flash_loan" }, { "data": { "symbol": "AAVE", "address": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "block_number": 1 }, "protocol": "aave_v3", "type": "enable_collateral | disable_collateral" }, { "data": { "name": "Uniswap V3: Positions NFT", "symbol": "UNI-V3-POS", "address": "0x1F98431c8aD98523631AE4a59f267346ea31F984", "to": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "ids": [ "1", "2" ], "block_number": 1 }, "protocol": "uniswap_v3", "type": "mint_nft" }, { "data": { "address0": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", "address1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "amount0": "1.289548595490270429", "amount1": "110.824768", "symbol0": "AAVE", "symbol1": "USDC" }, "protocol": "uniswap_v3", "type": "burn | collect | swap" } ], "decoded_input": { "method_call": "transferFrom(address _from, address _to, uint256 _value)", "method_id": "23b872dd", "parameters": [ { "name": "signature", "type": "bytes", "value": "0x0" } ] }, "token_transfers_overflow": false, "raw_input": "0xa9059cbb000000000000000000000000ef8801eaf234ff82801821ffe2d78d60a0237f97000000000000000000000000000000000000000000000000000000003178cb80", "value": "0", "max_priority_fee_per_gas": "49793412", "revert_reason": "Error: (Awaiting internal transactions for reason)", "confirmation_duration": [ 0, 17479 ], "tx_tag": "private_tx_tag" } ``` ## Get token transfers for a specific transaction `/transactions/{transaction_hash}/token-transfers` Returns token transfers within a given transaction hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/transactions/0x6662ad1ad2ea899e9e27832dc202fd2ef915a5d2816c1142e6933cff93f7c592/token-transfers?type=ERC-20' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "block_hash": "0xf569ec751152b2f814001fc730f7797aa155e4bc3ba9cb6ba24bc2c8c9468c1a", "from": { "hash": "0xcc4e74EB7F0D2F3e8c86Ac08A6B70689F564b226", "implementation_name": null, "is_contract": false, "is_verified": false, "name": null, "private_tags": [], "public_tags": [], "watchlist_names": [] }, "log_index": "243", "method": null, "timestamp": null, "to": { "hash": "0xEf8801eaf234ff82801821FFe2d78D60a0237F97", "implementation_name": null, "is_contract": false, "is_verified": false, "name": null, "private_tags": [], "public_tags": [], "watchlist_names": [] }, "token": { "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", "circulating_market_cap": "83606435600.3635", "decimals": "6", "exchange_rate": "0.999487", "holders": "1149", "icon_url": null, "name": "Tether USD", "symbol": "USDT", "total_supply": "39030615894320966", "type": "ERC-20" }, "total": { "decimals": "6", "value": "830000000" }, "tx_hash": "0x6662ad1ad2ea899e9e27832dc202fd2ef915a5d2816c1142e6933cff93f7c592", "type": "token_transfer" } ], "next_page_params": { "batch_block_hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "batch_log_index": 0, "batch_transaction_hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "index_in_batch": 1 } } ``` ## Get internal transactions for a specific transaction `/transactions/{transaction_hash}/internal-transactions` Returns internal transactions for a given transaction hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/transactions/0x08ea4d75ad0abe327a7fd368733eaeac43077989e635d800530d7906ebf3bd54/internal-transactions' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "block": 8844586, "created_contract": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "error": "reverted", "from": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "gas_limit": "351759", "index": 1, "success": true, "timestamp": "2023-04-17T10:37:12.000000Z", "to": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "transaction_hash": "0x08ea4d75ad0abe327a7fd368733eaeac43077989e635d800530d7906ebf3bd54", "type": "call", "value": "30000000000000000" } ], "next_page_params": { "block_number": 27350206, "index": 1, "items_count": 50, "transaction_index": 0 } } ``` ## Get logs for a specific transaction `/transactions/{transaction_hash}/logs` Returns logs for a given transaction hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/transactions/0x08ea4d75ad0abe327a7fd368733eaeac43077989e635d800530d7906ebf3bd54/logs' \ -H 'accept: application/json' ``` **Response** ``` { "items": [ { "address": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "block_hash": "0xf90fdff5f174f7f29ebdf203d32cad2fe95376e41880bb9e731ca5eb0eef7941", "block_number": 8844586, "data": "0x000000000000000000000000000000000000000000000000006a94d74f430000", "decoded": { "method_call": "transferFrom(address _from, address _to, uint256 _value)", "method_id": "23b872dd", "parameters": [ { "name": "signature", "type": "bytes", "value": "0x0", "indexed": true } ] }, "index": 35, "smart_contract": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "topics": [ "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c" ], "tx_hash": "0x08ea4d75ad0abe327a7fd368733eaeac43077989e635d800530d7906ebf3bd54" } ], "next_page_params": { "index": 0, "items_count": 50, "block_number": 2 } } ``` ## Get raw traces for a specific transaction `/transactions/{transaction_hash}/raw-trace` Returns raw traces from the given transaction hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/transactions/0x08ea4d75ad0abe327a7fd368733eaeac43077989e635d800530d7906ebf3bd54/raw-trace' \ -H 'accept: application/json' ``` **Response** ``` [ { "action": { "callType": "call", "to": "0x162e898bd0aacb578c8d5f8d6ca588c13d2a383f", "from": "0xf57b55b01b831e602e09674a4e5d69cbcf343f98", "input": "0x630cea8e000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000041c25b36779231e71769118210c3eb64c0a9c7577b925b309af3183e13acc7cf30210493d13c8c6c3c0bd337d5e39e454fece0c301f0aedb6c43c7a37650ac83e71c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000019500050000f0add9e5dc02faeca12e9669f045685449d6b80a000000000000744359447362798334d3485c64d1e4870fde2ddc0d75f0b456250dc9990662a6f25808cc74a6d1131ea9000927c001018064382ae87cdd000000000000000000000000bab3cbdcbcc578445480a79ed80269c50bb5b71800000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000351af1631aa5ea1ca62ad8a4e3cd87128d4d910800000000000000000000000000000000000000000000005b8decde02914ce837000000000000000000000000000000000000000000000000000000000000001e4d45444f4f5a412045636f73797374656d2076322e30206f6e2078446169000000000000000000000000000000000000000000000000000000000000000000044d445a41000000000000000000000000000000000000000000000000000000000000000000000000000000", "gas": "0x25D3FC", "value": "0x0" }, "subtraces": 0, "traceAddress": [ 0, 0 ], "type": "call", "error": "Reverted", "result": { "gasUsed": "0x25D3FC", "output": "0x0" } } ] ``` ## Get state changes for a specific transaction `/transactions/{transaction_hash}/state-changes` Returns state changes for the given transaction hash. **Request** ``` curl -X 'GET' \ 'https://evm-explorer.autheo.com/api/v2/transactions/0x08ea4d75ad0abe327a7fd368733eaeac43077989e635d800530d7906ebf3bd54/state-changes' \ -H 'accept: application/json' ``` **Responses** ``` { "items": [ { "token": { "circulating_market_cap": "83606435600.3635", "icon_url": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "name": "Tether USD", "decimals": "6", "symbol": "USDT", "address": "0x394c399dbA25B99Ab7708EdB505d755B3aa29997", "type": "ERC-20", "holders": "837494234523", "exchange_rate": "0.99", "total_supply": "10000000" }, "type": "coin | token", "is_miner": true, "address": { "hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "implementation_name": "implementationName", "name": "contractName", "is_contract": true, "private_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "watchlist_names": [ { "display_name": "name to show", "label": "label" } ], "public_tags": [ { "address_hash": "0xEb533ee5687044E622C69c58B1B12329F56eD9ad", "display_name": "name to show", "label": "label" } ], "is_verified": true }, "balance_before": "100000000", "balance_after": "100000000", "token_id": null, "change": [ { "direction": "from | to", "total": { "token_id": "1" } } ] } ], "next_page_params": { "items_count": 1, "state_changes": null } } ``` # Deployment checklist Source: https://docs.autheo.com/developers/guides/deployment-checklist Pre-deployment verification steps before launching a smart contract on Autheo Chain mainnet. Use this checklist before deploying any contract to Autheo Chain mainnet. Complete each item on testnet first. ## Compilation * [ ] Solidity version pinned (`pragma solidity ^0.8.20` or specific version) * [ ] EVM version set to `paris` in Hardhat/Foundry config * [ ] No compiler warnings in the output * [ ] All imports are from audited, versioned packages (e.g., `@openzeppelin/contracts@5.0.x`) ## Testing * [ ] Unit tests cover all public functions * [ ] Unit tests cover edge cases and revert conditions * [ ] Test coverage ≥ 90% (use `forge coverage` or `hardhat coverage`) * [ ] Integration tests run against a fork or devnet * [ ] Gas usage benchmarked — no unexpectedly high-cost functions ## Security review * [ ] Static analysis run (Slither, Mythril, or equivalent) * [ ] Reentrancy risks identified and mitigated * [ ] Access control on all privileged functions * [ ] Integer overflow protection (Solidity 0.8+ or SafeMath) * [ ] External audit completed (for contracts holding significant value) * [ ] No hardcoded addresses, private keys, or secrets in contract code ## Testnet deployment * [ ] Contract deployed and verified on Autheo Testnet * [ ] All functions tested with real transactions on testnet * [ ] Events and logs verified in the block explorer * [ ] Upgrade path tested if using a proxy pattern * [ ] Gas estimates confirmed on testnet match expectations ## Configuration * [ ] Constructor arguments documented and verified * [ ] Proxy admin key secured (if using an upgradeable proxy) * [ ] Contract ownership transferred to the correct multisig or DAO address * [ ] Any time locks or governance delays configured correctly * [ ] Contract verified on the [block explorer](https://evm-explorer.autheo.com/) (upload ABI/source) ## Network settings * [ ] Deployment script targets the correct network config (`autheoMainnet` or `autheoTestnet`) * [ ] Chain ID confirmed: `2127` for mainnet, `785` for testnet * [ ] `evmVersion: "paris"` confirmed in compiler settings * [ ] Deployer account has sufficient `aauth` for gas ## Post-deployment * [ ] Contract address recorded in deployment log * [ ] ABI exported and stored in version control * [ ] Contract source verified on block explorer * [ ] Initial state validated (e.g., owner set correctly, initial balances match) * [ ] Monitoring configured for critical events (see [security best practices](/developers/guides/security-best-practices)) ## Emergency plan * [ ] Pause mechanism in place (if contract is pausable) * [ ] Owner/admin key documented and secured * [ ] Incident response contact list documented * [ ] Upgrade or migration plan documented if a critical bug is found post-deployment # Gas fees and transaction lifecycle Source: https://docs.autheo.com/developers/guides/gas-fees-and-tx-lifecycle How gas estimation, fee payment, and transaction confirmation work on Autheo Chain. Autheo Chain uses the same gas model as Ethereum, with fees denominated in `aauth` (the base unit of THEO). This page explains how to estimate gas, set fees, and understand when a transaction is finalized. ## Fee denomination All transaction fees are paid in `aauth`: | Unit | Conversion | | -------------------- | ----------------------------------- | | `1 aauth` | Smallest fee unit | | `1 THEO` | 10¹⁸ `aauth` | | Typical transfer fee | \~5,000,000 `aauth` (0.000005 THEO) | ## Gas estimation Use `--gas auto` with `--gas-adjustment 1.5` for CLI transactions to avoid out-of-gas failures: ```bash theme={null} autheod tx bank send mykey 1000000000000000000aauth \ --chain-id autheo_2127-1 \ --keyring-backend file \ --gas auto \ --gas-adjustment 1.5 \ --fees 5000000aauth ``` For EVM transactions, use `eth_estimateGas`: ```bash theme={null} curl -X POST https://rpc1.autheo.com \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "eth_estimateGas", "params": [{"from": "0x...", "to": "0x...", "value": "0xDE0B6B3A7640000"}], "id": 1 }' ``` ## Gas price Query the current suggested gas price: ```bash theme={null} curl -X POST https://rpc1.autheo.com \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":1}' ``` In ethers.js: ```javascript theme={null} const feeData = await provider.getFeeData(); console.log("Gas price:", feeData.gasPrice.toString(), "aauth"); ``` ## Transaction lifecycle ``` 1. Submit → mempool 2. Validator includes tx in next block (~5 seconds) 3. Block committed (1 confirmation = finalized in CometBFT) 4. Receipt available via eth_getTransactionReceipt ``` Autheo Chain uses CometBFT BFT consensus — **one block confirmation is final**. There are no reorgs. You do not need to wait for multiple confirmations as you would on Ethereum. ## Checking transaction status **CLI:** ```bash theme={null} autheod query tx --chain-id autheo_2127-1 ``` **JSON-RPC:** ```bash theme={null} curl -X POST https://rpc1.autheo.com \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x"],"id":1}' ``` A receipt with `"status": "0x1"` means success. `"status": "0x0"` means the transaction was included but reverted. ## Common fee errors | Error | Cause | Fix | | ------------------------------- | ---------------------- | ----------------------------------------------------- | | `insufficient funds for gas` | Wallet balance too low | Fund the account with more `aauth` | | `out of gas` | Gas limit set too low | Use `--gas auto --gas-adjustment 1.5` | | `tx already in mempool` | Duplicate transaction | Wait for existing tx to confirm or increase gas price | | `signature verification failed` | Wrong chain ID | Pass `--chain-id autheo_2127-1` | ## EIP-1559 support Autheo Chain supports EIP-1559 fee transactions (type 2). Use `maxFeePerGas` and `maxPriorityFeePerGas` in ethers.js: ```javascript theme={null} const tx = await wallet.sendTransaction({ to: recipient, value: ethers.parseEther("1.0"), maxFeePerGas: ethers.parseUnits("25", "gwei"), maxPriorityFeePerGas: ethers.parseUnits("1", "gwei") }); await tx.wait(1); // 1 confirmation is final ``` # Key management Source: https://docs.autheo.com/developers/guides/key-management Managing operator and consensus keys on Autheo Chain: keyring backends, the eth_secp256k1 algorithm, address formats, and security best practices. Autheo Chain uses `eth_secp256k1` — the same elliptic curve as Ethereum. A single private key controls both your Cosmos address (`autheo1...`) and your Ethereum address (`0x...`), enabling native compatibility with hardware wallets and MetaMask. ## Two key types | Key | Purpose | Location | | ------------- | -------------------------------------------------------- | -------------------------------------- | | Operator key | Signs staking, governance, and all on-chain transactions | Keyring (file, OS, or hardware wallet) | | Consensus key | Signs block proposals for CometBFT consensus | `config/priv_validator_key.json` | A compromised operator key allows an attacker to drain your delegated funds. A compromised consensus key can cause permanent tombstoning from double-signing. ## Keyring backends | Backend | Security | Use case | | ------- | -------- | ----------------------------------------------------------------- | | `file` | Medium | Headless production servers (AES-encrypted, passphrase-protected) | | `os` | High | Production with OS keystore integration | | `pass` | High | Advanced Linux setups using GPG | | `test` | None | Development only — never in production | ## Creating a key ```bash theme={null} autheod keys add mykey \ --keyring-backend file \ --home /path/to/node-home ``` Save the 24-word mnemonic phrase immediately. It is displayed only once. There is no way to recover it afterward. Store it offline in encrypted storage. ## Restoring a key from mnemonic ```bash theme={null} autheod keys add \ --recover \ --keyring-backend file \ --home /path/to/node-home ``` ## Viewing address formats Each key has three equivalent address representations: ```bash theme={null} # Cosmos address (autheo1...) autheod keys show mykey --keyring-backend file # Validator operator address (autheovaloper1...) autheod keys show mykey --bech val --keyring-backend file # Ethereum hex address (0x...) autheod keys show mykey --bech eth --keyring-backend file ``` The `autheovaloper1...` address is derived from the same 20 bytes as `autheo1...` — only the Bech32 prefix differs. ## Consensus key Generated automatically during `autheod init`, stored in `config/priv_validator_key.json`. ```bash theme={null} # Get public key for MsgCreateValidator autheod tendermint show-validator --home /path/to/node-home ``` Back up this file immediately to encrypted offline storage. If duplicated on another running node, double-signing causes permanent tombstoning. ## Remote signing (production recommendation) Keep the consensus key off the validator host entirely using `tmkms` or an HSM: ```toml theme={null} # config/config.toml [consensus] priv_validator_laddr = "tcp://127.0.0.1:26658" ``` ## Hardware wallet support Autheo Chain's `eth_secp256k1` key algorithm is compatible with Ledger and Trezor. Use the `--ledger` flag with key commands when a hardware wallet is connected. ## Key security checklist * [ ] Mnemonic backed up to offline encrypted storage * [ ] `priv_validator_key.json` backed up separately from the mnemonic * [ ] `--keyring-backend test` never used in production * [ ] Consensus key protected by remote signer or HSM * [ ] Keyring password stored separately from the encrypted keystore file * [ ] No key files committed to version control # Security best practices Source: https://docs.autheo.com/developers/guides/security-best-practices Security recommendations for developers building smart contracts and applications on Autheo Chain. Building on an EVM-compatible chain means Ethereum's security patterns and common vulnerabilities apply directly to Autheo Chain. This guide covers the most important practices for contract security, key management, and application hardening. ## Private key management Never expose private keys in source code, environment variables committed to version control, or client-side JavaScript. A single key compromise can drain all associated funds irreversibly. * Store private keys in environment variables loaded from `.env` files that are **gitignored** * For production deployments, use a hardware wallet (Ledger/Trezor) or a secrets manager (AWS Secrets Manager, HashiCorp Vault) * Rotate keys immediately if any exposure is suspected * Use separate deployment keys for testnet and mainnet — never reuse keys across environments ## Smart contract security ### Reentrancy Always follow the checks-effects-interactions pattern: ```solidity theme={null} // ✅ Safe: update state before external call function withdraw(uint256 amount) external { require(balances[msg.sender] >= amount, "Insufficient balance"); balances[msg.sender] -= amount; // Effect first (bool success, ) = msg.sender.call{value: amount}(""); // Interaction last require(success, "Transfer failed"); } // ❌ Unsafe: external call before state update function withdraw(uint256 amount) external { (bool success, ) = msg.sender.call{value: amount}(""); balances[msg.sender] -= amount; // Too late } ``` Use OpenZeppelin's `ReentrancyGuard` as a defense-in-depth measure. ### Integer overflow Use Solidity 0.8.x or higher (built-in overflow checks), or OpenZeppelin's `SafeMath` for older compiler versions. ### Access control Use OpenZeppelin's `Ownable` or `AccessControl` for privileged functions: ```solidity theme={null} import "@openzeppelin/contracts/access/Ownable.sol"; contract MyContract is Ownable { function sensitiveOperation() external onlyOwner { // ... } } ``` ### Input validation * Validate all user-supplied inputs at the start of functions * Check address parameters are non-zero * Bound numeric inputs to reasonable ranges ## Auditing Before deploying any contract that holds real value: 1. **Internal review** — Have at least one other developer read every line 2. **Static analysis** — Run [Slither](https://github.com/crytic/slither) or [Mythril](https://github.com/ConsenSys/mythril) 3. **External audit** — Engage a professional audit firm for high-value contracts 4. **Bug bounty** — Consider a public bug bounty program post-deployment ## Deployment checklist See the [deployment checklist](/developers/guides/deployment-checklist) for a pre-deployment verification procedure. ## EVM version Always compile with `evmVersion: "paris"` to ensure opcode compatibility with Autheo Chain. Using `shanghai` or later may introduce opcodes not supported by the chain's current EVM configuration. ## RPC security * Use HTTPS endpoints only in production — never plain HTTP * Do not expose private node RPC endpoints publicly * Implement rate limiting on any middleware that proxies RPC calls * Never log raw transaction data that may contain private keys or sensitive parameters ## Upgrade patterns If your contracts need upgradeability, use audited proxy patterns: * [OpenZeppelin UUPS Proxy](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) * [OpenZeppelin Transparent Proxy](https://docs.openzeppelin.com/contracts/4.x/api/proxy#TransparentUpgradeableProxy) Document the upgrade key holder and consider timelocks for governance-level changes. # Developers Source: https://docs.autheo.com/developers/overview Build smart contracts and dApps on Autheo Chain — an EVM-compatible blockchain built on Cosmos SDK. Start here. Autheo Chain is EVM-compatible, so any Solidity contract that runs on Ethereum runs on Autheo with no changes. It is also built on the Cosmos SDK, which means you can interact with native chain modules (staking, governance, IBC) using the `autheod` CLI or the REST/JSON-RPC APIs. ## What you can build * **EVM smart contracts** — ERC-20 tokens, NFTs, DeFi protocols, any Solidity contract * **dApps** — Connect MetaMask or WalletConnect; use ethers.js or viem as usual * **Indexers and analytics** — Query the block explorer REST API or subscribe via WebSocket * **Cosmos-native integrations** — Interact with `x/license`, `x/staking`, `x/bank` via CLI or gRPC ## Fastest path to first success Install MetaMask and add the Autheo network. See [MetaMask install](/getting-started/wallets/metamask-install) and [Connect to testnet](/getting-started/wallets/connect-to-testnet). Request test THEO from the [testnet faucet](/getting-started/network/faucet) to cover gas fees. Open [Remix IDE](https://remix.ethereum.org), paste your Solidity contract, compile, and deploy directly to Autheo Testnet from MetaMask. Follow the step-by-step [deploy a smart contract](/developers/tutorials/deploy-smart-contract) guide. ## Choose your development path Deploy Solidity contracts using Remix, Hardhat, or Foundry. MetaMask is the only prerequisite. Use the `autheod` CLI to interact with native modules. Required for staking operations, key management, and node operation. For EVM smart contract development with Remix IDE, the `autheod` CLI is optional. You can compile, deploy, and call contracts entirely through MetaMask. Install the CLI only if you need to interact with Cosmos-native modules or operate a node. ## Prerequisites Depending on your path, you may need familiarity with: | Topic | Why it matters | Learn | | ---------------- | ---------------------------------------------------- | ------------------------------------------------------------- | | Solidity | Primary language for EVM contracts on Autheo | [soliditylang.org](https://soliditylang.org/) | | OpenZeppelin | Standard library for audited contract templates | [openzeppelin.com](https://www.openzeppelin.com/) | | ethers.js / viem | JavaScript libraries for interacting with EVM chains | [docs.ethers.org](https://docs.ethers.org/) | | MetaMask | Browser wallet for EVM transaction signing | [MetaMask install](/getting-started/wallets/metamask-install) | | Cosmos SDK | Framework underlying Autheo's native modules | [docs.cosmos.network](https://docs.cosmos.network/) | | Go | Required for building `autheod` from source | [go.dev](https://go.dev/dl/) | ## Network reference | Network | JSON-RPC | Chain ID (EVM) | Chain ID (Cosmos) | | ------- | --------------------------------- | -------------- | ----------------- | | Mainnet | `https://rpc1.autheo.com` | `2127` | `autheo_2127-1` | | Testnet | `https://testnet-rpc1.autheo.com` | `785` | `autheo_785-1` | See [Network endpoints](/getting-started/network/endpoints) for the full list including additional RPC endpoints, WebSocket, REST, and explorer URLs. # Autheo CLI installation Source: https://docs.autheo.com/developers/setup/cli-installation ## Autheod `autheod` is an all-in-one command-line interface. It supports wallet management, funds transfers and staking operations. ### Build and configurations #### Build prerequisites You can get the latest `autheod` binary here from the [testnet page](https://github.com/autheo-blockchain/autheo-chain-core/releases). #### Using `autheod` `autheod` is bundled with the Autheo Platform code. After you have obtained the latest `autheod` binary, run: ``` $ autheod [command] ``` There is also a `-h`, `--help` command available. ``` $ autheod -h ``` ## Config and data directory By default, your configuration and data are stored in the folder located in the `~/.autheo` directory. Ensure that you have backed up your wallet after creating it. Otherwise, your funds may be inaccessible in the event of an accident. ### Configure `autheod` config and data directory To specify the `autheod` config and data storage directory; you can add a global flag `--home `. ### Configuration setting We can view the default config setting by using autheod config command: ``` $ autheod config { "chain-id": "", "keyring-backend": "os", "output": "text", "node": "tcp://localhost:26657", "broadcast-mode": "sync" } ``` We can make changes to the default settings upon our choices, so it allows users to set the configuration beforehand all at once, so it would be ready with the same config afterward. For example, the chain-id can be changed to `auth_ChainID-1` from a blank name by: ``` $ autheod config "chain-id" autheo_2127-1 $ autheod config { "chain-id": "autheo_2127-1", "keyring-backend": "os", "output": "text", "node": "tcp://localhost:26657", "broadcast-mode": "sync" } ``` Other values can be changed in the same way. Alternatively, we can directly make the changes to the config values in one place at client.toml. It is under the path of `.autheo/config/client.toml`: ``` ############################################################################ ### Client Configuration ### ############################################################################ # The network chain ID chain-id = "autheo_2127-1" # The keyring's backend, where the keys are stored (os|file|kwallet|pass|test|memory) keyring-backend = "os" # CLI output format (text|json) output = "number" # : to Tendermint RPC interface for this chain node = "tcp://localhost:26657" # Transaction broadcasting mode (sync|async|block) broadcast-mode = "sync" ``` After the necessary changes are made in the `client.toml`, then save. For example, if we directly change the `chain-id` to `autheo_2127-1` and output to number, it would change instantly as shown below. ``` $ autheod config { "chain-id": "autheo_2127-1", "keyring-backend": "os", "output": "number", "node": "tcp://localhost:26657", "broadcast-mode": "sync" } ``` ### Options A list of commonly used flags of `autheod` is listed below: | Option | Description | Type | Default Value | | ------------------- | ----------------------------- | ------------ | ------------- | | `--home` | Directory for config and data | string | `~/.autheo` | | `--chain-id` | Full Chain ID | string | --- | | `--output` | Output format | string | "text" | | `--keyring-backend` | Select keyring's backend | os/file/test | os | ## Command list A list of commonly used `autheod` commands. | Command | Description | List | | ------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `keys` | Key management |
  • `add `
  • `add --recover`
  • `list`
  • `show `
  • `delete `
  • `export `
| | `tx` | Transaction subcommands |
  • `bank send`
  • `staking delegate`
  • `staking unbond`
  • `staking create-validator`
  • `slashing unjail`
| | `query` | Query subcommands | `query bank balance` | You may also add the flag `-h`, `--help` on `autheod [command]` to get more available commands and details. \*\* Example: more details of subcommand - tx staking\*\* ``` $ autheod tx staking --help Staking transaction subcommands Usage: autheod tx staking [flags] autheod tx staking [command] Available Commands: create-validator create new validator initialized with a self-delegation to it delegate Delegate liquid tokens to a validator edit-validator edit an existing validator account redelegate Redelegate illiquid tokens from one validator to another unbond Unbond shares from a validator ``` `MsgBeginRedelegate` is permanently disabled on Autheo Chain. The `redelegate` command will be rejected. To move stake, unbond from the current validator (subject to the \~21-day unbonding period) and re-delegate after. ``` Flags: -h, --help help for staking Global Flags: --chain-id string The network chain ID --home string directory for config and data (default "/Users/.autheo") --log_format string The logging format (json|plain) (default "plain") --log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info") --trace ``` ## Key management - `autheod` keys First of all, you will need an address to store and spend your THEO. ### `keys add `: Create a new key You can create a new key with the name Default. **Example: Create a new address** ``` $ autheod keys add Default - name: Default type: local address: tautheo1r4erhyx6jk8nsafhlw7263upnw9hja90gdgj5d pubkey: '{"@type":"/ethermint.crypto.v1alpha1.ethsecp256k1.PubKey","key":"A3EzNez+oPwDnRTY9OWdVDSjOqikiP7zYncTyxil2SgO"}' mnemonic: "" **Important** write this mnemonic phrase in a safe place. It is the only way to recover your account if you ever forget your password. farm surround surround hunt shop glory fringe bag mountain clerk arch ankle announce turtle slide brisk carbon album immense drop example speed grain dutch ``` The key comes with a "mnemonic phrase", which is serialized into a human-readable 24-word mnemonic. User can recover their associated addresses with the mnemonic phrase. Keep your mnemonic phrase secure and offline. There is no way to recover it — losing it means permanent loss of access to those funds. ### `keys add --recover`: Restore existing key by seed phrase You can restore an existing key with the mnemonic. **Example: restore an existing key** ``` $ autheod keys add Default_restore --recover > Enter your bip39 mnemonic ## Enter your 24-word mnemonic here ## ``` ### `keys list`: List your keys Multiple keys can be created when needed. You can list all keys saved under the storage path. **Example: list all of your keys** ``` $ autheod keys list - name: Default type: local address: ## Address of "Default" ## pubkey: ## Pubkey of "Default" ## mnemonic: "" threshold: 0 pubkeys: [] - name: Default_restore type: local address: ## Address of "Default_restore" ## pubkey: ## Pubkey of "Default_restore" ## mnemonic: "" threshold: 0 pubkeys: [] ``` ### `keys show `: Retrieve key information You can retrieve key information by its name. **Example: Retrieve key information - account address and its public key** ``` $ autheod keys show mykey --bech acc - name: mykey type: local address: tautheo1qsklxwt77qrxur494uvw07zjynu03dq9alwh37 pubkey: '{"@type":"/ethermint.crypto.v1alpha1.ethsecp256k1.PubKey","key":"A8nbJ3eW9oAb2RNZoS8L71jFMfjk6zVa1UISYgKK9HPm"}' mnemonic: "" ``` **Example: Retrieve key information - validator address and its public key** ``` $ autheod keys show Default --bech val $ autheod keys show test --bech val - name: mykey type: local address: tautheovaloper1qsklxwt77qrxur494uvw07zjynu03dq9rdsrlq pubkey: '{"@type":"/ethermint.crypto.v1alpha1.ethsecp256k1.PubKey","key":"A8nbJ3eW9oAb2RNZoS8L71jFMfjk6zVa1UISYgKK9HPm"}' mnemonic: "" ``` **Example: Retrieve key information - consensus nodes address and its public key** ``` $ autheod keys show Default --bech cons $ autheod keys show test --bech cons - name: mykey type: local address: ethvalcons1qsklxwt77qrxur494uvw07zjynu03dq9h7rlnp pubkey: '{"@type":"/ethermint.crypto.v1alpha1.ethsecp256k1.PubKey","key":"A8nbJ3eW9oAb2RNZoS8L71jFMfjk6zVa1UISYgKK9HPm"}' mnemonic: "" ``` ### `keys delete `: Delete a key You can delete a key in your storage path. Back up the key mnemonic before deleting. There is no way to recover a deleted key without the mnemonic. **Example: Remove a key** ``` $ autheod keys delete Default_restore1 Key reference will be deleted. Continue? [y/N]: y Key deleted forever (uh oh!) ``` ### `keys export `: Export private keys You can export and backup your key by using the export subcommand. **Example: export your keys exporting the key Default** ``` $ autheod keys export Default Enter passphrase to encrypt the exported key: ## Insert passphrase (must be at least 8 characters)## -----BEGIN TENDERMINT PRIVATE KEY----- kdf: bcrypt salt: ## Salt of the key ## type: secp256k1 ## Tendermint private key ## -----END TENDERMINT PRIVATE KEY----- ``` ### The keyring `--keyring-backend` option Interacting with a node requires a public-private key pair. Keyring is the place holding the keys. The keys can be stored in different locations with specified backend type. ``` $ autheod keys [subcommands] --keyring-backend [backend type] ``` #### 1. `os` backend The default `os` backend stores the keys in operating system's credential sub-system, which are comfortable to most users, yet without compromising on security. Here is a list of the corresponding password managers in different operating systems: * macOS (since Mac OS 8.6): [Keychain](https://support.apple.com/en-gb/guide/keychain-access/welcome/mac) * Windows: [Credentials Management API](https://docs.microsoft.com/en-us/windows/win32/secauthn/credentials-management) * GNU/Linux: * [libsecret](https://gitlab.gnome.org/GNOME/libsecret) * [kwallet](https://api.kde.org/kwallet-index.html) #### 2. `file` backend The `file` backend stores the encrypted keys inside the app's configuration directory. A password entry is required every time a user access it, which may also occur multiple times of repeated password prompts in one single command. #### 3. `test` backend The `test` backend is a password-less variation of the file backend. It stores unencrypted keys inside the app's configuration directory. It should only be used in testing environments and never be used in production. ## Transaction subcommands - `autheod tx` ### `tx bank send`: Transfer operation Transfer operation involves the transfer of tokens between two addresses. THEO uses 18 decimal places. **1 THEO = 1,000,000,000,000,000,000 aauth** (10¹⁸). All CLI amounts must be expressed in `aauth`. See [Token overview](/token/overview) for the full denomination table. **Send Funds \[`tx bank send `]** **Example: send 10aauth from one address to another** ``` $ autheod tx bank send Default tautheo1gjdxrv77zfpq6cywcs8kg6gqyfhl5768ucel6t 10aauth --chain-id auth_ChainID-1 ## Transaction payload## {"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address"....} confirm transaction before signing and broadcasting [y/N]: y ``` ### `tx staking`: Staking operations Staking operations involve the interaction between an address and a validator. It allows you to create a validator and lock/unlocking funds for staking purposes. **Delegate your funds to a validator \[`tx staking delegate `]** To bond funds for staking, you can delegate funds to a validator by the delegate command **Example: delegate funds from mykey to a validator under the address `tautheovaloper....lq`** ``` $ autheod tx staking delegate tautheovaloper1qsklxwt77qrxur494uvw07zjynu03dq9rdsrlq 100aauth --from mykey --chain-id auth_ChainID-1 ## Transactions payload## {"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgDelegate"....} confirm transaction before signing and broadcasting [y/N]: y ``` **Unbond your delegated funds \[`tx staking unbond `]** On the other hand, we can create a Unbond transaction to unbond the delegated funds **Example: unbond funds from a validator under the address `tautheovaloper...lq`** ``` $ autheod tx staking unbond tautheovaloper1qsklxwt77qrxur494uvw07zjynu03dq9rdsrlq 100aauth --from mykey --chain-id auth_ChainID-1 ## Transaction payload## {"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgUndelegate"...} confirm transaction before signing and broadcasting [y/N]: y ``` Once your funds are unbonded, it will be locked until the `unbonding_time` has passed. ## Balance and transaction history - `autheod` query ### `query bank balances`: Check your transferable balance You can check your transferable balance with the balances command under the bank module. **Example: check your address balance** ``` $ autheod query bank balances tautheo1a303tt49l5uhe87yaneyggly83g7e4uncdxqtl --output json | jq { "balances": [ { "denom": "aauth", "amount": "99999000000000000000000000" } ], "pagination": { "next_key": null, "total": "0" } } ``` ## Advanced operations and transactions ### rollback To recover from an app-hash mismatch failure, it would take hours to re-run an archive node, a faster way to do it would be to use `rollback`. ``` autheod rollback //rollback example at current height 6569206 Rolled back state to height 6569205 and hash 5BFA3A9FA0C207B83D327330ADE77C46A5E688A24864614843C743FDFD968BCD% ``` ### `tx staking create-validator`: Joining the network as a validator Anyone who wishes to become a validator can submit a `create-validator` transaction. ``` $ autheod tx staking create-validator [flags] ``` **Example: joining the network as a validator** ``` $ autheod tx staking create-validator \ --amount="100000000000000000000aauth" \ # 100 THEO (1 THEO = 10^18 aauth) --pubkey='{"@type":...,"key":...}' \ --moniker="The_new_node" \ --chain-id="auth_ChainID-1" \ --commission-rate="0.10" \ --commission-max-rate="0.20" \ --commission-max-change-rate="0.01" \ --min-self-delegation="1" \ --from=node1 ## Transactions payload## {"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator"...} confirm transaction before signing and broadcasting [y/N]: y ``` ### `tx slashing unjail`: Unjail a validator Validator could be punished and jailed due to network misbehavior, for example, if we check the validator set: ``` $ autheod query staking validators -o json | jq ................................ "operator_address": "tautheovaloper1zwm45n5r3u3xcpsd00d3arwzhz7250rtsadv65", "consensus_pubkey": { "@type": "/cosmos.crypto.ed25519.PubKey", "key": "fD6cWVYv5rsNbXDw3hVIbB3nd9x57HsTyeMgwmH472U=" }, "jailed": false, "status": "BOND_STATUS_BONDED", ................................ ``` After the jailing period has passed, one can broadcast a `unjail` transaction to unjail the validator and resume its normal operations by: ```` $ autheod tx slashing unjail --from node1 --chain-id auth_ChainID-1 {"body":{"messages":[{"@type":"/cosmos.slashing.v1beta1.MsgUnjail"...}]} confirm transaction before signing and broadcasting [y/N]: y  ``` ```` # Development environment setup Source: https://docs.autheo.com/developers/setup/dev-environment Install Go, Git, and the autheod CLI to interact with Autheo Chain's Cosmos-native modules. Autheo Chain uses the Cosmos SDK. To interact with native chain modules — staking, key management, querying — you need the `autheod` CLI. This guide installs all required dependencies. For EVM smart contract development with Remix IDE, `autheod` is optional. You can deploy and interact with contracts entirely through MetaMask without any CLI tooling. Return here when you need to operate a node or run Cosmos-native transactions. ## Install dependencies Before you install `autheod`, you'll need some basic dependencies. ### Install Go The Cosmos SDK uses Go as its primary language. Install Go 1.23 or later. **macOS:** ```bash theme={null} brew install go ``` **Ubuntu/Debian:** ```bash theme={null} sudo apt update && sudo apt install golang-go ``` For other systems, follow the official instructions at [go.dev/dl](https://go.dev/dl/). Verify the installation: ```bash theme={null} go version # Expected: go version go1.23.x ... ``` ### Install Git **macOS:** ```bash theme={null} brew install git ``` **Ubuntu/Debian:** ```bash theme={null} sudo apt install git ``` For other systems, see [git-scm.com/downloads](https://git-scm.com/downloads). ## Install autheod `autheod` is the Autheo Chain binary. It handles key management, transaction signing, staking, and node operations. ```bash theme={null} curl -L -o autheod \ https://github.com/autheo-blockchain/autheo-chain-core/releases/latest/download/autheod ``` ```bash theme={null} chmod +x autheod sudo mv autheod /usr/local/bin/ ``` ```bash theme={null} autheod version ``` Expected output: `1.0.8` To build `autheod` from source (required for some custom configurations), see the [Installation guide](/nodes/node-setup/installation). The pre-built binary is sufficient for development and CLI usage. ## Next steps * Explore CLI commands → [CLI installation guide](/developers/setup/cli-installation) * Set up a full development project → [Project scaffolding](/developers/setup/project-scaffolding) * Deploy your first smart contract → [Deploy a smart contract](/developers/tutorials/deploy-smart-contract) # Project scaffolding Source: https://docs.autheo.com/developers/setup/project-scaffolding Set up a new smart contract or dApp project for Autheo Chain using Hardhat, Foundry, or a bare ethers.js setup. Autheo Chain is EVM-compatible — Mainnet chain ID `2127`, Testnet chain ID `785` — which means any Hardhat, Foundry, or ethers.js project can target it with minimal configuration. This page shows the minimum setup for each major toolchain. ## Hardhat ```bash theme={null} mkdir my-autheo-project && cd my-autheo-project npm init -y npm install --save-dev hardhat npx hardhat init ``` Select **Create a JavaScript project** (or TypeScript). ```bash theme={null} npm install --save-dev @nomicfoundation/hardhat-toolbox dotenv ``` ```javascript theme={null} require("@nomicfoundation/hardhat-toolbox"); require("dotenv").config(); module.exports = { solidity: { version: "0.8.20", settings: { evmVersion: "paris" } }, networks: { autheoMainnet: { url: "https://rpc1.autheo.com", chainId: 2127, accounts: [process.env.PRIVATE_KEY] }, autheoTestnet: { url: "https://testnet-rpc1.autheo.com", chainId: 785, accounts: [process.env.PRIVATE_KEY] } } }; ``` ```bash theme={null} echo "PRIVATE_KEY=0x" > .env ``` Never commit your `.env` file to version control. Add it to `.gitignore`. ```bash theme={null} # Deploy to mainnet npx hardhat run scripts/deploy.js --network autheoMainnet # Deploy to testnet npx hardhat run scripts/deploy.js --network autheoTestnet ``` ## Foundry ```bash theme={null} curl -L https://foundry.paradigm.xyz | bash foundryup ``` ```bash theme={null} forge init my-autheo-project && cd my-autheo-project ``` ```toml theme={null} [profile.default] src = "src" out = "out" libs = ["lib"] evm_version = "paris" [rpc_endpoints] autheo_mainnet = "https://rpc1.autheo.com" autheo_testnet = "https://testnet-rpc1.autheo.com" ``` ```bash theme={null} # Deploy to mainnet forge create src/MyContract.sol:MyContract \ --rpc-url autheo_mainnet \ --private-key $PRIVATE_KEY \ --broadcast # Deploy to testnet forge create src/MyContract.sol:MyContract \ --rpc-url autheo_testnet \ --private-key $PRIVATE_KEY \ --broadcast ``` ## Bare ethers.js For scripts or backend services that don't need a full framework: ```javascript theme={null} import { ethers } from "ethers"; import * as dotenv from "dotenv"; dotenv.config(); const provider = new ethers.JsonRpcProvider("https://rpc1.autheo.com"); const wallet = new ethers.Wallet(process.env.PRIVATE_KEY, provider); // Deploy a contract const factory = new ethers.ContractFactory(abi, bytecode, wallet); const contract = await factory.deploy(); await contract.waitForDeployment(); console.log("Deployed at:", await contract.getAddress()); ``` ## EVM version note Always set the EVM version to `paris` (or earlier) when compiling contracts for Autheo Chain. Using `shanghai` or later may produce opcodes not yet supported by the chain's EVM configuration. ## Next steps * [Deploy a smart contract](/developers/tutorials/deploy-smart-contract) — step-by-step Remix tutorial * [Gas fees and transaction lifecycle](/developers/guides/gas-fees-and-tx-lifecycle) — understand fee estimation * [Deployment checklist](/developers/guides/deployment-checklist) — pre-mainnet verification # Common errors Source: https://docs.autheo.com/developers/troubleshooting/common-errors Troubleshooting guide for common errors encountered when developing on Autheo Chain. ## Transaction errors ### `signature verification failed: chain ID does not match` **Cause**: The `--chain-id` flag is missing or set to the wrong value. **Fix**: ```bash theme={null} # Always include this flag autheod tx ... --chain-id autheo_2127-1 ``` *** ### `insufficient funds for gas * price + value` **Cause**: The sending address does not have enough `aauth` to cover the transaction value plus gas fees. **Fix**: 1. Check the balance: `autheod query bank balance
aauth --chain-id autheo_2127-1` 2. Request testnet tokens from the [faucet](https://testnet-faucet.autheo.com/) if needed 3. Reduce the transaction amount or use a lower gas price *** ### `out of gas` **Cause**: Gas limit set too low for the operation. **Fix**: ```bash theme={null} # Use auto gas estimation with a safety buffer --gas auto --gas-adjustment 1.5 ``` *** ### `tx already in mempool` **Cause**: You submitted a duplicate transaction with the same nonce. **Fix**: Wait for the first transaction to confirm. If it's stuck, resubmit with a higher gas price using the same nonce. *** ### `account sequence mismatch` **Cause**: The account sequence (nonce) in your transaction doesn't match the chain's expected value. **Fix**: ```bash theme={null} # Query the current sequence autheod query account
--chain-id autheo_2127-1 ``` In ethers.js, set `nonce` explicitly: ```javascript theme={null} const nonce = await provider.getTransactionCount(wallet.address, "pending"); const tx = await wallet.sendTransaction({ ..., nonce }); ``` *** ## License errors ### `ErrLicenseNotBound` **Cause**: You tried to delegate or create a validator without a bound license. **Fix**: Bind your license first: ```bash theme={null} autheod tx license bind \ --from mykey --chain-id autheo_2127-1 --keyring-backend file ``` *** ### `ErrCooldownNotElapsed` **Cause**: You tried to bind a license before the unbind cooldown expired. **Fix**: Query the category policy to see the remaining cooldown: ```bash theme={null} autheod query license category-policy 1 ``` *** ### `ErrLicenseRevoked` **Cause**: The license has been suspended by governance. **Fix**: The reinstatement process requires a governance action (`MsgReinstateLicense`). See [Runbook D in backups and restore](/nodes/operations/backups-and-restore). *** ## Contract errors ### `Error: VM Exception while processing transaction: revert` **Cause**: A `require()` or `revert()` statement was triggered in the contract. **Fix**: 1. Check the revert reason in the transaction receipt 2. Use `eth_call` to simulate the transaction before submitting: ```javascript theme={null} await contract.myFunction.staticCall(args); ``` *** ### `invalid opcode` or `unsupported opcode` **Cause**: Contract compiled with an EVM version higher than `paris`, which is not supported. **Fix**: Set `evmVersion: "paris"` in your Hardhat or Foundry config and recompile. *** ### `contract not deployed` or empty response from `eth_getCode` **Cause**: The address doesn't contain contract code — either the deployment failed or the wrong address is being queried. **Fix**: ```bash theme={null} curl -X POST https://rpc1.autheo.com \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_getCode","params":["0x
","latest"],"id":1}' ``` If the result is `"0x"`, the contract is not deployed at that address. *** ## Keyring errors ### `Error: key not found` **Cause**: The key name doesn't exist in the specified keyring backend. **Fix**: ```bash theme={null} # List available keys autheod keys list --keyring-backend file # Import a key by mnemonic if needed autheod keys add mykey --recover --keyring-backend file ``` *** ### `Error: ciphertext decryption failed` **Cause**: Incorrect keyring passphrase entered. **Fix**: Re-enter the correct passphrase for the `file` keyring backend. If the passphrase is lost, the key cannot be decrypted — restore from mnemonic. # RPC issues Source: https://docs.autheo.com/developers/troubleshooting/rpc-issues Troubleshooting guide for JSON-RPC and REST API problems on Autheo Chain. ## Connection refused / ECONNREFUSED **Cause**: The RPC endpoint is unreachable or the node is not running. **Fix**: 1. Try the secondary endpoint: `https://testnet-rpc2.autheo.com` 2. Check node status: `autheod status --node ` 3. Verify that port 8545 (HTTP) or 8546 (WebSocket) is open in your firewall *** ## 429 Too Many Requests **Cause**: You have exceeded the rate limit on the public RPC endpoint. **Fix**: * Implement exponential backoff with jitter in your application * Reduce polling frequency (prefer event subscriptions over polling) * Use the secondary endpoint to distribute load * For production applications, use a [managed node provider](/validator-program/hosting-options) *** ## CORS errors in browser applications **Cause**: Browser enforces same-origin policy; the RPC endpoint doesn't return the expected CORS headers. **Fix**: Do not call the RPC endpoint directly from a browser. Route requests through your own backend server, which can add the appropriate CORS headers. *** ## `invalid request` (JSON-RPC error -32600) **Cause**: The request body is malformed JSON or missing required fields. **Fix**: Ensure the request includes `jsonrpc`, `method`, `params`, and `id` fields: ```bash theme={null} curl -X POST https://rpc1.autheo.com \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' ``` *** ## `method not found` (JSON-RPC error -32601) **Cause**: The requested method is not supported by the node. **Common unsupported methods**: `eth_mining`, `eth_hashrate`, `eth_submitWork`, `eth_getWork` — these are not applicable to BFT consensus chains. **Fix**: See the [JSON-RPC methods reference](/apis/json-rpc/overview) for the list of supported methods. *** ## `execution reverted` (JSON-RPC error -32000) **Cause**: A contract call reverted during execution. **Fix**: 1. Simulate the call with `eth_call` first to get the revert reason 2. Check input parameters match the contract's expected types and ranges 3. Verify the caller has the required permissions *** ## WebSocket connection drops **Cause**: WebSocket connections have a default idle timeout. **Fix**: Implement reconnection logic with a backoff strategy: ```javascript theme={null} function connect() { const ws = new ethers.WebSocketProvider("wss://rpc1.autheo.com:8546"); ws.on("error", (err) => { console.error("WebSocket error:", err); setTimeout(connect, 5000); // Reconnect after 5 seconds }); return ws; } ``` *** ## `eth_getLogs` returns empty array unexpectedly **Cause**: The block range or filter parameters don't match any events. **Fix**: 1. Verify the contract address is correct (checksummed EIP-55 format) 2. Check the `fromBlock` and `toBlock` values bracket the expected transaction blocks 3. Ensure the topic hash matches your event signature exactly: ```javascript theme={null} const topic = ethers.id("Transfer(address,address,uint256)"); ``` *** ## REST API 404 on block explorer endpoints **Cause**: The requested resource doesn't exist or the URL path is incorrect. **Fix**: Verify the endpoint against the [REST API reference](/apis/rest/overview). The base URL is: ``` https://evm-explorer.autheo.com/api/v2/ ``` *** ## Slow response times **Cause**: High network load or the node is processing a large request. **Fix**: * Use `eth_call` instead of `eth_sendTransaction` for read-only operations * Avoid fetching large block ranges in a single `eth_getLogs` call — paginate in chunks of 1,000–10,000 blocks * Cache responses for data that doesn't change frequently (e.g., contract ABIs, static configuration) # Deploying a smart contract on the Autheo blockchain Source: https://docs.autheo.com/developers/tutorials/deploy-smart-contract This document will guide you through launching an ERC20 token on the Autheo blockchain. This tutorial uses [MetaMask](https://metamask.io/) wallet, [OpenZeppelin](https://www.openzeppelin.com/), and [Remix IDE](https://remix.ethereum.org/). ## Connecting to the Autheo network with MetaMask Indepth information on connecting MetaMask to a custom RPC can be found on the [MetaMask support site](https://support.metamask.io/networks-and-sidechains/managing-networks/how-to-add-a-custom-network-rpc/). 1. Click on the **Network Selector Button** in the upper left of the application's main window. 2. Click **Add network**. 3. Enter the following information for the Autheo blockchain: * Network name: Autheo * New RPC URL: `https://rpc1.autheo.com` (mainnet) or `https://testnet-rpc1.autheo.com` (testnet) * Chain ID: `2127` (mainnet) or `785` (testnet) * Currency symbol: THEO 4. Click **Save**. 5. Click on the **Network Selector Button** once more, you should now see the Autheo blockchain. ## Creating an ERC20 token contract with OpenZeppelin​ [OpenZeppelin](https://wizard.openzeppelin.com/) provides a variety of premade templates for use with EVM-compatible blockchains. In this instance, we will use their ERC20 wizard to deploy a custom token on the Autheo blockchain. The left side of your screen will show a variety of pre-built options that are compatible with the ERC20 standard. You will want to update the **Name**, **Symbol**, and **Premint** number of tokens. For our example, we will not alter any other options. Further information on these options can be found [here](https://docs.openzeppelin.com/contracts/5.x/api/token/erc20). Changes made to the name, symbol and premint tokens option will reflect within the code in the main window on the right of your screen. This code can be copied over to the Remix IDE in the next step. ## Deploying your ERC20 token with Remix IDE From [Remix](https://remix.ethereum.org/), use the following steps: 1. Create a new file. In the **File Explorer** window on the left of your screen, choose the **Create new file** option beneath the `default_workspace` header. The icon is a picture of a single page with the corner folded. 2. Name your new file, using the `.sol` file type. You can use any name for the contract file, as long as it ends in `.sol`. For example, `ERC20Contract.sol`. 3. Copy your OpenZeppelin code into the file. After selecting your new file, you can copy your example contract code into the main working window in the center of your screen. The following expandable section contains a basic example from OpenZeppelin for a token called `AutheoTest` with the symbol `TST` and 10,000 preminted tokens. ``` // SPDX-License-Identifier: MIT // Compatible with OpenZeppelin Contracts ^5.0.0 pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; contract AutheoTest is ERC20, Ownable, ERC20Permit { constructor(address initialOwner) ERC20("AutheoTest", "TST") Ownable(initialOwner) ERC20Permit("AutheoTest") { _mint(msg.sender, 10000 * 10 ** decimals()); } function mint(address to, uint256 amount) public onlyOwner { _mint(to, amount); } } ``` 4. Compile your contract. Click on the **Solidity Compiler** icon on the left sidebar, which appears as two opposite arrows pointing to the upper left and lower right. In this window, you will see **Compile filename.sol**. In the example instance, `ERC20Contract.sol`. 5. Choose EVM version `paris`. In the **Advanced Configuration** settings under the **Solidity Compiler**, choose the `paris` version of EVM in the **EVM Version dropdown** menu. 6. Connect your MetaMask account to Remix. Choose **Deploy & Run Transaction** from the left sidebar, directly under the **Solidity Compiler**. You will see **Environment** at the top of this window, where you can choose **Injected Provider - MetaMask**. Assuming your MetaMask is properly configured for the Autheo network, this will allow you to deploy directly from Remix. 7. Verify information and deploy your ERC20 contract. Verify that your account and contract value are correct, and then click **Deploy** to deploy your ERC20 token on the Autheo blockchain. # Events and logs Source: https://docs.autheo.com/developers/tutorials/events-and-logs How to emit, query, filter, and decode on-chain events on Autheo Chain. Events are the primary mechanism for smart contracts to communicate what happened on-chain. This tutorial covers emitting events in Solidity, querying them via JSON-RPC, and decoding them with ethers.js. ## Emitting events in Solidity ```solidity theme={null} pragma solidity ^0.8.20; contract Vault { event Deposited(address indexed depositor, uint256 amount, uint256 timestamp); event Withdrawn(address indexed recipient, uint256 amount); mapping(address => uint256) public balances; function deposit() external payable { balances[msg.sender] += msg.value; emit Deposited(msg.sender, msg.value, block.timestamp); } function withdraw(uint256 amount) external { require(balances[msg.sender] >= amount, "Insufficient balance"); balances[msg.sender] -= amount; (bool ok, ) = msg.sender.call{value: amount}(""); require(ok, "Transfer failed"); emit Withdrawn(msg.sender, amount); } } ``` ## Querying events with ethers.js ```javascript theme={null} import { ethers } from "ethers"; const provider = new ethers.JsonRpcProvider("https://rpc1.autheo.com"); const abi = [ "event Deposited(address indexed depositor, uint256 amount, uint256 timestamp)", "event Withdrawn(address indexed recipient, uint256 amount)" ]; const contract = new ethers.Contract("0x", abi, provider); // Query last 10,000 blocks const currentBlock = await provider.getBlockNumber(); const logs = await contract.queryFilter("Deposited", currentBlock - 10000, currentBlock); logs.forEach(log => { const { depositor, amount, timestamp } = log.args; console.log(`Block ${log.blockNumber}: ${depositor} deposited ${ethers.formatEther(amount)} THEO`); }); ``` ## Filtering by indexed parameters Indexed event parameters can be used as topics for efficient filtering: ```javascript theme={null} // Filter Deposited events for a specific address const filter = contract.filters.Deposited("0x"); const logs = await contract.queryFilter(filter, -5000, "latest"); ``` You can also filter with `null` to match any value: ```javascript theme={null} // All Deposited events (any depositor) const allDeposits = contract.filters.Deposited(null); ``` ## Raw eth\_getLogs For lower-level access or when you don't have the ABI: ```bash theme={null} curl -X POST https://rpc1.autheo.com \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "eth_getLogs", "params": [{ "fromBlock": "0x0", "toBlock": "latest", "address": "0x", "topics": ["0x"] }], "id": 1 }' ``` Compute the topic hash for an event signature: ```javascript theme={null} const topic = ethers.id("Deposited(address,uint256,uint256)"); console.log(topic); // 0x... ``` ## Real-time event subscription ```javascript theme={null} // Subscribe to new events as they are emitted contract.on("Deposited", (depositor, amount, timestamp, event) => { console.log(`New deposit from ${depositor}: ${ethers.formatEther(amount)} THEO`); console.log(`Block: ${event.log.blockNumber}, Tx: ${event.log.transactionHash}`); }); // Stop listening contract.off("Deposited"); ``` WebSocket connections are required for real-time subscriptions. Use `wss://rpc1.autheo.com:8546` instead of the HTTP endpoint. ## Decoding raw log data If you have raw log data without the ABI: ```javascript theme={null} const iface = new ethers.Interface([ "event Deposited(address indexed depositor, uint256 amount, uint256 timestamp)" ]); const rawLog = { topics: ["0x", "0x"], data: "0x" }; const parsed = iface.parseLog(rawLog); console.log("Depositor:", parsed.args.depositor); console.log("Amount:", ethers.formatEther(parsed.args.amount)); ``` ## Best practices * Index only parameters you need to filter on — indexed parameters cost more gas * Keep event payloads minimal; emit only what consumers need * Do not use events as the primary storage mechanism — use them for off-chain notification * Paginate `eth_getLogs` queries in blocks of 1,000–10,000 to avoid timeout errors ## Next steps * [Indexing and analytics](/developers/tutorials/indexing-and-analytics) — build a persistent event index # Indexing and analytics Source: https://docs.autheo.com/developers/tutorials/indexing-and-analytics Strategies for indexing on-chain data from Autheo Chain, from simple polling scripts to persistent databases. Building analytics dashboards, portfolio trackers, or data feeds requires indexing on-chain data off-chain. This tutorial covers three approaches in order of complexity. ## Approach 1: Simple polling script Suitable for low-frequency monitoring or one-off analytics. ```javascript theme={null} import { ethers } from "ethers"; const provider = new ethers.JsonRpcProvider("https://rpc1.autheo.com"); const CONTRACT_ADDRESS = "0x"; const POLL_INTERVAL_MS = 10_000; // 10 seconds (2 blocks) const abi = ["event Transfer(address indexed from, address indexed to, uint256 value)"]; const contract = new ethers.Contract(CONTRACT_ADDRESS, abi, provider); let lastBlock = await provider.getBlockNumber(); setInterval(async () => { const currentBlock = await provider.getBlockNumber(); if (currentBlock <= lastBlock) return; const logs = await contract.queryFilter("Transfer", lastBlock + 1, currentBlock); logs.forEach(log => { const { from, to, value } = log.args; console.log(`Block ${log.blockNumber}: ${from} → ${to} | ${ethers.formatEther(value)}`); }); lastBlock = currentBlock; }, POLL_INTERVAL_MS); ``` ## Approach 2: Historical backfill with pagination Fetch all events from genesis (or a start block) in paginated chunks: ```javascript theme={null} async function backfill(contract, eventName, startBlock, endBlock, chunkSize = 5000) { const allEvents = []; for (let from = startBlock; from <= endBlock; from += chunkSize) { const to = Math.min(from + chunkSize - 1, endBlock); const logs = await contract.queryFilter(eventName, from, to); allEvents.push(...logs); console.log(`Indexed blocks ${from}–${to}, found ${logs.length} events`); // Respect rate limits await new Promise(r => setTimeout(r, 100)); } return allEvents; } const events = await backfill(contract, "Transfer", 0, await provider.getBlockNumber()); console.log("Total Transfer events:", events.length); ``` ## Approach 3: Persistent database index For production dashboards, store events in a database as they arrive. ### Schema example (PostgreSQL) ```sql theme={null} CREATE TABLE transfer_events ( id SERIAL PRIMARY KEY, block_number BIGINT NOT NULL, tx_hash VARCHAR(66) NOT NULL, log_index INTEGER NOT NULL, from_address VARCHAR(42) NOT NULL, to_address VARCHAR(42) NOT NULL, value NUMERIC(78, 0) NOT NULL, indexed_at TIMESTAMP DEFAULT NOW(), UNIQUE(tx_hash, log_index) ); CREATE INDEX idx_transfers_from ON transfer_events(from_address); CREATE INDEX idx_transfers_to ON transfer_events(to_address); CREATE INDEX idx_transfers_block ON transfer_events(block_number); ``` ### Indexer script ```javascript theme={null} import { Pool } from "pg"; const db = new Pool({ connectionString: process.env.DATABASE_URL }); contract.on("Transfer", async (from, to, value, event) => { await db.query( `INSERT INTO transfer_events (block_number, tx_hash, log_index, from_address, to_address, value) VALUES ($1, $2, $3, $4, $5, $6) ON CONFLICT DO NOTHING`, [ event.log.blockNumber, event.log.transactionHash, event.log.index, from.toLowerCase(), to.toLowerCase(), value.toString() ] ); }); ``` ## Query account balances from indexed data ```sql theme={null} -- Net balance for an address SELECT SUM(CASE WHEN to_address = $1 THEN value ELSE 0 END) - SUM(CASE WHEN from_address = $1 THEN value ELSE 0 END) AS balance FROM transfer_events WHERE from_address = $1 OR to_address = $1; ``` ## Using the block explorer REST API For simple lookups without running your own indexer, use the [REST API](/apis/rest/overview): ```bash theme={null} # Get all transactions for an address curl https://evm-explorer.autheo.com/api/v2/addresses/0x
/transactions # Get token transfers curl https://evm-explorer.autheo.com/api/v2/addresses/0x
/token-transfers ``` ## Tips for production indexers * **Checkpoint your progress**: Store the last indexed block in the database to resume after restarts * **Handle reorgs**: On Autheo Chain, CometBFT finality means there are no reorgs — one confirmation is sufficient * **Use WebSocket subscriptions** for real-time indexing, with HTTP fallback for historical backfills * **Rate limit awareness**: Public endpoints have rate limits; implement retry with backoff * **Deduplicate events**: Use `(tx_hash, log_index)` as a unique key to prevent duplicates from re-indexing # Interact with deployed contracts Source: https://docs.autheo.com/developers/tutorials/interact-with-contracts How to read from and write to smart contracts on Autheo Chain using ethers.js, Hardhat, and the JSON-RPC API. This tutorial covers reading contract state, calling write functions, and listening for events using ethers.js. The same patterns work with any deployed contract on Autheo Chain. ## Prerequisites * Node.js 18+ installed * A contract ABI and deployed contract address * A funded wallet (get testnet THEO from the [faucet](/getting-started/network/faucet)) ## Setup ```bash theme={null} npm install ethers dotenv ``` Create a `.env` file: ``` RPC_URL=https://rpc1.autheo.com PRIVATE_KEY=0x CONTRACT_ADDRESS=0x ``` ## Read from a contract (no gas required) ```javascript theme={null} import { ethers } from "ethers"; import * as dotenv from "dotenv"; dotenv.config(); const abi = [ "function balanceOf(address owner) view returns (uint256)", "function totalSupply() view returns (uint256)", "function name() view returns (string)" ]; const provider = new ethers.JsonRpcProvider(process.env.RPC_URL); const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS, abi, provider); // Read without signing const name = await contract.name(); const total = await contract.totalSupply(); const balance = await contract.balanceOf("0x"); console.log("Name:", name); console.log("Total supply:", ethers.formatEther(total)); console.log("Balance:", ethers.formatEther(balance)); ``` ## Write to a contract (requires gas) ```javascript theme={null} import { ethers } from "ethers"; import * as dotenv from "dotenv"; dotenv.config(); const abi = [ "function transfer(address to, uint256 amount) returns (bool)", "function approve(address spender, uint256 amount) returns (bool)" ]; const provider = new ethers.JsonRpcProvider(process.env.RPC_URL); const wallet = new ethers.Wallet(process.env.PRIVATE_KEY, provider); const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS, abi, wallet); // Send a write transaction const tx = await contract.transfer( "0x", ethers.parseEther("1.0") ); console.log("Transaction hash:", tx.hash); // Wait for confirmation (1 block = final on Autheo Chain) const receipt = await tx.wait(1); console.log("Confirmed in block:", receipt.blockNumber); console.log("Gas used:", receipt.gasUsed.toString()); ``` ## Listen for events ```javascript theme={null} const abi = [ "event Transfer(address indexed from, address indexed to, uint256 value)" ]; const contract = new ethers.Contract(process.env.CONTRACT_ADDRESS, abi, provider); // Listen for real-time events contract.on("Transfer", (from, to, value, event) => { console.log(`Transfer: ${from} → ${to}, amount: ${ethers.formatEther(value)}`); console.log("Block:", event.log.blockNumber); }); // Query historical events const filter = contract.filters.Transfer(); const logs = await contract.queryFilter(filter, -1000, "latest"); // Last 1000 blocks logs.forEach(log => { const { from, to, value } = log.args; console.log(`Block ${log.blockNumber}: ${from} → ${to}`); }); ``` ## Simulate before sending Use `staticCall` to simulate a write transaction without broadcasting: ```javascript theme={null} try { // Simulate — throws if it would revert await contract.transfer.staticCall("0x", ethers.parseEther("1.0")); // Safe to submit const tx = await contract.transfer("0x", ethers.parseEther("1.0")); await tx.wait(1); } catch (err) { console.error("Transaction would revert:", err.message); } ``` ## Encoding function calls manually For low-level interaction or debugging: ```javascript theme={null} const iface = new ethers.Interface(abi); // Encode calldata const data = iface.encodeFunctionData("transfer", ["0x", ethers.parseEther("1.0")]); // Decode return value const result = await provider.call({ to: process.env.CONTRACT_ADDRESS, data }); const [success] = iface.decodeFunctionResult("transfer", result); console.log("Success:", success); ``` ## Next steps * [Events and logs](/developers/tutorials/events-and-logs) — in-depth event filtering and decoding * [Token contracts](/developers/tutorials/token-contracts) — working with ERC-20 and ERC-721 tokens # Token contracts Source: https://docs.autheo.com/developers/tutorials/token-contracts Deploy and interact with ERC-20 and ERC-721 token contracts on Autheo Chain. Autheo Chain's EVM layer supports the full ERC-20 and ERC-721 standards. This tutorial shows how to deploy and interact with both token types using OpenZeppelin contracts. ## ERC-20 token ### Deploy Use the [OpenZeppelin Wizard](https://wizard.openzeppelin.com/) to generate your contract or write from scratch: ```solidity theme={null} // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract MyToken is ERC20, Ownable { constructor(address initialOwner) ERC20("MyToken", "MTK") Ownable(initialOwner) { _mint(msg.sender, 1_000_000 * 10 ** decimals()); } function mint(address to, uint256 amount) external onlyOwner { _mint(to, amount); } } ``` Deploy with Hardhat: ```bash theme={null} npx hardhat run scripts/deploy.js --network autheoTestnet ``` ### Interact with ethers.js ```javascript theme={null} import { ethers } from "ethers"; const abi = [ "function balanceOf(address) view returns (uint256)", "function transfer(address to, uint256 amount) returns (bool)", "function approve(address spender, uint256 amount) returns (bool)", "function allowance(address owner, address spender) view returns (uint256)", "event Transfer(address indexed from, address indexed to, uint256 value)" ]; const provider = new ethers.JsonRpcProvider("https://rpc1.autheo.com"); const wallet = new ethers.Wallet(process.env.PRIVATE_KEY, provider); const token = new ethers.Contract(TOKEN_ADDRESS, abi, wallet); // Check balance const balance = await token.balanceOf(wallet.address); console.log("Balance:", ethers.formatEther(balance), "MTK"); // Transfer tokens const tx = await token.transfer("0x", ethers.parseEther("100")); await tx.wait(1); console.log("Transferred in block:", (await tx.wait(1)).blockNumber); ``` ## ERC-721 (NFT) ### Deploy ```solidity theme={null} // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract MyNFT is ERC721, Ownable { uint256 private _nextTokenId; constructor(address initialOwner) ERC721("MyNFT", "MNFT") Ownable(initialOwner) {} function safeMint(address to) external onlyOwner returns (uint256) { uint256 tokenId = _nextTokenId++; _safeMint(to, tokenId); return tokenId; } } ``` ### Interact with ethers.js ```javascript theme={null} const abi = [ "function safeMint(address to) returns (uint256)", "function ownerOf(uint256 tokenId) view returns (address)", "function balanceOf(address owner) view returns (uint256)", "function transferFrom(address from, address to, uint256 tokenId)", "event Transfer(address indexed from, address indexed to, uint256 indexed tokenId)" ]; const nft = new ethers.Contract(NFT_ADDRESS, abi, wallet); // Mint a new NFT const tx = await nft.safeMint(wallet.address); const receipt = await tx.wait(1); // Find the token ID from the Transfer event const transferEvent = receipt.logs .map(log => { try { return nft.interface.parseLog(log); } catch { return null; } }) .find(e => e?.name === "Transfer"); const tokenId = transferEvent.args.tokenId; console.log("Minted token ID:", tokenId.toString()); // Check owner const owner = await nft.ownerOf(tokenId); console.log("Owner:", owner); ``` ## EVM version note Compile with `evmVersion: "paris"` to ensure compatibility with Autheo Chain. Using `shanghai` or later may cause deployment failures. ## Next steps * [Interact with contracts](/developers/tutorials/interact-with-contracts) — general contract interaction patterns * [Events and logs](/developers/tutorials/events-and-logs) — track Transfer events and other token activity * [Indexing and analytics](/developers/tutorials/indexing-and-analytics) — build a token balance tracker # FAQ Source: https://docs.autheo.com/getting-started/faq Frequently asked questions about Autheo Chain covering general concepts, NFT licenses and staking, and validator operations. **What is Autheo Chain?** Autheo Chain is a permissioned, EVM-compatible Layer 1 blockchain built on Cosmos SDK v0.53.0 and Ethermint. It features a custom NFT license gating system requiring validators and delegators to hold on-chain license NFTs. *** **What is the native token?** The native token is THEO with base denomination `aauth` at 18 decimal places: 1 THEO = 10¹⁸ aauth. *** **What are the chain IDs?** | Network | Cosmos format | EVM integer | | ------- | --------------- | ----------- | | Mainnet | `autheo_2127-1` | `2127` | | Testnet | `autheo_785-1` | `785` | Always pass `--chain-id autheo_2127-1` to CLI commands targeting mainnet. *** **What is the binary name and current version?** Binary: `autheod`, version: `1.0.8`. *** **What address formats does Autheo Chain use?** | Format | Example | | --------------------- | ------------------- | | Cosmos Bech32 | `autheo1...` | | Validator Bech32 | `autheovaloper1...` | | Ethereum hex (EIP-55) | `0x...` | *** **Is the chain EVM-compatible?** Yes — full Ethermint EVM with JSON-RPC on port 8545 (HTTP) and 8546 (WebSocket). MetaMask, ethers.js, Hardhat, and Foundry all work with Chain ID `2127` (mainnet) or `785` (testnet). *** **What is the block time?** Target block time is 5 seconds. *** **Does Autheo Chain support IBC?** Yes, via `ibc-go v10.1.1`. IBC-sourced delegate/undelegate messages do not trigger license status transitions — only native messages do. *** **How do I check the current block height?** ```bash theme={null} autheod status | jq '.SyncInfo.latest_block_height' ``` *** **Where is the source code?** [https://github.com/autheo-blockchain/autheo-chain-core](https://github.com/autheo-blockchain/autheo-chain-core) **What is an NFT license on Autheo Chain?** An NFT license is an on-chain record granting its holder the right to participate in specific staking operations. Licenses originate as ERC-721 tokens on Arbitrum. Transferring one to your Autheo Chain EVM address automatically mints a `LicenseRecord` in `ISSUED` status on the Cosmos side. *** **What are the three license tiers?** | Tier | Purpose | Annual THEO emission | | --------- | ----------------------------------- | -------------------- | | Sovereign | Create and operate a validator | \~187,969 | | Prime | External delegation (higher tier) | \~18,797 | | Core | External delegation (standard tier) | \~1,880 | *** **What are the four license statuses?** | Status | Meaning | | ------- | ---------------------------------------------------------------------------- | | ISSUED | Minted; not yet bound. Can be bound or transferred. | | BOUND | Attached to a validator; no active delegation. Does not earn rewards. | | ACTIVE | Attached to a validator with a live delegation. Earns per-block NFT rewards. | | REVOKED | Governance-suspended. No operations permitted. | *** **What is the difference between BOUND and ACTIVE?** BOUND means the license is committed to a validator but no delegation exists yet — no NFT rewards accrue. ACTIVE means the license is committed to a validator with a live delegation with positive token value — per-block NFT rewards accrue. *** **Can I redelegate?** No. `MsgBeginRedelegate` is permanently disabled. Use undelegate followed by delegate instead: ```bash theme={null} autheod tx staking unbond aauth \ --from --chain-id autheo_2127-1 --keyring-backend file # After unbonding period (~21 days): autheod tx staking delegate aauth \ --from --chain-id autheo_2127-1 --keyring-backend file ``` *** **How do I view my licenses?** ```bash theme={null} autheod query license licenses-by-owner autheod query license license autheod query license licenses-by-owner --status LICENSE_STATUS_ACTIVE ``` *** **How do NFT rewards differ from staking rewards?** | Aspect | NFT emission rewards | Staking rewards | | ------ | --------------------------- | ------------------------------- | | Source | `x/emissions` | `x/mint` | | Claim | Manual: `claim-nft-rewards` | Manual: `withdraw-rewards` | | Basis | Fixed per license tier | Proportional to delegated stake | | Cap | 7B THEO global cap | No cap from `x/emissions` | *** **How do I claim NFT rewards?** ```bash theme={null} autheod query emissions license-accrued-rewards autheod tx licensedistribution claim-nft-rewards \ --from --chain-id autheo_2127-1 --keyring-backend file ``` *** **Do NFT rewards expire?** No. Accrued rewards accumulate indefinitely with no expiry. Once the global 7B THEO cap is reached, no new rewards are minted, but existing accrued rewards remain claimable. *** **Can I transfer a license?** Only `ISSUED` licenses can be transferred (if the category policy has `Transferable = true`). Transferring does not clear the unbind cooldown timer. **What hardware do I need?** | Resource | Minimum | Recommended | | -------- | ---------------- | ----------------------- | | CPU | 16 vCPU | 32 vCPU | | RAM | 32 GB | 64 GB | | Storage | 1 TB NVMe SSD | 2 TB NVMe SSD (RAID 10) | | Network | 1 Gbps | 10 Gbps | | OS | Ubuntu 22.04 LTS | Ubuntu 22.04 LTS | MemIAVL requires an additional 8–16 GB of RAM above your process baseline. *** **What causes a validator to be jailed?** 1. **Liveness failures** — Missing too many consecutive blocks as tracked by `x/slashing` 2. **Governance revocation** — `MsgRevokeLicense` for a Sovereign license triggers immediate jailing *** **How do I unjail my validator?** ```bash theme={null} autheod tx slashing unjail \ --from mykey --chain-id autheo_2127-1 --keyring-backend file ``` The JailInterceptor verifies a non-revoked Sovereign license is bound before allowing unjail. *** **What is tombstoning?** Tombstoning is permanent — it results from double-signing (signing two different blocks at the same height). It cannot be undone. The validator must be decommissioned and replaced with a new validator using a new consensus key. *** **How do I check if my validator is tombstoned?** ```bash theme={null} autheod query slashing signing-info \ $(autheod tendermint show-validator --home /path/to/node-home) ``` Look for `tombstoned: true`. *** **My node is not in the active set despite having stake. Why?** Validators are ranked by bonded stake and the active set has a maximum size. Check: ```bash theme={null} autheod query staking params | jq '.max_validators' ``` Also verify you are not jailed and your Sovereign license is `ACTIVE` (not `BOUND`). *** **My license is stuck in BOUND after unjailing. How do I fix it?** Check if a delegation exists, then re-delegate if needed: ```bash theme={null} autheod query staking delegation autheod tx staking delegate aauth \ --from mykey --chain-id autheo_2127-1 --keyring-backend file ``` *** **How do I restore from a snapshot?** ```bash theme={null} sudo systemctl stop autheod rm -rf /path/to/node-home/data/ wget https://snapshot.autheo.com/data_backup_latest.tar.gz tar xzvf data_backup_latest.tar.gz mv data/ /path/to/node-home/data/ cp /secure/backup/priv_validator_state.json /path/to/node-home/data/ sudo systemctl start autheod ``` *** **How do I send tokens?** ```bash theme={null} autheod tx bank send aauth \ --chain-id autheo_2127-1 --keyring-backend file \ --fees 5000000aauth --yes ``` 1 THEO = 1,000,000,000,000,000,000 aauth (10¹⁸ aauth). # Network endpoints Source: https://docs.autheo.com/getting-started/network/endpoints Public RPC, WebSocket, REST, and explorer endpoints for Autheo Mainnet and Testnet. ## Mainnet | Service | URL | | ------------------------- | ----------------------------------------- | | JSON-RPC HTTP | `https://rpc1.autheo.com` | | JSON-RPC HTTP (secondary) | `https://rpc2.autheo.com` | | JSON-RPC HTTP (tertiary) | `https://rpc3.autheo.com` | | EVM block explorer | `https://evm-explorer.autheo.com/` | | EVM block explorer API | `https://evm-explorer.autheo.com/api/v2/` | | Cosmos explorer | `https://cosmos.autheo.com` | ## Testnet | Service | URL | | ------------------------- | ------------------------------------ | | JSON-RPC HTTP (primary) | `https://testnet-rpc1.autheo.com` | | JSON-RPC HTTP (secondary) | `https://testnet-rpc2.autheo.com` | | Testnet faucet | `https://testnet-faucet.autheo.com/` | ## Network parameters | Parameter | Value | | ------------------ | --------------------- | | Chain ID (Cosmos) | `autheo_2127-1` | | Chain ID (EVM) | `2127` | | Currency symbol | `THEO` | | Native token denom | `aauth` (18 decimals) | | Block time | \~5 seconds | | EIP-155 | Enabled | | EIP-1559 | Enabled | | Parameter | Value | | ------------------ | ------------------------------------ | | Chain ID (Cosmos) | `autheo_785-1` | | Chain ID (EVM) | `785` | | Currency symbol | `THEO` | | Native token denom | `aauth` (18 decimals) | | Block time | \~5 seconds | | Faucet | `https://testnet-faucet.autheo.com/` | ## Connecting with MetaMask Use the following settings when adding Autheo Mainnet as a custom network in MetaMask: | Field | Value | | ------------------ | ---------------------------------- | | Network name | Autheo | | Default RPC URL | `https://rpc1.autheo.com` | | Chain ID | `2127` | | Currency symbol | `THEO` | | Block explorer URL | `https://evm-explorer.autheo.com/` | Use the following settings when adding Autheo Testnet as a custom network in MetaMask: | Field | Value | | ------------------ | ---------------------------------- | | Network name | Autheo Testnet | | Default RPC URL | `https://testnet-rpc1.autheo.com` | | Chain ID | `785` | | Currency symbol | `THEO` | | Block explorer URL | `https://evm-explorer.autheo.com/` | See [Connect to testnet](/getting-started/wallets/connect-to-testnet) for step-by-step instructions. ## Connecting with ethers.js ```javascript theme={null} import { ethers } from "ethers"; const provider = new ethers.JsonRpcProvider("https://rpc1.autheo.com"); const network = await provider.getNetwork(); console.log(network.chainId); // 2127n ``` ```javascript theme={null} import { ethers } from "ethers"; const provider = new ethers.JsonRpcProvider("https://testnet-rpc1.autheo.com"); const network = await provider.getNetwork(); console.log(network.chainId); // 785n ``` ## Connecting with the CLI ```bash theme={null} # Query a node's sync status autheod status --node https://rpc1.autheo.com:443 # Send a transaction autheod tx bank send 1000000000000000000aauth \ --chain-id autheo_2127-1 \ --node https://rpc1.autheo.com:443 \ --keyring-backend file ``` ```bash theme={null} # Query a node's sync status autheod status --node https://testnet-rpc1.autheo.com:443 # Send a transaction autheod tx bank send 1000000000000000000aauth \ --chain-id autheo_785-1 \ --node https://testnet-rpc1.autheo.com:443 \ --keyring-backend file ``` ## WebSocket connections Use the `wss://` scheme on port 8546 when connecting via WebSocket: ```javascript theme={null} // Mainnet const wsProvider = new ethers.WebSocketProvider("wss://rpc1.autheo.com:8546"); // Testnet const wsProvider = new ethers.WebSocketProvider("wss://testnet-rpc1.autheo.com:8546"); ``` If you need dedicated node access with higher rate limits or guaranteed uptime, see [managed hosting options](/validator-program/hosting-options) from approved providers such as InfStones and Zeeve. # Testnet faucet Source: https://docs.autheo.com/getting-started/network/faucet How to request testnet THEO tokens from the Autheo faucet. The Autheo Testnet faucet distributes free THEO tokens for use on the testnet. These tokens have no real-world value and are provided for testing and development purposes only. ## Requesting tokens Open MetaMask and copy your wallet address (the `0x...` value at the top of the window). If you haven't connected MetaMask to the Autheo Testnet yet, follow the [Connect to testnet](/getting-started/wallets/connect-to-testnet) guide first. Go to [https://testnet-faucet.autheo.com/](https://testnet-faucet.autheo.com/). Paste your wallet address into the input field and click **Request**. Tokens will be sent within a few seconds. After \~5 seconds (one block), your MetaMask balance will update. You can also confirm receipt on the [block explorer](https://evm-explorer.autheo.com/) by searching your address. ## Faucet limits | Limit | Value | | ----------------------------- | ------ | | THEO per request | 2 THEO | | Maximum requests per 24 hours | 2 | | Maximum per 24-hour period | 4 THEO | ## Need more tokens? If you need additional testnet THEO for load testing or development purposes, contact the Autheo team directly via [Discord](https://discord.gg/McEEeXGGya) or email [info@autheo.com](mailto:info@autheo.com). ## Token conversion When working with the CLI or JSON-RPC directly, note that amounts are expressed in `aauth`, not THEO: | THEO | `aauth` | | ---------- | --------------------------------- | | 1 THEO | `1000000000000000000aauth` (10¹⁸) | | 2 THEO | `2000000000000000000aauth` | | 0.001 THEO | `1000000000000000aauth` | # Network troubleshooting Source: https://docs.autheo.com/getting-started/network/troubleshooting Common connection problems when working with Autheo Chain and how to resolve them. ## MetaMask shows wrong balance or no balance **Cause**: MetaMask may not have switched to the correct Autheo network. **Fix**: 1. Click the network selector in MetaMask's upper-left corner. 2. Select **Autheo** (mainnet) or **Autheo Testnet** from the list. 3. If the network isn't listed, re-add it: | Field | Mainnet | Testnet | | -------- | ------------------------- | --------------------------------- | | Chain ID | `2127` | `785` | | RPC URL | `https://rpc1.autheo.com` | `https://testnet-rpc1.autheo.com` | *** ## Transaction stuck as "Pending" in MetaMask **Cause**: The nonce in MetaMask may be out of sync with the chain state. **Fix**: 1. In MetaMask, go to **Settings → Advanced**. 2. Click **Clear activity and nonce data**. 3. Resubmit the transaction. *** ## "Chain ID mismatch" error **Cause**: The RPC endpoint and MetaMask network configuration are pointing to different chains. **Fix**: Verify that your RPC URL and MetaMask Chain ID match the same network — `2127` + `https://rpc1.autheo.com` for mainnet, or `785` + `https://testnet-rpc1.autheo.com` for testnet. Do not mix endpoints from different networks. *** ## RPC request returns 429 (Too Many Requests) **Cause**: The public RPC endpoints enforce rate limits. **Fix**: * Switch to the secondary endpoint: `https://testnet-rpc2.autheo.com` * Reduce request frequency in your application * For high-volume workloads, use a [managed node provider](/validator-program/hosting-options) *** ## `autheod` CLI reports wrong chain ID **Cause**: Missing or incorrect `--chain-id` flag. **Fix**: Always pass the correct `--chain-id` flag matching your target network: ```bash theme={null} # Mainnet autheod tx bank send ... --chain-id autheo_2127-1 # Testnet autheod tx bank send ... --chain-id autheo_785-1 ``` Using the wrong chain ID causes signature mismatch errors even if the transaction is otherwise valid. *** ## Node shows `catching_up: true` **Cause**: The node is still syncing with the network. **Fix**: Wait for sync to complete before submitting transactions. Check sync status: ```bash theme={null} autheod status | jq '.SyncInfo.catching_up' ``` Returns `false` when fully synced. If sync is stalled, see the [node troubleshooting guide](/nodes/node-setup/troubleshooting). *** ## Faucet returns "Address has already received tokens" **Cause**: The faucet allows a maximum of 2 requests per 24-hour period per address. **Fix**: Wait 24 hours before requesting again, or use a different wallet address for additional test tokens. For larger amounts, contact the Autheo team via [Discord](https://discord.gg/McEEeXGGya). *** ## JSON-RPC calls return "method not found" **Cause**: Some Ethereum JSON-RPC methods are not supported by Ethermint or are limited to specific namespaces. **Fix**: Check the [JSON-RPC methods reference](/apis/json-rpc/overview) for the list of supported methods. Common unsupported methods include `eth_mining`, `eth_hashrate`, and `eth_submitWork` (not applicable to PoA/BFT chains). # Quickstart Source: https://docs.autheo.com/getting-started/quickstart Get connected to Autheo Chain in under 5 minutes: add the network to MetaMask and send your first transaction. This guide gets you connected to Autheo Chain in under 5 minutes. Connect to **Mainnet** to use the live network, or **Testnet** if you're a developer exploring the chain before deploying. ## What you need * A web browser with [MetaMask installed](https://metamask.io/) * 2 minutes ## Step 1: Add Autheo to MetaMask Click the network name in the upper-left corner of MetaMask (shows "Ethereum Mainnet" by default). Scroll to the bottom of the network list and click **Add a custom network**. Fill in the following: | Field | Value | | ------------------ | ---------------------------------- | | Network name | Autheo | | Default RPC URL | `https://rpc1.autheo.com` | | Chain ID | `2127` | | Currency symbol | `THEO` | | Block explorer URL | `https://evm-explorer.autheo.com/` | Click **Save**. MetaMask will switch to Autheo Mainnet automatically. Click the network name in the upper-left corner of MetaMask (shows "Ethereum Mainnet" by default). Scroll to the bottom of the network list and click **Add a custom network**. Fill in the following: | Field | Value | | ------------------ | ---------------------------------- | | Network name | Autheo Testnet | | Default RPC URL | `https://testnet-rpc1.autheo.com` | | Chain ID | `785` | | Currency symbol | `THEO` | | Block explorer URL | `https://evm-explorer.autheo.com/` | Click **Save**. MetaMask will switch to Autheo Testnet automatically. After connecting, get free test THEO from the [Autheo Testnet Faucet](https://testnet-faucet.autheo.com/). Paste your `0x...` wallet address and request up to **2 THEO** per request (limit: two per 24-hour period). ## Step 2: Verify your connection After a few seconds (target block time is \~5 seconds), your balance should appear in MetaMask. You can also search your `0x...` address on the [EVM block explorer](https://evm-explorer.autheo.com/) to confirm. ## What's next? Deploy Solidity contracts with Remix or Hardhat — no CLI required Step-by-step setup from license acquisition to your first reward Stake THEO to an existing validator with a Prime or Core license JSON-RPC and REST API reference # Autheo account creation Source: https://docs.autheo.com/getting-started/wallets/account-basics New users can access the onboarding process by clicking **Sign Up** in the upper right corner of [the main Autheo site](https://www.autheo.com/). This will bring you to the initial *Sign Up* window, where you can choose one of three registration options: 1. Manual sign up: Create an account manually through the Autheo form. 2. Sign up with Google: Sign up for Autheo by associating your Google account. 3. Sign up with wallet: Create a new account based on an existing wallet. ## Manual sign up When signing up manually, you will need to enter your **full name**, your desired **username**, an **email address** where Autheo can send account notifications and a strong **password**. We recommend using a password that is at least 12 characters long, comprised of letters, numbers and special characters. After entering this information, click **Sign Up** to bring up the *verification code* window. You should receive your verification code in the email address used for registration. If you cannot find the email and have checked your email's Spam folder, there is an option to Resend the code. Verifying your account will bring you to the next screen, where we will begin building your home feed. After filling in how you **Identify**, you will be brought to the **Select Niche** and **Topics** window. Here, you can choose a *Niche* you are interested in. The dropdown menu allows you to choose a specific niche, or show all available topics. You may choose multiple topics within a single niche. If you want to add an additional niche, click the plus sign to the right of your existing niche to bring up another Select Niche instance. Once you are satisfied with your selections, click **Next**. The *Create Community* window gives you the opportunity to create your own community on Autheo. You can find more information on creating a community here. If you do not want to create a community, click **Skip** to move to the next window. The final page allows you to link various social media accounts to your Autheo account. Autheo natively supports linking [Facebook](https://www.facebook.com/), [Instagram](https://www.instagram.com/), [Twitter/X](https://twitter.com/) and [YouTube](https://www.youtube.com/). You can divide these socials by sector if you are involved in more than one niche. Sectors can be added by clicking the green plus sign to the right of your existing *Select Sector* instance. After inputting your social media links, click **Next** to complete account creation. ## Sign up with Google Clicking on **Sign Up with Google** will open a window where you can choose to **Create a new wallet** or **Import an existing wallet**. Clicking Create a new wallet will open a window where you can choose to either **Use a Recovery Phrase** or **Sign-up with Google**. Signing up with Google will bring you to the *Set Up Your Wallet* window. You will need to choose a **Wallet Name** and a strong **Password**. Make sure that you use a name that makes sense to you for easy identification. After entering this information and clicking **Sign Up**, you will be brought to a window that displays your *Private Key*. You will need your private key to recover your account if you lose access.  We suggest writing your private key down and physically storing it in a safe space. It is not safe if stored digitally. After storing your private key, click **Got it** to move to the *Select Chains* window. Here, you can choose which blockchains you want to associate you wallet with initially. You can add or remove chains in the future using the *Manage Chain Visibility* option in the sidebar. Clicking **Save** will complete the account creation process. ## Sign up with wallet Choosing **Sign up with Wallet** will give you the option to either **Create a new wallet** or **Import an existing wallet.** ### Creating a new wallet  If you choose **Create a new wallet**, you will be brought to a new window where you can choose to either **Create a new recovery phrase** or **Import an existing recovery phrase**. * **Create a new recovery phrase**: You will see a prompt to generate your own 12-word recovery phrase and an associated wallet name. After entering this information, you will be prompted to also create a strong password for accessing the wallet through Autheo. Finally, you can **Select the Chains** you will be using the wallet with and then Save to finish creating your account. * **Import an existing recovery phrase**: Use the recovery phrase of an existing wallet to create an Autheo wallet. You will be prompted to name the wallet and assign a strong password before selecting associated blockchains for the wallet.  Clicking **Save** will complete account creation. ### Importing an existing wallet Choosing **Import an existing wallet** will bring you to the Network window, where you can choose the blockchain your wallet is associated with. You can import your existing wallet with a **Recovery Phrase** or a **Private Key**. Entering your recovery phrase or private key, in the appropriate tab, will give you the option to add a **Name** to the wallet. After clicking **Import**, your account will be created using the existing wallet. # Connect To Testnet Source: https://docs.autheo.com/getting-started/wallets/connect-to-testnet Step-by-step guide to connecting MetaMask to the Autheo Testnet using a custom RPC network. Interacting with Autheo's Testnet requires the use of a compatible [cryptocurrency wallet](https://en.wikipedia.org/wiki/Cryptocurrency_wallet). Autheo uses underlying EVM architecture and is compatible with most major Ethereum-focused wallets. For the purposes of this document, we will be using a browser-based [MetaMask Wallet](https://metamask.io/). MetaMask is available through the Chrome store, Google Play store and Apple's App Store. Always visit the official MetaMask website to download the wallet application, to avoid phishing scams. ## Creating a custom network in MetaMask Network selection icon outlined in red *Network selection icon outlined in red.* Connecting MetaMask to the Autheo Testnet requires the creation of a custom network within your instance of the MetaMask wallet. Clicking on the icon in the upper left of your MetaMask window will bring you to the network selection page. Add a custom network button outlined in red *Add a custom network button outlined in red.* On the following screen, there is a large + Add a custom network button at the bottom. Click this button to open the custom network details form. On the custom network details screen, you will need to enter the following information: * Network name: AUTHEO Testnet * Default RPC URL: `https://testnet-rpc1.autheo.com` (fallback: `https://testnet-rpc2.autheo.com`) * Chain ID: 785 * Currency symbol: THEO * Block explorer URL: [https://evm-explorer.autheo.com/](https://evm-explorer.autheo.com/) The RPC URLs above are JSON-RPC endpoints — they accept `POST` requests from wallets and applications, not browser `GET` requests. Visiting them directly in a browser returns `405 Method Not Allowed`. This is expected behavior and does not indicate a problem with the network. After inputting all necessary information, select **Save** to save the network to your MetaMask wallet. It will now be available from the previously shown network selection screen. ## Requesting Testnet THEO tokens Autheo provides an automated "faucet" that distributes test THEO tokens for user and developer use in learning the platform or testing decentralized applications. You can access the [Autheo Testnet faucet](https://testnet-faucet.autheo.com/). You will need to enter your personal wallet address, which can be obtained at the top of your MetaMask window and will be a long alphanumeric value beginning with **0x** (Example: 0x972E44da6d56DFe14073e19DD4183caE7ebA60Ff). You can request 2 THEO up to twice per 24 hour period. If you need additional Testnet THEO tokens, please contact Autheo's team directly. # MetaMask browser wallet installation Source: https://docs.autheo.com/getting-started/wallets/metamask-install While any EVM-compatible wallet will work natively with Autheo, MetaMask represents one of the simplest wallets to install and configure. For those less familiar with cryptocurrency and the underlying technology and available applications, this guide will walk you through the process of installing MetaMask and preparing to engage with the Autheo ecosystem. ## Getting started with MetaMask