@gearbox-protocol/sdk 0.0.109 → 0.0.110
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/lib/apy/convexAPY copy.d.ts +6 -0
- package/lib/apy/convexAPY copy.js +201 -0
- package/lib/apy/convexAPY.d.ts +9 -5
- package/lib/apy/convexAPY.js +29 -69
- package/lib/apy/curveAPY.d.ts +4 -0
- package/lib/apy/curveAPY.js +94 -0
- package/lib/apy/index.d.ts +6 -0
- package/lib/apy/index.js +20 -0
- package/lib/apy/lidoAPY.d.ts +1 -1
- package/lib/apy/lidoAPY.js +3 -3
- package/lib/apy/yearnAPY.d.ts +4 -0
- package/lib/apy/yearnAPY.js +90 -0
- package/lib/contracts/contractsRegister.js +2 -1
- package/lib/core/creditAccount.d.ts +2 -1
- package/lib/core/creditAccount.js +19 -12
- package/lib/core/creditManager.d.ts +3 -1
- package/lib/core/creditManager.js +22 -8
- package/lib/core/errors.d.ts +1 -1
- package/lib/core/pool.js +4 -4
- package/lib/core/strategy.d.ts +5 -3
- package/lib/core/strategy.js +6 -4
- package/lib/index.d.ts +4 -4
- package/lib/index.js +7 -6
- package/lib/tokens/convex.d.ts +3 -0
- package/lib/tokens/convex.js +44 -18
- package/lib/tokens/curveLP.d.ts +1 -0
- package/lib/tokens/curveLP.js +11 -7
- package/lib/tokens/normal.d.ts +1 -0
- package/lib/tokens/normal.js +5 -1
- package/lib/tokens/token.d.ts +7 -2
- package/lib/tokens/token.js +10 -1
- package/lib/tokens/tokenData.js +2 -3
- package/lib/tokens/yearn.d.ts +1 -0
- package/lib/tokens/yearn.js +11 -7
- package/lib/utils/extracter.d.ts +11 -0
- package/lib/utils/extracter.js +19 -0
- package/lib/utils/mappers.d.ts +2 -2
- package/lib/utils/price.d.ts +8 -0
- package/lib/utils/price.js +26 -0
- package/package.json +1 -1
- package/src/apy/convexAPY.ts +47 -96
- package/src/apy/curveAPY.ts +68 -0
- package/src/apy/index.ts +8 -0
- package/src/apy/lidoAPY.ts +1 -1
- package/src/apy/yearnAPY.ts +66 -0
- package/src/contracts/contractsRegister.ts +2 -1
- package/src/core/creditAccount.ts +20 -12
- package/src/core/creditManager.ts +35 -10
- package/src/core/errors.ts +1 -0
- package/src/core/pool.ts +4 -4
- package/src/core/strategy.ts +16 -10
- package/src/index.ts +4 -4
- package/src/tokens/convex.ts +43 -20
- package/src/tokens/curveLP.ts +9 -6
- package/src/tokens/normal.ts +3 -0
- package/src/tokens/token.ts +24 -6
- package/src/tokens/tokenData.ts +2 -4
- package/src/tokens/yearn.ts +9 -6
- package/src/utils/extracter.ts +30 -0
- package/src/utils/mappers.ts +2 -2
- package/src/utils/price.ts +33 -0
- package/lib/core/price.d.ts +0 -2
- package/lib/core/price.js +0 -14
- package/lib/types/@chainlink/contracts/src/v0.6/index.d.ts +0 -2
- package/lib/types/@chainlink/contracts/src/v0.6/index.js +0 -2
- package/lib/types/@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.d.ts +0 -146
- package/lib/types/@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.js +0 -2
- package/lib/types/@chainlink/contracts/src/v0.6/interfaces/index.d.ts +0 -1
- package/lib/types/@chainlink/contracts/src/v0.6/interfaces/index.js +0 -2
- package/lib/types/contracts/integrations/lido/IstETH.d.ts +0 -154
- package/lib/types/contracts/integrations/lido/IstETH.js +0 -2
- package/lib/types/contracts/interfaces/ICreditFacade.sol/ICreditFacadeBalanceChecker.d.ts +0 -50
- package/lib/types/contracts/interfaces/ICreditFacade.sol/ICreditFacadeBalanceChecker.js +0 -2
- package/lib/types/contracts/pathfinder/Balances.sol/BalanceOps.d.ts +0 -27
- package/lib/types/contracts/pathfinder/Balances.sol/BalanceOps.js +0 -2
- package/lib/types/contracts/pathfinder/Balances.sol/index.d.ts +0 -1
- package/lib/types/contracts/pathfinder/Balances.sol/index.js +0 -2
- package/lib/types/contracts/pathfinder/NormalTokenPathFinder.sol/PathFinder.d.ts +0 -269
- package/lib/types/contracts/pathfinder/NormalTokenPathFinder.sol/PathFinder.js +0 -2
- package/lib/types/contracts/pathfinder/NormalTokenPathFinder.sol/index.d.ts +0 -1
- package/lib/types/contracts/pathfinder/NormalTokenPathFinder.sol/index.js +0 -2
- package/lib/types/contracts/test/mocks/integrations/ConvexTokenRewardContractMock.sol/VirtualBalanceWrapper.d.ts +0 -58
- package/lib/types/contracts/test/mocks/integrations/ConvexTokenRewardContractMock.sol/VirtualBalanceWrapper.js +0 -2
- package/lib/types/contracts/test/pathfinder/UniswapV2PathFinder.t.sol/UniswapV2PathFinderAdapterTest.d.ts +0 -528
- package/lib/types/contracts/test/pathfinder/UniswapV2PathFinder.t.sol/UniswapV2PathFinderAdapterTest.js +0 -2
- package/lib/types/contracts/test/pathfinder/UniswapV3PathFinder.t.sol/UniswapV3PathFinderAdapterTest.d.ts +0 -528
- package/lib/types/contracts/test/pathfinder/UniswapV3PathFinder.t.sol/UniswapV3PathFinderAdapterTest.js +0 -2
- package/lib/types/factories/@chainlink/contracts/src/v0.6/index.d.ts +0 -1
- package/lib/types/factories/@chainlink/contracts/src/v0.6/index.js +0 -30
- package/lib/types/factories/@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface__factory.d.ts +0 -22
- package/lib/types/factories/@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface__factory.js +0 -133
- package/lib/types/factories/@chainlink/contracts/src/v0.6/interfaces/index.d.ts +0 -1
- package/lib/types/factories/@chainlink/contracts/src/v0.6/interfaces/index.js +0 -8
- package/lib/types/factories/contracts/integrations/lido/IstETH__factory.d.ts +0 -35
- package/lib/types/factories/contracts/integrations/lido/IstETH__factory.js +0 -224
- package/lib/types/factories/contracts/interfaces/ICreditFacade.sol/ICreditFacadeBalanceChecker__factory.d.ts +0 -18
- package/lib/types/factories/contracts/interfaces/ICreditFacade.sol/ICreditFacadeBalanceChecker__factory.js +0 -40
- package/lib/types/factories/contracts/pathfinder/Balances.sol/BalanceOps__factory.d.ts +0 -28
- package/lib/types/factories/contracts/pathfinder/Balances.sol/BalanceOps__factory.js +0 -76
- package/lib/types/factories/contracts/pathfinder/Balances.sol/index.d.ts +0 -1
- package/lib/types/factories/contracts/pathfinder/Balances.sol/index.js +0 -8
- package/lib/types/factories/contracts/pathfinder/NormalTokenPathFinder.sol/PathFinder__factory.d.ts +0 -144
- package/lib/types/factories/contracts/pathfinder/NormalTokenPathFinder.sol/PathFinder__factory.js +0 -522
- package/lib/types/factories/contracts/pathfinder/NormalTokenPathFinder.sol/index.d.ts +0 -1
- package/lib/types/factories/contracts/pathfinder/NormalTokenPathFinder.sol/index.js +0 -8
- package/lib/types/factories/contracts/test/mocks/integrations/ConvexTokenRewardContractMock.sol/VirtualBalanceWrapper__factory.d.ts +0 -34
- package/lib/types/factories/contracts/test/mocks/integrations/ConvexTokenRewardContractMock.sol/VirtualBalanceWrapper__factory.js +0 -110
- package/lib/types/factories/contracts/test/pathfinder/UniswapV2PathFinder.t.sol/UniswapV2PathFinderAdapterTest__factory.d.ts +0 -65
- package/lib/types/factories/contracts/test/pathfinder/UniswapV2PathFinder.t.sol/UniswapV2PathFinderAdapterTest__factory.js +0 -775
- package/lib/types/factories/contracts/test/pathfinder/UniswapV3PathFinder.t.sol/UniswapV3PathFinderAdapterTest__factory.d.ts +0 -65
- package/lib/types/factories/contracts/test/pathfinder/UniswapV3PathFinder.t.sol/UniswapV3PathFinderAdapterTest__factory.js +0 -775
- package/src/core/price.ts +0 -13
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.VirtualBalanceWrapper__factory = void 0;
|
|
19
|
-
/* Autogenerated file. Do not edit manually. */
|
|
20
|
-
/* tslint:disable */
|
|
21
|
-
/* eslint-disable */
|
|
22
|
-
var ethers_1 = require("ethers");
|
|
23
|
-
var _abi = [
|
|
24
|
-
{
|
|
25
|
-
inputs: [
|
|
26
|
-
{
|
|
27
|
-
internalType: "address",
|
|
28
|
-
name: "account",
|
|
29
|
-
type: "address",
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
name: "balanceOf",
|
|
33
|
-
outputs: [
|
|
34
|
-
{
|
|
35
|
-
internalType: "uint256",
|
|
36
|
-
name: "",
|
|
37
|
-
type: "uint256",
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
stateMutability: "view",
|
|
41
|
-
type: "function",
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
inputs: [],
|
|
45
|
-
name: "deposits",
|
|
46
|
-
outputs: [
|
|
47
|
-
{
|
|
48
|
-
internalType: "contract IDeposit",
|
|
49
|
-
name: "",
|
|
50
|
-
type: "address",
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
stateMutability: "view",
|
|
54
|
-
type: "function",
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
inputs: [],
|
|
58
|
-
name: "totalSupply",
|
|
59
|
-
outputs: [
|
|
60
|
-
{
|
|
61
|
-
internalType: "uint256",
|
|
62
|
-
name: "",
|
|
63
|
-
type: "uint256",
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
stateMutability: "view",
|
|
67
|
-
type: "function",
|
|
68
|
-
},
|
|
69
|
-
];
|
|
70
|
-
var _bytecode = "0x608060405234801561001057600080fd5b50610277806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806318160ddd14610046578063323a5e0b1461006157806370a08231146100a6575b600080fd5b61004e6100b9565b6040519081526020015b60405180910390f35b6000546100819073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610058565b61004e6100b43660046101eb565b610150565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610127573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061014b9190610228565b905090565b600080546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152909116906370a0823190602401602060405180830381865afa1580156101c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101e59190610228565b92915050565b6000602082840312156101fd57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461022157600080fd5b9392505050565b60006020828403121561023a57600080fd5b505191905056fea2646970667358221220f5f52fc9e3ccf406497b2e745b7fc9608acb9ef259066f7f231d7a242d7a7d8864736f6c634300080a0033";
|
|
71
|
-
var isSuperArgs = function (xs) { return xs.length > 1; };
|
|
72
|
-
var VirtualBalanceWrapper__factory = /** @class */ (function (_super) {
|
|
73
|
-
__extends(VirtualBalanceWrapper__factory, _super);
|
|
74
|
-
function VirtualBalanceWrapper__factory() {
|
|
75
|
-
var args = [];
|
|
76
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
77
|
-
args[_i] = arguments[_i];
|
|
78
|
-
}
|
|
79
|
-
var _this = this;
|
|
80
|
-
if (isSuperArgs(args)) {
|
|
81
|
-
_this = _super.apply(this, args) || this;
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
_this = _super.call(this, _abi, _bytecode, args[0]) || this;
|
|
85
|
-
}
|
|
86
|
-
return _this;
|
|
87
|
-
}
|
|
88
|
-
VirtualBalanceWrapper__factory.prototype.deploy = function (overrides) {
|
|
89
|
-
return _super.prototype.deploy.call(this, overrides || {});
|
|
90
|
-
};
|
|
91
|
-
VirtualBalanceWrapper__factory.prototype.getDeployTransaction = function (overrides) {
|
|
92
|
-
return _super.prototype.getDeployTransaction.call(this, overrides || {});
|
|
93
|
-
};
|
|
94
|
-
VirtualBalanceWrapper__factory.prototype.attach = function (address) {
|
|
95
|
-
return _super.prototype.attach.call(this, address);
|
|
96
|
-
};
|
|
97
|
-
VirtualBalanceWrapper__factory.prototype.connect = function (signer) {
|
|
98
|
-
return _super.prototype.connect.call(this, signer);
|
|
99
|
-
};
|
|
100
|
-
VirtualBalanceWrapper__factory.createInterface = function () {
|
|
101
|
-
return new ethers_1.utils.Interface(_abi);
|
|
102
|
-
};
|
|
103
|
-
VirtualBalanceWrapper__factory.connect = function (address, signerOrProvider) {
|
|
104
|
-
return new ethers_1.Contract(address, _abi, signerOrProvider);
|
|
105
|
-
};
|
|
106
|
-
VirtualBalanceWrapper__factory.bytecode = _bytecode;
|
|
107
|
-
VirtualBalanceWrapper__factory.abi = _abi;
|
|
108
|
-
return VirtualBalanceWrapper__factory;
|
|
109
|
-
}(ethers_1.ContractFactory));
|
|
110
|
-
exports.VirtualBalanceWrapper__factory = VirtualBalanceWrapper__factory;
|