@raac/rpc 1.0.2-beta.1 → 1.0.2-beta.2
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/dist/configs/chains/11155111.json +132 -0
- package/dist/configs/chains/index.js +2 -0
- package/dist/methods/commons/estimateGasPrice.js +7 -2
- package/dist/types/configs/chains/index.d.ts +3 -1
- package/dist/types/configs/index.d.ts +1 -0
- package/dist/types/utils/contracts.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chainId": 11155111,
|
|
3
|
+
"name": "sepolia",
|
|
4
|
+
"rpcs": ["https://sepolia.infura.io/v3/38126531f7b3458d80e5a822dfbf5854"],
|
|
5
|
+
"nativeCurrency": {
|
|
6
|
+
"name": "ETH",
|
|
7
|
+
"symbol": "ETH",
|
|
8
|
+
"decimals": 18
|
|
9
|
+
},
|
|
10
|
+
"blockExplorer": [
|
|
11
|
+
{
|
|
12
|
+
"name": "Etherscan",
|
|
13
|
+
"url": "https://sepolia.etherscan.io"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"contracts": {
|
|
17
|
+
"raachouseprices": {
|
|
18
|
+
"id": "raachouseprices",
|
|
19
|
+
"name": "RAAC House Prices",
|
|
20
|
+
"contract": "0xA151fE9b3F225Ed575D0775c3Db096F14Ead5A0c"
|
|
21
|
+
},
|
|
22
|
+
"raacprimerateoracle": {
|
|
23
|
+
"id": "raacprimerateoracle",
|
|
24
|
+
"name": "RAAC Prime Rate Oracle",
|
|
25
|
+
"contract": "0xB710417257e2bcf66759149812e9B5dA97cEcaFF"
|
|
26
|
+
},
|
|
27
|
+
"auctionfactory": {
|
|
28
|
+
"id": "auctionfactory",
|
|
29
|
+
"name": "Auction Factory",
|
|
30
|
+
"contract": "0xC644A84734A7329eE46d3B6704746179d272f990"
|
|
31
|
+
},
|
|
32
|
+
"zenofactory": {
|
|
33
|
+
"id": "zenofactory",
|
|
34
|
+
"name": "Zeno Factory",
|
|
35
|
+
"contract": "0xa9eE59A113bCB4B2CC10f802D1efF0Bae1Ab91D2"
|
|
36
|
+
},
|
|
37
|
+
"raacminter": {
|
|
38
|
+
"id": "raacminter",
|
|
39
|
+
"name": "RAAC Minter",
|
|
40
|
+
"contract": "0xC9D00720F535dBDBf94472066A3fBba05471aA1f"
|
|
41
|
+
},
|
|
42
|
+
"feecollector": {
|
|
43
|
+
"id": "feecollector",
|
|
44
|
+
"name": "Fee Collector",
|
|
45
|
+
"contract": "0x0a4c1755e9d76cdE0361EB6cDF77824cb06C8a98"
|
|
46
|
+
},
|
|
47
|
+
"treasury": {
|
|
48
|
+
"id": "treasury",
|
|
49
|
+
"name": "Treasury",
|
|
50
|
+
"contract": "0xEaA6082460b2a1Cb2059551A5e368d7bB410D94c"
|
|
51
|
+
},
|
|
52
|
+
"repairfund": {
|
|
53
|
+
"id": "repairfund",
|
|
54
|
+
"name": "Repair Fund",
|
|
55
|
+
"contract": "0x39184F690a71C2978Af392caE86853006D4df97b"
|
|
56
|
+
},
|
|
57
|
+
"releaseorchestrator": {
|
|
58
|
+
"id": "releaseorchestrator",
|
|
59
|
+
"name": "Release Orchestrator",
|
|
60
|
+
"contract": "0x3758d904c69d2C56b89f4b5BbD2c1B1D74773830"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"pools": {
|
|
64
|
+
"stabilitypool": {
|
|
65
|
+
"id": "stabilitypool",
|
|
66
|
+
"name": "Stability Pool",
|
|
67
|
+
"contract": "0xCDc21F23A946Ab63bdF941677AE19dC5aBdD5011"
|
|
68
|
+
},
|
|
69
|
+
"lendingpool": {
|
|
70
|
+
"id": "lendingpool",
|
|
71
|
+
"name": "Lending Pool",
|
|
72
|
+
"contract": "0x98981d5Ae694d8a63d008c1763716ae26e36A9A7"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"nfts": {
|
|
76
|
+
"raacnft": {
|
|
77
|
+
"id": "raacnft",
|
|
78
|
+
"name": "RAAC NFT",
|
|
79
|
+
"contract": "0xc986D2750327EA6454d16cE2cD00BA62421dd0bC"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"assets": {
|
|
83
|
+
"eth": {
|
|
84
|
+
"id": "eth",
|
|
85
|
+
"name": "ETH",
|
|
86
|
+
"decimals": 18,
|
|
87
|
+
"contract": "0x0000000000000000000000000000000000000000"
|
|
88
|
+
},
|
|
89
|
+
"crvusd": {
|
|
90
|
+
"id": "crvusd",
|
|
91
|
+
"name": "CRVUSD",
|
|
92
|
+
"decimals": 18,
|
|
93
|
+
"contract": "0x0eeFb2Edd6865fdDA929dDAEB87701C34CE6B1A3"
|
|
94
|
+
},
|
|
95
|
+
"rtoken": {
|
|
96
|
+
"id": "rtoken",
|
|
97
|
+
"name": "RToken",
|
|
98
|
+
"decimals": 18,
|
|
99
|
+
"contract": "0x9c0Aae91BeA71737EE802cb29EAA15a279cE58E6"
|
|
100
|
+
},
|
|
101
|
+
"detoken": {
|
|
102
|
+
"id": "detoken",
|
|
103
|
+
"name": "DEToken",
|
|
104
|
+
"decimals": 18,
|
|
105
|
+
"contract": "0x8F499A9303e90a3Df10D6B3C435f78B6b6c0b503"
|
|
106
|
+
},
|
|
107
|
+
"raactoken": {
|
|
108
|
+
"id": "raactoken",
|
|
109
|
+
"name": "RAAC",
|
|
110
|
+
"decimals": 18,
|
|
111
|
+
"contract": "0x1503F1fE0c451214D9555F524E12984858202cC6"
|
|
112
|
+
},
|
|
113
|
+
"veraac": {
|
|
114
|
+
"id": "veraac",
|
|
115
|
+
"name": "VERAAC",
|
|
116
|
+
"decimals": 18,
|
|
117
|
+
"contract": "0x2a2d358cdC342f58911Fb8d569E6aA66f564e0D2"
|
|
118
|
+
},
|
|
119
|
+
"debttoken": {
|
|
120
|
+
"id": "debttoken",
|
|
121
|
+
"name": "Debt Token",
|
|
122
|
+
"decimals": 18,
|
|
123
|
+
"contract": "0xf6e002A1E60955d006C5EC1c4Eb74677B73Fba13"
|
|
124
|
+
},
|
|
125
|
+
"indextoken": {
|
|
126
|
+
"id": "indextoken",
|
|
127
|
+
"name": "Index Token",
|
|
128
|
+
"decimals": 18,
|
|
129
|
+
"contract": "0x3A663C401AdF767d710C7f0133DF40eA18F24863"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -7,9 +7,11 @@ exports.configs = void 0;
|
|
|
7
7
|
// @ts-ignore
|
|
8
8
|
const _8453_json_1 = __importDefault(require("./8453.json")); // assert { type: "json" };
|
|
9
9
|
const _17000_json_1 = __importDefault(require("./17000.json")); // assert { type: "json" };
|
|
10
|
+
const _11155111_json_1 = __importDefault(require("./11155111.json")); // assert { type: "json" };
|
|
10
11
|
const chains = {
|
|
11
12
|
8453: _8453_json_1.default,
|
|
12
13
|
17000: _17000_json_1.default, // the interface is the same for all the chains, so taking this
|
|
14
|
+
11155111: _11155111_json_1.default,
|
|
13
15
|
};
|
|
14
16
|
exports.default = chains;
|
|
15
17
|
exports.configs = chains;
|
|
@@ -5,9 +5,14 @@ const estimateGasPrice = async (signer) => {
|
|
|
5
5
|
const provider = signer.provider;
|
|
6
6
|
try {
|
|
7
7
|
const feeData = await provider.getFeeData();
|
|
8
|
+
const maxPriorityFeePerGas = feeData.maxPriorityFeePerGas;
|
|
9
|
+
// Fix for maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two
|
|
10
|
+
const maxFeePerGas = maxPriorityFeePerGas && feeData.maxFeePerGas &&
|
|
11
|
+
feeData.maxFeePerGas < maxPriorityFeePerGas ?
|
|
12
|
+
maxPriorityFeePerGas : feeData.maxFeePerGas;
|
|
8
13
|
return {
|
|
9
|
-
maxFeePerGas
|
|
10
|
-
maxPriorityFeePerGas
|
|
14
|
+
maxFeePerGas,
|
|
15
|
+
maxPriorityFeePerGas,
|
|
11
16
|
};
|
|
12
17
|
}
|
|
13
18
|
catch (error) {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { Chain8453 } from "./chain";
|
|
1
|
+
import { Chain8453, Chain11155111 } from "./chain";
|
|
2
2
|
declare const chains: {
|
|
3
3
|
8453: Chain8453;
|
|
4
4
|
17000: Chain8453;
|
|
5
|
+
11155111: Chain11155111;
|
|
5
6
|
};
|
|
6
7
|
export default chains;
|
|
7
8
|
export declare const configs: {
|
|
8
9
|
8453: Chain8453;
|
|
9
10
|
17000: Chain8453;
|
|
11
|
+
11155111: Chain11155111;
|
|
10
12
|
};
|
|
11
13
|
export type Configs = typeof chains;
|
|
12
14
|
export type ConfigKeys = keyof Configs;
|
|
@@ -2,6 +2,7 @@ import { ChainId } from "./chains/index";
|
|
|
2
2
|
declare function getChainsConfig(): {
|
|
3
3
|
8453: import("./chains/chain").Chain8453;
|
|
4
4
|
17000: import("./chains/chain").Chain8453;
|
|
5
|
+
11155111: import("./chains/chain").Chain11155111;
|
|
5
6
|
};
|
|
6
7
|
declare function setChainConfig(chainId: ChainId, config: any): void;
|
|
7
8
|
declare function getChainConfig(chainId: ChainId): any;
|
|
@@ -4,6 +4,7 @@ import { ethers, Provider } from "ethers";
|
|
|
4
4
|
export declare const getConfigs: () => {
|
|
5
5
|
8453: import("../configs/chains/chain").Chain8453;
|
|
6
6
|
17000: import("../configs/chains/chain").Chain8453;
|
|
7
|
+
11155111: import("../configs/chains/chain").Chain11155111;
|
|
7
8
|
};
|
|
8
9
|
export declare const setOverrideConfig: (chainId: ChainId, newConfig: any) => void;
|
|
9
10
|
export declare const getConfig: (chainId: ChainId) => any;
|
|
@@ -17,6 +18,7 @@ declare const _default: {
|
|
|
17
18
|
getConfigs: () => {
|
|
18
19
|
8453: import("../configs/chains/chain").Chain8453;
|
|
19
20
|
17000: import("../configs/chains/chain").Chain8453;
|
|
21
|
+
11155111: import("../configs/chains/chain").Chain11155111;
|
|
20
22
|
};
|
|
21
23
|
};
|
|
22
24
|
export default _default;
|