Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion examples/nested_structs/abi.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface INestedStructs {

function addDogs(address user, Dog[] memory dogs) external;

function getUser(address _address) external view returns (User);
function getUser(address _address) external view returns (User memory);

function getAllUsers() external view returns (User[] memory);

Expand Down
3 changes: 3 additions & 0 deletions stylus-proc/src/macros/derive/abi_type/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ impl<E: DeriveAbiTypeExtension> DeriveAbiTypeGenerator<E> {
.concat(#fields_selector_abis)
)*
.concat(#ConstString::new(")"));

const EXPORT_ABI_RET: #ConstString = #ConstString::new(#name_str).concat(#ConstString::new(" memory"));
}
}
}
Expand Down Expand Up @@ -136,6 +138,7 @@ mod tests {
.concat(stylus_sdk::abi::ConstString::new(","))
.concat(<T as stylus_sdk::abi::AbiType>::SELECTOR_ABI)
.concat(stylus_sdk::abi::ConstString::new(")"));
const EXPORT_ABI_RET: stylus_sdk::abi::ConstString = stylus_sdk::abi::ConstString::new("Foo").concat(stylus_sdk::abi::ConstString::new(" memory"));
}
};
assert_ast_eq(result, expected);
Expand Down
2 changes: 1 addition & 1 deletion stylus-proc/tests/contract_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface ICounter is ITrait1, ITrait2 {

function mixed(MixedInput input) external;

function mixedResult() external view returns (MixedResult);
function mixedResult() external view returns (MixedResult memory);

struct MixedResult {uint256 number;string text;uint256 number2;}
}
Expand Down