Skip to content

Commit

Permalink
chore: delete old rpc mod
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Jan 10, 2024
1 parent bfc786f commit 4695fa5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 125 deletions.
4 changes: 2 additions & 2 deletions cmd/crates/soroban-rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ pub struct Event {
#[serde(rename = "type")]
pub event_type: String,

pub ledger: String,
pub ledger: u32,
#[serde(rename = "ledgerClosedAt")]
pub ledger_closed_at: String,

Expand Down Expand Up @@ -892,7 +892,7 @@ soroban config identity fund {address} --helper-url <url>"#

let mut oparams = ObjectParams::new();
match start {
EventStart::Ledger(l) => oparams.insert("startLedger", l.to_string())?,
EventStart::Ledger(l) => oparams.insert("startLedger", l)?,
EventStart::Cursor(c) => {
pagination.insert("cursor".to_string(), c.into());
}
Expand Down
18 changes: 9 additions & 9 deletions cmd/crates/soroban-spec-tools/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ impl Display for Contract {
}

fn write_func(f: &mut std::fmt::Formatter<'_>, func: &ScSpecFunctionV0) -> std::fmt::Result {
writeln!(f, " • Function: {}", func.name.to_string_lossy())?;
writeln!(f, " • Function: {}", func.name.to_utf8_string_lossy())?;
if func.doc.len() > 0 {
writeln!(
f,
" Docs: {}",
&indent(&func.doc.to_string_lossy(), 11).trim()
&indent(&func.doc.to_utf8_string_lossy(), 11).trim()
)?;
}
writeln!(
Expand All @@ -185,7 +185,7 @@ fn write_union(f: &mut std::fmt::Formatter<'_>, udt: &ScSpecUdtUnionV0) -> std::
writeln!(
f,
" Docs: {}",
indent(&udt.doc.to_string_lossy(), 10).trim()
indent(&udt.doc.to_utf8_string_lossy(), 10).trim()
)?;
}
writeln!(f, " Cases:")?;
Expand All @@ -202,15 +202,15 @@ fn write_struct(f: &mut std::fmt::Formatter<'_>, udt: &ScSpecUdtStructV0) -> std
writeln!(
f,
" Docs: {}",
indent(&udt.doc.to_string_lossy(), 10).trim()
indent(&udt.doc.to_utf8_string_lossy(), 10).trim()
)?;
}
writeln!(f, " Fields:")?;
for field in udt.fields.iter() {
writeln!(
f,
" • {}: {}",
field.name.to_string_lossy(),
field.name.to_utf8_string_lossy(),
indent(&format!("{:#?}", field.type_), 8).trim()
)?;
if field.doc.len() > 0 {
Expand All @@ -227,7 +227,7 @@ fn write_enum(f: &mut std::fmt::Formatter<'_>, udt: &ScSpecUdtEnumV0) -> std::fm
writeln!(
f,
" Docs: {}",
indent(&udt.doc.to_string_lossy(), 10).trim()
indent(&udt.doc.to_utf8_string_lossy(), 10).trim()
)?;
}
writeln!(f, " Cases:")?;
Expand All @@ -244,7 +244,7 @@ fn write_error(f: &mut std::fmt::Formatter<'_>, udt: &ScSpecUdtErrorEnumV0) -> s
writeln!(
f,
" Docs: {}",
indent(&udt.doc.to_string_lossy(), 10).trim()
indent(&udt.doc.to_utf8_string_lossy(), 10).trim()
)?;
}
writeln!(f, " Cases:")?;
Expand All @@ -265,8 +265,8 @@ fn indent(s: &str, n: usize) -> String {

fn format_name(lib: &StringM<80>, name: &StringM<60>) -> String {
if lib.len() > 0 {
format!("{}::{}", lib.to_string_lossy(), name.to_string_lossy())
format!("{}::{}", lib.to_utf8_string_lossy(), name.to_utf8_string_lossy())
} else {
name.to_string_lossy()
name.to_utf8_string_lossy()
}
}
1 change: 0 additions & 1 deletion cmd/soroban-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pub mod commands;
pub mod fee;
pub mod key;
pub mod log;
// pub mod rpc;
pub mod toid;
pub mod utils;
pub mod wasm;
Expand Down
39 changes: 0 additions & 39 deletions cmd/soroban-cli/src/rpc/fixtures/event_response.json

This file was deleted.

74 changes: 0 additions & 74 deletions cmd/soroban-cli/src/rpc/txn/finished.rs

This file was deleted.

0 comments on commit 4695fa5

Please sign in to comment.