Skip to content

Commit

Permalink
refactor: reorganize code
Browse files Browse the repository at this point in the history
  • Loading branch information
MikkySnow committed Oct 7, 2024
1 parent 6497cdc commit ebc0d02
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 1,274 deletions.
20 changes: 20 additions & 0 deletions sgxvm/Cargo.lock

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

1 change: 1 addition & 0 deletions sgxvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ num = { version = "0.4", default-features = false, features = ["alloc"] }
bech32 = { version = "0.9.1", default-features = false }
multibase = { version = "0.9.1", default-features=false }
ethabi = { version = "18.0.0", default-features=false }
static-precompiles = { path="../crates/static-precompiles", default-features = false, features = ["sgx"] }

# Encryption
curve25519-dalek = { version = "4.1.1", default-features = false, features = ["alloc"] }
Expand Down
145 changes: 0 additions & 145 deletions sgxvm/src/precompiles/blake2f.rs

This file was deleted.

193 changes: 0 additions & 193 deletions sgxvm/src/precompiles/bn128.rs

This file was deleted.

2 changes: 1 addition & 1 deletion sgxvm/src/precompiles/compliance_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl<G: AsRef<RuntimeState> + GasMutState> LinearCostPrecompileWithQuerier<G> fo
fn execute(querier: *mut GoQuerier, input: &[u8], gasometer: &mut G) -> (ExitResult, Vec<u8>) {
// For some reason, rust compiler cannot infer type for BASE and WORD consts,
// therefore their values provided directly
let cost = match crate::precompiles::linear_cost(input.len() as u64, 60, 150) {
let cost = match static_precompiles::linear_cost(input.len() as u64, 60, 150) {
Ok(cost) => cost,
Err(e) => return (e.into(), Vec::new()),
};
Expand Down
Loading

0 comments on commit ebc0d02

Please sign in to comment.