Skip to content

Commit 07d3045

Browse files
onahprosperchibie
authored andcommitted
feat: add Lisk network configuration and update README with gateway details
1 parent 3218ab6 commit 07d3045

File tree

4 files changed

+333
-8
lines changed

4 files changed

+333
-8
lines changed

.openzeppelin/unknown-1135.json

Lines changed: 283 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,283 @@
1+
{
2+
"manifestVersion": "3.2",
3+
"admin": {
4+
"address": "0x8FD1f78d88Dd008E557273b5Cd517487C2A9A7de",
5+
"txHash": "0x0711b3c3d75f99b8fefaf880d892e7d7bb3b61517295cf506f899d617ec2c68d"
6+
},
7+
"proxies": [
8+
{
9+
"address": "0xff0E00E0110C1FBb5315D276243497b66D3a4d8a",
10+
"txHash": "0x5f89c6752c144b69fbe09f9be78a0feabfff80cda61221c44719de943bd31f5e",
11+
"kind": "transparent"
12+
}
13+
],
14+
"impls": {
15+
"8689ffc4c401435f48792097adca219ffd47d52aa60869b4623055b9563f9927": {
16+
"address": "0x3Dc80272cE93cBFF3351913bB089B59C4a9141DE",
17+
"txHash": "0xe5a082ffb6844d7c662a6f8be4f16045368df884fbf5bd3c26094995cfcfaf6c",
18+
"layout": {
19+
"solcVersion": "0.8.18",
20+
"storage": [
21+
{
22+
"label": "_initialized",
23+
"offset": 0,
24+
"slot": "0",
25+
"type": "t_uint8",
26+
"contract": "Initializable",
27+
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63",
28+
"retypedFrom": "bool"
29+
},
30+
{
31+
"label": "_initializing",
32+
"offset": 1,
33+
"slot": "0",
34+
"type": "t_bool",
35+
"contract": "Initializable",
36+
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68"
37+
},
38+
{
39+
"label": "__gap",
40+
"offset": 0,
41+
"slot": "1",
42+
"type": "t_array(t_uint256)50_storage",
43+
"contract": "ContextUpgradeable",
44+
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40"
45+
},
46+
{
47+
"label": "_owner",
48+
"offset": 0,
49+
"slot": "51",
50+
"type": "t_address",
51+
"contract": "OwnableUpgradeable",
52+
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
53+
},
54+
{
55+
"label": "__gap",
56+
"offset": 0,
57+
"slot": "52",
58+
"type": "t_array(t_uint256)49_storage",
59+
"contract": "OwnableUpgradeable",
60+
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
61+
},
62+
{
63+
"label": "_pendingOwner",
64+
"offset": 0,
65+
"slot": "101",
66+
"type": "t_address",
67+
"contract": "Ownable2StepUpgradeable",
68+
"src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:21"
69+
},
70+
{
71+
"label": "__gap",
72+
"offset": 0,
73+
"slot": "102",
74+
"type": "t_array(t_uint256)49_storage",
75+
"contract": "Ownable2StepUpgradeable",
76+
"src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:70"
77+
},
78+
{
79+
"label": "MAX_BPS",
80+
"offset": 0,
81+
"slot": "151",
82+
"type": "t_uint256",
83+
"contract": "GatewaySettingManager",
84+
"src": "contracts/GatewaySettingManager.sol:12"
85+
},
86+
{
87+
"label": "protocolFeePercent",
88+
"offset": 0,
89+
"slot": "152",
90+
"type": "t_uint64",
91+
"contract": "GatewaySettingManager",
92+
"src": "contracts/GatewaySettingManager.sol:13"
93+
},
94+
{
95+
"label": "treasuryAddress",
96+
"offset": 8,
97+
"slot": "152",
98+
"type": "t_address",
99+
"contract": "GatewaySettingManager",
100+
"src": "contracts/GatewaySettingManager.sol:14"
101+
},
102+
{
103+
"label": "_aggregatorAddress",
104+
"offset": 0,
105+
"slot": "153",
106+
"type": "t_address",
107+
"contract": "GatewaySettingManager",
108+
"src": "contracts/GatewaySettingManager.sol:15"
109+
},
110+
{
111+
"label": "_isTokenSupported",
112+
"offset": 0,
113+
"slot": "154",
114+
"type": "t_mapping(t_address,t_uint256)",
115+
"contract": "GatewaySettingManager",
116+
"src": "contracts/GatewaySettingManager.sol:16"
117+
},
118+
{
119+
"label": "__gap",
120+
"offset": 0,
121+
"slot": "155",
122+
"type": "t_array(t_uint256)50_storage",
123+
"contract": "GatewaySettingManager",
124+
"src": "contracts/GatewaySettingManager.sol:19"
125+
},
126+
{
127+
"label": "_paused",
128+
"offset": 0,
129+
"slot": "205",
130+
"type": "t_bool",
131+
"contract": "PausableUpgradeable",
132+
"src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29"
133+
},
134+
{
135+
"label": "__gap",
136+
"offset": 0,
137+
"slot": "206",
138+
"type": "t_array(t_uint256)49_storage",
139+
"contract": "PausableUpgradeable",
140+
"src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116"
141+
},
142+
{
143+
"label": "order",
144+
"offset": 0,
145+
"slot": "255",
146+
"type": "t_mapping(t_bytes32,t_struct(Order)1824_storage)",
147+
"contract": "Gateway",
148+
"src": "contracts/Gateway.sol:19"
149+
},
150+
{
151+
"label": "_nonce",
152+
"offset": 0,
153+
"slot": "256",
154+
"type": "t_mapping(t_address,t_uint256)",
155+
"contract": "Gateway",
156+
"src": "contracts/Gateway.sol:20"
157+
},
158+
{
159+
"label": "__gap",
160+
"offset": 0,
161+
"slot": "257",
162+
"type": "t_array(t_uint256)50_storage",
163+
"contract": "Gateway",
164+
"src": "contracts/Gateway.sol:21"
165+
}
166+
],
167+
"types": {
168+
"t_address": {
169+
"label": "address",
170+
"numberOfBytes": "20"
171+
},
172+
"t_array(t_uint256)49_storage": {
173+
"label": "uint256[49]",
174+
"numberOfBytes": "1568"
175+
},
176+
"t_array(t_uint256)50_storage": {
177+
"label": "uint256[50]",
178+
"numberOfBytes": "1600"
179+
},
180+
"t_bool": {
181+
"label": "bool",
182+
"numberOfBytes": "1"
183+
},
184+
"t_bytes32": {
185+
"label": "bytes32",
186+
"numberOfBytes": "32"
187+
},
188+
"t_mapping(t_address,t_uint256)": {
189+
"label": "mapping(address => uint256)",
190+
"numberOfBytes": "32"
191+
},
192+
"t_mapping(t_bytes32,t_struct(Order)1824_storage)": {
193+
"label": "mapping(bytes32 => struct IGateway.Order)",
194+
"numberOfBytes": "32"
195+
},
196+
"t_struct(Order)1824_storage": {
197+
"label": "struct IGateway.Order",
198+
"members": [
199+
{
200+
"label": "sender",
201+
"type": "t_address",
202+
"offset": 0,
203+
"slot": "0"
204+
},
205+
{
206+
"label": "token",
207+
"type": "t_address",
208+
"offset": 0,
209+
"slot": "1"
210+
},
211+
{
212+
"label": "senderFeeRecipient",
213+
"type": "t_address",
214+
"offset": 0,
215+
"slot": "2"
216+
},
217+
{
218+
"label": "senderFee",
219+
"type": "t_uint256",
220+
"offset": 0,
221+
"slot": "3"
222+
},
223+
{
224+
"label": "protocolFee",
225+
"type": "t_uint256",
226+
"offset": 0,
227+
"slot": "4"
228+
},
229+
{
230+
"label": "isFulfilled",
231+
"type": "t_bool",
232+
"offset": 0,
233+
"slot": "5"
234+
},
235+
{
236+
"label": "isRefunded",
237+
"type": "t_bool",
238+
"offset": 1,
239+
"slot": "5"
240+
},
241+
{
242+
"label": "refundAddress",
243+
"type": "t_address",
244+
"offset": 2,
245+
"slot": "5"
246+
},
247+
{
248+
"label": "currentBPS",
249+
"type": "t_uint96",
250+
"offset": 0,
251+
"slot": "6"
252+
},
253+
{
254+
"label": "amount",
255+
"type": "t_uint256",
256+
"offset": 0,
257+
"slot": "7"
258+
}
259+
],
260+
"numberOfBytes": "256"
261+
},
262+
"t_uint256": {
263+
"label": "uint256",
264+
"numberOfBytes": "32"
265+
},
266+
"t_uint64": {
267+
"label": "uint64",
268+
"numberOfBytes": "8"
269+
},
270+
"t_uint8": {
271+
"label": "uint8",
272+
"numberOfBytes": "1"
273+
},
274+
"t_uint96": {
275+
"label": "uint96",
276+
"numberOfBytes": "12"
277+
}
278+
},
279+
"namespaces": {}
280+
}
281+
}
282+
}
283+
}

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,19 @@ npx hardhat run scripts/tron/updateProtocolFee.ts
261261
<td>Gateway Admin</td>
262262
<td>0xc38D6817F736b1cb44785e14A8cb7152385d3210</td>
263263
</tr>
264+
<tr>
265+
<td rowspan="3">Lisk</td>
266+
<td>Gateway Proxy</td>
267+
<td>0xff0E00E0110C1FBb5315D276243497b66D3a4d8a</td>
268+
</tr>
269+
<tr>
270+
<td>Gateway Implementation</td>
271+
<td>0x3Dc80272cE93cBFF3351913bB089B59C4a9141DE</td>
272+
</tr>
273+
<tr>
274+
<td>Gateway Admin</td>
275+
<td>0x8FD1f78d88Dd008E557273b5Cd517487C2A9A7de</td>
276+
</tr>
264277
<tr>
265278
<td rowspan="2">Asset Chain</td>
266279
<td>Gateway Proxy</td>

hardhat.config.ts

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ const config: HardhatUserConfig = {
8989
chainId: 42420,
9090
saveDeployments: true,
9191
},
92+
lisk: {
93+
url: "https://rpc.api.lisk.com", // @note this is a public rpc
94+
accounts: [DEPLOYER_PRIVATE_KEY || testPrivateKey],
95+
chainId: 1135,
96+
saveDeployments: true,
97+
},
9298

9399
// Testnets
94100
arbitrumSepolia: {
@@ -155,6 +161,8 @@ const config: HardhatUserConfig = {
155161
optimisticEthereum: OPTIMISM_API!,
156162
scroll: SCROLL_API!,
157163
celo: CELO_API!,
164+
lisk: "Paycrest", // @note https://docs.blockscout.com/devs/verification/hardhat-verification-plugin#config-file-and-unsupported-networks
165+
assetChain: "Paycrest",
158166
},
159167
customChains: [
160168
{
@@ -173,6 +181,22 @@ const config: HardhatUserConfig = {
173181
browserURL: "https://scrollscan.com/",
174182
},
175183
},
184+
{
185+
network: "lisk",
186+
chainId: 1135,
187+
urls: {
188+
apiURL: "https://blockscout.lisk.com/api",
189+
browserURL: "https://blockscout.lisk.com/",
190+
},
191+
},
192+
{
193+
network: "assetChain",
194+
chainId: 42421,
195+
urls: {
196+
apiURL: "https://scan.assetchain.org/api",
197+
browserURL: "https://scan.assetchain.org/",
198+
},
199+
},
176200
{
177201
network: "baseSepolia",
178202
chainId: 84532,
@@ -205,14 +229,6 @@ const config: HardhatUserConfig = {
205229
browserURL: "https://celoscan.io/",
206230
},
207231
},
208-
{
209-
network: "assetchain_test",
210-
chainId: 42421,
211-
urls: {
212-
apiURL: "https://scan-testnet.assetchain.org/api",
213-
browserURL: "https://scan-testnet.assetchain.org/",
214-
},
215-
},
216232
],
217233
},
218234
};

scripts/config.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,19 @@ const NETWORKS = {
148148
GATEWAY_CONTRACT: "0xff0E00E0110C1FBb5315D276243497b66D3a4d8a",
149149
IMPERSONATE_ACCOUNT: "",
150150
},
151+
/**
152+
* @dev Lisk Mainnet
153+
*/
154+
1135: {
155+
RPC_URL: `https://rpc.api.lisk.com`,
156+
GATEWAY_IMPLEMENTATION: "0x3Dc80272cE93cBFF3351913bB089B59C4a9141DE",
157+
SUPPORTED_TOKENS: {
158+
USDT: "0x05D032ac25d322df992303dCa074EE7392C117b9",
159+
},
160+
TREASURY_FEE_PERCENT: 500, // in BPS i.e 0.5%
161+
GATEWAY_CONTRACT: "0xff0E00E0110C1FBb5315D276243497b66D3a4d8a",
162+
IMPERSONATE_ACCOUNT: "",
163+
},
151164

152165
/////////////////////////////////
153166
// Testnets

0 commit comments

Comments
 (0)