Skip to content

Commit

Permalink
removed get and added to rpc.md
Browse files Browse the repository at this point in the history
  • Loading branch information
varun-doshi committed Nov 27, 2024
1 parent 99672e5 commit 9c89206
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions core/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ impl<N: NetworkSpec, C: Consensus<N::TransactionResponse>> Client<N, C> {
self.node.get_priority_fee()
}

pub async fn get_blob_base_fee(&self,block: BlockTag,)->Result<U256>{
self.node.get_blob_base_fee(block).await
pub async fn blob_base_fee(&self,block: BlockTag,)->Result<U256>{
self.node.blob_base_fee(block).await
}

pub async fn get_block_number(&self) -> Result<U256> {
Expand Down
4 changes: 2 additions & 2 deletions core/src/client/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ impl<N: NetworkSpec, C: Consensus<N::TransactionResponse>> Node<N, C> {
Ok(base_fee + tip)
}

pub async fn get_blob_base_fee(&self, block:BlockTag)->Result<U256>{
Ok(self.execution.get_blob_base_fee(block).await)
pub async fn blob_base_fee(&self, block:BlockTag)->Result<U256>{
Ok(self.execution.blob_base_fee(block).await)
}

// assumes tip of 1 gwei to prevent having to prove out every tx in the block
Expand Down
6 changes: 3 additions & 3 deletions core/src/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ trait EthRpc<TX: TransactionResponse + RpcObject, TXR: RpcObject, R: ReceiptResp
#[method(name = "maxPriorityFeePerGas")]
async fn max_priority_fee_per_gas(&self) -> Result<U256, ErrorObjectOwned>;
#[method(name = "getBlobBaseFee")]
async fn get_blob_base_fee(&self, block: BlockTag) -> Result<U256, ErrorObjectOwned>;
async fn blob_base_fee(&self, block: BlockTag) -> Result<U256, ErrorObjectOwned>;
#[method(name = "blockNumber")]
async fn block_number(&self) -> Result<U64, ErrorObjectOwned>;
#[method(name = "getBlockByNumber")]
Expand Down Expand Up @@ -249,8 +249,8 @@ impl<N: NetworkSpec, C: Consensus<N::TransactionResponse>>
convert_err(self.node.get_priority_fee())
}

async fn get_blob_base_fee(&self, block: BlockTag) -> Result<U256, ErrorObjectOwned> {
convert_err(self.node.get_blob_base_fee(block).await)
async fn blob_base_fee(&self, block: BlockTag) -> Result<U256, ErrorObjectOwned> {
convert_err(self.node.blob_base_fee(block).await)
}

async fn block_number(&self) -> Result<U64, ErrorObjectOwned> {
Expand Down
2 changes: 1 addition & 1 deletion core/src/execution/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl<N: NetworkSpec, R: ExecutionRpc<N>> ExecutionClient<N, R> {
Some(block)
}

pub async fn get_blob_base_fee(&self, block: BlockTag) -> U256 {
pub async fn blob_base_fee(&self, block: BlockTag) -> U256 {
let block = self.state.get_block(block).await;
if block.is_none() {
warn!(target: "helios::execution", "requested block not found");
Expand Down
1 change: 1 addition & 0 deletions rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Helios provides a variety of RPC methods for interacting with the Ethereum netwo
| `eth_getChainId` | `chain_id` | Returns the chain ID of the current network. | `client.chain_id(&self)` |
| `eth_gasPrice` | `gas_price` | Returns the current price per gas in wei. | `client.gas_price(&self)` |
| `eth_maxPriorityFeePerGas` | `max_priority_fee_per_gas` | Returns the current max priority fee per gas in wei. | `client.max_priority_fee_per_gas(&self)` |
| `eth_blobBaseFee` | `blob_base_fee` | Returns the base fee per blob gas in wei. | `client.blob_base_fee(&self, block: BlockTag)` |
| `eth_blockNumber` | `block_number` | Returns the number of the most recent block. | `client.block_number(&self)` |
| `eth_getBlockByNumber` | `get_block_by_number` | Returns the information of a block by number. | `get_block_by_number(&self, block: BlockTag, full_tx: bool)` |
| `eth_getBlockByHash` | `get_block_by_hash` | Returns the information of a block by hash. | `get_block_by_hash(&self, hash: &str, full_tx: bool)` |
Expand Down

0 comments on commit 9c89206

Please sign in to comment.