Skip to content

Commit

Permalink
[Cleanup] - Remove Gateway Server crate and RPC apis (MystenLabs#6482)
Browse files Browse the repository at this point in the history
* remove gateway RPC apis

* move tests

* revert unintended changes
  • Loading branch information
patrickkuo authored Dec 1, 2022
1 parent 3330f63 commit 689c8e4
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 580 deletions.
32 changes: 5 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ members = [
"crates/sui-faucet",
"crates/sui-framework",
"crates/sui-framework-build",
"crates/sui-gateway",
"crates/sui-indexer",
"crates/sui-json",
"crates/sui-json-rpc",
Expand Down
38 changes: 0 additions & 38 deletions crates/sui-gateway/Cargo.toml

This file was deleted.

76 changes: 0 additions & 76 deletions crates/sui-gateway/src/main.rs

This file was deleted.

7 changes: 7 additions & 0 deletions crates/sui-json-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ sui-cost = { path = "../sui-cost" }
sui-transaction-builder = { path = "../sui-transaction-builder" }
mysten-metrics = { path = "../mysten-metrics" }
workspace-hack.workspace = true

[dev-dependencies]
sui-config = { path = "../sui-config" }
sui-framework-build = { path = "../sui-framework-build" }
sui-keys = { path = "../sui-keys" }
test-utils = { path = "../test-utils" }
sui-sdk = { path = "../sui-sdk" }
30 changes: 0 additions & 30 deletions crates/sui-json-rpc/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,6 @@ use sui_types::query::{EventQuery, TransactionQuery};
/// for document purposes.
pub const QUERY_MAX_RESULT_LIMIT: usize = 1000;

#[open_rpc(namespace = "sui", tag = "Gateway Transaction Execution API")]
#[rpc(server, client, namespace = "sui")]
pub trait RpcGatewayApi {
/// Execute the transaction using the transaction data, signature and public key.
#[method(name = "executeTransaction")]
async fn execute_transaction(
&self,
/// transaction data bytes, as base-64 encoded string
tx_bytes: Base64,
/// Flag of the signature scheme that is used.
sig_scheme: SignatureScheme,
/// transaction signature, as base-64 encoded string
signature: Base64,
/// signer's public key, as base-64 encoded string
pub_key: Base64,
) -> RpcResult<SuiTransactionResponse>;
}

#[open_rpc(namespace = "sui", tag = "Wallet Sync API")]
#[rpc(server, client, namespace = "sui")]
pub trait WalletSyncApi {
/// Synchronize client state with validators.
#[method(name = "syncAccountState")]
async fn sync_account_state(
&self,
/// the Sui address to be synchronized
address: SuiAddress,
) -> RpcResult<()>;
}

#[open_rpc(namespace = "sui", tag = "Read API")]
#[rpc(server, client, namespace = "sui")]
pub trait RpcReadApi {
Expand Down
Loading

0 comments on commit 689c8e4

Please sign in to comment.