Skip to content

Commit 72cb44f

Browse files
authored
Refactor to remove native task wrapper (#3780)
* init * remove submit native task * init * update * remove redundant * update * some more refactoring
1 parent 4149801 commit 72cb44f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3345
-5168
lines changed

tee-worker/omni-executor/Cargo.lock

Lines changed: 19 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tee-worker/omni-executor/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ members = [
2020
"intent/executors/solana",
2121
"intent/token-query",
2222
"mock-server",
23-
"native-task-handler",
2423
"oauth-providers",
2524
"omni-cli",
2625
"pumpx",
@@ -118,7 +117,6 @@ hyperliquid = { path = "hyperliquid" }
118117
intent-asset-lock = { path = "intent/asset-lock" }
119118
intent-token-query = { path = "intent/token-query" }
120119
mock-server = { path = "mock-server" }
121-
native-task-handler = { path = "native-task-handler" }
122120
oauth-providers = { path = "oauth-providers" }
123121
pumpx = { path = "pumpx" }
124122
rpc-server = { path = "rpc-server" }

tee-worker/omni-executor/native-task-handler/src/aes256_key_store.rs renamed to tee-worker/omni-executor/executor-core/src/aes256_key_store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use executor_core::key_store::KeyStore;
1+
use crate::key_store::KeyStore;
22
use executor_crypto::aes256::Aes256Key;
33
use rand::Rng;
44

tee-worker/omni-executor/executor-core/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// You should have received a copy of the GNU General Public License
1515
// along with Litentry. If not, see <https://www.gnu.org/licenses/>.
1616

17+
pub mod aes256_key_store;
1718
pub mod ecdsa_key_store;
1819
pub mod ed25519_key_store;
1920
pub mod event_handler;
@@ -26,3 +27,5 @@ pub mod shielding_key_store;
2627
pub mod sync_checkpoint_repository;
2728
pub mod types;
2829
pub mod wallet_metrics;
30+
31+
pub use aes256_key_store::Aes256KeyStore;

tee-worker/omni-executor/executor-worker/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ accounting-contract-client = { workspace = true }
2929
binance-api = { workspace = true }
3030
config-loader = { workspace = true }
3131
cross-chain-intent-executor = { workspace = true }
32-
ethereum-intent-executor = { workspace = true }
3332
ethereum-rpc = { workspace = true }
3433
executor-core = { workspace = true }
3534
executor-crypto = { workspace = true }
@@ -38,12 +37,10 @@ executor-storage = { workspace = true }
3837
heima-identity-verification = { workspace = true }
3938
intent-asset-lock = { workspace = true }
4039
mock-server = { workspace = true }
41-
native-task-handler = { workspace = true }
4240
pumpx = { workspace = true }
4341
rpc-server = { workspace = true }
4442
signer-client = { workspace = true }
4543
solana = { workspace = true }
46-
solana-intent-executor = { workspace = true }
4744
wildmeta-api = { workspace = true }
4845

4946
[features]

tee-worker/omni-executor/executor-worker/src/main.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ use clap::Parser;
2626
use cli::{Cli, Commands, ExportBundlerKeyArgs};
2727
use config_loader::ConfigLoader;
2828
use cross_chain_intent_executor::{Chain, CrossChainIntentExecutor, RpcEndpointRegistry};
29-
use ethereum_intent_executor::EthereumIntentExecutor;
3029
use ethereum_rpc::client::EthereumRpcClient;
3130
use executor_core::ecdsa_key_store::EcdsaKeyStore;
3231
use executor_core::ed25519_key_store::Ed25519KeyStore;
@@ -36,18 +35,17 @@ use executor_core::wallet_metrics::Wallet;
3635
use executor_core::wallet_metrics::{
3736
start_wallet_metrics, WalletBalanceFetcher, WalletId, WalletMetrics, WalletNetworkType,
3837
};
38+
use executor_core::Aes256KeyStore;
3939
use executor_crypto::{ecdsa, ed25519, PairTrait};
4040
use executor_storage::init_storage;
4141
use intent_asset_lock::precise::PreciseAssetsLock;
4242
use intent_asset_lock::AccountAssetLocks;
4343
use metrics_exporter_prometheus::PrometheusBuilder;
44-
use native_task_handler::Aes256KeyStore;
4544
use pumpx::{pubkey_to_evm_address, pubkey_to_solana_address};
4645
use pumpx::{PumpxApi, PumpxApiClient};
4746
use rpc_server::{start_server as start_rpc_server, AuthTokenKeyStore};
4847
use rust_decimal::Decimal;
4948
use solana::SolanaRpcClient;
50-
use solana_intent_executor::SolanaIntentExecutor;
5149
use std::collections::HashMap;
5250
use std::net::SocketAddr;
5351
use std::path::Path;
@@ -178,12 +176,6 @@ async fn main() -> Result<(), ()> {
178176
pumpx_signer_pair,
179177
)));
180178

181-
let ethereum_intent_executor = EthereumIntentExecutor::new(
182-
&config_loader.ethereum_url,
183-
&args.delegation_contract_address,
184-
)?;
185-
let solana_intent_executor = SolanaIntentExecutor::new(&config_loader.solana_url)?;
186-
187179
let mut rpc_endpoint_registry = RpcEndpointRegistry::new();
188180
rpc_endpoint_registry.insert(Chain::Solana, config_loader.solana_url.to_string());
189181
rpc_endpoint_registry.insert(Chain::Ethereum(56), config_loader.bsc_url.to_string());
@@ -531,8 +523,6 @@ async fn main() -> Result<(), ()> {
531523
wildmeta_backend_ecdsa_pubkey,
532524
evm_accounting_ecdsa_signer_key,
533525
bundler_key_export_authorized_pubkey,
534-
Arc::new(ethereum_intent_executor),
535-
Arc::new(solana_intent_executor),
536526
Arc::new(cross_chain_intent_executor),
537527
aes256_key,
538528
entry_point_clients,

tee-worker/omni-executor/native-task-handler/Cargo.toml

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)