@sonarwatch/portfolio-plugins 0.14.23 → 0.14.24
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/plugins/cyberfrogs/constants.js +1 -1
- package/src/plugins/cyberfrogs/constants.js.map +1 -1
- package/src/plugins/cyberfrogs/thorDepositFetcher.js +1 -0
- package/src/plugins/cyberfrogs/thorDepositFetcher.js.map +1 -1
- package/src/utils/misc/getSourceWeight.d.ts +1 -1
- package/src/utils/misc/getSourceWeight.js +3 -3
- package/src/utils/misc/getSourceWeight.js.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.14.24](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.23...plugins-0.14.24) (2024-11-07)
|
6
|
+
|
7
|
+
|
8
|
+
|
5
9
|
## [0.14.23](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.22...plugins-0.14.23) (2024-11-07)
|
6
10
|
|
7
11
|
|
package/package.json
CHANGED
@@ -5,7 +5,7 @@ const web3_js_1 = require("@solana/web3.js");
|
|
5
5
|
exports.platformId = 'cyberfrogs';
|
6
6
|
exports.platform = {
|
7
7
|
id: exports.platformId,
|
8
|
-
name: 'CyberFrogs
|
8
|
+
name: 'CyberFrogs',
|
9
9
|
image: 'https://sonar.watch/img/platforms/cyberfrogs.webp',
|
10
10
|
website: 'https://legacy.cyberfrogs.io/faction-contracts-v3',
|
11
11
|
twitter: 'https://twitter.com/CyberFrogsNFT',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cyberfrogs/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cyberfrogs/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,mDAAmD;IAC1D,OAAO,EAAE,mDAAmD;IAC5D,OAAO,EAAE,mCAAmC;CAC7C,CAAC;AAEW,QAAA,GAAG,GAAG,IAAI,mBAAS,CAC9B,8CAA8C,CAC/C,CAAC"}
|
@@ -31,6 +31,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
31
31
|
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
32
32
|
const element = elementRegistry.addElementMultiple({
|
33
33
|
label: 'Deposit',
|
34
|
+
name: 'Thor V3',
|
34
35
|
});
|
35
36
|
accounts.forEach((deposit) => {
|
36
37
|
element.addAsset({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"thorDepositFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cyberfrogs/thorDepositFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAA8C;AAE9C,iDAAsD;AACtD,uCAA0C;AAC1C,gFAA6E;AAC7E,+CAA8E;AAE9E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,UAAU,EACV,uBAAa,EACb,eAAG,EACH;QACE;YACE,MAAM,EAAE;gBACN,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,EAAE;aACX;SACF;QACD;YACE,QAAQ,EAAE,EAAE;SACb;KACF,CACF,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC;QACjD,KAAK,EAAE,SAAS;
|
1
|
+
{"version":3,"file":"thorDepositFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/cyberfrogs/thorDepositFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAA8C;AAE9C,iDAAsD;AACtD,uCAA0C;AAC1C,gFAA6E;AAC7E,+CAA8E;AAE9E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,UAAU,EACV,uBAAa,EACb,eAAG,EACH;QACE;YACE,MAAM,EAAE;gBACN,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,EAAE;aACX;SACF;QACD;YACE,QAAQ,EAAE,EAAE;SACb;KACF,CACF,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC;QACjD,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC;IAEH,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,OAAO,CAAC,QAAQ,CAAC;YACf,OAAO,EAAE,uBAAc;YACvB,MAAM,EAAE,OAAO,CAAC,cAAc;YAC9B,UAAU,EAAE;gBACV,WAAW,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;aAClD;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,eAAe;IAChC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -3,7 +3,7 @@ import BigNumber from 'bignumber.js';
|
|
3
3
|
* Get the weight of a new TokenPriceSource depending on the size of the pool in USD$ value
|
4
4
|
*
|
5
5
|
* @param {BigNumber | number} poolTvl Pool total value locked (in USD$)
|
6
|
-
* @param {number} [trustValue=
|
6
|
+
* @param {number} [trustValue=100000000] Value (in USD$) from which the weight is 1
|
7
7
|
*
|
8
8
|
* @returns weight between 0 and 1
|
9
9
|
*/
|
@@ -9,11 +9,11 @@ const constants_1 = require("./constants");
|
|
9
9
|
* Get the weight of a new TokenPriceSource depending on the size of the pool in USD$ value
|
10
10
|
*
|
11
11
|
* @param {BigNumber | number} poolTvl Pool total value locked (in USD$)
|
12
|
-
* @param {number} [trustValue=
|
12
|
+
* @param {number} [trustValue=100000000] Value (in USD$) from which the weight is 1
|
13
13
|
*
|
14
14
|
* @returns weight between 0 and 1
|
15
15
|
*/
|
16
|
-
function getSourceWeight(poolTvl, trustValue =
|
16
|
+
function getSourceWeight(poolTvl, trustValue = 100000000) {
|
17
17
|
const fPoolTvl = new bignumber_js_1.default(poolTvl);
|
18
18
|
if (fPoolTvl.isGreaterThanOrEqualTo(trustValue))
|
19
19
|
return 1;
|
@@ -21,7 +21,7 @@ function getSourceWeight(poolTvl, trustValue = 1000000000) {
|
|
21
21
|
return 0;
|
22
22
|
return fPoolTvl
|
23
23
|
.dividedBy(trustValue)
|
24
|
-
.decimalPlaces(
|
24
|
+
.decimalPlaces(6, bignumber_js_1.default.ROUND_CEIL)
|
25
25
|
.toNumber();
|
26
26
|
}
|
27
27
|
exports.default = getSourceWeight;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getSourceWeight.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getSourceWeight.ts"],"names":[],"mappings":";;;;;AAAA,gEAAqC;AACrC,2CAA4C;AAE5C;;;;;;;GAOG;AACH,SAAwB,eAAe,CACrC,OAA2B,EAC3B,UAAU,GAAG,
|
1
|
+
{"version":3,"file":"getSourceWeight.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getSourceWeight.ts"],"names":[],"mappings":";;;;;AAAA,gEAAqC;AACrC,2CAA4C;AAE5C;;;;;;;GAOG;AACH,SAAwB,eAAe,CACrC,OAA2B,EAC3B,UAAU,GAAG,SAAS;IAEtB,MAAM,QAAQ,GAAG,IAAI,sBAAS,CAAC,OAAO,CAAC,CAAC;IACxC,IAAI,QAAQ,CAAC,sBAAsB,CAAC,UAAU,CAAC;QAAE,OAAO,CAAC,CAAC;IAC1D,IAAI,QAAQ,CAAC,mBAAmB,CAAC,yBAAa,CAAC;QAAE,OAAO,CAAC,CAAC;IAC1D,OAAO,QAAQ;SACZ,SAAS,CAAC,UAAU,CAAC;SACrB,aAAa,CAAC,CAAC,EAAE,sBAAS,CAAC,UAAU,CAAC;SACtC,QAAQ,EAAE,CAAC;AAChB,CAAC;AAXD,kCAWC"}
|