curvance 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -4
- package/package.json +2 -2
- package/dist/abis/BaseCToken.json +0 -1550
- package/dist/abis/BorrowableCToken.json +0 -2188
- package/dist/abis/IDynamicIRM.json +0 -158
- package/dist/abis/MarketManagerIsolated.json +0 -1587
- package/dist/abis/ProtocolReader.json +0 -767
- package/dist/classes/CToken.d.ts +0 -170
- package/dist/classes/CToken.d.ts.map +0 -1
- package/dist/classes/CToken.js +0 -292
- package/dist/classes/CToken.js.map +0 -1
- package/dist/classes/CVE.d.ts +0 -7
- package/dist/classes/CVE.d.ts.map +0 -1
- package/dist/classes/CVE.js +0 -7
- package/dist/classes/CVE.js.map +0 -1
- package/dist/classes/ERC20.d.ts +0 -35
- package/dist/classes/ERC20.d.ts.map +0 -1
- package/dist/classes/ERC20.js +0 -68
- package/dist/classes/ERC20.js.map +0 -1
- package/dist/classes/Faucet.d.ts +0 -25
- package/dist/classes/Faucet.d.ts.map +0 -1
- package/dist/classes/Faucet.js +0 -48
- package/dist/classes/Faucet.js.map +0 -1
- package/dist/classes/Market.d.ts +0 -68
- package/dist/classes/Market.d.ts.map +0 -1
- package/dist/classes/Market.js +0 -136
- package/dist/classes/Market.js.map +0 -1
- package/dist/classes/OracleManager.d.ts +0 -13
- package/dist/classes/OracleManager.d.ts.map +0 -1
- package/dist/classes/OracleManager.js +0 -34
- package/dist/classes/OracleManager.js.map +0 -1
- package/dist/classes/ProtocolReader.d.ts +0 -116
- package/dist/classes/ProtocolReader.d.ts.map +0 -1
- package/dist/classes/ProtocolReader.js +0 -136
- package/dist/classes/ProtocolReader.js.map +0 -1
- package/dist/helpers.d.ts +0 -20
- package/dist/helpers.d.ts.map +0 -1
- package/dist/helpers.js +0 -45
- package/dist/helpers.js.map +0 -1
- package/dist/setup.d.ts +0 -11
- package/dist/setup.d.ts.map +0 -1
- package/dist/setup.js.map +0 -1
- package/dist/types.d.ts +0 -10
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
package/dist/helpers.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { JsonRpcSigner, Wallet } from "ethers";
|
|
2
|
-
import { BorrowableCToken, CToken } from "./classes/CToken";
|
|
3
|
-
import { Contract } from "ethers";
|
|
4
|
-
import { Decimal } from "decimal.js";
|
|
5
|
-
import { address } from "./types";
|
|
6
|
-
export declare const WAD: bigint;
|
|
7
|
-
export declare const WAD_DECIMAL: Decimal;
|
|
8
|
-
export declare enum AdaptorTypes {
|
|
9
|
-
CHAINLINK = 1,
|
|
10
|
-
REDSTONE_CORE = 2,
|
|
11
|
-
REDSTONE_CLASSIC = 3,
|
|
12
|
-
MOCK = 1337
|
|
13
|
-
}
|
|
14
|
-
export declare function toDecimal(amount: bigint, decimals?: bigint): bigint;
|
|
15
|
-
export declare function toInteger(amount: bigint, decimals?: bigint): bigint;
|
|
16
|
-
export declare function contractSetup<I>(signer: JsonRpcSigner | Wallet, contractAddress: address, abi: any): Contract & I;
|
|
17
|
-
export declare function handleTransactionWithOracles<T>(exec_func: Function, token: CToken | BorrowableCToken, adaptor: AdaptorTypes): Promise<T>;
|
|
18
|
-
export declare const AVAILABLE_CHAINS: string[];
|
|
19
|
-
export type ChainRpcPrefix = typeof AVAILABLE_CHAINS[number];
|
|
20
|
-
//# sourceMappingURL=helpers.d.ts.map
|
package/dist/helpers.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,eAAO,MAAM,GAAG,QAAqB,CAAC;AACtC,eAAO,MAAM,WAAW,SAAmB,CAAC;AAE5C,oBAAY,YAAY;IACpB,SAAS,IAAI;IACb,aAAa,IAAI;IACjB,gBAAgB,IAAI;IACpB,IAAI,OAAO;CACd;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,SAAM,GAAG,MAAM,CAEhE;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,SAAM,GAAG,MAAM,CAEhE;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,GAAG,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,QAAQ,GAAG,CAAC,CAMjH;AAED,wBAAgB,4BAA4B,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,gBAAgB,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC,CAOxI;AAED,eAAO,MAAM,gBAAgB,UAK5B,CAAC;AACF,MAAM,MAAM,cAAc,GAAG,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/helpers.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AVAILABLE_CHAINS = exports.AdaptorTypes = exports.WAD_DECIMAL = exports.WAD = void 0;
|
|
4
|
-
exports.toDecimal = toDecimal;
|
|
5
|
-
exports.toInteger = toInteger;
|
|
6
|
-
exports.contractSetup = contractSetup;
|
|
7
|
-
exports.handleTransactionWithOracles = handleTransactionWithOracles;
|
|
8
|
-
const ethers_1 = require("ethers");
|
|
9
|
-
const decimal_js_1 = require("decimal.js");
|
|
10
|
-
exports.WAD = BigInt(10n ** 18n);
|
|
11
|
-
exports.WAD_DECIMAL = new decimal_js_1.Decimal(exports.WAD);
|
|
12
|
-
var AdaptorTypes;
|
|
13
|
-
(function (AdaptorTypes) {
|
|
14
|
-
AdaptorTypes[AdaptorTypes["CHAINLINK"] = 1] = "CHAINLINK";
|
|
15
|
-
AdaptorTypes[AdaptorTypes["REDSTONE_CORE"] = 2] = "REDSTONE_CORE";
|
|
16
|
-
AdaptorTypes[AdaptorTypes["REDSTONE_CLASSIC"] = 3] = "REDSTONE_CLASSIC";
|
|
17
|
-
AdaptorTypes[AdaptorTypes["MOCK"] = 1337] = "MOCK";
|
|
18
|
-
})(AdaptorTypes || (exports.AdaptorTypes = AdaptorTypes = {}));
|
|
19
|
-
function toDecimal(amount, decimals = 18n) {
|
|
20
|
-
return amount / BigInt(10n ** BigInt(decimals));
|
|
21
|
-
}
|
|
22
|
-
function toInteger(amount, decimals = 18n) {
|
|
23
|
-
return amount * BigInt(10n ** BigInt(decimals));
|
|
24
|
-
}
|
|
25
|
-
function contractSetup(signer, contractAddress, abi) {
|
|
26
|
-
const contract = new ethers_1.Contract(contractAddress, abi, signer);
|
|
27
|
-
if (contract == undefined || contract == null) {
|
|
28
|
-
throw new Error(`Failed to load contract at address ${contractAddress}.`);
|
|
29
|
-
}
|
|
30
|
-
return contract;
|
|
31
|
-
}
|
|
32
|
-
function handleTransactionWithOracles(exec_func, token, adaptor) {
|
|
33
|
-
if (adaptor == AdaptorTypes.REDSTONE_CORE) {
|
|
34
|
-
// TODO:
|
|
35
|
-
// Handle Redstone Core specific logic
|
|
36
|
-
}
|
|
37
|
-
return exec_func();
|
|
38
|
-
}
|
|
39
|
-
exports.AVAILABLE_CHAINS = [
|
|
40
|
-
'eth-sepolia',
|
|
41
|
-
'arb-sepolia',
|
|
42
|
-
'monad-testnet',
|
|
43
|
-
'berachain-bepolia'
|
|
44
|
-
];
|
|
45
|
-
//# sourceMappingURL=helpers.js.map
|
package/dist/help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QAAQ;QACR,sCAAsC;IAC1C,CAAC;IAED,OAAO,SAAS,EAAgB,CAAC;AACrC,CAAC;AAEY,QAAA,gBAAgB,GAAG;IAC5B,aAAa;IACb,aAAa;IACb,eAAe;IACf,mBAAmB;CACtB,CAAC"}
|
package/dist/setup.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { JsonRpcSigner, Wallet } from "ethers";
|
|
2
|
-
import { ChainRpcPrefix } from "./helpers";
|
|
3
|
-
import { Market } from "./classes/Market";
|
|
4
|
-
import { ProtocolReader } from "./classes/ProtocolReader";
|
|
5
|
-
import { Faucet } from "./classes/Faucet";
|
|
6
|
-
export default function SetupChain(chain: ChainRpcPrefix, signer: JsonRpcSigner | Wallet): Promise<{
|
|
7
|
-
markets: Market[];
|
|
8
|
-
faucet: Faucet;
|
|
9
|
-
reader: ProtocolReader;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=setup.d.ts.map
|
package/dist/setup.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAI1C,wBAA8B,UAAU,CAAC,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa,GAAG,MAAM;;;;GAgB7F"}
|
package/dist/setup.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":";;;;;AAUA,6BAgBC;AAxBD,6CAA0C;AAC1C,4CAAoB;AAEpB,6DAA0D;AAC1D,6CAA0C;AAC1C,2DAAwD;AACxD,gDAAwB;AAET,KAAK,UAAU,UAAU,CAAC,KAAqB,EAAE,MAA8B;IAC1F,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC;IAClE,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,oCAAoC,KAAK,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,YAAE,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IACxE,MAAM,MAAM,GAAG,IAAI,+BAAc,CAAC,MAAM,EAAE,eAAe,CAAC,cAAyB,CAAC,CAAA;IACpF,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,MAAM,EAAE,eAAe,CAAC,MAAiB,CAAC,CAAC;IACrE,MAAM,cAAc,GAAG,IAAI,6BAAa,CAAC,MAAM,EAAE,eAAe,CAAC,aAAwB,CAAC,CAAC;IAE3F,OAAO;QACH,OAAO,EAAE,MAAM,eAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC;QAC5D,MAAM;QACN,MAAM;KACT,CAAC;AACN,CAAC"}
|
package/dist/types.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { JsonRpcSigner, Wallet } from "ethers";
|
|
2
|
-
export type address = `0x${string}`;
|
|
3
|
-
export type bytes = `0x${string}`;
|
|
4
|
-
export type uint = bigint | number;
|
|
5
|
-
export type uint240 = uint;
|
|
6
|
-
export type uint8 = uint;
|
|
7
|
-
export type uint256 = uint;
|
|
8
|
-
export type uint128 = uint;
|
|
9
|
-
export type curvance_signer = JsonRpcSigner | Wallet;
|
|
10
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/C,MAAM,MAAM,OAAO,GAAG,KAAK,MAAM,EAAE,CAAC;AACpC,MAAM,MAAM,KAAK,GAAG,KAAK,MAAM,EAAE,CAAC;AAClC,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,MAAM,CAAA;AAClC,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC;AAC3B,MAAM,MAAM,KAAK,GAAG,IAAI,CAAC;AACzB,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC;AAC3B,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC;AAC3B,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,MAAM,CAAC"}
|
package/dist/types.js
DELETED
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|