@ichidao/ichi-vaults-sdk 0.0.86 → 0.0.88

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.
Files changed (48) hide show
  1. package/dist/abis/types/Multicall.d.ts +98 -0
  2. package/dist/abis/types/Multicall.js +3 -0
  3. package/dist/abis/types/Multicall.js.map +1 -0
  4. package/dist/abis/types/factories/Multicall__factory.d.ts +76 -0
  5. package/dist/abis/types/factories/Multicall__factory.js +113 -0
  6. package/dist/abis/types/factories/Multicall__factory.js.map +1 -0
  7. package/dist/abis/types/factories/index.d.ts +1 -0
  8. package/dist/abis/types/factories/index.js +3 -1
  9. package/dist/abis/types/factories/index.js.map +1 -1
  10. package/dist/abis/types/index.d.ts +2 -0
  11. package/dist/abis/types/index.js +3 -1
  12. package/dist/abis/types/index.js.map +1 -1
  13. package/dist/src/abis/multicall.json +92 -0
  14. package/dist/src/abis/types/Multicall.d.ts +98 -0
  15. package/dist/src/abis/types/factories/Multicall__factory.d.ts +76 -0
  16. package/dist/src/abis/types/factories/index.d.ts +1 -0
  17. package/dist/src/abis/types/index.d.ts +2 -0
  18. package/dist/src/functions/chains.js +4 -7
  19. package/dist/src/functions/chains.js.map +1 -1
  20. package/dist/src/functions/deposit.js +6 -6
  21. package/dist/src/functions/deposit.js.map +1 -1
  22. package/dist/src/functions/priceFromPool.js +3 -3
  23. package/dist/src/functions/priceFromPool.js.map +1 -1
  24. package/dist/src/functions/userBalances.js +69 -94
  25. package/dist/src/functions/userBalances.js.map +1 -1
  26. package/dist/src/functions/vault.js +4 -3
  27. package/dist/src/functions/vault.js.map +1 -1
  28. package/dist/src/functions/vaultBasics.js +2 -5
  29. package/dist/src/functions/vaultBasics.js.map +1 -1
  30. package/dist/src/functions/vaultMetrics.js +3 -3
  31. package/dist/src/functions/vaultMetrics.js.map +1 -1
  32. package/dist/src/functions/withdraw.js +7 -7
  33. package/dist/src/functions/withdraw.js.map +1 -1
  34. package/dist/src/graphql/constants.js +5 -0
  35. package/dist/src/graphql/constants.js.map +1 -1
  36. package/dist/src/index.cjs.js +1 -1
  37. package/dist/src/index.esm.js +1 -1
  38. package/dist/src/src/types/index.d.ts +1 -2
  39. package/dist/src/src/utils/config/addresses.d.ts +2 -2
  40. package/dist/src/src/utils/multicallUtils.d.ts +26 -0
  41. package/dist/src/types/index.d.ts +1 -2
  42. package/dist/src/utils/config/addresses.d.ts +2 -2
  43. package/dist/src/utils/config/addresses.js +47 -3
  44. package/dist/src/utils/config/addresses.js.map +1 -1
  45. package/dist/src/utils/multicallUtils.d.ts +26 -0
  46. package/dist/src/utils/multicallUtils.js +127 -0
  47. package/dist/src/utils/multicallUtils.js.map +1 -0
  48. package/package.json +2 -1
@@ -0,0 +1,98 @@
1
+ import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
2
+ import type { FunctionFragment, Result } from "@ethersproject/abi";
3
+ import type { Listener, Provider } from "@ethersproject/providers";
4
+ import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "./common";
5
+ export declare namespace UniswapInterfaceMulticall {
6
+ type CallStruct = {
7
+ target: PromiseOrValue<string>;
8
+ gasLimit: PromiseOrValue<BigNumberish>;
9
+ callData: PromiseOrValue<BytesLike>;
10
+ };
11
+ type CallStructOutput = [string, BigNumber, string] & {
12
+ target: string;
13
+ gasLimit: BigNumber;
14
+ callData: string;
15
+ };
16
+ type ResultStruct = {
17
+ success: PromiseOrValue<boolean>;
18
+ gasUsed: PromiseOrValue<BigNumberish>;
19
+ returnData: PromiseOrValue<BytesLike>;
20
+ };
21
+ type ResultStructOutput = [boolean, BigNumber, string] & {
22
+ success: boolean;
23
+ gasUsed: BigNumber;
24
+ returnData: string;
25
+ };
26
+ }
27
+ export interface MulticallInterface extends utils.Interface {
28
+ functions: {
29
+ "getCurrentBlockTimestamp()": FunctionFragment;
30
+ "getEthBalance(address)": FunctionFragment;
31
+ "multicall((address,uint256,bytes)[])": FunctionFragment;
32
+ };
33
+ getFunction(nameOrSignatureOrTopic: "getCurrentBlockTimestamp" | "getEthBalance" | "multicall"): FunctionFragment;
34
+ encodeFunctionData(functionFragment: "getCurrentBlockTimestamp", values?: undefined): string;
35
+ encodeFunctionData(functionFragment: "getEthBalance", values: [PromiseOrValue<string>]): string;
36
+ encodeFunctionData(functionFragment: "multicall", values: [UniswapInterfaceMulticall.CallStruct[]]): string;
37
+ decodeFunctionResult(functionFragment: "getCurrentBlockTimestamp", data: BytesLike): Result;
38
+ decodeFunctionResult(functionFragment: "getEthBalance", data: BytesLike): Result;
39
+ decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
40
+ events: {};
41
+ }
42
+ export interface Multicall extends BaseContract {
43
+ connect(signerOrProvider: Signer | Provider | string): this;
44
+ attach(addressOrName: string): this;
45
+ deployed(): Promise<this>;
46
+ interface: MulticallInterface;
47
+ queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
48
+ listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
49
+ listeners(eventName?: string): Array<Listener>;
50
+ removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
51
+ removeAllListeners(eventName?: string): this;
52
+ off: OnEvent<this>;
53
+ on: OnEvent<this>;
54
+ once: OnEvent<this>;
55
+ removeListener: OnEvent<this>;
56
+ functions: {
57
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<[BigNumber] & {
58
+ timestamp: BigNumber;
59
+ }>;
60
+ getEthBalance(addr: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[BigNumber] & {
61
+ balance: BigNumber;
62
+ }>;
63
+ multicall(calls: UniswapInterfaceMulticall.CallStruct[], overrides?: Overrides & {
64
+ from?: PromiseOrValue<string>;
65
+ }): Promise<ContractTransaction>;
66
+ };
67
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
68
+ getEthBalance(addr: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
69
+ multicall(calls: UniswapInterfaceMulticall.CallStruct[], overrides?: Overrides & {
70
+ from?: PromiseOrValue<string>;
71
+ }): Promise<ContractTransaction>;
72
+ callStatic: {
73
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
74
+ getEthBalance(addr: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
75
+ multicall(calls: UniswapInterfaceMulticall.CallStruct[], overrides?: CallOverrides): Promise<[
76
+ BigNumber,
77
+ UniswapInterfaceMulticall.ResultStructOutput[]
78
+ ] & {
79
+ blockNumber: BigNumber;
80
+ returnData: UniswapInterfaceMulticall.ResultStructOutput[];
81
+ }>;
82
+ };
83
+ filters: {};
84
+ estimateGas: {
85
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
86
+ getEthBalance(addr: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
87
+ multicall(calls: UniswapInterfaceMulticall.CallStruct[], overrides?: Overrides & {
88
+ from?: PromiseOrValue<string>;
89
+ }): Promise<BigNumber>;
90
+ };
91
+ populateTransaction: {
92
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<PopulatedTransaction>;
93
+ getEthBalance(addr: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
94
+ multicall(calls: UniswapInterfaceMulticall.CallStruct[], overrides?: Overrides & {
95
+ from?: PromiseOrValue<string>;
96
+ }): Promise<PopulatedTransaction>;
97
+ };
98
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Multicall.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Multicall.js","sourceRoot":"","sources":["../../../abis/types/Multicall.ts"],"names":[],"mappings":""}
@@ -0,0 +1,76 @@
1
+ import { Signer } from "ethers";
2
+ import type { Provider } from "@ethersproject/providers";
3
+ import type { Multicall, MulticallInterface } from "../Multicall";
4
+ export declare class Multicall__factory {
5
+ static readonly abi: readonly [{
6
+ readonly inputs: readonly [];
7
+ readonly name: "getCurrentBlockTimestamp";
8
+ readonly outputs: readonly [{
9
+ readonly internalType: "uint256";
10
+ readonly name: "timestamp";
11
+ readonly type: "uint256";
12
+ }];
13
+ readonly stateMutability: "view";
14
+ readonly type: "function";
15
+ }, {
16
+ readonly inputs: readonly [{
17
+ readonly internalType: "address";
18
+ readonly name: "addr";
19
+ readonly type: "address";
20
+ }];
21
+ readonly name: "getEthBalance";
22
+ readonly outputs: readonly [{
23
+ readonly internalType: "uint256";
24
+ readonly name: "balance";
25
+ readonly type: "uint256";
26
+ }];
27
+ readonly stateMutability: "view";
28
+ readonly type: "function";
29
+ }, {
30
+ readonly inputs: readonly [{
31
+ readonly components: readonly [{
32
+ readonly internalType: "address";
33
+ readonly name: "target";
34
+ readonly type: "address";
35
+ }, {
36
+ readonly internalType: "uint256";
37
+ readonly name: "gasLimit";
38
+ readonly type: "uint256";
39
+ }, {
40
+ readonly internalType: "bytes";
41
+ readonly name: "callData";
42
+ readonly type: "bytes";
43
+ }];
44
+ readonly internalType: "struct UniswapInterfaceMulticall.Call[]";
45
+ readonly name: "calls";
46
+ readonly type: "tuple[]";
47
+ }];
48
+ readonly name: "multicall";
49
+ readonly outputs: readonly [{
50
+ readonly internalType: "uint256";
51
+ readonly name: "blockNumber";
52
+ readonly type: "uint256";
53
+ }, {
54
+ readonly components: readonly [{
55
+ readonly internalType: "bool";
56
+ readonly name: "success";
57
+ readonly type: "bool";
58
+ }, {
59
+ readonly internalType: "uint256";
60
+ readonly name: "gasUsed";
61
+ readonly type: "uint256";
62
+ }, {
63
+ readonly internalType: "bytes";
64
+ readonly name: "returnData";
65
+ readonly type: "bytes";
66
+ }];
67
+ readonly internalType: "struct UniswapInterfaceMulticall.Result[]";
68
+ readonly name: "returnData";
69
+ readonly type: "tuple[]";
70
+ }];
71
+ readonly stateMutability: "nonpayable";
72
+ readonly type: "function";
73
+ }];
74
+ static createInterface(): MulticallInterface;
75
+ static connect(address: string, signerOrProvider: Signer | Provider): Multicall;
76
+ }
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Multicall__factory = void 0;
7
+ var ethers_1 = require("ethers");
8
+ var _abi = [
9
+ {
10
+ inputs: [],
11
+ name: "getCurrentBlockTimestamp",
12
+ outputs: [
13
+ {
14
+ internalType: "uint256",
15
+ name: "timestamp",
16
+ type: "uint256",
17
+ },
18
+ ],
19
+ stateMutability: "view",
20
+ type: "function",
21
+ },
22
+ {
23
+ inputs: [
24
+ {
25
+ internalType: "address",
26
+ name: "addr",
27
+ type: "address",
28
+ },
29
+ ],
30
+ name: "getEthBalance",
31
+ outputs: [
32
+ {
33
+ internalType: "uint256",
34
+ name: "balance",
35
+ type: "uint256",
36
+ },
37
+ ],
38
+ stateMutability: "view",
39
+ type: "function",
40
+ },
41
+ {
42
+ inputs: [
43
+ {
44
+ components: [
45
+ {
46
+ internalType: "address",
47
+ name: "target",
48
+ type: "address",
49
+ },
50
+ {
51
+ internalType: "uint256",
52
+ name: "gasLimit",
53
+ type: "uint256",
54
+ },
55
+ {
56
+ internalType: "bytes",
57
+ name: "callData",
58
+ type: "bytes",
59
+ },
60
+ ],
61
+ internalType: "struct UniswapInterfaceMulticall.Call[]",
62
+ name: "calls",
63
+ type: "tuple[]",
64
+ },
65
+ ],
66
+ name: "multicall",
67
+ outputs: [
68
+ {
69
+ internalType: "uint256",
70
+ name: "blockNumber",
71
+ type: "uint256",
72
+ },
73
+ {
74
+ components: [
75
+ {
76
+ internalType: "bool",
77
+ name: "success",
78
+ type: "bool",
79
+ },
80
+ {
81
+ internalType: "uint256",
82
+ name: "gasUsed",
83
+ type: "uint256",
84
+ },
85
+ {
86
+ internalType: "bytes",
87
+ name: "returnData",
88
+ type: "bytes",
89
+ },
90
+ ],
91
+ internalType: "struct UniswapInterfaceMulticall.Result[]",
92
+ name: "returnData",
93
+ type: "tuple[]",
94
+ },
95
+ ],
96
+ stateMutability: "nonpayable",
97
+ type: "function",
98
+ },
99
+ ];
100
+ var Multicall__factory = /** @class */ (function () {
101
+ function Multicall__factory() {
102
+ }
103
+ Multicall__factory.createInterface = function () {
104
+ return new ethers_1.utils.Interface(_abi);
105
+ };
106
+ Multicall__factory.connect = function (address, signerOrProvider) {
107
+ return new ethers_1.Contract(address, _abi, signerOrProvider);
108
+ };
109
+ Multicall__factory.abi = _abi;
110
+ return Multicall__factory;
111
+ }());
112
+ exports.Multicall__factory = Multicall__factory;
113
+ //# sourceMappingURL=Multicall__factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Multicall__factory.js","sourceRoot":"","sources":["../../../../abis/types/factories/Multicall__factory.ts"],"names":[],"mappings":";AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;;;AAEpB,iCAAiD;AAIjD,IAAM,IAAI,GAAG;IACX;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,0BAA0B;QAChC,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,SAAS;aAChB;SACF;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE;YACN;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,SAAS;aAChB;SACF;QACD,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,SAAS;aAChB;SACF;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE;YACN;gBACE,UAAU,EAAE;oBACV;wBACE,YAAY,EAAE,SAAS;wBACvB,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,YAAY,EAAE,SAAS;wBACvB,IAAI,EAAE,UAAU;wBAChB,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,YAAY,EAAE,OAAO;wBACrB,IAAI,EAAE,UAAU;wBAChB,IAAI,EAAE,OAAO;qBACd;iBACF;gBACD,YAAY,EAAE,yCAAyC;gBACvD,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,SAAS;aAChB;SACF;QACD,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,UAAU,EAAE;oBACV;wBACE,YAAY,EAAE,MAAM;wBACpB,IAAI,EAAE,SAAS;wBACf,IAAI,EAAE,MAAM;qBACb;oBACD;wBACE,YAAY,EAAE,SAAS;wBACvB,IAAI,EAAE,SAAS;wBACf,IAAI,EAAE,SAAS;qBAChB;oBACD;wBACE,YAAY,EAAE,OAAO;wBACrB,IAAI,EAAE,YAAY;wBAClB,IAAI,EAAE,OAAO;qBACd;iBACF;gBACD,YAAY,EAAE,2CAA2C;gBACzD,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,SAAS;aAChB;SACF;QACD,eAAe,EAAE,YAAY;QAC7B,IAAI,EAAE,UAAU;KACjB;CACO,CAAC;AAEX;IAAA;IAWA,CAAC;IATQ,kCAAe,GAAtB;QACE,OAAO,IAAI,cAAK,CAAC,SAAS,CAAC,IAAI,CAAuB,CAAC;IACzD,CAAC;IACM,0BAAO,GAAd,UACE,OAAe,EACf,gBAAmC;QAEnC,OAAO,IAAI,iBAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,gBAAgB,CAAc,CAAC;IACpE,CAAC;IATe,sBAAG,GAAG,IAAI,CAAC;IAU7B,yBAAC;CAAA,AAXD,IAWC;AAXY,gDAAkB"}
@@ -3,4 +3,5 @@ export { ERC20__factory } from "./ERC20__factory";
3
3
  export { IchiVault__factory } from "./IchiVault__factory";
4
4
  export { AlgebraIntegralPool__factory } from "./AlgebraIntegralPool__factory";
5
5
  export { AlgebraPool__factory } from "./AlgebraPool__factory";
6
+ export { Multicall__factory } from "./Multicall__factory";
6
7
  export { UniswapV3Pool__factory } from "./UniswapV3Pool__factory";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UniswapV3Pool__factory = exports.AlgebraPool__factory = exports.AlgebraIntegralPool__factory = exports.IchiVault__factory = exports.ERC20__factory = exports.DepositGuard__factory = void 0;
3
+ exports.UniswapV3Pool__factory = exports.Multicall__factory = exports.AlgebraPool__factory = exports.AlgebraIntegralPool__factory = exports.IchiVault__factory = exports.ERC20__factory = exports.DepositGuard__factory = void 0;
4
4
  /* Autogenerated file. Do not edit manually. */
5
5
  /* tslint:disable */
6
6
  /* eslint-disable */
@@ -14,6 +14,8 @@ var AlgebraIntegralPool__factory_1 = require("./AlgebraIntegralPool__factory");
14
14
  Object.defineProperty(exports, "AlgebraIntegralPool__factory", { enumerable: true, get: function () { return AlgebraIntegralPool__factory_1.AlgebraIntegralPool__factory; } });
15
15
  var AlgebraPool__factory_1 = require("./AlgebraPool__factory");
16
16
  Object.defineProperty(exports, "AlgebraPool__factory", { enumerable: true, get: function () { return AlgebraPool__factory_1.AlgebraPool__factory; } });
17
+ var Multicall__factory_1 = require("./Multicall__factory");
18
+ Object.defineProperty(exports, "Multicall__factory", { enumerable: true, get: function () { return Multicall__factory_1.Multicall__factory; } });
17
19
  var UniswapV3Pool__factory_1 = require("./UniswapV3Pool__factory");
18
20
  Object.defineProperty(exports, "UniswapV3Pool__factory", { enumerable: true, get: function () { return UniswapV3Pool__factory_1.UniswapV3Pool__factory; } });
19
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../abis/types/factories/index.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,+EAA8E;AAArE,4IAAA,4BAA4B,OAAA;AACrC,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../abis/types/factories/index.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,+EAA8E;AAArE,4IAAA,4BAA4B,OAAA;AACrC,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA"}
@@ -3,6 +3,7 @@ export type { ERC20 } from "./ERC20";
3
3
  export type { IchiVault } from "./IchiVault";
4
4
  export type { AlgebraIntegralPool } from "./AlgebraIntegralPool";
5
5
  export type { AlgebraPool } from "./AlgebraPool";
6
+ export type { Multicall } from "./Multicall";
6
7
  export type { UniswapV3Pool } from "./UniswapV3Pool";
7
8
  export * as factories from "./factories";
8
9
  export { AlgebraIntegralPool__factory } from "./factories/AlgebraIntegralPool__factory";
@@ -10,4 +11,5 @@ export { AlgebraPool__factory } from "./factories/AlgebraPool__factory";
10
11
  export { DepositGuard__factory } from "./factories/DepositGuard__factory";
11
12
  export { ERC20__factory } from "./factories/ERC20__factory";
12
13
  export { IchiVault__factory } from "./factories/IchiVault__factory";
14
+ export { Multicall__factory } from "./factories/Multicall__factory";
13
15
  export { UniswapV3Pool__factory } from "./factories/UniswapV3Pool__factory";
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.UniswapV3Pool__factory = exports.IchiVault__factory = exports.ERC20__factory = exports.DepositGuard__factory = exports.AlgebraPool__factory = exports.AlgebraIntegralPool__factory = exports.factories = void 0;
26
+ exports.UniswapV3Pool__factory = exports.Multicall__factory = exports.IchiVault__factory = exports.ERC20__factory = exports.DepositGuard__factory = exports.AlgebraPool__factory = exports.AlgebraIntegralPool__factory = exports.factories = void 0;
27
27
  exports.factories = __importStar(require("./factories"));
28
28
  var AlgebraIntegralPool__factory_1 = require("./factories/AlgebraIntegralPool__factory");
29
29
  Object.defineProperty(exports, "AlgebraIntegralPool__factory", { enumerable: true, get: function () { return AlgebraIntegralPool__factory_1.AlgebraIntegralPool__factory; } });
@@ -35,6 +35,8 @@ var ERC20__factory_1 = require("./factories/ERC20__factory");
35
35
  Object.defineProperty(exports, "ERC20__factory", { enumerable: true, get: function () { return ERC20__factory_1.ERC20__factory; } });
36
36
  var IchiVault__factory_1 = require("./factories/IchiVault__factory");
37
37
  Object.defineProperty(exports, "IchiVault__factory", { enumerable: true, get: function () { return IchiVault__factory_1.IchiVault__factory; } });
38
+ var Multicall__factory_1 = require("./factories/Multicall__factory");
39
+ Object.defineProperty(exports, "Multicall__factory", { enumerable: true, get: function () { return Multicall__factory_1.Multicall__factory; } });
38
40
  var UniswapV3Pool__factory_1 = require("./factories/UniswapV3Pool__factory");
39
41
  Object.defineProperty(exports, "UniswapV3Pool__factory", { enumerable: true, get: function () { return UniswapV3Pool__factory_1.UniswapV3Pool__factory; } });
40
42
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../abis/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AASA,yDAAyC;AACzC,yFAAwF;AAA/E,4IAAA,4BAA4B,OAAA;AACrC,yEAAwE;AAA/D,4HAAA,oBAAoB,OAAA;AAC7B,2EAA0E;AAAjE,8HAAA,qBAAqB,OAAA;AAC9B,6DAA4D;AAAnD,gHAAA,cAAc,OAAA;AACvB,qEAAoE;AAA3D,wHAAA,kBAAkB,OAAA;AAC3B,6EAA4E;AAAnE,gIAAA,sBAAsB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../abis/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,yDAAyC;AACzC,yFAAwF;AAA/E,4IAAA,4BAA4B,OAAA;AACrC,yEAAwE;AAA/D,4HAAA,oBAAoB,OAAA;AAC7B,2EAA0E;AAAjE,8HAAA,qBAAqB,OAAA;AAC9B,6DAA4D;AAAnD,gHAAA,cAAc,OAAA;AACvB,qEAAoE;AAA3D,wHAAA,kBAAkB,OAAA;AAC3B,qEAAoE;AAA3D,wHAAA,kBAAkB,OAAA;AAC3B,6EAA4E;AAAnE,gIAAA,sBAAsB,OAAA"}
@@ -0,0 +1,92 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "name": "getCurrentBlockTimestamp",
5
+ "outputs": [
6
+ {
7
+ "internalType": "uint256",
8
+ "name": "timestamp",
9
+ "type": "uint256"
10
+ }
11
+ ],
12
+ "stateMutability": "view",
13
+ "type": "function"
14
+ },
15
+ {
16
+ "inputs": [
17
+ {
18
+ "internalType": "address",
19
+ "name": "addr",
20
+ "type": "address"
21
+ }
22
+ ],
23
+ "name": "getEthBalance",
24
+ "outputs": [
25
+ {
26
+ "internalType": "uint256",
27
+ "name": "balance",
28
+ "type": "uint256"
29
+ }
30
+ ],
31
+ "stateMutability": "view",
32
+ "type": "function"
33
+ },
34
+ {
35
+ "inputs": [
36
+ {
37
+ "components": [
38
+ {
39
+ "internalType": "address",
40
+ "name": "target",
41
+ "type": "address"
42
+ },
43
+ {
44
+ "internalType": "uint256",
45
+ "name": "gasLimit",
46
+ "type": "uint256"
47
+ },
48
+ {
49
+ "internalType": "bytes",
50
+ "name": "callData",
51
+ "type": "bytes"
52
+ }
53
+ ],
54
+ "internalType": "struct UniswapInterfaceMulticall.Call[]",
55
+ "name": "calls",
56
+ "type": "tuple[]"
57
+ }
58
+ ],
59
+ "name": "multicall",
60
+ "outputs": [
61
+ {
62
+ "internalType": "uint256",
63
+ "name": "blockNumber",
64
+ "type": "uint256"
65
+ },
66
+ {
67
+ "components": [
68
+ {
69
+ "internalType": "bool",
70
+ "name": "success",
71
+ "type": "bool"
72
+ },
73
+ {
74
+ "internalType": "uint256",
75
+ "name": "gasUsed",
76
+ "type": "uint256"
77
+ },
78
+ {
79
+ "internalType": "bytes",
80
+ "name": "returnData",
81
+ "type": "bytes"
82
+ }
83
+ ],
84
+ "internalType": "struct UniswapInterfaceMulticall.Result[]",
85
+ "name": "returnData",
86
+ "type": "tuple[]"
87
+ }
88
+ ],
89
+ "stateMutability": "nonpayable",
90
+ "type": "function"
91
+ }
92
+ ]
@@ -0,0 +1,98 @@
1
+ import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
2
+ import type { FunctionFragment, Result } from "@ethersproject/abi";
3
+ import type { Listener, Provider } from "@ethersproject/providers";
4
+ import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "./common";
5
+ export declare namespace UniswapInterfaceMulticall {
6
+ type CallStruct = {
7
+ target: PromiseOrValue<string>;
8
+ gasLimit: PromiseOrValue<BigNumberish>;
9
+ callData: PromiseOrValue<BytesLike>;
10
+ };
11
+ type CallStructOutput = [string, BigNumber, string] & {
12
+ target: string;
13
+ gasLimit: BigNumber;
14
+ callData: string;
15
+ };
16
+ type ResultStruct = {
17
+ success: PromiseOrValue<boolean>;
18
+ gasUsed: PromiseOrValue<BigNumberish>;
19
+ returnData: PromiseOrValue<BytesLike>;
20
+ };
21
+ type ResultStructOutput = [boolean, BigNumber, string] & {
22
+ success: boolean;
23
+ gasUsed: BigNumber;
24
+ returnData: string;
25
+ };
26
+ }
27
+ export interface MulticallInterface extends utils.Interface {
28
+ functions: {
29
+ "getCurrentBlockTimestamp()": FunctionFragment;
30
+ "getEthBalance(address)": FunctionFragment;
31
+ "multicall((address,uint256,bytes)[])": FunctionFragment;
32
+ };
33
+ getFunction(nameOrSignatureOrTopic: "getCurrentBlockTimestamp" | "getEthBalance" | "multicall"): FunctionFragment;
34
+ encodeFunctionData(functionFragment: "getCurrentBlockTimestamp", values?: undefined): string;
35
+ encodeFunctionData(functionFragment: "getEthBalance", values: [PromiseOrValue<string>]): string;
36
+ encodeFunctionData(functionFragment: "multicall", values: [UniswapInterfaceMulticall.CallStruct[]]): string;
37
+ decodeFunctionResult(functionFragment: "getCurrentBlockTimestamp", data: BytesLike): Result;
38
+ decodeFunctionResult(functionFragment: "getEthBalance", data: BytesLike): Result;
39
+ decodeFunctionResult(functionFragment: "multicall", data: BytesLike): Result;
40
+ events: {};
41
+ }
42
+ export interface Multicall extends BaseContract {
43
+ connect(signerOrProvider: Signer | Provider | string): this;
44
+ attach(addressOrName: string): this;
45
+ deployed(): Promise<this>;
46
+ interface: MulticallInterface;
47
+ queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
48
+ listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
49
+ listeners(eventName?: string): Array<Listener>;
50
+ removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
51
+ removeAllListeners(eventName?: string): this;
52
+ off: OnEvent<this>;
53
+ on: OnEvent<this>;
54
+ once: OnEvent<this>;
55
+ removeListener: OnEvent<this>;
56
+ functions: {
57
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<[BigNumber] & {
58
+ timestamp: BigNumber;
59
+ }>;
60
+ getEthBalance(addr: PromiseOrValue<string>, overrides?: CallOverrides): Promise<[BigNumber] & {
61
+ balance: BigNumber;
62
+ }>;
63
+ multicall(calls: UniswapInterfaceMulticall.CallStruct[], overrides?: Overrides & {
64
+ from?: PromiseOrValue<string>;
65
+ }): Promise<ContractTransaction>;
66
+ };
67
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
68
+ getEthBalance(addr: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
69
+ multicall(calls: UniswapInterfaceMulticall.CallStruct[], overrides?: Overrides & {
70
+ from?: PromiseOrValue<string>;
71
+ }): Promise<ContractTransaction>;
72
+ callStatic: {
73
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
74
+ getEthBalance(addr: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
75
+ multicall(calls: UniswapInterfaceMulticall.CallStruct[], overrides?: CallOverrides): Promise<[
76
+ BigNumber,
77
+ UniswapInterfaceMulticall.ResultStructOutput[]
78
+ ] & {
79
+ blockNumber: BigNumber;
80
+ returnData: UniswapInterfaceMulticall.ResultStructOutput[];
81
+ }>;
82
+ };
83
+ filters: {};
84
+ estimateGas: {
85
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
86
+ getEthBalance(addr: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
87
+ multicall(calls: UniswapInterfaceMulticall.CallStruct[], overrides?: Overrides & {
88
+ from?: PromiseOrValue<string>;
89
+ }): Promise<BigNumber>;
90
+ };
91
+ populateTransaction: {
92
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<PopulatedTransaction>;
93
+ getEthBalance(addr: PromiseOrValue<string>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
94
+ multicall(calls: UniswapInterfaceMulticall.CallStruct[], overrides?: Overrides & {
95
+ from?: PromiseOrValue<string>;
96
+ }): Promise<PopulatedTransaction>;
97
+ };
98
+ }
@@ -0,0 +1,76 @@
1
+ import { Signer } from "ethers";
2
+ import type { Provider } from "@ethersproject/providers";
3
+ import type { Multicall, MulticallInterface } from "../Multicall";
4
+ export declare class Multicall__factory {
5
+ static readonly abi: readonly [{
6
+ readonly inputs: readonly [];
7
+ readonly name: "getCurrentBlockTimestamp";
8
+ readonly outputs: readonly [{
9
+ readonly internalType: "uint256";
10
+ readonly name: "timestamp";
11
+ readonly type: "uint256";
12
+ }];
13
+ readonly stateMutability: "view";
14
+ readonly type: "function";
15
+ }, {
16
+ readonly inputs: readonly [{
17
+ readonly internalType: "address";
18
+ readonly name: "addr";
19
+ readonly type: "address";
20
+ }];
21
+ readonly name: "getEthBalance";
22
+ readonly outputs: readonly [{
23
+ readonly internalType: "uint256";
24
+ readonly name: "balance";
25
+ readonly type: "uint256";
26
+ }];
27
+ readonly stateMutability: "view";
28
+ readonly type: "function";
29
+ }, {
30
+ readonly inputs: readonly [{
31
+ readonly components: readonly [{
32
+ readonly internalType: "address";
33
+ readonly name: "target";
34
+ readonly type: "address";
35
+ }, {
36
+ readonly internalType: "uint256";
37
+ readonly name: "gasLimit";
38
+ readonly type: "uint256";
39
+ }, {
40
+ readonly internalType: "bytes";
41
+ readonly name: "callData";
42
+ readonly type: "bytes";
43
+ }];
44
+ readonly internalType: "struct UniswapInterfaceMulticall.Call[]";
45
+ readonly name: "calls";
46
+ readonly type: "tuple[]";
47
+ }];
48
+ readonly name: "multicall";
49
+ readonly outputs: readonly [{
50
+ readonly internalType: "uint256";
51
+ readonly name: "blockNumber";
52
+ readonly type: "uint256";
53
+ }, {
54
+ readonly components: readonly [{
55
+ readonly internalType: "bool";
56
+ readonly name: "success";
57
+ readonly type: "bool";
58
+ }, {
59
+ readonly internalType: "uint256";
60
+ readonly name: "gasUsed";
61
+ readonly type: "uint256";
62
+ }, {
63
+ readonly internalType: "bytes";
64
+ readonly name: "returnData";
65
+ readonly type: "bytes";
66
+ }];
67
+ readonly internalType: "struct UniswapInterfaceMulticall.Result[]";
68
+ readonly name: "returnData";
69
+ readonly type: "tuple[]";
70
+ }];
71
+ readonly stateMutability: "nonpayable";
72
+ readonly type: "function";
73
+ }];
74
+ static createInterface(): MulticallInterface;
75
+ static connect(address: string, signerOrProvider: Signer | Provider): Multicall;
76
+ }
@@ -3,4 +3,5 @@ export { ERC20__factory } from "./ERC20__factory";
3
3
  export { IchiVault__factory } from "./IchiVault__factory";
4
4
  export { AlgebraIntegralPool__factory } from "./AlgebraIntegralPool__factory";
5
5
  export { AlgebraPool__factory } from "./AlgebraPool__factory";
6
+ export { Multicall__factory } from "./Multicall__factory";
6
7
  export { UniswapV3Pool__factory } from "./UniswapV3Pool__factory";
@@ -3,6 +3,7 @@ export type { ERC20 } from "./ERC20";
3
3
  export type { IchiVault } from "./IchiVault";
4
4
  export type { AlgebraIntegralPool } from "./AlgebraIntegralPool";
5
5
  export type { AlgebraPool } from "./AlgebraPool";
6
+ export type { Multicall } from "./Multicall";
6
7
  export type { UniswapV3Pool } from "./UniswapV3Pool";
7
8
  export * as factories from "./factories";
8
9
  export { AlgebraIntegralPool__factory } from "./factories/AlgebraIntegralPool__factory";
@@ -10,4 +11,5 @@ export { AlgebraPool__factory } from "./factories/AlgebraPool__factory";
10
11
  export { DepositGuard__factory } from "./factories/DepositGuard__factory";
11
12
  export { ERC20__factory } from "./factories/ERC20__factory";
12
13
  export { IchiVault__factory } from "./factories/IchiVault__factory";
14
+ export { Multicall__factory } from "./factories/Multicall__factory";
13
15
  export { UniswapV3Pool__factory } from "./factories/UniswapV3Pool__factory";