use of org.fisco.bcos.web3j.abi.datatypes.generated.StaticArray6 in project web3sdk by FISCO-BCOS.
the class FunctionEncoderTest method testMixTypeEncode3.
@Test
public void testMixTypeEncode3() {
// function set0(string,uint256,uint256[6],uint256[],bool,address)
Function function = new Function("set0", Arrays.asList(new Utf8String("daslfjaklfdaskl"), new Uint256(1111), new StaticArray6<>(new Uint256(1), new Uint256(2), new Uint256(3), new Uint256(4), new Uint256(5), new Uint256(6)), new DynamicArray<>(new Uint256(1), new Uint256(2), new Uint256(3), new Uint256(4), new Uint256(5), new Uint256(6)), new Bool(false), new Address("0x692a70d2e424a56d2c6c27aa97d1a86395877b3a")), Collections.singletonList(new TypeReference<DynamicArray<Utf8String>>() {
}));
assertThat(FunctionEncoder.encodeParameters(function.getInputParameters(), new StringBuilder()), is("00000000000000000000000000000000000000000000000000000000000001600000000000000000" + "00000000000000000000000000000000000000000000045700000000000000000000000000000000" + "00000000000000000000000000000001000000000000000000000000000000000000000000000000" + "00000000000000020000000000000000000000000000000000000000000000000000000000000003" + "00000000000000000000000000000000000000000000000000000000000000040000000000000000" + "00000000000000000000000000000000000000000000000500000000000000000000000000000000" + "00000000000000000000000000000006000000000000000000000000000000000000000000000000" + "00000000000001a00000000000000000000000000000000000000000000000000000000000000000" + "000000000000000000000000692a70d2e424a56d2c6c27aa97d1a86395877b3a0000000000000000" + "00000000000000000000000000000000000000000000000f6461736c666a616b6c666461736b6c00" + "00000000000000000000000000000000000000000000000000000000000000000000000000000000" + "00000000000000060000000000000000000000000000000000000000000000000000000000000001" + "00000000000000000000000000000000000000000000000000000000000000020000000000000000" + "00000000000000000000000000000000000000000000000300000000000000000000000000000000" + "00000000000000000000000000000004000000000000000000000000000000000000000000000000" + "00000000000000050000000000000000000000000000000000000000000000000000000000000006"));
}
Aggregations