@exodus/assets-base
Advanced tools
Comparing version 8.0.117 to 8.0.118-beta-0
@@ -1,10 +0,1 @@ | ||
# 8.0.117 / 2022-02-18 | ||
- republish without changes | ||
# 8.0.116 / 2022-02-14 | ||
- update `funfair` asset to `funtoken` | ||
- update Terra tokens | ||
# 8.0.115 / 2022-02-10 | ||
@@ -11,0 +2,0 @@ |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.units = exports.ticker = exports.properName = exports.name = exports.blockExplorer = exports.baseAssetName = exports.assetType = void 0; | ||
exports.units = exports.ticker = exports.properTicker = exports.properName = exports.name = exports.blockExplorer = exports.baseAssetName = exports.assetType = void 0; | ||
@@ -23,5 +23,11 @@ var _types = require("./_types"); | ||
exports.properName = properName; | ||
const ticker = base.ticker; | ||
const ticker = name.toUpperCase(); | ||
exports.ticker = ticker; | ||
const units = base.units; | ||
const properTicker = base.ticker; | ||
exports.properTicker = properTicker; | ||
const units = { | ||
satoshis: 0, | ||
[base.ticker]: 8, | ||
[ticker]: 8 | ||
}; | ||
exports.units = units; | ||
@@ -28,0 +34,0 @@ const assetType = base.assetType; |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.units = exports.ticker = exports.properName = exports.name = exports.blockExplorer = exports.baseAssetName = exports.assetType = void 0; | ||
exports.units = exports.ticker = exports.properTicker = exports.properName = exports.name = exports.blockExplorer = exports.baseAssetName = exports.assetType = void 0; | ||
@@ -23,5 +23,11 @@ var _types = require("./_types"); | ||
exports.properName = properName; | ||
const ticker = base.ticker; | ||
const ticker = name.toUpperCase(); | ||
exports.ticker = ticker; | ||
const units = base.units; | ||
const properTicker = base.ticker; | ||
exports.properTicker = properTicker; | ||
const units = { | ||
satoshis: 0, | ||
[base.ticker]: 8, | ||
[ticker]: 8 | ||
}; | ||
exports.units = units; | ||
@@ -28,0 +34,0 @@ const assetType = base.assetType; |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.units = exports.ticker = exports.properName = exports.name = exports.blockExplorer = exports.baseAssetName = exports.assetType = void 0; | ||
exports.units = exports.ticker = exports.properTicker = exports.properName = exports.name = exports.blockExplorer = exports.baseAssetName = exports.assetType = void 0; | ||
@@ -23,5 +23,11 @@ var _types = require("./_types"); | ||
exports.properName = properName; | ||
const ticker = base.ticker; | ||
const ticker = name.toUpperCase(); | ||
exports.ticker = ticker; | ||
const units = base.units; | ||
const properTicker = base.ticker; | ||
exports.properTicker = properTicker; | ||
const units = { | ||
satoshis: 0, | ||
[base.ticker]: 8, | ||
[ticker]: 8 | ||
}; | ||
exports.units = units; | ||
@@ -28,0 +34,0 @@ const assetType = base.assetType; |
@@ -412,3 +412,3 @@ "use strict"; | ||
name: 'funfair', | ||
properName: 'FUNToken', | ||
properName: 'FunFair', | ||
decimals: 8, | ||
@@ -415,0 +415,0 @@ ticker: 'FUN', |
{ | ||
"name": "@exodus/assets-base", | ||
"version": "8.0.117", | ||
"version": "8.0.118-beta-0", | ||
"description": "Base level package for supporting Exodus assets.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -26,12 +26,9 @@ # Exodus Assets Base | ||
## "Base" asset vs "Tokens" | ||
From a technical point of view, a "token" is an asset: | ||
- such that `asset.name !== asset.baseAsset.name`: it is a "non-primary" asset of the chain | ||
- that has a specific `assetType` property: `ETHEREUM_ERC20`, `BINANCE_TOKEN`, `SOLANA_TOKEN`, `OTHER` (ontologygas). | ||
In some cases a token can be a "gas" token(`feeAsset`): the asset used to pay for fees on the given network (e.g ontologygas, vethor, neo3gas). | ||
In some cases a token can be a "gas" token(`feeAsset`): the asset used to pay for fees on the given network (e.g ontologygas, vethor, neo3gas). | ||
At UX level: | ||
- tokens that are not "gas" tokens are displayed using a chain badge (ERC20s, BEP20, tron tokens, solana tokens) | ||
@@ -41,5 +38,4 @@ - tokens that are "gas" tokens (gas for neo chain, ontologygas for ontology chain, vethor for vechain...) don't use a chain badge. | ||
Note that the lower level implementation of tokens (`accountState`, nomenclature of variables, imports...) isn't standardized yet but it is planned to unify it in the future. | ||
## Tokens Attributes Documentation | ||
## Asset Attributes Documentation | ||
The `assets-base/src/<asset>.js` files are where we define our supported assets. These files consists of a list of objects that more/less follow this object definition: | ||
@@ -57,4 +53,2 @@ | ||
tickerAlias: 'ARNv1', | ||
tickerAliases: ['ARNv1'], | ||
units: [ base: 0, [ticker]: 18 ] | ||
properTicker: 'ARN', | ||
@@ -82,5 +76,3 @@ displayNetworkName: 'Ethereum', | ||
| `properTicker` (optional) | The ticker we display to the user. This field MUST fall back to the value of `ticker` if not defined. It MAY only be used for display purposes. | :point_left: | :point_left: | n/a | | ||
| `tickerAlias` (optional) | This property is specific to Ethereum-like tokens (but may be ported to others). It updates the `Unit` object to recognize `tickerAlias` as the same unit as `ticker`. | :point_left: | :point_left: | n/a | | ||
| `tickerAliases` (optional) | This property is specific to Ethereum-like tokens (but may be ported to others). It behaves the same as `tickerAlias` except that it is an array of aliases. | :point_left: | :point_left: | n/a | | ||
| `units` | An array used to build the UnitType for this asset/token. The keys are the unit names and the values are the number of decimals. Thus the base value (integer) has zero (0) decimals. The number of keys and their names in the array are arbitrary but the ordering is not. The keys need to be ordered by the decimals number starting with zero and encreasing. By convention the last key should be the same as the `ticker`. Example for an asset with 8 decimals: `[ base: 0, micro: 2, [ticker]: 8 ]` | :point_left: | :point_left: | n/a | | ||
| `tickerAlias` | This property is specific to Ethereum-like tokens. It updates the `Unit` object to recognize `tickerAlias` as the same unit as `ticker`. | :point_left: | :point_left: | n/a | | | ||
| `displayNetworkName` (optional) | The name of the network/blockchain of this asset. If not defined it MUST fall-back to the `properName` of the asset's baseAsset. It MAY only be used for display purposes. | :point_left: | :point_left: | n/a | | ||
@@ -100,1 +92,2 @@ | `displayNetworkTicker` (optional) | The short name of the network/blockchain of this asset. If not defined it MUST fall back to `properTicker` of the asset's baseAsset. It MAY only be used for display purposes. | :point_left: | :point_left: | n/a | | ||
> To solve this, we added a hack which introduced the `old` property. The `old` property was meant to imply that there is an identifical `ticker` for a newer asset. So for the exchange, we skip over the old assets and activate the ones without the `old` property. | ||
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4165
182018
2
89