# xWin Split Fee Wallet

xWin Finance has a smart contract that we deploy for every strategy that is partnered with funds. This smart contract will collect the fees where the smart contract divides the fee between our partner and xWin.&#x20;

### xWinSplitFeeWallet

#### Manager

```solidity
struct Manager {
  address managerAddress;
  uint256[] ratio;
}
```

#### managers

```solidity
struct xWinSplitFeeWallet.Manager[] managers
```

#### tokens

```solidity
address[] tokens
```

#### emitEvent

```solidity
contract IxWinEmitEvent emitEvent
```

#### startBlock

```solidity
uint256 startBlock
```

#### period

```solidity
uint256 period
```

#### initialize

```solidity
function initialize(address _emitEvent, struct xWinSplitFeeWallet.Manager[] _managers) external
```

#### restateManagers

```solidity
function restateManagers(struct xWinSplitFeeWallet.Manager[] _managers) external
```

resets the manager information

**Parameters**

| Name       | Type                                 | Description                                |
| ---------- | ------------------------------------ | ------------------------------------------ |
| \_managers | struct xWinSplitFeeWallet.Manager\[] | Array of manager addresses and their ratio |

#### distributeFees

```solidity
function distributeFees() external returns (bool)
```

distributes the fees to all the managers

#### addToken

```solidity
function addToken(address _token) external
```

Adds a new token to be tracked by this contract

**Parameters**

| Name    | Type    | Description   |
| ------- | ------- | ------------- |
| \_token | address | token address |

#### removeToken

```solidity
function removeToken(uint256 index) external
```

#### updateEventEmitter

```solidity
function updateEventEmitter(address _newEmitEvent) external
```

#### updateStartBlock

```solidity
function updateStartBlock(uint256 _newStartBlock) external
```

#### setPeriod

```solidity
function setPeriod(uint256 _newPeriod) external
```

#### tokenLength

```solidity
function tokenLength() public view returns (uint256)
```

#### managersLength

```solidity
function managersLength() public view returns (uint256)
```

#### managerAll

```solidity
function managerAll() public view returns (struct xWinSplitFeeWallet.Manager[])
```

#### managerRatio

```solidity
function managerRatio(uint256 index) public view returns (struct xWinSplitFeeWallet.Manager)
```
