alia-contracts-spec 0.1.0
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/LICENSE +23 -0
- package/README.md +73 -0
- package/abi/IAllocationAdapter.json +181 -0
- package/abi/IPillarDMode.json +281 -0
- package/abi/IScoreEngine.json +87 -0
- package/abi/adapters/IAaveV3BNBAdapter.json +251 -0
- package/abi/adapters/ICompoundAdapter.json +238 -0
- package/abi/adapters/IEulerAdapter.json +238 -0
- package/abi/adapters/IKernelAdapter.json +255 -0
- package/abi/adapters/IListaAdapter.json +239 -0
- package/abi/adapters/IMorphoAdapter.json +259 -0
- package/abi/adapters/IPendleAdapter.json +289 -0
- package/abi/adapters/ISiloAdapter.json +238 -0
- package/abi/adapters/ISparkAdapter.json +245 -0
- package/dist/IAllocationAdapter.d.ts +132 -0
- package/dist/IAllocationAdapter.d.ts.map +1 -0
- package/dist/IAllocationAdapter.js +2 -0
- package/dist/IPillarDMode.d.ts +179 -0
- package/dist/IPillarDMode.d.ts.map +1 -0
- package/dist/IPillarDMode.js +2 -0
- package/dist/IScoreEngine.d.ts +90 -0
- package/dist/IScoreEngine.d.ts.map +1 -0
- package/dist/IScoreEngine.js +2 -0
- package/dist/adapters/IAaveV3BNBAdapter.d.ts +156 -0
- package/dist/adapters/IAaveV3BNBAdapter.d.ts.map +1 -0
- package/dist/adapters/IAaveV3BNBAdapter.js +2 -0
- package/dist/adapters/ICompoundAdapter.d.ts +148 -0
- package/dist/adapters/ICompoundAdapter.d.ts.map +1 -0
- package/dist/adapters/ICompoundAdapter.js +2 -0
- package/dist/adapters/IEulerAdapter.d.ts +144 -0
- package/dist/adapters/IEulerAdapter.d.ts.map +1 -0
- package/dist/adapters/IEulerAdapter.js +2 -0
- package/dist/adapters/IKernelAdapter.d.ts +164 -0
- package/dist/adapters/IKernelAdapter.d.ts.map +1 -0
- package/dist/adapters/IKernelAdapter.js +2 -0
- package/dist/adapters/IListaAdapter.d.ts +148 -0
- package/dist/adapters/IListaAdapter.d.ts.map +1 -0
- package/dist/adapters/IListaAdapter.js +2 -0
- package/dist/adapters/IMorphoAdapter.d.ts +174 -0
- package/dist/adapters/IMorphoAdapter.d.ts.map +1 -0
- package/dist/adapters/IMorphoAdapter.js +2 -0
- package/dist/adapters/IPendleAdapter.d.ts +156 -0
- package/dist/adapters/IPendleAdapter.d.ts.map +1 -0
- package/dist/adapters/IPendleAdapter.js +2 -0
- package/dist/adapters/ISiloAdapter.d.ts +144 -0
- package/dist/adapters/ISiloAdapter.d.ts.map +1 -0
- package/dist/adapters/ISiloAdapter.js +2 -0
- package/dist/adapters/ISparkAdapter.d.ts +148 -0
- package/dist/adapters/ISparkAdapter.d.ts.map +1 -0
- package/dist/adapters/ISparkAdapter.js +2 -0
- package/dist/adapters/index.d.ts +10 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +2 -0
- package/dist/common.d.ts +51 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +2 -0
- package/dist/factories/IAllocationAdapter__factory.d.ts +146 -0
- package/dist/factories/IAllocationAdapter__factory.d.ts.map +1 -0
- package/dist/factories/IAllocationAdapter__factory.js +198 -0
- package/dist/factories/IPillarDMode__factory.d.ts +223 -0
- package/dist/factories/IPillarDMode__factory.d.ts.map +1 -0
- package/dist/factories/IPillarDMode__factory.js +298 -0
- package/dist/factories/IScoreEngine__factory.d.ts +74 -0
- package/dist/factories/IScoreEngine__factory.d.ts.map +1 -0
- package/dist/factories/IScoreEngine__factory.js +104 -0
- package/dist/factories/adapters/IAaveV3BNBAdapter__factory.d.ts +198 -0
- package/dist/factories/adapters/IAaveV3BNBAdapter__factory.d.ts.map +1 -0
- package/dist/factories/adapters/IAaveV3BNBAdapter__factory.js +268 -0
- package/dist/factories/adapters/ICompoundAdapter__factory.d.ts +188 -0
- package/dist/factories/adapters/ICompoundAdapter__factory.d.ts.map +1 -0
- package/dist/factories/adapters/ICompoundAdapter__factory.js +255 -0
- package/dist/factories/adapters/IEulerAdapter__factory.d.ts +188 -0
- package/dist/factories/adapters/IEulerAdapter__factory.d.ts.map +1 -0
- package/dist/factories/adapters/IEulerAdapter__factory.js +255 -0
- package/dist/factories/adapters/IKernelAdapter__factory.d.ts +202 -0
- package/dist/factories/adapters/IKernelAdapter__factory.d.ts.map +1 -0
- package/dist/factories/adapters/IKernelAdapter__factory.js +272 -0
- package/dist/factories/adapters/IListaAdapter__factory.d.ts +190 -0
- package/dist/factories/adapters/IListaAdapter__factory.d.ts.map +1 -0
- package/dist/factories/adapters/IListaAdapter__factory.js +256 -0
- package/dist/factories/adapters/IMorphoAdapter__factory.d.ts +205 -0
- package/dist/factories/adapters/IMorphoAdapter__factory.d.ts.map +1 -0
- package/dist/factories/adapters/IMorphoAdapter__factory.js +276 -0
- package/dist/factories/adapters/IPendleAdapter__factory.d.ts +226 -0
- package/dist/factories/adapters/IPendleAdapter__factory.d.ts.map +1 -0
- package/dist/factories/adapters/IPendleAdapter__factory.js +306 -0
- package/dist/factories/adapters/ISiloAdapter__factory.d.ts +188 -0
- package/dist/factories/adapters/ISiloAdapter__factory.d.ts.map +1 -0
- package/dist/factories/adapters/ISiloAdapter__factory.js +255 -0
- package/dist/factories/adapters/ISparkAdapter__factory.d.ts +194 -0
- package/dist/factories/adapters/ISparkAdapter__factory.d.ts.map +1 -0
- package/dist/factories/adapters/ISparkAdapter__factory.js +262 -0
- package/dist/factories/adapters/index.d.ts +10 -0
- package/dist/factories/adapters/index.d.ts.map +1 -0
- package/dist/factories/adapters/index.js +24 -0
- package/dist/factories/index.d.ts +5 -0
- package/dist/factories/index.d.ts.map +1 -0
- package/dist/factories/index.js +46 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +61 -0
- package/package.json +56 -0
- package/src/adapters/interfaces/IAaveV3BNBAdapter.sol +34 -0
- package/src/adapters/interfaces/ICompoundAdapter.sol +21 -0
- package/src/adapters/interfaces/IEulerAdapter.sol +10 -0
- package/src/adapters/interfaces/IKernelAdapter.sol +30 -0
- package/src/adapters/interfaces/IListaAdapter.sol +11 -0
- package/src/adapters/interfaces/IMorphoAdapter.sol +19 -0
- package/src/adapters/interfaces/IPendleAdapter.sol +13 -0
- package/src/adapters/interfaces/ISiloAdapter.sol +10 -0
- package/src/adapters/interfaces/ISparkAdapter.sol +11 -0
- package/src/interfaces/IAllocationAdapter.sol +78 -0
- package/src/interfaces/IPillarDMode.sol +85 -0
- package/src/interfaces/IScoreEngine.sol +52 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { IAaveV3BNBAdapter__factory } from "./IAaveV3BNBAdapter__factory";
|
|
2
|
+
export { ICompoundAdapter__factory } from "./ICompoundAdapter__factory";
|
|
3
|
+
export { IEulerAdapter__factory } from "./IEulerAdapter__factory";
|
|
4
|
+
export { IKernelAdapter__factory } from "./IKernelAdapter__factory";
|
|
5
|
+
export { IListaAdapter__factory } from "./IListaAdapter__factory";
|
|
6
|
+
export { IMorphoAdapter__factory } from "./IMorphoAdapter__factory";
|
|
7
|
+
export { IPendleAdapter__factory } from "./IPendleAdapter__factory";
|
|
8
|
+
export { ISiloAdapter__factory } from "./ISiloAdapter__factory";
|
|
9
|
+
export { ISparkAdapter__factory } from "./ISparkAdapter__factory";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../typechain/factories/adapters/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ISparkAdapter__factory = exports.ISiloAdapter__factory = exports.IPendleAdapter__factory = exports.IMorphoAdapter__factory = exports.IListaAdapter__factory = exports.IKernelAdapter__factory = exports.IEulerAdapter__factory = exports.ICompoundAdapter__factory = exports.IAaveV3BNBAdapter__factory = void 0;
|
|
4
|
+
/* Autogenerated file. Do not edit manually. */
|
|
5
|
+
/* tslint:disable */
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
var IAaveV3BNBAdapter__factory_1 = require("./IAaveV3BNBAdapter__factory");
|
|
8
|
+
Object.defineProperty(exports, "IAaveV3BNBAdapter__factory", { enumerable: true, get: function () { return IAaveV3BNBAdapter__factory_1.IAaveV3BNBAdapter__factory; } });
|
|
9
|
+
var ICompoundAdapter__factory_1 = require("./ICompoundAdapter__factory");
|
|
10
|
+
Object.defineProperty(exports, "ICompoundAdapter__factory", { enumerable: true, get: function () { return ICompoundAdapter__factory_1.ICompoundAdapter__factory; } });
|
|
11
|
+
var IEulerAdapter__factory_1 = require("./IEulerAdapter__factory");
|
|
12
|
+
Object.defineProperty(exports, "IEulerAdapter__factory", { enumerable: true, get: function () { return IEulerAdapter__factory_1.IEulerAdapter__factory; } });
|
|
13
|
+
var IKernelAdapter__factory_1 = require("./IKernelAdapter__factory");
|
|
14
|
+
Object.defineProperty(exports, "IKernelAdapter__factory", { enumerable: true, get: function () { return IKernelAdapter__factory_1.IKernelAdapter__factory; } });
|
|
15
|
+
var IListaAdapter__factory_1 = require("./IListaAdapter__factory");
|
|
16
|
+
Object.defineProperty(exports, "IListaAdapter__factory", { enumerable: true, get: function () { return IListaAdapter__factory_1.IListaAdapter__factory; } });
|
|
17
|
+
var IMorphoAdapter__factory_1 = require("./IMorphoAdapter__factory");
|
|
18
|
+
Object.defineProperty(exports, "IMorphoAdapter__factory", { enumerable: true, get: function () { return IMorphoAdapter__factory_1.IMorphoAdapter__factory; } });
|
|
19
|
+
var IPendleAdapter__factory_1 = require("./IPendleAdapter__factory");
|
|
20
|
+
Object.defineProperty(exports, "IPendleAdapter__factory", { enumerable: true, get: function () { return IPendleAdapter__factory_1.IPendleAdapter__factory; } });
|
|
21
|
+
var ISiloAdapter__factory_1 = require("./ISiloAdapter__factory");
|
|
22
|
+
Object.defineProperty(exports, "ISiloAdapter__factory", { enumerable: true, get: function () { return ISiloAdapter__factory_1.ISiloAdapter__factory; } });
|
|
23
|
+
var ISparkAdapter__factory_1 = require("./ISparkAdapter__factory");
|
|
24
|
+
Object.defineProperty(exports, "ISparkAdapter__factory", { enumerable: true, get: function () { return ISparkAdapter__factory_1.ISparkAdapter__factory; } });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * as adapters from "./adapters";
|
|
2
|
+
export { IAllocationAdapter__factory } from "./IAllocationAdapter__factory";
|
|
3
|
+
export { IPillarDMode__factory } from "./IPillarDMode__factory";
|
|
4
|
+
export { IScoreEngine__factory } from "./IScoreEngine__factory";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../typechain/factories/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.IScoreEngine__factory = exports.IPillarDMode__factory = exports.IAllocationAdapter__factory = exports.adapters = void 0;
|
|
37
|
+
/* Autogenerated file. Do not edit manually. */
|
|
38
|
+
/* tslint:disable */
|
|
39
|
+
/* eslint-disable */
|
|
40
|
+
exports.adapters = __importStar(require("./adapters"));
|
|
41
|
+
var IAllocationAdapter__factory_1 = require("./IAllocationAdapter__factory");
|
|
42
|
+
Object.defineProperty(exports, "IAllocationAdapter__factory", { enumerable: true, get: function () { return IAllocationAdapter__factory_1.IAllocationAdapter__factory; } });
|
|
43
|
+
var IPillarDMode__factory_1 = require("./IPillarDMode__factory");
|
|
44
|
+
Object.defineProperty(exports, "IPillarDMode__factory", { enumerable: true, get: function () { return IPillarDMode__factory_1.IPillarDMode__factory; } });
|
|
45
|
+
var IScoreEngine__factory_1 = require("./IScoreEngine__factory");
|
|
46
|
+
Object.defineProperty(exports, "IScoreEngine__factory", { enumerable: true, get: function () { return IScoreEngine__factory_1.IScoreEngine__factory; } });
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type * as adapters from "./adapters";
|
|
2
|
+
export type { adapters };
|
|
3
|
+
export type { IAllocationAdapter } from "./IAllocationAdapter";
|
|
4
|
+
export type { IPillarDMode } from "./IPillarDMode";
|
|
5
|
+
export type { IScoreEngine } from "./IScoreEngine";
|
|
6
|
+
export * as factories from "./factories";
|
|
7
|
+
export type { IAaveV3BNBAdapter } from "./adapters/IAaveV3BNBAdapter";
|
|
8
|
+
export { IAaveV3BNBAdapter__factory } from "./factories/adapters/IAaveV3BNBAdapter__factory";
|
|
9
|
+
export type { ICompoundAdapter } from "./adapters/ICompoundAdapter";
|
|
10
|
+
export { ICompoundAdapter__factory } from "./factories/adapters/ICompoundAdapter__factory";
|
|
11
|
+
export type { IEulerAdapter } from "./adapters/IEulerAdapter";
|
|
12
|
+
export { IEulerAdapter__factory } from "./factories/adapters/IEulerAdapter__factory";
|
|
13
|
+
export type { IKernelAdapter } from "./adapters/IKernelAdapter";
|
|
14
|
+
export { IKernelAdapter__factory } from "./factories/adapters/IKernelAdapter__factory";
|
|
15
|
+
export type { IListaAdapter } from "./adapters/IListaAdapter";
|
|
16
|
+
export { IListaAdapter__factory } from "./factories/adapters/IListaAdapter__factory";
|
|
17
|
+
export type { IMorphoAdapter } from "./adapters/IMorphoAdapter";
|
|
18
|
+
export { IMorphoAdapter__factory } from "./factories/adapters/IMorphoAdapter__factory";
|
|
19
|
+
export type { IPendleAdapter } from "./adapters/IPendleAdapter";
|
|
20
|
+
export { IPendleAdapter__factory } from "./factories/adapters/IPendleAdapter__factory";
|
|
21
|
+
export type { ISiloAdapter } from "./adapters/ISiloAdapter";
|
|
22
|
+
export { ISiloAdapter__factory } from "./factories/adapters/ISiloAdapter__factory";
|
|
23
|
+
export type { ISparkAdapter } from "./adapters/ISparkAdapter";
|
|
24
|
+
export { ISparkAdapter__factory } from "./factories/adapters/ISparkAdapter__factory";
|
|
25
|
+
export { IAllocationAdapter__factory } from "./factories/IAllocationAdapter__factory";
|
|
26
|
+
export { IPillarDMode__factory } from "./factories/IPillarDMode__factory";
|
|
27
|
+
export { IScoreEngine__factory } from "./factories/IScoreEngine__factory";
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../typechain/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,QAAQ,MAAM,YAAY,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,CAAC;AACzB,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,YAAY,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAC;AAC7F,YAAY,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AACvF,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.IScoreEngine__factory = exports.IPillarDMode__factory = exports.IAllocationAdapter__factory = exports.ISparkAdapter__factory = exports.ISiloAdapter__factory = exports.IPendleAdapter__factory = exports.IMorphoAdapter__factory = exports.IListaAdapter__factory = exports.IKernelAdapter__factory = exports.IEulerAdapter__factory = exports.ICompoundAdapter__factory = exports.IAaveV3BNBAdapter__factory = exports.factories = void 0;
|
|
37
|
+
exports.factories = __importStar(require("./factories"));
|
|
38
|
+
var IAaveV3BNBAdapter__factory_1 = require("./factories/adapters/IAaveV3BNBAdapter__factory");
|
|
39
|
+
Object.defineProperty(exports, "IAaveV3BNBAdapter__factory", { enumerable: true, get: function () { return IAaveV3BNBAdapter__factory_1.IAaveV3BNBAdapter__factory; } });
|
|
40
|
+
var ICompoundAdapter__factory_1 = require("./factories/adapters/ICompoundAdapter__factory");
|
|
41
|
+
Object.defineProperty(exports, "ICompoundAdapter__factory", { enumerable: true, get: function () { return ICompoundAdapter__factory_1.ICompoundAdapter__factory; } });
|
|
42
|
+
var IEulerAdapter__factory_1 = require("./factories/adapters/IEulerAdapter__factory");
|
|
43
|
+
Object.defineProperty(exports, "IEulerAdapter__factory", { enumerable: true, get: function () { return IEulerAdapter__factory_1.IEulerAdapter__factory; } });
|
|
44
|
+
var IKernelAdapter__factory_1 = require("./factories/adapters/IKernelAdapter__factory");
|
|
45
|
+
Object.defineProperty(exports, "IKernelAdapter__factory", { enumerable: true, get: function () { return IKernelAdapter__factory_1.IKernelAdapter__factory; } });
|
|
46
|
+
var IListaAdapter__factory_1 = require("./factories/adapters/IListaAdapter__factory");
|
|
47
|
+
Object.defineProperty(exports, "IListaAdapter__factory", { enumerable: true, get: function () { return IListaAdapter__factory_1.IListaAdapter__factory; } });
|
|
48
|
+
var IMorphoAdapter__factory_1 = require("./factories/adapters/IMorphoAdapter__factory");
|
|
49
|
+
Object.defineProperty(exports, "IMorphoAdapter__factory", { enumerable: true, get: function () { return IMorphoAdapter__factory_1.IMorphoAdapter__factory; } });
|
|
50
|
+
var IPendleAdapter__factory_1 = require("./factories/adapters/IPendleAdapter__factory");
|
|
51
|
+
Object.defineProperty(exports, "IPendleAdapter__factory", { enumerable: true, get: function () { return IPendleAdapter__factory_1.IPendleAdapter__factory; } });
|
|
52
|
+
var ISiloAdapter__factory_1 = require("./factories/adapters/ISiloAdapter__factory");
|
|
53
|
+
Object.defineProperty(exports, "ISiloAdapter__factory", { enumerable: true, get: function () { return ISiloAdapter__factory_1.ISiloAdapter__factory; } });
|
|
54
|
+
var ISparkAdapter__factory_1 = require("./factories/adapters/ISparkAdapter__factory");
|
|
55
|
+
Object.defineProperty(exports, "ISparkAdapter__factory", { enumerable: true, get: function () { return ISparkAdapter__factory_1.ISparkAdapter__factory; } });
|
|
56
|
+
var IAllocationAdapter__factory_1 = require("./factories/IAllocationAdapter__factory");
|
|
57
|
+
Object.defineProperty(exports, "IAllocationAdapter__factory", { enumerable: true, get: function () { return IAllocationAdapter__factory_1.IAllocationAdapter__factory; } });
|
|
58
|
+
var IPillarDMode__factory_1 = require("./factories/IPillarDMode__factory");
|
|
59
|
+
Object.defineProperty(exports, "IPillarDMode__factory", { enumerable: true, get: function () { return IPillarDMode__factory_1.IPillarDMode__factory; } });
|
|
60
|
+
var IScoreEngine__factory_1 = require("./factories/IScoreEngine__factory");
|
|
61
|
+
Object.defineProperty(exports, "IScoreEngine__factory", { enumerable: true, get: function () { return IScoreEngine__factory_1.IScoreEngine__factory; } });
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "alia-contracts-spec",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ALIA Quality Network — contract interfaces and ABIs for integration. 12 Solidity interfaces (3 core + 9 adapters) for Score, Allocation, and Pillar D modes consumable on BNB Chain testnet/mainnet.",
|
|
5
|
+
"license": "BUSL-1.1",
|
|
6
|
+
"homepage": "https://github.com/alia-core/alia-contracts-spec#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/alia-core/alia-contracts-spec.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/alia-core/alia-contracts-spec/issues"
|
|
13
|
+
},
|
|
14
|
+
"author": "Avvatar Labs SAS",
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"types": "dist/index.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"abi/",
|
|
19
|
+
"src/interfaces/",
|
|
20
|
+
"src/adapters/interfaces/",
|
|
21
|
+
"dist/",
|
|
22
|
+
"LICENSE",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"keywords": [
|
|
26
|
+
"alia",
|
|
27
|
+
"alia-quality-network",
|
|
28
|
+
"defi",
|
|
29
|
+
"ethereum",
|
|
30
|
+
"bnb-chain",
|
|
31
|
+
"agentic",
|
|
32
|
+
"quality",
|
|
33
|
+
"pillar-d",
|
|
34
|
+
"stablecoin",
|
|
35
|
+
"yield"
|
|
36
|
+
],
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "forge build && node scripts/extract-abis.js && npm run typechain && npm run tsc",
|
|
42
|
+
"typechain": "typechain --target ethers-v6 --out-dir typechain/ 'abi/**/*.json'",
|
|
43
|
+
"tsc": "tsc",
|
|
44
|
+
"clean": "rm -rf abi/ typechain/ dist/ out/ cache/",
|
|
45
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"ethers": ">=6.0.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@typechain/ethers-v6": "^0.5.1",
|
|
52
|
+
"typechain": "^8.3.2",
|
|
53
|
+
"ethers": "^6.13.0",
|
|
54
|
+
"typescript": "^5.5.0"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
+
pragma solidity ^0.8.24;
|
|
3
|
+
|
|
4
|
+
import {IAllocationAdapter} from "../../interfaces/IAllocationAdapter.sol";
|
|
5
|
+
|
|
6
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
7
|
+
// IAaveV3BNBAdapter — ALIA Quality Network · negotiation hook
|
|
8
|
+
//
|
|
9
|
+
// Production adapter spec for Aave V3 on BNB Chain.
|
|
10
|
+
// Reference: Aave V3 Pool 0x6807dc923806fE8Fd134338EABCA509979a7e0cB (BNB mainnet)
|
|
11
|
+
//
|
|
12
|
+
// Stani Kulechov / Aave Labs team integration scope (3-5 days):
|
|
13
|
+
// 1. Implement IAllocationAdapter base via IAaveV3BNBAdapter extension
|
|
14
|
+
// 2. Pool.supply() wraps user asset → aToken receipt
|
|
15
|
+
// 3. Pool.withdraw() unwraps aToken → asset
|
|
16
|
+
// 4. expectedAPY pulls from Pool.getReserveData().currentLiquidityRate
|
|
17
|
+
// 5. Audit ALIA core team (bytecode hash + score attestation)
|
|
18
|
+
// 6. Register via QualityGatedAllocator.registerAdapter()
|
|
19
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
20
|
+
|
|
21
|
+
interface IAaveV3BNBAdapter is IAllocationAdapter {
|
|
22
|
+
|
|
23
|
+
/// @notice Aave V3 Pool contract reference
|
|
24
|
+
function aavePool() external view returns (address);
|
|
25
|
+
|
|
26
|
+
/// @notice aToken receipt for a given underlying asset
|
|
27
|
+
function aTokenFor(address asset) external view returns (address);
|
|
28
|
+
|
|
29
|
+
/// @notice Current variable borrow rate (annualized bps) — for future leverage V1
|
|
30
|
+
function variableBorrowRate(address asset) external view returns (uint16 bps);
|
|
31
|
+
|
|
32
|
+
/// @notice Aave V3 reserve normalized income (RAY 1e27)
|
|
33
|
+
function getReserveNormalizedIncome(address asset) external view returns (uint256);
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
+
pragma solidity ^0.8.24;
|
|
3
|
+
|
|
4
|
+
import {IAllocationAdapter} from "../../interfaces/IAllocationAdapter.sol";
|
|
5
|
+
|
|
6
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
7
|
+
// ICompoundAdapter — ALIA Quality Network · negotiation hook
|
|
8
|
+
//
|
|
9
|
+
// Compound V3 (Comet) integration. Single-asset markets per base token.
|
|
10
|
+
// Reference: cUSDCv3 / cWETHv3 / cUSDTv3 deployed multi-chain.
|
|
11
|
+
//
|
|
12
|
+
// Compound Labs / OpenZeppelin team integration scope (3-5 days):
|
|
13
|
+
// 1. Comet.supply(asset, amount) → base token receipt
|
|
14
|
+
// 2. expectedAPY via Comet.getUtilization() + getSupplyRate()
|
|
15
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
16
|
+
|
|
17
|
+
interface ICompoundAdapter is IAllocationAdapter {
|
|
18
|
+
function cometFor(address asset) external view returns (address);
|
|
19
|
+
function utilization(address asset) external view returns (uint256);
|
|
20
|
+
function getSupplyRatePerSecond(address asset) external view returns (uint256);
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
+
pragma solidity ^0.8.24;
|
|
3
|
+
|
|
4
|
+
import {IAllocationAdapter} from "../../interfaces/IAllocationAdapter.sol";
|
|
5
|
+
|
|
6
|
+
interface IEulerAdapter is IAllocationAdapter {
|
|
7
|
+
function vaultFor(address asset) external view returns (address);
|
|
8
|
+
function interestRate(address asset) external view returns (uint256);
|
|
9
|
+
function eTokenFor(address asset) external view returns (address);
|
|
10
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
+
pragma solidity ^0.8.24;
|
|
3
|
+
|
|
4
|
+
import {IAllocationAdapter} from "../../interfaces/IAllocationAdapter.sol";
|
|
5
|
+
|
|
6
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
7
|
+
// IKernelAdapter — ALIA Quality Network · negotiation hook
|
|
8
|
+
//
|
|
9
|
+
// Production adapter spec for Kernel (BNB-native restaking + LRT).
|
|
10
|
+
// Reference: Kernel Protocol — BNB Chain restaking layer
|
|
11
|
+
//
|
|
12
|
+
// Kernel team integration scope (3-5 days):
|
|
13
|
+
// 1. Stake user asset → kBNB / kETH receipt token
|
|
14
|
+
// 2. expectedAPY = base staking yield + restaking rewards
|
|
15
|
+
// 3. Withdraw with cooldown period (typical 7 days BNB-side)
|
|
16
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
17
|
+
|
|
18
|
+
interface IKernelAdapter is IAllocationAdapter {
|
|
19
|
+
|
|
20
|
+
function kernelManager() external view returns (address);
|
|
21
|
+
|
|
22
|
+
/// @notice Receipt token (LRT) for a given underlying staked asset
|
|
23
|
+
function lrtFor(address asset) external view returns (address);
|
|
24
|
+
|
|
25
|
+
/// @notice Cooldown period in seconds before withdrawal claimable
|
|
26
|
+
function cooldownPeriod() external view returns (uint256);
|
|
27
|
+
|
|
28
|
+
/// @notice Pending withdrawal request for caller on a given asset
|
|
29
|
+
function pendingWithdrawal(address asset, address owner) external view returns (uint256 amount, uint256 unlockAt);
|
|
30
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
+
pragma solidity ^0.8.24;
|
|
3
|
+
|
|
4
|
+
import {IAllocationAdapter} from "../../interfaces/IAllocationAdapter.sol";
|
|
5
|
+
|
|
6
|
+
interface IListaAdapter is IAllocationAdapter {
|
|
7
|
+
function listaStaking() external view returns (address);
|
|
8
|
+
function listaRWAModule() external view returns (address);
|
|
9
|
+
function moduleFor(address asset) external view returns (string memory);
|
|
10
|
+
function slisBNBRate() external view returns (uint256);
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
+
pragma solidity ^0.8.24;
|
|
3
|
+
|
|
4
|
+
import {IAllocationAdapter} from "../../interfaces/IAllocationAdapter.sol";
|
|
5
|
+
|
|
6
|
+
interface IMorphoAdapter is IAllocationAdapter {
|
|
7
|
+
|
|
8
|
+
struct MarketParams {
|
|
9
|
+
address loanToken;
|
|
10
|
+
address collateralToken;
|
|
11
|
+
address oracle;
|
|
12
|
+
address irm;
|
|
13
|
+
uint256 lltv;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function morphoBlue() external view returns (address);
|
|
17
|
+
function marketIdFor(address asset) external view returns (bytes32);
|
|
18
|
+
function marketParamsFor(address asset) external view returns (MarketParams memory);
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
+
pragma solidity ^0.8.24;
|
|
3
|
+
|
|
4
|
+
import {IAllocationAdapter} from "../../interfaces/IAllocationAdapter.sol";
|
|
5
|
+
|
|
6
|
+
interface IPendleAdapter is IAllocationAdapter {
|
|
7
|
+
function pendleRouter() external view returns (address);
|
|
8
|
+
function marketFor(address asset) external view returns (address);
|
|
9
|
+
function ptToken(address market) external view returns (address);
|
|
10
|
+
function ytToken(address market) external view returns (address);
|
|
11
|
+
function maturity(address market) external view returns (uint256);
|
|
12
|
+
function fixedYieldBps(address market) external view returns (uint16);
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
+
pragma solidity ^0.8.24;
|
|
3
|
+
|
|
4
|
+
import {IAllocationAdapter} from "../../interfaces/IAllocationAdapter.sol";
|
|
5
|
+
|
|
6
|
+
interface ISiloAdapter is IAllocationAdapter {
|
|
7
|
+
function siloFor(address asset) external view returns (address);
|
|
8
|
+
function shareTokenFor(address asset) external view returns (address);
|
|
9
|
+
function getInterestRate(address asset) external view returns (uint256);
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
+
pragma solidity ^0.8.24;
|
|
3
|
+
|
|
4
|
+
import {IAllocationAdapter} from "../../interfaces/IAllocationAdapter.sol";
|
|
5
|
+
|
|
6
|
+
interface ISparkAdapter is IAllocationAdapter {
|
|
7
|
+
function sparkPool() external view returns (address);
|
|
8
|
+
function spTokenFor(address asset) external view returns (address);
|
|
9
|
+
function dsrRateBps() external view returns (uint16);
|
|
10
|
+
function isD3MActive(address asset) external view returns (bool);
|
|
11
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
+
pragma solidity ^0.8.24;
|
|
3
|
+
|
|
4
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
5
|
+
// IAllocationAdapter — ALIA Quality Network · alia-core/alia-engine
|
|
6
|
+
//
|
|
7
|
+
// Interface canonical réutilisable pour tout protocole de lending/yield
|
|
8
|
+
// adressable par QualityGatedAllocator + PillarDRouter (Mode 1 Yield Boosted).
|
|
9
|
+
//
|
|
10
|
+
// Pattern stratégique :
|
|
11
|
+
// Cette interface est le "negotiation hook" pour onboarder n'importe quel
|
|
12
|
+
// protocole DeFi (Aave V3 BNB, Morpho, Pendle, Kernel, Lista, Spark,
|
|
13
|
+
// Compound, Euler, Silo, Venus, etc.) en 3-5 jours par adapter.
|
|
14
|
+
//
|
|
15
|
+
// Le pattern Federated by Design Pilier 4 V25 opérationnel :
|
|
16
|
+
// 1. Protocole self-registers via AdapterRegistry.requestAdapterListing()
|
|
17
|
+
// 2. ALIA core team audit bytecode + score attestation
|
|
18
|
+
// 3. ALIA Quality Badge soulbound mint sur adapter address
|
|
19
|
+
// 4. Adapter devient éligible capital flow PillarDRouter
|
|
20
|
+
//
|
|
21
|
+
// V0 scope sprint sem 1-2 (supply-only, cohérent VenusAdapter v0.1.0 12 mai) :
|
|
22
|
+
// - supply(asset, amount) → received
|
|
23
|
+
// - withdraw(asset, amount) → withdrawn
|
|
24
|
+
// - balanceOf(asset, owner) → balance
|
|
25
|
+
// - expectedAPY(asset) → bps annualized
|
|
26
|
+
// - adapterType() + protocolName() metadata pure
|
|
27
|
+
//
|
|
28
|
+
// V1 scope Y1H2 (borrow + repay + leverage) :
|
|
29
|
+
// - borrow/repay added when PillarDRouter Mode 2 Tranching implements
|
|
30
|
+
// senior/junior leverage logic Q4 2026
|
|
31
|
+
//
|
|
32
|
+
// V2 scope Y2H1 (cross-protocol routing optimization) :
|
|
33
|
+
// - swap/rebalance hooks when AGIL-4 Decision Orchestrator industrialised
|
|
34
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
35
|
+
|
|
36
|
+
interface IAllocationAdapter {
|
|
37
|
+
|
|
38
|
+
/// @notice Supply assets to the underlying protocol (lending/yield)
|
|
39
|
+
/// @dev Caller MUST have approved this adapter to spend `amount` of `asset`
|
|
40
|
+
/// @param asset Token address to supply (USDC, USDT, FDUSD, etc.)
|
|
41
|
+
/// @param amount Amount to supply in token native decimals
|
|
42
|
+
/// @return received Amount of receipt token (vToken, aToken, mToken) credited
|
|
43
|
+
function supply(address asset, uint256 amount) external returns (uint256 received);
|
|
44
|
+
|
|
45
|
+
/// @notice Withdraw assets from the underlying protocol
|
|
46
|
+
/// @dev Caller MUST have a balance on this adapter (via prior supply)
|
|
47
|
+
/// @param asset Token address to withdraw
|
|
48
|
+
/// @param amount Amount to withdraw in token native decimals (or type(uint256).max for full)
|
|
49
|
+
/// @return withdrawn Actual amount of asset received back
|
|
50
|
+
function withdraw(address asset, uint256 amount) external returns (uint256 withdrawn);
|
|
51
|
+
|
|
52
|
+
/// @notice Read user balance on the underlying protocol
|
|
53
|
+
/// @param asset Token address
|
|
54
|
+
/// @param owner Address whose balance to read
|
|
55
|
+
/// @return Balance in token native decimals (asset, not receipt token)
|
|
56
|
+
function balanceOf(address asset, address owner) external view returns (uint256);
|
|
57
|
+
|
|
58
|
+
/// @notice Expected annualized yield for supplying `asset` to this adapter
|
|
59
|
+
/// @dev Returned in basis points (bps), e.g. 850 = 8.50% APY
|
|
60
|
+
/// MUST reflect current market conditions, not historical
|
|
61
|
+
/// MAY revert if market not initialised on the protocol
|
|
62
|
+
/// @param asset Token address
|
|
63
|
+
/// @return bps Annualized yield in basis points
|
|
64
|
+
function expectedAPY(address asset) external view returns (uint16 bps);
|
|
65
|
+
|
|
66
|
+
/// @notice Adapter category for routing logic
|
|
67
|
+
/// @return Type tag — "LENDING" | "YIELD_AGG" | "VAULT" | "RWA" | "STRUCTURED"
|
|
68
|
+
function adapterType() external pure returns (string memory);
|
|
69
|
+
|
|
70
|
+
/// @notice Protocol name (display + AdapterRegistry indexing)
|
|
71
|
+
/// @return Name — "Venus" | "Aave-V3-BNB" | "Morpho" | "Pendle" | "Kernel" | etc.
|
|
72
|
+
function protocolName() external pure returns (string memory);
|
|
73
|
+
|
|
74
|
+
// ─── Events (recommended emission patterns) ─────────────────────────────────
|
|
75
|
+
|
|
76
|
+
event Supplied(address indexed caller, address indexed asset, uint256 amount, uint256 received);
|
|
77
|
+
event Withdrawn(address indexed caller, address indexed asset, uint256 amount, uint256 withdrawn);
|
|
78
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BUSL-1.1
|
|
2
|
+
pragma solidity ^0.8.24;
|
|
3
|
+
|
|
4
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
5
|
+
// IPillarDMode — ALIA Quality Network · alia-core/alia-engine
|
|
6
|
+
//
|
|
7
|
+
// Interface commune pour tous les modes Pillar D Stable Capital Edge V25.
|
|
8
|
+
//
|
|
9
|
+
// 3 modes paramétrables Memo V7 §7.3 :
|
|
10
|
+
// Mode 1 — YieldBoostedMode : yield boosté 8-15% APY quality-gated (V0 J3)
|
|
11
|
+
// Mode 2 — TranchingMode : senior 6-7% / junior 15-25% (interface J3, impl Q4 2026)
|
|
12
|
+
// Mode 3 — IncomeStreamingMode : flux mensuel fixe annuity pattern (interface J3, impl Y2H1 2027)
|
|
13
|
+
//
|
|
14
|
+
// PillarDRouter dispatche deposit(mode) → Mode contract.
|
|
15
|
+
// Chaque mode implémente vault ERC-4626-compatible avec shares accounting.
|
|
16
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
17
|
+
|
|
18
|
+
interface IPillarDMode {
|
|
19
|
+
|
|
20
|
+
/// @notice Mode identifier (for routing + telemetry)
|
|
21
|
+
/// @return Mode tag — "YIELD_BOOSTED" | "TRANCHING" | "INCOME_STREAMING"
|
|
22
|
+
function modeName() external pure returns (string memory);
|
|
23
|
+
|
|
24
|
+
/// @notice Mode version (semver-like for upgrade tracking)
|
|
25
|
+
function modeVersion() external pure returns (string memory);
|
|
26
|
+
|
|
27
|
+
/// @notice Deposit assets into the mode vault
|
|
28
|
+
/// @dev Caller MUST have approved this contract for `amount` of `asset`
|
|
29
|
+
/// @param asset Token deposited
|
|
30
|
+
/// @param amount Amount in asset native decimals
|
|
31
|
+
/// @param receiver Address to credit shares to
|
|
32
|
+
/// @param mandateId Mandate driving quality gating + risk policy
|
|
33
|
+
/// @return shares Vault shares minted to receiver
|
|
34
|
+
function deposit(
|
|
35
|
+
address asset,
|
|
36
|
+
uint256 amount,
|
|
37
|
+
address receiver,
|
|
38
|
+
bytes32 mandateId
|
|
39
|
+
) external returns (uint256 shares);
|
|
40
|
+
|
|
41
|
+
/// @notice Withdraw assets by redeeming vault shares
|
|
42
|
+
/// @param asset Token to redeem
|
|
43
|
+
/// @param shares Vault shares to burn (type(uint256).max = full position)
|
|
44
|
+
/// @param receiver Address to receive withdrawn assets
|
|
45
|
+
/// @return assets Amount of asset transferred to receiver
|
|
46
|
+
function redeem(
|
|
47
|
+
address asset,
|
|
48
|
+
uint256 shares,
|
|
49
|
+
address receiver
|
|
50
|
+
) external returns (uint256 assets);
|
|
51
|
+
|
|
52
|
+
/// @notice Total shares outstanding for an asset
|
|
53
|
+
function totalShares(address asset) external view returns (uint256);
|
|
54
|
+
|
|
55
|
+
/// @notice Total assets under management for an asset (incl. accrued yield)
|
|
56
|
+
function totalAssets(address asset) external view returns (uint256);
|
|
57
|
+
|
|
58
|
+
/// @notice User's share balance for an asset
|
|
59
|
+
function shareBalanceOf(address asset, address user) external view returns (uint256);
|
|
60
|
+
|
|
61
|
+
/// @notice Convert shares to underlying asset amount (current exchange rate)
|
|
62
|
+
function convertToAssets(address asset, uint256 shares) external view returns (uint256);
|
|
63
|
+
|
|
64
|
+
/// @notice Convert asset amount to shares (current exchange rate)
|
|
65
|
+
function convertToShares(address asset, uint256 amount) external view returns (uint256);
|
|
66
|
+
|
|
67
|
+
// ─── Events ───────────────────────────────────────────────────────────────
|
|
68
|
+
|
|
69
|
+
event Deposit(
|
|
70
|
+
address indexed sender,
|
|
71
|
+
address indexed receiver,
|
|
72
|
+
address indexed asset,
|
|
73
|
+
uint256 amount,
|
|
74
|
+
uint256 shares,
|
|
75
|
+
bytes32 mandateId
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
event Redeem(
|
|
79
|
+
address indexed sender,
|
|
80
|
+
address indexed receiver,
|
|
81
|
+
address indexed asset,
|
|
82
|
+
uint256 shares,
|
|
83
|
+
uint256 assets
|
|
84
|
+
);
|
|
85
|
+
}
|