New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@exodus/assets-base

Package Overview
Dependencies
Maintainers
0
Versions
271
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/assets-base - npm Package Compare versions

Comparing version 8.0.93 to 8.0.94

1

lib/erc20-tokens/index.js

@@ -21,2 +21,3 @@ "use strict";

ticker: token.ticker,
properTicker: token.properTicker,
assetType: 'ETHEREUM_ERC20',

@@ -23,0 +24,0 @@ baseAssetName: 'ethereum',

@@ -21,2 +21,3 @@ "use strict";

ticker: token.ticker,
properTicker: token.properTicker,
assetType: 'QUORUM_ERC20',

@@ -23,0 +24,0 @@ baseAssetName: 'quorum',

2

package.json
{
"name": "@exodus/assets-base",
"version": "8.0.93",
"version": "8.0.94",
"description": "Base level package for supporting Exodus assets.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -25,5 +25,5 @@ # Exodus Assets Base

## ERC-20 Attributes Documentation
## Assets Attributes Documentation
The `assets/base/src/erc20-tokens/tokens.js` file is where we define our supported ERC-20 assets (note that these properties also apply to (mostly) all other assets in `asset-base.js`). This file consists of a list of objects that more/less follow this object definition:
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:

@@ -33,9 +33,16 @@ ```js

name: 'aeron',
baseAssetName: 'ethereum',
feeAssetName: 'ethereum',
assetType: 'ETHEREUM_ERC20',
properName: 'Aeron (old)',
decimals: 8,
ticker: 'ARN',
tickerAlias: 'ARNv1',
properTicker: 'ARN',
displayNetworkName: 'Ethereum',
displayNetworkTicker: 'ETH',
addresses: {
current: '0xBA5F11b16B155792Cf3B2E6880E8706859A8AEB6',
},
old: true,
old: true, // deprecated
}

@@ -46,10 +53,17 @@ ```

| Attribute | Definition | Desktop Usage | Mobile Usage | Pricing Server/Exchange Usage |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | The unique identifier of the asset which is used by code in both wallets to reference specific assets. Nuances are [documented here](https://github.com/ExodusMovement/exodus-core/pull/264/files#r456422332). | :point_left: | :point_left: | `name` is notably, _not_ used when making requests to the pricing and exchange servers; in those cases, `ticker` is used. See the `ticker` section below for details. |
| `properName` | The name of the asset, as displayed to the user in our wallets. | :point_left: | :point_left: | n/a |
| `decimals` | Many token contracts support fractional tokens. They accomplish this by using a scaling factor denoted by the value of decimals. This value indicates how many zeroes there are to the right of the decimal point the fixed-point representation of a token. | :point_left: | :point_left: | n/a |
| `ticker` | A secondary unique identifier for assets. It is used for anything that requires the asset's symbol (eg: Bitcoin -> BTC). | This is used by desktop and mapped to [a legacy property in that codebase](https://github.com/ExodusMovement/exodus-desktop/blob/5ed608be9c9dc2afbb19478f87a3540621431267/src/app/_local_modules/assets/_baseasset.js#L178) called `displayUnit`. | In mobile, this attribute is used as a unique identifier to reference an asset. | In both cases, this attribute is used as an idenfiifer to reference a specific asset when interfacing with the exchange and pricing servers. Note that it is possible for two assets to have the same `ticker` - in these cases, the `old` attribute is used to differentiate between the two. |
| `addresses` | These are the contract addresses. They are used to detect transactions/balances/send. Without them then you wouldn't know how to look up which token this is on the ETH blockchain. | :point_left: | :point_left: | n/a |
| `old` (optional) | This flag exists to handle cases in which an asset has upgraded to it's own mainnet or the underlying contract has been upgraded. In these cases, there would be two assets with similar `tickers` and this flag would be used to imply the differentiation between the two. Details on how this works can be [found here](https://github.com/ExodusMovement/exodus-core/pull/264/files#r456422332). | :point_left: | :point_left: | :point_left: |
| Attribute | Definition | Desktop Usage | Mobile Usage | Pricing Server/Exchange Usage |
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | The unique identifier of the asset which is used by code in both wallets to reference specific assets. Nuances are [documented here](https://github.com/ExodusMovement/exodus-core/pull/264/files#r456422332). | :point_left: | :point_left: | `name` is notably, _not_ used when making requests to the pricing and exchange servers; in those cases, `ticker` is used. See the `ticker` section below for details. |
| `properName` | The name of the asset, as displayed to the user in our wallets. | :point_left: | :point_left: | n/a |
| `decimals` | Many assets support fractional values. They accomplish this by using a scaling factor denoted by the value of decimals. This value indicates how many zeroes there are to the right of the decimal point the fixed-point representation of a token. | :point_left: | :point_left: | n/a |
| `baseAssetName` (optional) | The base asset name. This field only applies to tokens. The base asset of tokens is the primary asset of a blockchain. If this field is not defined it MUST fall back to `name`. This makes primary assets on chains without tokens their own base asset. E.g. the `baseAssetName` of ERC20 tokens on the Ethereum network is `ethereum`. E.g. the `baseAssetName` of `bitcoin` is `bitcoin`. | This field is mapped into an asset object to be accessed as `asset.baseAsset` | This field is mapped into an asset object to be accessed as `asset.baseAsset` | n/a |
| `feeAssetName` (optional) | The fee asset name. This is intended to be set by assets where the fee asset is not the primary network asset. If not defined, this MUST fall back to `baseAssetName`. E.g. the `feeAssetName` on the Vechain network is `vethor`. is | This field is mapped into an asset object to be accessed as `asset.feeAsset` | This field is mapped into an asset object to be accessed as `asset.feeAsset` | n/a |
| `assetType` | A type parameter so assets can be grouped. Used for grouping tokens of the same base asset. E.g. all Ethereum ERC20 tokens have a type value `ETHEREUM_ERC20` | :point_left: | :point_left: | n/a |
| `ticker` | A secondary unique identifier for assets. It is used for anything that requires the asset's symbol (eg: Bitcoin -> BTC). | On desktop it is not required to be unique in the code, however we should treat it as unique because of mobile and exchange usage. | In mobile, this attribute is used as a unique identifier to reference an asset. | In both cases, this attribute is used as an idenfiifer to reference a specific asset when interfacing with the exchange and pricing servers. Note that it is possible for two assets to have the same `ticker` - in these cases, the `old` attribute is used to differentiate between the two. |
| `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` | 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 |
| `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 |
| `addresses` | These are the contract addresses. They are used to detect transactions/balances/send. Without them then you wouldn't know how to look up which token this is on the ETH blockchain. | :point_left: | :point_left: | n/a |
| `old` (optional) (deprecated) | This flag exists to handle cases in which an asset has upgraded to it's own mainnet or the underlying contract has been upgraded. In these cases, there would be two assets with similar `tickers` and this flag would be used to imply the differentiation between the two. Details on how this works can be [found here](https://github.com/ExodusMovement/exodus-core/pull/264/files#r456422332). | :point_left: | :point_left: | :point_left: |

@@ -60,3 +74,3 @@ Some notes on the above from @faris:

>
> `ticker` doesn't have that requirement. However, the requests to the pricing server and the exchange use `ticker`. So when you have two identical `tickers`, things get messy.
> `ticker` is required to be unique on mobile. Desktop does not have that requirement but since it is on mobile, we must treat it as such on desktop too. The requests to the pricing server and the exchange use `ticker` (updated by @feri).
>

@@ -63,0 +77,0 @@ > For the exchange specifically, if two assets have the same `ticker`, the wrong asset could activate on the exchange screen in the wallet. This would happen with mainnet swaps. For instance, the `old` EOS would activate instead of the new EOS.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc