Function: createAssetToken(Asset asset, uint256 maxFee, address issuer, address rebalancer, address feeManager, address swap_)
This function creates an asset-token contract.
Inputs
assetControl: Fully controlled by the caller.
Constraints: Must have an asset ID that does not exist.
Impact: Asset to be created.
maxFeeControl: Fully controlled by the caller.
Constraints: Must be less than
10 ** feeDecimals.Impact: Maximum fee of the asset token.
issuerControl: Fully controlled by the caller.
Constraints: Must be a nonzero address.
Impact: Issuer of the asset token.
rebalancerControl: Fully controlled by the caller.
Constraints: Must be a nonzero address.
Impact: Rebalancer of the asset token.
feeManagerControl: Fully controlled by the caller.
Constraints: Must be a nonzero address.
Impact: Fee manager of the asset token.
swap_Control: Fully controlled by the caller.
Constraints: None.
Impact: Swap contract of the asset token.
Branches and code coverage
Intended branches
Create the asset-token contract.
Grant the role to the issuer, rebalancer, and fee manager.
Store the information about the asset token.
Negative behavior
The caller is the owner.
Asset ID does not exist.
Maximum fee is less than
10 ** feeDecimals.