It is a transaction that creates a contract so since it fails the problem is in the constructor.
constructor(
address[] memory _components,
int256[] memory _units,
address[] memory _modules,
IController _controller,
address _manager,
string memory _name,
string memory _symbol
)
public
ERC20(_name, _symbol)
{
controller = _controller;
manager = _manager;
positionMultiplier = PreciseUnitMath.preciseUnitInt();
components = _components;
// Modules are put in PENDING state, as they need to be individually initialized by the Module
for (uint256 i = 0; i < _modules.length; i++) {
moduleStates[_modules[i]] = ISetToken.ModuleState.PENDING;
}
// Positions are put in default state initially
for (uint256 j = 0; j < _components.length; j++) {
componentPositions[_components[j]].virtualUnit = _units[j];
}
}
The transaction consumes all 10,000,000 gas available. This type of errors is mainly caused by an assert()
or accessing an array out of bounds.
The constructors are quite simple and there's no assert nor require that might fail (ERC20's constructor is also invoked but it is also quite simple).
The access to arrays _modules
and _components
is correct, but access to _units
never checks against its length. Implicitly the code requires _units.length == _components.length
.
Parsing the constructor arguments we can see that the last requirements fails. There's one unit and three components.
So this line fails when j = 1
componentPositions[_components[j]].virtualUnit = _units[j]