We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Experiencing an issue with the encoded response of the following contract function. We have replicated this issue in both the TS-SDK and RS-SDK.
From the function, we return the following struct:
// 0x000000000000000100000000000000010000000000000001 StructWithEnumArray { a: [EnumWithNative::Pending, EnumWithNative::Pending, EnumWithNative::Pending], }
However, the result from the function call is the following:
// 0x000000000000000100000000000000000000000000000001 StructWithEnumArray { a: [EnumWithNative::Pending, EnumWithNative::Checked, EnumWithNative::Pending], }
The return data receipt for the function call is the follow:
// raw receipt { id: '0xa52541ced4559cf68e923e81ffc900d6855994bfabad4dd9f24c4dfea8e4f183', pc: '44544', is: '11712', ptr: '67107840', digest: '0x639809bc6d63798b4571d10a078c77219a7191b65eb30d8b08415d8631c1dbd9', len: '24', receiptType: 'RETURN_DATA', data: '0x000000000000000100000000000000000000000000000001', }
The contract method should return:
StructWithEnumArray { a: [Pending, Pending, Pending] }
The contract method actually returns:
StructWithEnumArray { a: [Pending, Checked, Pending] }
When we remove the input arguments for this function, we receive the correct expected result.
fn return_struct_with_enum_array() -> StructWithEnumArray { const EXPECTED_ENUM = EnumWithNative::Pending; const EXPECTED: StructWithEnumArray = StructWithEnumArray { a: [EXPECTED_ENUM, EXPECTED_ENUM, EXPECTED_ENUM], }; EXPECTED }
The text was updated successfully, but these errors were encountered:
abi-coder
No branches or pull requests
Summary
Experiencing an issue with the encoded response of the following contract function. We have replicated this issue in both the TS-SDK and RS-SDK.
From the function, we return the following struct:
However, the result from the function call is the following:
The return data receipt for the function call is the follow:
Expected
The contract method should return:
Actual
The contract method actually returns:
Additional notes
When we remove the input arguments for this function, we receive the correct expected result.
The text was updated successfully, but these errors were encountered: