@cryptonergy/smart-contracts-sdk 1.0.0-dev.8 → 1.0.0-dev.9

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 (90) hide show
  1. package/dist/types/typechain-types/@chainlink/contracts/index.d.ts +2 -0
  2. package/dist/types/typechain-types/@chainlink/contracts/index.js +1 -0
  3. package/dist/types/typechain-types/@chainlink/contracts/src/index.d.ts +2 -0
  4. package/dist/types/typechain-types/@chainlink/contracts/src/index.js +1 -0
  5. package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/index.d.ts +2 -0
  6. package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/index.js +1 -0
  7. package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/shared/index.d.ts +2 -0
  8. package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/shared/index.js +1 -0
  9. package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.d.ts +103 -0
  10. package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.js +1 -0
  11. package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/shared/interfaces/index.d.ts +1 -0
  12. package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/shared/interfaces/index.js +1 -0
  13. package/dist/types/typechain-types/@chainlink/index.d.ts +2 -0
  14. package/dist/types/typechain-types/@chainlink/index.js +1 -0
  15. package/dist/types/typechain-types/@openzeppelin/contracts/access/Ownable.d.ts +54 -0
  16. package/dist/types/typechain-types/@openzeppelin/contracts/access/Ownable.js +1 -0
  17. package/dist/types/typechain-types/@openzeppelin/contracts/access/index.d.ts +1 -0
  18. package/dist/types/typechain-types/@openzeppelin/contracts/access/index.js +1 -0
  19. package/dist/types/typechain-types/@openzeppelin/contracts/index.d.ts +2 -0
  20. package/dist/types/typechain-types/contracts/index.d.ts +2 -0
  21. package/dist/types/typechain-types/contracts/mocks/MockPriceProvider.d.ts +113 -0
  22. package/dist/types/typechain-types/contracts/mocks/MockPriceProvider.js +1 -0
  23. package/dist/types/typechain-types/contracts/mocks/MockV3Aggregator.d.ts +75 -0
  24. package/dist/types/typechain-types/contracts/mocks/MockV3Aggregator.js +1 -0
  25. package/dist/types/typechain-types/contracts/mocks/index.d.ts +2 -0
  26. package/dist/types/typechain-types/contracts/oracle/IPriceProvider.d.ts +65 -0
  27. package/dist/types/typechain-types/contracts/oracle/IPriceProvider.js +1 -0
  28. package/dist/types/typechain-types/contracts/oracle/OracleProviderRegistry.d.ts +246 -0
  29. package/dist/types/typechain-types/contracts/oracle/OracleProviderRegistry.js +1 -0
  30. package/dist/types/typechain-types/contracts/oracle/OracleRouter.d.ts +395 -0
  31. package/dist/types/typechain-types/contracts/oracle/OracleRouter.js +1 -0
  32. package/dist/types/typechain-types/contracts/oracle/index.d.ts +5 -0
  33. package/dist/types/typechain-types/contracts/oracle/index.js +1 -0
  34. package/dist/types/typechain-types/contracts/oracle/providers/ChainlinkProvider.d.ts +116 -0
  35. package/dist/types/typechain-types/contracts/oracle/providers/ChainlinkProvider.js +1 -0
  36. package/dist/types/typechain-types/contracts/oracle/providers/index.d.ts +1 -0
  37. package/dist/types/typechain-types/contracts/oracle/providers/index.js +1 -0
  38. package/dist/types/typechain-types/factories/@chainlink/contracts/index.d.ts +1 -0
  39. package/dist/types/typechain-types/factories/@chainlink/contracts/index.js +4 -0
  40. package/dist/types/typechain-types/factories/@chainlink/contracts/src/index.d.ts +1 -0
  41. package/dist/types/typechain-types/factories/@chainlink/contracts/src/index.js +4 -0
  42. package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/index.d.ts +1 -0
  43. package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/index.js +4 -0
  44. package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/shared/index.d.ts +1 -0
  45. package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/shared/index.js +4 -0
  46. package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface__factory.d.ts +93 -0
  47. package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface__factory.js +126 -0
  48. package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/shared/interfaces/index.d.ts +1 -0
  49. package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/shared/interfaces/index.js +4 -0
  50. package/dist/types/typechain-types/factories/@chainlink/index.d.ts +1 -0
  51. package/dist/types/typechain-types/factories/@chainlink/index.js +4 -0
  52. package/dist/types/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.d.ts +64 -0
  53. package/dist/types/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.js +89 -0
  54. package/dist/types/typechain-types/factories/@openzeppelin/contracts/access/index.d.ts +1 -0
  55. package/dist/types/typechain-types/factories/@openzeppelin/contracts/access/index.js +4 -0
  56. package/dist/types/typechain-types/factories/@openzeppelin/contracts/index.d.ts +1 -0
  57. package/dist/types/typechain-types/factories/@openzeppelin/contracts/index.js +1 -0
  58. package/dist/types/typechain-types/factories/contracts/VaultFactoryV1__factory.d.ts +1 -1
  59. package/dist/types/typechain-types/factories/contracts/VaultFactoryV1__factory.js +1 -1
  60. package/dist/types/typechain-types/factories/contracts/VaultV1__factory.d.ts +1 -1
  61. package/dist/types/typechain-types/factories/contracts/VaultV1__factory.js +1 -1
  62. package/dist/types/typechain-types/factories/contracts/index.d.ts +1 -0
  63. package/dist/types/typechain-types/factories/contracts/index.js +1 -0
  64. package/dist/types/typechain-types/factories/contracts/mocks/MockPriceProvider__factory.d.ts +218 -0
  65. package/dist/types/typechain-types/factories/contracts/mocks/MockPriceProvider__factory.js +291 -0
  66. package/dist/types/typechain-types/factories/contracts/mocks/MockV3Aggregator__factory.d.ts +110 -0
  67. package/dist/types/typechain-types/factories/contracts/mocks/MockV3Aggregator__factory.js +149 -0
  68. package/dist/types/typechain-types/factories/contracts/mocks/index.d.ts +2 -0
  69. package/dist/types/typechain-types/factories/contracts/mocks/index.js +2 -0
  70. package/dist/types/typechain-types/factories/contracts/oracle/IPriceProvider__factory.d.ts +67 -0
  71. package/dist/types/typechain-types/factories/contracts/oracle/IPriceProvider__factory.js +94 -0
  72. package/dist/types/typechain-types/factories/contracts/oracle/OracleProviderRegistry__factory.d.ts +377 -0
  73. package/dist/types/typechain-types/factories/contracts/oracle/OracleProviderRegistry__factory.js +498 -0
  74. package/dist/types/typechain-types/factories/contracts/oracle/OracleRouter__factory.d.ts +623 -0
  75. package/dist/types/typechain-types/factories/contracts/oracle/OracleRouter__factory.js +822 -0
  76. package/dist/types/typechain-types/factories/contracts/oracle/index.d.ts +4 -0
  77. package/dist/types/typechain-types/factories/contracts/oracle/index.js +7 -0
  78. package/dist/types/typechain-types/factories/contracts/oracle/providers/ChainlinkProvider__factory.d.ts +179 -0
  79. package/dist/types/typechain-types/factories/contracts/oracle/providers/ChainlinkProvider__factory.js +241 -0
  80. package/dist/types/typechain-types/factories/contracts/oracle/providers/index.d.ts +1 -0
  81. package/dist/types/typechain-types/factories/contracts/oracle/providers/index.js +4 -0
  82. package/dist/types/typechain-types/factories/contracts/providers/AddressProviderV1__factory.d.ts +1 -1
  83. package/dist/types/typechain-types/factories/contracts/providers/AddressProviderV1__factory.js +1 -1
  84. package/dist/types/typechain-types/factories/contracts/registers/VaultRegistryV1__factory.d.ts +1 -1
  85. package/dist/types/typechain-types/factories/contracts/registers/VaultRegistryV1__factory.js +1 -1
  86. package/dist/types/typechain-types/factories/index.d.ts +1 -0
  87. package/dist/types/typechain-types/factories/index.js +1 -0
  88. package/dist/types/typechain-types/index.d.ts +18 -0
  89. package/dist/types/typechain-types/index.js +8 -0
  90. package/package.json +1 -1
@@ -0,0 +1,149 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import { Contract, ContractFactory, Interface, } from "ethers";
5
+ const _abi = [
6
+ {
7
+ inputs: [
8
+ {
9
+ internalType: "uint8",
10
+ name: "decimals_",
11
+ type: "uint8",
12
+ },
13
+ {
14
+ internalType: "int256",
15
+ name: "initialAnswer_",
16
+ type: "int256",
17
+ },
18
+ ],
19
+ stateMutability: "nonpayable",
20
+ type: "constructor",
21
+ },
22
+ {
23
+ inputs: [],
24
+ name: "answer",
25
+ outputs: [
26
+ {
27
+ internalType: "int256",
28
+ name: "",
29
+ type: "int256",
30
+ },
31
+ ],
32
+ stateMutability: "view",
33
+ type: "function",
34
+ },
35
+ {
36
+ inputs: [],
37
+ name: "decimals",
38
+ outputs: [
39
+ {
40
+ internalType: "uint8",
41
+ name: "",
42
+ type: "uint8",
43
+ },
44
+ ],
45
+ stateMutability: "view",
46
+ type: "function",
47
+ },
48
+ {
49
+ inputs: [],
50
+ name: "latestRoundData",
51
+ outputs: [
52
+ {
53
+ internalType: "uint80",
54
+ name: "roundId",
55
+ type: "uint80",
56
+ },
57
+ {
58
+ internalType: "int256",
59
+ name: "ans",
60
+ type: "int256",
61
+ },
62
+ {
63
+ internalType: "uint256",
64
+ name: "startedAt",
65
+ type: "uint256",
66
+ },
67
+ {
68
+ internalType: "uint256",
69
+ name: "updatedAt_",
70
+ type: "uint256",
71
+ },
72
+ {
73
+ internalType: "uint80",
74
+ name: "answeredInRound",
75
+ type: "uint80",
76
+ },
77
+ ],
78
+ stateMutability: "view",
79
+ type: "function",
80
+ },
81
+ {
82
+ inputs: [
83
+ {
84
+ internalType: "int256",
85
+ name: "a",
86
+ type: "int256",
87
+ },
88
+ ],
89
+ name: "setAnswer",
90
+ outputs: [],
91
+ stateMutability: "nonpayable",
92
+ type: "function",
93
+ },
94
+ {
95
+ inputs: [
96
+ {
97
+ internalType: "uint256",
98
+ name: "ts",
99
+ type: "uint256",
100
+ },
101
+ ],
102
+ name: "setUpdatedAt",
103
+ outputs: [],
104
+ stateMutability: "nonpayable",
105
+ type: "function",
106
+ },
107
+ {
108
+ inputs: [],
109
+ name: "updatedAt",
110
+ outputs: [
111
+ {
112
+ internalType: "uint256",
113
+ name: "",
114
+ type: "uint256",
115
+ },
116
+ ],
117
+ stateMutability: "view",
118
+ type: "function",
119
+ },
120
+ ];
121
+ const _bytecode = "0x6080604052348015600f57600080fd5b506040516101e43803806101e4833981016040819052602c91604d565b6000805460ff191660ff841617905560478160015542600255565b5050607f565b60008060408385031215605f57600080fd5b825160ff81168114606f57600080fd5b6020939093015192949293505050565b6101568061008e6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80631ecc7d8814610067578063313ce5671461007c5780637519ab50146100a057806385bb7d69146100b757806399213cd8146100c0578063feaf968c146100d7575b600080fd5b61007a610075366004610107565b600255565b005b6000546100899060ff1681565b60405160ff90911681526020015b60405180910390f35b6100a960025481565b604051908152602001610097565b6100a960015481565b61007a6100ce366004610107565b60015542600255565b6001805460025460408051848152602081019390935282018190526060820152608081019190915260a001610097565b60006020828403121561011957600080fd5b503591905056fea264697066735822122010ee89c3ce719698d1072b907bc3c26de8486aacf5517326b8d1497ca07e776964736f6c634300081c0033";
122
+ const isSuperArgs = (xs) => xs.length > 1;
123
+ export class MockV3Aggregator__factory extends ContractFactory {
124
+ constructor(...args) {
125
+ if (isSuperArgs(args)) {
126
+ super(...args);
127
+ }
128
+ else {
129
+ super(_abi, _bytecode, args[0]);
130
+ }
131
+ }
132
+ getDeployTransaction(decimals_, initialAnswer_, overrides) {
133
+ return super.getDeployTransaction(decimals_, initialAnswer_, overrides || {});
134
+ }
135
+ deploy(decimals_, initialAnswer_, overrides) {
136
+ return super.deploy(decimals_, initialAnswer_, overrides || {});
137
+ }
138
+ connect(runner) {
139
+ return super.connect(runner);
140
+ }
141
+ static createInterface() {
142
+ return new Interface(_abi);
143
+ }
144
+ static connect(address, runner) {
145
+ return new Contract(address, _abi, runner);
146
+ }
147
+ }
148
+ MockV3Aggregator__factory.bytecode = _bytecode;
149
+ MockV3Aggregator__factory.abi = _abi;
@@ -1 +1,3 @@
1
1
  export { MockERC20__factory } from "./MockERC20__factory";
2
+ export { MockPriceProvider__factory } from "./MockPriceProvider__factory";
3
+ export { MockV3Aggregator__factory } from "./MockV3Aggregator__factory";
@@ -2,3 +2,5 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
  export { MockERC20__factory } from "./MockERC20__factory";
5
+ export { MockPriceProvider__factory } from "./MockPriceProvider__factory";
6
+ export { MockV3Aggregator__factory } from "./MockV3Aggregator__factory";
@@ -0,0 +1,67 @@
1
+ import { type ContractRunner } from "ethers";
2
+ import type { IPriceProvider, IPriceProviderInterface } from "../../../contracts/oracle/IPriceProvider";
3
+ export declare class IPriceProvider__factory {
4
+ static readonly abi: readonly [{
5
+ readonly inputs: readonly [{
6
+ readonly internalType: "address";
7
+ readonly name: "asset";
8
+ readonly type: "address";
9
+ }];
10
+ readonly name: "getPrice";
11
+ readonly outputs: readonly [{
12
+ readonly internalType: "uint256";
13
+ readonly name: "price";
14
+ readonly type: "uint256";
15
+ }, {
16
+ readonly internalType: "uint256";
17
+ readonly name: "timestamp";
18
+ readonly type: "uint256";
19
+ }, {
20
+ readonly internalType: "uint8";
21
+ readonly name: "decimals";
22
+ readonly type: "uint8";
23
+ }, {
24
+ readonly internalType: "bool";
25
+ readonly name: "ok";
26
+ readonly type: "bool";
27
+ }];
28
+ readonly stateMutability: "view";
29
+ readonly type: "function";
30
+ }, {
31
+ readonly inputs: readonly [{
32
+ readonly internalType: "address";
33
+ readonly name: "asset";
34
+ readonly type: "address";
35
+ }];
36
+ readonly name: "isSupported";
37
+ readonly outputs: readonly [{
38
+ readonly internalType: "bool";
39
+ readonly name: "";
40
+ readonly type: "bool";
41
+ }];
42
+ readonly stateMutability: "view";
43
+ readonly type: "function";
44
+ }, {
45
+ readonly inputs: readonly [];
46
+ readonly name: "providerId";
47
+ readonly outputs: readonly [{
48
+ readonly internalType: "bytes32";
49
+ readonly name: "";
50
+ readonly type: "bytes32";
51
+ }];
52
+ readonly stateMutability: "view";
53
+ readonly type: "function";
54
+ }, {
55
+ readonly inputs: readonly [];
56
+ readonly name: "version";
57
+ readonly outputs: readonly [{
58
+ readonly internalType: "uint32";
59
+ readonly name: "";
60
+ readonly type: "uint32";
61
+ }];
62
+ readonly stateMutability: "view";
63
+ readonly type: "function";
64
+ }];
65
+ static createInterface(): IPriceProviderInterface;
66
+ static connect(address: string, runner?: ContractRunner | null): IPriceProvider;
67
+ }
@@ -0,0 +1,94 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ import { Contract, Interface } from "ethers";
5
+ const _abi = [
6
+ {
7
+ inputs: [
8
+ {
9
+ internalType: "address",
10
+ name: "asset",
11
+ type: "address",
12
+ },
13
+ ],
14
+ name: "getPrice",
15
+ outputs: [
16
+ {
17
+ internalType: "uint256",
18
+ name: "price",
19
+ type: "uint256",
20
+ },
21
+ {
22
+ internalType: "uint256",
23
+ name: "timestamp",
24
+ type: "uint256",
25
+ },
26
+ {
27
+ internalType: "uint8",
28
+ name: "decimals",
29
+ type: "uint8",
30
+ },
31
+ {
32
+ internalType: "bool",
33
+ name: "ok",
34
+ type: "bool",
35
+ },
36
+ ],
37
+ stateMutability: "view",
38
+ type: "function",
39
+ },
40
+ {
41
+ inputs: [
42
+ {
43
+ internalType: "address",
44
+ name: "asset",
45
+ type: "address",
46
+ },
47
+ ],
48
+ name: "isSupported",
49
+ outputs: [
50
+ {
51
+ internalType: "bool",
52
+ name: "",
53
+ type: "bool",
54
+ },
55
+ ],
56
+ stateMutability: "view",
57
+ type: "function",
58
+ },
59
+ {
60
+ inputs: [],
61
+ name: "providerId",
62
+ outputs: [
63
+ {
64
+ internalType: "bytes32",
65
+ name: "",
66
+ type: "bytes32",
67
+ },
68
+ ],
69
+ stateMutability: "view",
70
+ type: "function",
71
+ },
72
+ {
73
+ inputs: [],
74
+ name: "version",
75
+ outputs: [
76
+ {
77
+ internalType: "uint32",
78
+ name: "",
79
+ type: "uint32",
80
+ },
81
+ ],
82
+ stateMutability: "view",
83
+ type: "function",
84
+ },
85
+ ];
86
+ export class IPriceProvider__factory {
87
+ static createInterface() {
88
+ return new Interface(_abi);
89
+ }
90
+ static connect(address, runner) {
91
+ return new Contract(address, _abi, runner);
92
+ }
93
+ }
94
+ IPriceProvider__factory.abi = _abi;