Skip to content
Merged
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions wrapper/src/api/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ pub fn encode_params(types: Vec<String>, values: Vec<String>) -> Vec<u8> {
.zip(types.iter())
.map(|(arg, t)| {
let kind = HumanReadableParser::parse_type(&t).unwrap();
if arg.starts_with("\"") && arg.ends_with("\"") {
return LenientTokenizer::tokenize(&kind, arg.replace("\"", "").as_str()).unwrap()
}
LenientTokenizer::tokenize(&kind, arg).unwrap()
})
.collect();
Expand Down Expand Up @@ -43,10 +46,8 @@ pub fn tokenize_values(values: &Vec<String>, params: &Vec<Param>) -> Vec<Token>
.iter()
.zip(values.iter())
.map(|(param, arg)| {
if let ParamType::Array(addresses) = &param.kind {
if let ParamType::Address = addresses.as_ref() {
return LenientTokenizer::tokenize(&param.kind, arg.replace("\"", "").as_str()).unwrap()
};
if arg.starts_with("\"") && arg.ends_with("\"") {
return LenientTokenizer::tokenize(&param.kind, arg.replace("\"", "").as_str()).unwrap()
}
LenientTokenizer::tokenize(&param.kind, arg).unwrap()
})
Expand Down