Skip to content

Commit

Permalink
Remove some TODOs and trigger CI (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabijanC authored Oct 12, 2023
1 parent 13628d9 commit 110ef1a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion crates/starknet-server/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl Args {
.try_into()
.expect("Invalid value for initial balance"), // TODO: Doesn't exit nicely.
host: self.host.inner,
port: self.port, // TODO: Unification of parsing messages for host and port.
port: self.port,
timeout: self.timeout,
gas_price: self.gas_price,
chain_id: match self.chain_id.as_str() {
Expand Down
3 changes: 0 additions & 3 deletions crates/starknet/src/starknet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ impl Starknet {
Ok(())
}

// TODO: rewrite using our BlockId.
fn get_state_at(&self, block_id: &BlockId) -> DevnetResult<&StarknetState> {
match block_id {
BlockId::Tag(_) => Ok(&self.state),
Expand Down Expand Up @@ -411,8 +410,6 @@ impl Starknet {
Ok(res.execution.retdata.0.into_iter().map(Felt::from).collect())
}

// TODO: move to estimate_fee file
/// Returns just the gas usage, not the overall fee
pub fn estimate_fee(
&self,
block_id: BlockId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,6 @@ impl TryFrom<Cairo0Json> for blockifier::execution::contract_class::ContractClas
}
}

// TODO: figure out if needed
// pub fn raw_program_into_json(program: &[u8]) -> DevnetResult<Value> {
// let decoder = flate2::read::GzDecoder::new(program);
// let starknet_program: LegacyProgram =
// serde_json::from_reader(decoder).map_err(JsonError::SerdeJsonError)?;
//
// Ok(serde_json::to_value(starknet_program).map_err(JsonError::SerdeJsonError)?)
// }

pub fn json_into_raw_program(json_data: &Value) -> DevnetResult<Vec<u8>> {
let mut buffer = Vec::new();
let encoder = GzEncoder::new(&mut buffer, Compression::default());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ impl BroadcastedDeclareTransactionV1 {
) -> DevnetResult<ClassHash> {
let additional_data: Vec<Felt252> = vec![self.common.nonce.into()];
let calldata = vec![class_hash.into()];
// TODO: Remove when SirDeclare::new will give same hash
Ok(calculate_transaction_hash_common(
SirTransactionHashPrefix::Declare,
self.common.version.into(),
Expand Down

0 comments on commit 110ef1a

Please sign in to comment.