Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(snapshot): code split #198

Merged
merged 24 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8c18e89
refactor: extract logger functions
iankressin Nov 23, 2023
b49da54
refactor: extract shortned address to function
iankressin Nov 23, 2023
8ca1b0a
chore: merge with origin branch
iankressin Nov 25, 2023
46a04bd
chore: remove duplicated function declaration
iankressin Nov 25, 2023
63ad6e6
chore: move get_shortnet_target and set_logger_env to common
iankressin Nov 28, 2023
40be8fd
refactor: extract function selector resolvers to resolve.rs
iankressin Dec 1, 2023
0dc9274
refactor: move get_contract_bytecode to a new bytecode module
iankressin Dec 1, 2023
f9b9cfa
refactor: move get_selectors to selectors module
iankressin Dec 1, 2023
07a985d
refactor: make bytecode disambled external from get_resolved_selectors
iankressin Dec 1, 2023
95b4ef2
refactor: remove logger from params of resolve_signature
iankressin Dec 1, 2023
273086d
refactor: rework snapshot mod variable and args declaration order
iankressin Dec 4, 2023
539f362
merge: origin main
iankressin Dec 4, 2023
f023cd6
refactor: remove logger from params list and initialize internally
iankressin Dec 5, 2023
2739e82
fix: remove extrar logger param from get_contract_bytecode call
iankressin Dec 5, 2023
9e810be
chore: change rpc from llama to ankr
iankressin Dec 8, 2023
4f731f3
fix(tests): remove unnecessary `0x` prefix constraint
Jon-Becker Dec 9, 2023
f336a3a
refactor: rename resolve_custom_event_signatures to resolve_event_sig…
iankressin Dec 9, 2023
60857e3
refactor: rename get_contract_bytecode to get_bytecode_from_target
iankressin Dec 9, 2023
c5c6eff
fix: update comments from get_bytecode_from_target to be module agnostic
iankressin Dec 9, 2023
ea577df
refactor: switch from logger::debug_max to debug_max
iankressin Dec 9, 2023
e756416
fix: remove out of context log
iankressin Dec 9, 2023
d4b4812
refactor: remove get_logger_and_trace function
iankressin Dec 9, 2023
0633c2e
style: code format
iankressin Dec 9, 2023
ecb59fe
refactor: change target param from string reference to string slice
iankressin Dec 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions common/src/utils/io/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl TraceFactory {
"{} {} {}",
replace_last(prefix, "│ ", " ├─").bold().bright_white(),
format!("[{}]", trace.instruction).bold().bright_white(),
trace.message.get(0).expect("Failed to build trace.")
Jon-Becker marked this conversation as resolved.
Show resolved Hide resolved
trace.message.first().expect("Failed to build trace.")
);

// print the children
Expand Down Expand Up @@ -136,7 +136,7 @@ impl TraceFactory {
println!(
"{} emit {}",
replace_last(prefix, "│ ", " ├─").bold().bright_white(),
trace.message.get(0).expect("Failed to build trace.")
Jon-Becker marked this conversation as resolved.
Show resolved Hide resolved
trace.message.first().expect("Failed to build trace.")
);
}
TraceCategory::LogUnknown => {
Expand Down Expand Up @@ -211,7 +211,7 @@ impl TraceFactory {
"{} {} create → {}",
replace_last(prefix, "│ ", " ├─").bold().bright_white(),
format!("[{}]", trace.instruction).bold().bright_white(),
trace.message.get(0).expect("Failed to build trace.")
Jon-Becker marked this conversation as resolved.
Show resolved Hide resolved
trace.message.first().expect("Failed to build trace.")
);

// print the children
Expand Down
2 changes: 1 addition & 1 deletion core/src/decompile/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub fn match_parameters(
&function
.arguments
.values()
.map(|(_, types)| types.get(0).unwrap().clone())
Jon-Becker marked this conversation as resolved.
Show resolved Hide resolved
.map(|(_, types)| types.first().unwrap().clone())
.collect::<Vec<String>>()
.join(",")
));
Expand Down
Loading
Loading