Monad 백서

Monad

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 31쪽

": "2.0", "method": "eth_call", "params": [ { "to": "0x...", "data": "0x..." }, "latest" ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` </CodeGroup> ## eth\_chainId Returns the chain ID of the current network. <a href="/reference/json-rpc/playground?method=eth_chainId"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** This method takes no parameters. **Returns** <ResponseField name="result" type="string"> The chain ID, hex-encoded. </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": "0x4b7" } ``` </CodeGroup> ## eth\_createAccessList Returns the derived access list and gas used for a simulated transaction. Execution failures and reverts are reported in the result object's optional `error` field so callers can still use the generated access list. <a href="/reference/json-rpc/playground?method=eth_createAccessList"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="object"> Transaction call object. <Expandable title="properties"> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> </Expandable> </ParamField> <ParamField type="string"> Block tag (`latest`, `safe`, `finalized`, `pending`) or 32-byte block hash. </ParamField> **Returns** <ResponseField name="result" type="object"> The access list and estimated gas used. <Expandable title="properties"> <ResponseField name="accessList" type="array" /> <ResponseField name="gasUsed" type="string" /> <ResponseField name="error" type="string" /> </Expandable> </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_createAccessList", "params": [ { "to": "0x...", "data": "0x..." }, "latest" ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` </CodeGroup> ## eth\_estimateGas Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. <a href="/reference/json-rpc/playground?method=eth_estimateGas"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="object"> Transaction call object. <Expandable title="properties"> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> </Expandable> </ParamField> <ParamField type="string"> Block tag (`latest`, `safe`, `finalized`, `pending`) or 32-byte block hash. </ParamField> **Returns** <ResponseField name="result" type="string"> The estimated gas needed, hex-encoded. </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_estimateGas", "params": [ { "to": "0x...", "data": "0x..." }, "latest" ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": "0x4b7" } ``` </CodeGroup> ## eth\_feeHistory Transaction fee history Returns transaction base fee per gas and effective priority fee per gas for the requested/supported block range. <a href="/reference/json-rpc/playground?method=eth_feeHistory"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="string"> Number of blocks in the requested range (hex-encoded integer). </ParamField> <ParamField type="string"> Highest block number (hex) or tag: `latest`, `safe`, `finalized`, `pending`. </ParamField> <ParamField type="array"> Array of percentile values (floats between 0 and 100) to sample effective priority fees. Can be `null`. </ParamField> **Returns** <ResponseField name="result" type="object"> Fee history for the requested block range. <Expandable title="properties"> <ResponseField name="gasUsedRatio" type="array" /> <ResponseField name="oldestBlock" type="string" /> </Expandable> </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_feeHistory", "params": [ "0x1", "latest", [ 25, 75 ] ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": { "gasUsedRatio": [], "oldestBlock": "0x0" } } ``` </CodeGroup> ## eth\_fillTransaction <a href="/reference/json-rpc/playground?method=eth_fillTransaction"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="object"> Transaction call object. <Expandable title="properties"> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> </Expandable> </ParamField> **Returns** <ResponseField name="result" type="object"> <Expandable title="properties"> <ResponseField name="raw" type="string" /> <ResponseField name="tx" type="object" /> </Expandable> </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_fillTransaction", "params": [ { "to": "0x...", "data": "0x..." } ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": { "raw": "0x", "tx": { "from": null, "to": null, "gas": null, "maxFeePerGas": null, "maxPriorityFeePerGas": null, "value": null, "input": null, "data": null, "nonce": null, "chainId": null, "accessList": null, "authorizationList": null } } } ``` </CodeGroup> ## eth\_gasPrice Returns the current price per gas in wei. <a href="/reference/json-rpc/playground?method=eth_gasPrice"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** This method takes no parameters. **Returns** <ResponseField name="result" type="string"> The current gas price in wei, hex-encoded. </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": "0x4b7" } ``` </CodeGroup> ## eth\_getBalance Returns the balance of the account of given address. <a href="/reference/json-rpc/playground?method=eth_getBalance"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="string"> 20-byte account address (hex-encoded). </ParamField> <ParamField type="string"> Block tag (`latest`, `safe`, `finalized`, `pending`) or 32-byte block hash. </ParamField> **Returns** <ResponseField name="result" type="string"> The account balance in wei, hex-encoded. </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_getBalance", "params": [ "0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest" ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` </CodeGroup> ## eth\_getBlockByHash Returns information about a block by hash. <a href="/reference/json-rpc/playground?method=eth_getBlockByHash"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="string"> 32-byte block hash (hex-encoded). </ParamField> <ParamField type="boolean"> If `true`, returns full transaction objects; if `false`, returns only transaction hashes. </ParamField> **Returns** <ResponseField name="result" type="object"> The block object, or `null` if not found. <Expandable title="properties"> <ResponseField name="hash" type="string" /> <ResponseField name="parentHash" type="string" /> <ResponseField name="sha3Uncles" type="string" /> <ResponseField name="miner" type="string" /> <ResponseField name="stateRoot" type="string" /> <ResponseField name="transactionsRoot" type="string" /> <ResponseField name="receiptsRoot" type="string" /> <ResponseField name="logsBloom" type="string" /> <ResponseField name="difficulty" type="string" /> <ResponseField name="number" type="string" /> <ResponseField name="gasLimit" type="string" /> <ResponseField name="gasUsed" type="string" /> <ResponseField name="timestamp" type="string" /> <ResponseField name="extraData" type="string" /> <ResponseField name="mixHash" type="string" /> <ResponseField name="nonce" type="string" /> <ResponseField name="uncles" type="array" /> <ResponseField name="transactions" type="array" /> </Expandable> </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": [ "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae", false ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": { "hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "miner": "0x0000000000000000000000000000000000000000", "stateRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "logsBloom": "0x00000000...", "difficulty": "0x0", "number": "0x0", "gasLimit": "0x0", "gasUsed": "0x0", "timestamp": "0x0", "extraData": "0x", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "uncles": [], "transactions": [] } } ``` </CodeGroup> ## eth\_getBlockByNumber Returns information about a block by number. <a href="/reference/json-rpc/playground?method=eth_getBlockByNumber"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="string"> Block number (hex) or tag: `latest`, `safe`, `finalized`, `pending`. </ParamField> <ParamField type="boolean"> If `true`, returns full transaction objects; if `false`, returns only transaction hashes. </ParamField> **Returns** <ResponseField name="result" type="object"> The block object, or `null` if not found. <Expandable title="properties"> <ResponseField name="hash" type="string" /> <ResponseField name="parentHash" type="string" /> <ResponseField name="sha3Uncles" type="string" /> <ResponseField name="miner" type="string" /> <ResponseField name="stateRoot" type="string" /> <ResponseField name="transactionsRoot" type="string" /> <ResponseField name="receiptsRoot" type="string" /> <ResponseField name="logsBloom" type="string" /> <ResponseField name="difficulty" type="string" /> <ResponseField name="number" type="string" /> <ResponseField name="gasLimit" type="string" /> <ResponseField name="gasUsed" type="string" /> <ResponseField name="timestamp" type="string" /> <ResponseField name="extraData" type="string" /> <ResponseField name="mixHash" type="string" /> <ResponseField name="nonce" type="string" /> <ResponseField name="uncles" type="array" /> <ResponseField name="transactions" type="array" /> </Expandable> </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": [ "latest", false ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": { "hash": "0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "miner": "0x0000000000000000000000000000000000000000", "stateRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "logsBloom": "0x00000000...", "difficulty": "0x0", "number": "0x0", "gasLimit": "0x0", "gasUsed": "0x0", "timestamp": "0x0", "extraData": "0x", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "nonce": "0x0000000000000000", "uncles": [], "transactions": [] } } ``` </CodeGroup> ## eth\_getBlockReceipts Returns the receipts of a block by number or hash. <a href="/reference/json-rpc/playground?method=eth_getBlockReceipts"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="string"> Block tag (`latest`, `safe`, `finalized`, `pending`) or 32-byte block hash. </ParamField> **Returns** <ResponseField name="result" type="array"> Array of transaction receipt objects for the block. </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": [ "latest" ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": [ "0x..." ] } ``` </CodeGroup> ## eth\_getBlockTransactionCountByHash Returns the number of transactions in a block from a block matching the given block hash. <a href="/reference/json-rpc/playground?method=eth_getBlockTransactionCountByHash"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="string"> 32-byte block hash (hex-encoded). </ParamField> **Returns** <ResponseField name="result" type="string"> The number of transactions in the block, hex-encoded. </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByHash", "params": [ "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae" ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` </CodeGroup> ## eth\_getBlockTransactionCountByNumber Returns the number of transactions in a block matching the given block number. <a href="/reference/json-rpc/playground?method=eth_getBlockTransactionCountByNumber"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="string"> Block number (hex) or tag: `latest`, `safe`, `finalized`, `pending`. </ParamField> **Returns** <ResponseField name="result" type="string"> The number of transactions in the block, hex-encoded. </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_getBlockTransactionCountByNumber", "params": [ "latest" ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` </CodeGroup> ## eth\_getCode Returns code at a given address. <a href="/reference/json-rpc/playground?method=eth_getCode"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="string"> 20-byte account address (hex-encoded). </ParamField> <ParamField type="string"> Block tag (`latest`, `safe`, `finalized`, `pending`) or 32-byte block hash. </ParamField> **Returns** <ResponseField name="result" type="string"> The bytecode at the given address. </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_getCode", "params": [ "0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest" ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` </CodeGroup> ## eth\_getLogs Returns an array of all logs matching filter with given id. <a href="/reference/json-rpc/playground?method=eth_getLogs"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="object"> Log filter object. <Expandable title="properties"> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="string" /> <ParamField type="array" /> </Expandable> </ParamField> **Returns** <ResponseField name="result" type="array"> Array of log objects matching the filter. </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_getLogs", "params": [ { "fromBlock": "0x0", "toBlock": "0x1", "address": "0xac4b3dacb91461209ae9d41ec517c2b9cb1b7daf", "topics": [] } ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": [ "0x..." ] } ``` </CodeGroup> ## eth\_getStorageAt Returns the value from a storage position at a given address. <a href="/reference/json-rpc/playground?method=eth_getStorageAt"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="string"> 20-byte account address (hex-encoded). </ParamField> <ParamField type="string"> Storage position (hex-encoded 256-bit integer). </ParamField> <ParamField type="string"> Block tag (`latest`, `safe`, `finalized`, `pending`) or 32-byte block hash. </ParamField> **Returns** <ResponseField name="result" type="string"> The value at the given storage position, hex-encoded. </ResponseField> **Example** <CodeGroup> ```json Request theme={null} { "jsonrpc": "2.0", "method": "eth_getStorageAt", "params": [ "0x407d73d8a49eeb85d32cf465507dd71d507100c1", "0x0", "latest" ], "id": 1 } ``` ```json Response theme={null} { "jsonrpc": "2.0", "id": 1, "result": "0x..." } ``` </CodeGroup> ## eth\_getTransactionByBlockHashAndIndex Returns information about a transaction by block hash and transaction index position. <a href="/reference/json-rpc/playground?method=eth_getTransactionByBlockHashAndIndex"> <span /> <span>Open in RPC Playground</span> <svg> <path /> </svg> </a> **Parameters** <ParamField type="string"> 32-byte block hash (hex-encoded). </ParamField> <ParamField type="string"> Transaction index position (hex-encoded integer). </ParamField> **Returns** <ResponseField name="result" type="object"> The transaction object, or `null` if not found. <Expandable title="properties"> <ResponseField name="type" type="string" /> <ResponseField name="chainId" type="string" /> <ResponseField name="nonce" type="string" /> <ResponseField name="gas" type="string" /> <ResponseField name="maxFeePerGas" type="string" /> <ResponseField name="maxPriorityFeePerGas" type="string" /> <ResponseField name="to" type="string" /> <ResponseField name="value" type="string" /> <ResponseField name="accessList" type="array" /> <ResponseField name="input" type="string" /> <ResponseField name="r" type="string" /> <ResponseField name="s" type="string" /> <ResponseField name="yParity" type="string" /> <ResponseField name="v" type="string" /> <ResponseField name="hash" type="string" /> <ResponseField name="blockHash" type="string" /> <ResponseField name="blockNumber" type="string" /> <ResponseField name="transactionIndex" type="str
프로젝트로 돌아가기