You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use mvn web3j:generate-sources get java code, Two-dimensional array problem???
Issue_description
1D and 2D arrays generate the same code parameters, which I think might be incorrect?
function setOrders(Order[] calldata) external {}
function setOrderss(Order[][] calldata) external {}
Issue_context
solidity code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract TestArray {
struct Order {
address from;
address to;
}
function setOrder(Order calldata) external {}
function setOrders(Order[] calldata) external {}
function setOrderss(Order[][] calldata) external {}
// function get(uint256[][] calldata) external {}
}
use mvn web3j:generate-sources get java code
public RemoteFunctionCall<TransactionReceipt> setOrder(Order param0) {
final Function function = new Function(
FUNC_SETORDER,
Arrays.<Type>asList(param0),
Collections.<TypeReference<?>>emptyList());
return executeRemoteCallTransaction(function);
}
public RemoteFunctionCall<TransactionReceipt> setOrders(List<Order> param0) {
final Function function = new Function(
FUNC_SETORDERS,
Arrays.<Type>asList(new org.web3j.abi.datatypes.DynamicArray<Order>(Order.class, param0)),
Collections.<TypeReference<?>>emptyList());
return executeRemoteCallTransaction(function);
}
public RemoteFunctionCall<TransactionReceipt> setOrderss(List<Order> param0) {
final Function function = new Function(
FUNC_SETORDERSS,
Arrays.<Type>asList(new org.web3j.abi.datatypes.DynamicArray<Order>(Order.class, param0)),
Collections.<TypeReference<?>>emptyList());
return executeRemoteCallTransaction(function);
}
my system cofig:
windows 10, solidity 0.8.17, web3j 4.10.0
public RemoteFunctionCall<TransactionReceipt> setOrderss(List<List<Order>> param0) {
// code
}
How should I write this code???
The text was updated successfully, but these errors were encountered:
Issue_title
use
mvn web3j:generate-sources
get java code, Two-dimensional array problem???Issue_description
1D and 2D arrays generate the same code parameters, which I think might be incorrect?
Issue_context
solidity code
use
mvn web3j:generate-sources
get java codemy system cofig:
windows 10, solidity 0.8.17, web3j 4.10.0
How should I write this code???
The text was updated successfully, but these errors were encountered: