diff --git a/pages/differences-with-ethereum.mdx b/pages/differences-with-ethereum.mdx index 86f44300..934c80e1 100644 --- a/pages/differences-with-ethereum.mdx +++ b/pages/differences-with-ethereum.mdx @@ -1,36 +1,43 @@ # Differences with Ethereum + +While Sei features full EVM compatibility, there are some differences between Sei's EVM and Ethereum itself. + ## EVM Differences -Sei uses Shanghai version EVM, unless Ethereum mainnet which is on Cancun for its execution layer. What that means is that features like blob transactions are not supported on Sei. +Unlike Ethereum mainnet which is on Cancun for its execution layer, Sei uses the Shanghai version of EVM. This means that features like blob transactions are not supported on Sei. ## Opcode Differences ### PREVRANDAO -Since Sei doesn’t rely on the same pseudo-randomness way of determining the next validator like PoS Ethereum does, it doesn’t really have the `RANDOM` artifact that can be set as `PREVRANDO`'s return value. In Sei `PREVRANDAO` is set to return the hash of the current block time. For strong randomness guarantee needs in contracts logic, it’s advised to use external verifiable oracles (as is advised on Ethereum itself) +Since Sei doesn’t rely on the same pseudo-randomness way of determining the next validator like Proof of Stake (PoS) Ethereum does, it doesn’t really have the `RANDOM` artifact that can be set as `PREVRANDO`'s return value. +In Sei `PREVRANDAO` is set to return the hash of the current block time. For strong randomness guarantee needs in contracts logic, it’s advised to use external verifiable oracles (as is advised on Ethereum itself). ### COINBASE -Coinbase address on Sei is always sets to (the EVM address of) the global fee collector. +Coinbase address on Sei is always set to (the EVM address of) the global fee collector. ## State Root -Since Sei uses AVL-tree instead of MPT for data storage, Sei doesn’t have per-account state root. The global state root is the AVL-tree root which is also not equivalent to Ethereum’s overall state root (which is a MPT root) +Since Sei uses AVL-tree instead of Merkle Patricia Trie (MPT) for data storage, Sei doesn’t have per-account state root. The global state root is the AVL-tree root which is also not equivalent to Ethereum’s overall state root (which is a MPT root) ## Block Hash -Block hash on Sei is computed based on block header in Tendermint data format, and as a result is different than Ethereum’s block Hash +The block hash on Sei is computed based on the block header in Tendermint data format, and is different from Ethereum’s block Hash as a result. ## Base Fee & Tips -Sei supports all transaction types. However Sei does not fluctuate base fee based on block congestion. In fact base fee will always be 0 on Sei, meaning all fees will go to the validators (i.e. tips) and none will be burnt. +Sei supports all transaction types. However Sei's base fee does not fluctuate due to block congestion. Base fee will always be 0 on Sei - all fees will go to the validators (i.e. tips) and none will be burnt. ## Block Limit -Sei has a gas limit of 10M on pacific-1, compared to Ethereum’s 30M. In addition, Sei also has a byte size limit of 21MB, whereas Ethereum doesn’t have byte-denominated limits. +Sei has a gas limit of 10M on pacific-1, compared to Ethereum’s 30M. + +In addition, Sei also has a byte size limit of 21MB, whereas Ethereum doesn’t have byte-denominated limits. ## Non-EVM Transactions -On Sei there exists non-EVM transactions which may update states accessible by EVM transactions. Simplest example would be bank balances, which may be updated by both native Cosmos bank send transactions and EVM send transactions. As a result, if certain offchain applications only parse EVM transactions, they may find certain state changes unattributable to any EVM transaction. +On Sei there exists non-EVM transactions which may update states accessible by EVM transactions. The simplest example would be bank balances, which may be updated by both native Cosmos bank send transactions and EVM send transactions. +As a result, if certain offchain applications only parse EVM transactions, they may find certain state changes unattributable to any EVM transaction. ## Finality @@ -38,4 +45,6 @@ Sei has instant finality, meaning that commitment levels of “safe”, “lates ## Pending State -On Ethereum the block proposer would execute its proposed block first (and update its local state) before broadcasting the proposal to others (the updated state would be marked “pending” until the node is accepted by other nodes), whereas on Sei the block proposer would broadcast first and only execute the proposal if it’s accepted (i.e. every node would execute the block at roughly the same time), so Sei does not really have a window when “pending state” exists. +On Ethereum the block proposer would execute its proposed block first (and update its local state) before broadcasting the proposal to others (the updated state would be marked “pending” until the node is accepted by other nodes). + +However, on Sei, the block proposer would broadcast first and only execute the proposal if it’s accepted (i.e. every node would execute the block at roughly the same time), so Sei does not really have a window when “pending state” exists. diff --git a/pages/evm-rpc-endpoints.mdx b/pages/evm-rpc-endpoints.mdx index ae4f65ca..47ddd32d 100644 --- a/pages/evm-rpc-endpoints.mdx +++ b/pages/evm-rpc-endpoints.mdx @@ -2,195 +2,455 @@ Below is a list of EVM-RPC endpoints provided by default on a Sei RPC node. Your RPC provider may offer slightly different/extended specifications. All endpoints are in the form of JSON-RPC and share the following request/response structure: -- request - - HTTP method: always "GET" +- Request + - HTTP method: always "GET". - header: `accept: application/json` - header: `content-type: application/json` - body (JSON): - - id: an arbitrary string identifier - - jsonrpc: always "2.0" - - method: endpoint name (e.g. "eth_sendRawTransaction") - - params: an array that differs from endpoint to endpoint -- response + - id: an arbitrary string identifier. + - jsonrpc: always "2.0". + - method: endpoint name (e.g. "eth_sendRawTransaction"). + - params: an array that differs from endpoint to endpoint. +- Response - body (JSON): - - id: the same identifier in request - - jsonrpc: always "2.0" - - result: an object that differs from endpoint to endpoint + - id: the same identifier in request. + - jsonrpc: always "2.0". + - result: an object that differs from endpoint to endpoint. ## Send Transactions ### eth_sendRawTransaction Sends a signed transaction. -- param 1: string | hex-encoding of the signed transaction -- result: string | transaction hash +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The hex-encoding of the signed transaction. | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The transaction hash. | ### sei_associate -Sends a transaction to establish association between the signer's Sei address and EVM address on-chain -- param 1: object - - custom_message: any string message - - r: the R-part of the signature over the Keccak256 hash of the custom message - - s: the S-part of the signature over the Keccak256 hash of the custom message - - v: the V-part of the signature over the Keccak256 hash of the custom message +Sends a transaction to establish association between the signer's Sei address and EVM address on-chain. +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| object | A custom object containing a string message and the v, r, s of the signed message. | + +Object Schema: +```json +{ + custom_message: // Any string message + r: // The R-part of the signature over the Keccak256 hash of the custom message. + s: // The S-part of the signature over the Keccak256 hash of the custom message. + v: // The V-part of the signature over the Keccak256 hash of the custom message. +} +``` ## Transaction Lookup ### eth_getTransactionReceipt Gets the receipt of a sent transaction -- param 1: string | transaction hash -- result: object | [receipt object](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionreceipt) +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The transaction hash. | + + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| object | The [receipt object](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionreceipt). | ### eth_getTransactionByBlockNumberAndIndex Gets transaction by the block number and the index of the transaction in the block -- param 1: string | block number, which can either be a hexadecimal number, or one of "safe", "finalized", "latest", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. -- param 2: string | transaction index as a hexadecimal number -- result: object | [transaction details](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash) + +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The block number, which can either be a hexadecimal number, or one of "safe", "finalized", "latest", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. | +| string | The transaction index as a hexadecimal number. | + + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| object | The [transaction details](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash). | ### eth_getTransactionByBlockHashAndIndex -Gets transaction by the block hash and the index of the transaction in the block -- param 1: string | block hash -- param 2: string | transaction index as a hexadecimal number -- result: object | [transaction details](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash) +Gets transaction by the block hash and the index of the transaction in the block. + +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The block hash. | +| string | The transaction index as a hexadecimal number. | + + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| object | The [transaction details](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash). | ### eth_getTransactionByHash -Gets transaction by the transaction hash -- param 1: string | transaction hash -- result: object | [transaction details](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash) +Gets transaction by the transaction hash. +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The transaction hash. | + + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| object | The [transaction details](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash).| ## Account Information ### eth_getTransactionCount Gets the number of transactions sent by the account -- param 1: string | address -- param 2: string | block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of "safe", "finalized", "latest", "pending", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. -- result: string | hexadecimal form of the number of transactions +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The address to look up. | +| string | The block number, which can either be a hexadecimal number, or one of "safe", "finalized", "latest", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. | + + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The hexadecimal form of the number of transactions. | ### eth_getBalance Gets the balance in wei (i.e. 10^-12 usei) of the account -- param 1: string | address -- param 2: string | block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of "safe", "finalized", "latest", "pending", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. -- result: string | hexadecimal form of the wei balance +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The address to look up. | +| string | The block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of "safe", "finalized", "latest", "pending", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The hexadecimal form of the wei balance. | ### eth_getCode Gets EVM code stored at the account address -- param 1: string | address -- param 2: string | block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of "safe", "finalized", "latest", "pending", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. -- result: string | hexadecimal form of the code binary +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The address to look up. | +| string | The block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of "safe", "finalized", "latest", "pending", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The hexadecimal form of the code binary. | ### eth_getStorageAt Gets value at given key of the account -- param 1: string | address -- param 2: string | hexadecimal form of the key -- param 3: string | block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of "safe", "finalized", "latest", "pending", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. -- result: string | hexadecimal form of the storage value +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The address to look up. | +| string | The hexadecimal form of the key. | +| string | The block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of "safe", "finalized", "latest", "pending", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. | + + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The hexadecimal form of the storage value. | ### eth_getProof -Gets the IAVL proof (note: not a MPT proof) of the given keys for an account -- param 1: string | address -- param 2: array of string | hexadecimal form of the keys -- param 3: string | block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of "safe", "finalized", "latest", "pending", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. -- result: object - - address - the requested address - - hexValues - an array of the hexdecimal form of the values at the given keys - - storageProof - an array of storage proofs, each of which follows this [format](https://github.com/sei-protocol/sei-tendermint/blob/main/proto/tendermint/crypto/proof.pb.go#L272-L274) +Gets the IAVL proof (note: not a MPT proof) of the given keys for an account. +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The address to look up. | +| string[] | The hexadecimal form of the keys. | +| string | The block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of "safe", "finalized", "latest", "pending", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| object | An object with data from the IAVL proof. | + +Object Schema: +```json +{ + address: // The requested address. + hexValues: // An array of the hexdecimal form of the values at the given keys. + storageProof: // An array of storage proofs. +} +``` + +Note: The storage proofs in the return object follow this [format](https://github.com/sei-protocol/sei-tendermint/blob/main/proto/tendermint/crypto/proof.pb.go#L272-L274). ## Block Information ### eth_getBlockTransactionCountByNumber -Gets the count of EVM transactions (i.e. excluding native Cosmos transactions) in a block by its number -- param 1: string | block number, which can either be a hexadecimal number, or one of "safe", "finalized", "latest", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. -- result: string | hexadecimal form of the count +Gets the count of EVM transactions (i.e. excluding native Cosmos transactions) in a block by its number. +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The block number, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of "safe", "finalized", "latest", "pending", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The hexadecimal form of the count. | ### eth_getBlockTransactionCountByHash -Gets the count of EVM transactions (i.e. excluding native Cosmos transactions) in a block by its hash -- param 1: string | block hash -- result: string | hexadecimal form of the count +Gets the count of EVM transactions (i.e. excluding native Cosmos transactions) in a block by its hash. +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The block hash. | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The hexadecimal form of the count. | ### eth_getBlockByHash Gets the block metadata and/or its EVM transactions by block hash -- param 1: string | block hash -- param 2: bool | whether to include transactions in the response -- result: object | [block info](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The block hash. | +| bool | Whether to include transactions in the response. | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The [block info](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash). | ### eth_getBlockByNumber -Gets the block metadata and/or its EVM transactions by block number -- param 1: string | block number, which can either be a hexadecimal number, or one of "safe", "finalized", "latest", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. -- param 2: bool | whether to include transactions in the response -- result: object | [block info](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) +Gets the block metadata and/or its EVM transactions by block number. +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The block number, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of "safe", "finalized", "latest", "pending", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. | +| bool | Whether to include transactions in the response. | + + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The [block info](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash). | ### eth_getBlockReceipts Gets an array of EVM transaction receipt in a block by block number -- param 1: string | block number, which can either be a hexadecimal number, or one of "safe", "finalized", "latest", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. -- result: array of objects | [receipt object](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionreceipt) +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The block number, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of "safe", "finalized", "latest", "pending", or "earliest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| object[] | An array of [receipt objects](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionreceipt). | ## Blockchain Information ### eth_blockNumber -Gets the latest committed block number -- no param -- result: string | hexadecimal form of the block number +Gets the latest committed block number. +- **Parameters**: + + None +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The hexadecimal form of the block number. | ### eth_chainId -Gets the chain ID -- no param -- result: string | hexadecimal form of the chain ID +Gets the chain ID. +- **Parameters**: + + None +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The hexadecimal form of the chain ID. | ### eth_coinbase -Gets the fee collector address -- no param -- result: string | fee collector address +Gets the fee collector address. +- **Parameters**: + + None +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The address of the fee collector. | ### eth_feeHistory -Gets fee history over the requested block range -- param 1: string | number of blocks to look at, in either decimal or hexadecimal form -- param 2: string | block number, which can either be a hexadecimal number, or one of "safe", "finalized", or "latest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. -- param 3: array of floats | reward percentiles -- result: object +Gets fee history over the requested block range. +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The number of blocks to look at, in either decimal or hexadecimal form. | +| string | The block number, which can either be a hexadecimal number, or one of "safe", "finalized", or "latest". Note that "safe", "finalized", and "latest" mean the same thing on Sei due to its instant finality. | +| float[] | The reward percentiles. | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| object | The fee history over the requested block range. | ### eth_gasPrice -Gets the 50% percentile of gas prices in the most recent block -- no param -- result: string | hexadecimal form of the gas price +Gets the 50% percentile of gas prices in the most recent block. +- **Parameters**: + + None +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The hexadecimal form of the gas price. | ### net_version -Gets the version (equal to Chain ID) -- no param -- result: string | hexadecimal form of the chain ID +Gets the version (equal to Chain ID). +- **Parameters**: + + None +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The hexadecimal form of the chainID. | ### web3_clientVersion -- no param -- result: string | the RPC node's runtime version +- **Parameters**: + + None +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The RPC node's runtime version. | ## Filter Endpoints Note that log filters are subject to the following limits by default: - 10000 logs in one response if block range is open-ended - 2000 blocks to query over if block range is close-ended + Your RPC provider may tweak these limits. ### eth_newFilter -Creates a new log filter for later queries -- param 1: object | [filter criteria](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) -- result: string | the newly created filter's ID +Creates a new log filter for later queries. +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| object | The [filter criteria](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter). | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The newly created filter's ID. | ### eth_newBlockFilter -Creates a new block filter for later queries -- no param -- result: string | the newly created filter's ID +Creates a new block filter for later queries. +- **Parameters**: + + None +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The newly created filter's ID. | ### eth_getFilterChanges -Gets all the updates since the filter was last queried -- param 1: string | filter ID -- result: array | for block filters, the result would be an array of block hashes; for log filters, the result would be an array of [log objects](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) +Gets all the updates since the filter was last queried. +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The filter ID. | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string[] OR object[] | For block filters, the result would be an array of block hashes; for log filters, the result would be an array of [log objects](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). | ### eth_getFilterLogs -Get all logs for a given log filter, including the logs that have been returned before -- param 1: string | filter ID -- result: array | an array of [log objects](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) +Get all logs for a given log filter, including the logs that have been returned before. +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The filter ID. | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| object[] | An array of [log objects](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). | + ### eth_getLogs -Get all logs for the given filter criteria -- param 1: object | [filter criteria](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) -- result: array | an array of [log objects](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) +Get all logs for the given filter criteria. +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| object | The [filter criteria](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter). | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| object[] | An array of [log objects](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). | ### eth_uninstallFilter -Removes a created filter -- param 1: string | filter ID -- result: bool | whether the filter exists +Removes a created filter. +- **Parameters**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| string | The filter ID. | + +- **Result**: + +| Type | Description | +| :------------------- | :------------------------------------------------------------------- | +| bool | Whether the filter existed. | ## Simulation Endpoints ### eth_estimateGas diff --git a/pages/quickstart/evm-cli-tutorial.mdx b/pages/quickstart/evm-cli-tutorial.mdx index 670a92e0..f0a91edd 100644 --- a/pages/quickstart/evm-cli-tutorial.mdx +++ b/pages/quickstart/evm-cli-tutorial.mdx @@ -1,23 +1,24 @@ # Interact with EVM on Sei via CLI -You can query or send transactions to Sei easily via CLI once you have the `seid` command installed (see `Installing Seid`) +You can query or send transactions to Sei easily via CLI once you have the `seid` command installed (see [Installing Seid](./installing-seid)) ## Queries -If the machine you run these commands aren't a node of the network, you'd need to append `--node http://url-to-sei-cosmos-rpc` to your command. +If the machine you run these commands from are not running a node of the network, you'll need to append `--node http://url-to-sei-cosmos-rpc` to your command. Refer to the [Tools and Resources](/tools-and-resources) page for a list of RPC endpoints. -- `seid q evm sei-addr [some EVM address]`: gets the associated Sei address, if exists on-chain, of the queried EVM address -- `seid q evm evm-addr [some Sei address]`: gets the associated EVM address, if exists on-chain, of the queried Sei address -- `seid q evm erc20 [erc20 address] [method] [arguments...]`: query the ERC20 contract at given address for the given method/arguments -- `seid q evm payload [abi-filepath] [method] [arguments...]`: generate the hexadecimal payload of the requested method call given an ABI -- `seid q evm pointer [type] [pointee]`: gets the pointer contract of the requested pointee. `type` can be one of "NATIVE", "CW20", "CW721", "ERC20", or "ERC721", and `pointee` is the target contract address (except for "NATIVE" type, for which `pointee` would be the native denom name) +- `seid q evm sei-addr [some EVM address]`: Gets the associated Sei address of the queried EVM address, if it exists on-chain. +- `seid q evm evm-addr [some Sei address]`: Gets the associated EVM address of the queried Sei address, if it exists on-chain. +- `seid q evm erc20 [erc20 address] [method] [arguments...]`: Query the ERC20 contract at given address using the given method/arguments. +- `seid q evm payload [abi-filepath] [method] [arguments...]`: Generate the hexadecimal payload of the requested method call given an ABI. +- `seid q evm pointer [type] [pointee]`: Gets the pointer contract of the requested pointee. The `type` parameter can be one of "NATIVE", "CW20", "CW721", "ERC20", or "ERC721", and `pointee` is the target contract address. +For "NATIVE" type, `pointee` would be the native denom name instead. ## Transactions Sending transactions via CLI requires you to have keys added via `seid keys add`. You can then specify the key you want to use by appending `--from=[key name]` to your command. -If the machine you run these commands aren't a node of the network, you'd need to append `--evm-rpc http://url-to-sei-evm-rpc` to your command. +If the machine you run these commands from are not a node of the network, you'd need to append `--evm-rpc http://url-to-sei-evm-rpc` to your command. Refer to the [Tools and Resources](/tools-and-resources) page for a list of RPC endpoints. -- `seid tx evm associate-address`: associate Sei address and EVM address on-chain for the sending key -- `seid tx evm send [to EVM address] [amount in wei]`: send native tokens to the target EVM address -- `seid tx evm deploy [path to binary]`: deploy an EVM contract -- `seid tx evm call-contract [addr] [payload hex]`: send a transaction that calls contract at the target address with the provided payload -- `seid tx evm erc20-send [addr] [recipient] [amount]`: send ERC20 tokens of contract at `addr` to the target recipient -- `seid tx evm delegate [val-addr] [amount]`: delegate specified amount to the target validator address. Note that the validator address would be in Sei/Cosmos validator address format +- `seid tx evm associate-address`: Associates the Sei address and EVM address on-chain for the sending key. +- `seid tx evm send [to EVM address] [amount in wei]`: Sends native tokens to the target EVM address. +- `seid tx evm deploy [path_to_binary]`: Deploys the EVM contract specified in `path_to_binary`. +- `seid tx evm call-contract [addr] [payload hex]`: Sends a transaction that calls contract at the target address with the provided payload. +- `seid tx evm erc20-send [addr] [recipient] [amount]`: Sends ERC20 tokens of contract at `addr` to the target recipient. +- `seid tx evm delegate [val-addr] [amount]`: Delegates specified amount to the target validator address. The validator address must be in Sei/Cosmos validator address format.