# IFrictionlessOnChainAssetToken

[Git Source](https://gitlab.com/dfyclabs/protocol/dfyclabs-tokens/blob/85f6dfa54ce0787eb1b1345bd6726f84fe766c54/contracts/interface/IFrictionlessOnChainAssetToken.sol)

**Inherits:** IBasicFrictionlessToken

**Author:** DEFYCA Labs S.à.r.l

Copyright © 2023 DEFYCA Labs S.à.r.l Permission is hereby granted, free of charge, to any person obtaining a copy of the Frictionless protocol smart contracts (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DEFYCA LABS S.à.r.l BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Implementation of the storage of the underlying OnChain Asset and it's data.

## Functions

### setSpecificationData

*Sets the specData data for the `FrictionlessOnChainAssetToken`. throws `FrictionlessOnChainAssetTokenUnableToUpdateData` This data is immutable, an attempt to modify will generate the error `FrictionlessOnChainAssetTokenUnableToUpdateData`*

```solidity
function setSpecificationData(FOCASpecData calldata specData) external;
```

**Parameters**

| Name       | Type           | Description                                               |
| ---------- | -------------- | --------------------------------------------------------- |
| `specData` | `FOCASpecData` | the specData data for the `FrictionlessOnChainAssetToken` |

### setIssuanceData

*Sets the issuanceData data for the `FrictionlessOnChainAssetToken` throws `FrictionlessOnChainAssetTokenUnableToUpdateData` This data is immutable, an attempt to modify will generate the error `FrictionlessOnChainAssetTokenUnableToUpdateData`*

```solidity
function setIssuanceData(FOCAIssuanceData calldata issuanceData) external;
```

**Parameters**

| Name           | Type               | Description                                                |
| -------------- | ------------------ | ---------------------------------------------------------- |
| `issuanceData` | `FOCAIssuanceData` | the updatable data for the `FrictionlessOnChainAssetToken` |

### setUpdateData

*Sets the updatable data for the `FrictionlessOnChainAssetToken`*

```solidity
function setUpdateData(FOCAUpdateData calldata updateData) external;
```

**Parameters**

| Name         | Type             | Description                                                |
| ------------ | ---------------- | ---------------------------------------------------------- |
| `updateData` | `FOCAUpdateData` | the updatable data for the `FrictionlessOnChainAssetToken` |

### getSpecificationData

*Get the specData data for the `FrictionlessOnChainAssetToken`.*

```solidity
function getSpecificationData() external view returns (FOCASpecData memory);
```

**Returns**

| Name     | Type           | Description                                               |
| -------- | -------------- | --------------------------------------------------------- |
| `<none>` | `FOCASpecData` | the specData data for the `FrictionlessOnChainAssetToken` |

### getIssuanceData

*Get the issuanceData data for the `FrictionlessOnChainAssetToken`.*

```solidity
function getIssuanceData() external view returns (FOCAIssuanceData memory);
```

**Returns**

| Name     | Type               | Description                                                   |
| -------- | ------------------ | ------------------------------------------------------------- |
| `<none>` | `FOCAIssuanceData` | the issuanceData data for the `FrictionlessOnChainAssetToken` |

### getUpdateData

*Get the updateData data for the `FrictionlessOnChainAssetToken`.*

```solidity
function getUpdateData() external view returns (FOCAUpdateData memory);
```

**Returns**

| Name     | Type             | Description                                                 |
| -------- | ---------------- | ----------------------------------------------------------- |
| `<none>` | `FOCAUpdateData` | the updateData data for the `FrictionlessOnChainAssetToken` |

### getCurrency

*Get the currency the `FrictionlessOnChainAssetToken` is issued in.*

```solidity
function getCurrency() external view returns (string memory);
```

**Returns**

| Name     | Type     | Description                                                    |
| -------- | -------- | -------------------------------------------------------------- |
| `<none>` | `string` | the currency the `FrictionlessOnChainAssetToken` is issued in. |

## Errors

### FrictionlessOnChainAssetTokenUnableToUpdateData

*error throw if there is an attempt to modify the immutable data.*

```solidity
error FrictionlessOnChainAssetTokenUnableToUpdateData();
```

## Structs

### FOCASpecData

*The specification data for the `FrictionlessOnChainAssetToken`, this is an immutable data struct.*

```solidity
struct FOCASpecData {
    uint256 issuedOn;
    uint256 maturityDays;
    FrictionlessOnChainAssetSchedule schedule;
    FrictionlessOnChainAssetPaymentFrequency paymentFrequency;
    FrictionlessOnChainAssetYieldType yieldType;
    string baseCurrency;
    uint256 stripTotal;
    string name;
    string symbol;
}
```

### FOCAIssuanceData

*The issuance data for the `FrictionlessOnChainAssetToken`, this is an immutable data struct.*

```solidity
struct FOCAIssuanceData {
    uint256 auctionedOn;
    FrictionlessOnChainAssetPriceStatus priceQuoteStatus;
    string onChainAssetUUID;
    string issuerUUID;
    string isin;
    string issuanceDocs;
    string assetClass;
}
```

### FOCAUpdateData

*The uopdatable data for the `FrictionlessOnChainAssetToken`.*

```solidity
struct FOCAUpdateData {
    uint256 maturesOn;
    uint256 total;
    FrictionlessOnChainAssetStatus status;
    uint256 yield;
    FrictionlessOnChainAssetRiskGrade riskGrade;
    uint256 pullToParValue;
    address custodianAddress;
}
```

## Enums

### FrictionlessOnChainAssetSchedule

*Enum for the schedule of the payments by the Manager, either pro\_rat or coupon/bullet style.*

```solidity
enum FrictionlessOnChainAssetSchedule {
    SCHEDULE_COUPON_ONLY,
    SCHEDULE_PRO_RATA
}
```

### FrictionlessOnChainAssetPaymentFrequency

*Enum for the periodicity of payments by the Manager*

```solidity
enum FrictionlessOnChainAssetPaymentFrequency {
    PAYMENT_FREQUENCY_DAILY,
    PAYMENT_FREQUENCY_WEEKLY,
    PAYMENT_FREQUENCY_MONTHLY,
    PAYMENT_FREQUENCY_QUARTERLY,
    PAYMENT_FREQUENCY_SEMI_ANNUALLY,
    PAYMENT_FREQUENCY_ANNUALLY,
    PAYMENT_FREQUENCY_SINGLE
}
```

### FrictionlessOnChainAssetYieldType

*Enum for the yield for this `FrictionlessOnChainAssetToken` is a fixed/floating rate*

```solidity
enum FrictionlessOnChainAssetYieldType {
    YIELD_FIXED,
    YIELD_FLOATING
}
```

### FrictionlessOnChainAssetPriceStatus

*Enum for the price quote status obtained at auction*

```solidity
enum FrictionlessOnChainAssetPriceStatus {
    PRICE_QUOTE_STATUS_UNDER_SUBSCRIBED,
    PRICE_QUOTE_STATUS_PRICED_AT_PAR,
    PRICE_QUOTE_STATUS_PRICED_AT_DISCOUNT,
    PRICE_QUOTE_STATUS_PRICED_AT_PREMIUM
}
```

### FrictionlessOnChainAssetStatus

*Enum for the current status of the `FrictionlessOnChainAssetToken`. Updated over time by the Treasury*

```solidity
enum FrictionlessOnChainAssetStatus {
    STATUS_MINTED,
    STATUS_PURCHASED,
    STATUS_MATURED,
    STATUS_IMPAIRED,
    STATUS_REDEEMED
}
```

### FrictionlessOnChainAssetRiskGrade

*Enum for the current S\&P style riskGrade of the `FrictionlessOnChainAssetToken`. Updated over time by the Manager/Treasury/Risk Oracle.*

```solidity
enum FrictionlessOnChainAssetRiskGrade {
    BER_AAA,
    BER_AA,
    BER_A,
    BER_BBB,
    BER_BB,
    BER_B,
    BER_CCC,
    BER_CC,
    BER_C,
    BER_D,
    BER_UNRATED
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.frictionless.markets/developer/smart-contracts/smart-contract-docs/frictionless-tokens/ifrictionlessonchainassettoken.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
