Skip to content

Commit 5957a55

Browse files
committed
Import monad-execution API changes
1 parent b257dcd commit 5957a55

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

monad-cxx/monad-execution

Submodule monad-execution updated 76 files

monad-ethcall/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn main() {
2525

2626
let bindings = bindgen::Builder::default()
2727
.header("../monad-cxx/monad-execution/category/execution/ethereum/chain/chain_config.h")
28-
.header("../monad-cxx/monad-execution/category/rpc/eth_call.h")
28+
.header("../monad-cxx/monad-execution/category/rpc/monad_executor.h")
2929
.clang_arg("-I../monad-cxx/monad-execution")
3030
.clang_arg("-std=c23")
3131
// invalidate on header change

monad-ethcall/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use alloy_eips::eip2718::Encodable2718;
2525
use alloy_primitives::{Address, Bytes, B256, U256, U64};
2626
use alloy_rlp::Encodable;
2727
use alloy_sol_types::decode_revert_reason;
28-
use bindings::monad_eth_call_result;
28+
use bindings::monad_executor_result;
2929
use futures::channel::oneshot::{channel, Sender};
3030
use monad_chain_config::{
3131
ETHEREUM_MAINNET_CHAIN_ID, MONAD_DEVNET_CHAIN_ID, MONAD_MAINNET_CHAIN_ID,
@@ -39,11 +39,11 @@ pub mod bindings {
3939
include!(concat!(env!("OUT_DIR"), "/ethcall.rs"));
4040
}
4141

42-
pub use bindings::monad_eth_call_pool_config as PoolConfig;
42+
pub use bindings::monad_executor_pool_config as PoolConfig;
4343

4444
#[derive(Debug)]
4545
pub struct EthCallExecutor {
46-
eth_call_executor: *mut bindings::monad_eth_call_executor,
46+
eth_call_executor: *mut bindings::monad_executor,
4747
}
4848

4949
unsafe impl Send for EthCallExecutor {}
@@ -62,7 +62,7 @@ impl EthCallExecutor {
6262
.expect("failed to create CString");
6363

6464
let eth_call_executor = unsafe {
65-
bindings::monad_eth_call_executor_create(
65+
bindings::monad_executor_create(
6666
low_pool_config,
6767
high_pool_config,
6868
node_lru_max_mem,
@@ -78,7 +78,7 @@ impl Drop for EthCallExecutor {
7878
fn drop(&mut self) {
7979
info!("dropping eth_call_executor");
8080
unsafe {
81-
bindings::monad_eth_call_executor_destroy(self.eth_call_executor);
81+
bindings::monad_executor_destroy(self.eth_call_executor);
8282
}
8383
info!("eth_call_executor successfully destroyed");
8484
}
@@ -164,7 +164,7 @@ pub struct RevertCallResult {
164164
}
165165

166166
pub struct SenderContext {
167-
sender: Sender<*mut monad_eth_call_result>,
167+
sender: Sender<*mut monad_executor_result>,
168168
}
169169

170170
/// # Safety
@@ -173,7 +173,7 @@ pub struct SenderContext {
173173
/// This function is called when the eth_call is finished and the result is returned over the
174174
/// channel
175175
pub unsafe extern "C" fn eth_call_submit_callback(
176-
result: *mut monad_eth_call_result,
176+
result: *mut monad_executor_result,
177177
user: *mut std::ffi::c_void,
178178
) {
179179
let user = unsafe { Box::from_raw(user as *mut SenderContext) };
@@ -309,7 +309,7 @@ pub async fn eth_call(
309309
unsafe {
310310
let sender_ctx_ptr = Box::into_raw(sender_ctx);
311311

312-
bindings::monad_eth_call_executor_submit(
312+
bindings::monad_executor_eth_call_submit(
313313
eth_call_executor.eth_call_executor,
314314
chain_config,
315315
rlp_encoded_tx.as_ptr(),
@@ -436,7 +436,7 @@ pub async fn eth_call(
436436
}
437437
};
438438

439-
bindings::monad_eth_call_result_release(result);
439+
bindings::monad_executor_result_release(result);
440440
bindings::monad_state_override_destroy(override_ctx);
441441

442442
call_result

0 commit comments

Comments
 (0)