Open jeremyjams opened 10 months ago
Describe the bug Getting a struct inside a map of a mock does not always return the proper structure.
3 new tests reading a struct in a map have been added to the readable-storage-logic.spec.ts test suite.
readable-storage-logic.spec.ts
mapping(bytes32 => SimpleStruct)
mapping(bytes32 => PackedStruct)
mapping(bytes32 => OtherPackedStruct)
Reproduction steps
npm i
npx hardhat typechain
yarn run mocha test/unit/mock/readable-storage-logic.spec.ts
Expected behavior
{ packedA: ADDRESS_EXAMPLE, packedB: '0x000000000000000000000001', }
Actual output:
should be able to get values in a bytes32 => OtherPackedStruct mapping: + expected - actual { "packedA": "0x558ba9b8d78713fbf768c1f8a584485B4003f43F" - "packedB": "0x3f" + "packedB": "0x000000000000000000000001" }
System Specs:
Describe the bug Getting a struct inside a map of a mock does not always return the proper structure.
3 new tests reading a struct in a map have been added to the
readable-storage-logic.spec.ts
test suite.mapping(bytes32 => SimpleStruct)
:heavy_check_mark:mapping(bytes32 => PackedStruct)
:heavy_check_mark:mapping(bytes32 => OtherPackedStruct)
:red_circle:Reproduction steps
npm i
npx hardhat typechain
yarn run mocha test/unit/mock/readable-storage-logic.spec.ts
Expected behavior
Actual output:
System Specs: