CorporateActionManager
A contract that orchestrates advanced corporate actions by interacting with one or more Token contracts. This keeps the heavy logic out of each Token, focusing it here instead.
State Variables
owner
address public owner;
Asset
IAsset public Asset;
Functions
onlyOwner
modifier onlyOwner();
constructor
constructor(address _asset);
processSpinOff
*Example function for a "spin-off" scenario in which:
The old lot is partially or fully adjusted
You create a new lot with new cost basis
This might correspond to shares in a different class or contract In real cases, you might also call a second contract to create brand-new shares in "SpinCo".*
function processSpinOff(bytes32 oldLotId, uint96 spinOffQuantity, uint96 spinOffCostBasis, string calldata reason)
external
onlyOwner
returns (bytes32 newLotId);
forcedBuyback
*Example function for a forced buyback scenario in which:
The "company" forcibly buys some or all shares from a user's lot.
We might do a partial or full re-lot if needed.*
function forcedBuyback(
bytes32 oldLotId,
uint96 buybackQuantity,
uint96 leftoverQuantity,
uint96 leftoverCostBasis,
string calldata reason
) external onlyOwner returns (bytes32 newLotId);
processMerger
Another advanced scenario: A "merger" operation could loop over many tokens. We'll not fully implement it, but here's a conceptual outline:
function processMerger(
bytes32[] calldata oldLotIds,
uint96 newQuantityPerShare,
uint96 newCostBasisPerShare,
string calldata reason
) external onlyOwner;
setOwner
Example function to reassign operator or ownership if desired.
function setOwner(address newOwner) external onlyOwner;
setAsset
Example function to set a different Token
function setAsset(address _asset) external onlyOwner;
Events
SpinOffProcessed
event SpinOffProcessed(
bytes32 indexed oldLotId,
bytes32 indexed newLotId,
address indexed holder,
uint96 newQuantity,
uint96 newCostBasis,
string info
);
Last updated
Was this helpful?