Skip to content

Commit 8d4fd85

Browse files
committed
feat: add geo-block
1 parent 7d96884 commit 8d4fd85

73 files changed

Lines changed: 1817 additions & 277 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/wet-poets-knock.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@venusprotocol/evm": minor
3+
---
4+
5+
add geo-block

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"editor.defaultFormatter": "vscode.css-language-features"
2121
},
2222
"[json]": {
23-
"editor.defaultFormatter": "biomejs.biome"
23+
"editor.defaultFormatter": "vscode.json-language-features"
2424
},
2525
"[typescript]": {
2626
"editor.defaultFormatter": "biomejs.biome"

apps/evm/src/__mocks__/models/asset.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ export const assetData: Asset[] = [
8484
extraInfoUrl: 'https://fake.url',
8585
},
8686
],
87+
isGated: false,
88+
isRestricted: false,
8789
},
8890
{
8991
vToken: vUsdc,
@@ -180,6 +182,8 @@ export const assetData: Asset[] = [
180182
],
181183
supplyPointDistributions: [],
182184
borrowPointDistributions: [],
185+
isRestricted: false,
186+
isGated: false,
183187
},
184188
{
185189
vToken: vUsdtCorePool,
@@ -272,6 +276,8 @@ export const assetData: Asset[] = [
272276
extraInfoUrl: 'https://fake.url',
273277
},
274278
],
279+
isGated: true,
280+
isRestricted: false,
275281
},
276282
{
277283
vToken: vBusdCorePool,
@@ -376,5 +382,7 @@ export const assetData: Asset[] = [
376382
},
377383
],
378384
borrowPointDistributions: [],
385+
isGated: false,
386+
isRestricted: true,
379387
},
380388
];

apps/evm/src/clients/api/queries/getSimulatedPool/__tests__/__snapshots__/index.spec.ts.snap

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ exports[`getSimulatedPool > recalculates Prime APYs when a Prime market is mutat
4242
"isBorrowable": true,
4343
"isBorrowableByUser": true,
4444
"isCollateralOfUser": true,
45+
"isGated": false,
4546
"isProtectionModeEnabled": false,
47+
"isRestricted": false,
4648
"liquidationPenaltyPercentage": 4,
4749
"liquidationThresholdPercentage": 50,
4850
"liquidityCents": "8036465875",
@@ -168,7 +170,9 @@ exports[`getSimulatedPool > recalculates Prime APYs when a Prime market is mutat
168170
"isBorrowable": false,
169171
"isBorrowableByUser": false,
170172
"isCollateralOfUser": false,
173+
"isGated": false,
171174
"isProtectionModeEnabled": false,
175+
"isRestricted": false,
172176
"liquidationPenaltyPercentage": 4,
173177
"liquidationThresholdPercentage": 80,
174178
"liquidityCents": "1702951959",
@@ -310,7 +314,9 @@ exports[`getSimulatedPool > recalculates Prime APYs when a Prime market is mutat
310314
"isBorrowable": true,
311315
"isBorrowableByUser": true,
312316
"isCollateralOfUser": true,
317+
"isGated": true,
313318
"isProtectionModeEnabled": false,
319+
"isRestricted": false,
314320
"liquidationPenaltyPercentage": 4,
315321
"liquidationThresholdPercentage": 80,
316322
"liquidityCents": "5534102886",
@@ -444,7 +450,9 @@ exports[`getSimulatedPool > recalculates Prime APYs when a Prime market is mutat
444450
"isBorrowable": true,
445451
"isBorrowableByUser": true,
446452
"isCollateralOfUser": false,
453+
"isGated": false,
447454
"isProtectionModeEnabled": false,
455+
"isRestricted": true,
448456
"liquidationPenaltyPercentage": 4,
449457
"liquidationThresholdPercentage": 80,
450458
"liquidityCents": "3654492935",
@@ -794,7 +802,9 @@ exports[`getSimulatedPool > returns simulated pool with updated asset balances w
794802
"isBorrowable": true,
795803
"isBorrowableByUser": true,
796804
"isCollateralOfUser": true,
805+
"isGated": false,
797806
"isProtectionModeEnabled": false,
807+
"isRestricted": false,
798808
"liquidationPenaltyPercentage": 4,
799809
"liquidationThresholdPercentage": 50,
800810
"liquidityCents": "8036465875",
@@ -920,7 +930,9 @@ exports[`getSimulatedPool > returns simulated pool with updated asset balances w
920930
"isBorrowable": false,
921931
"isBorrowableByUser": false,
922932
"isCollateralOfUser": false,
933+
"isGated": false,
923934
"isProtectionModeEnabled": false,
935+
"isRestricted": false,
924936
"liquidationPenaltyPercentage": 4,
925937
"liquidationThresholdPercentage": 80,
926938
"liquidityCents": "1702951959",
@@ -1062,7 +1074,9 @@ exports[`getSimulatedPool > returns simulated pool with updated asset balances w
10621074
"isBorrowable": true,
10631075
"isBorrowableByUser": true,
10641076
"isCollateralOfUser": true,
1077+
"isGated": true,
10651078
"isProtectionModeEnabled": false,
1079+
"isRestricted": false,
10661080
"liquidationPenaltyPercentage": 4,
10671081
"liquidationThresholdPercentage": 80,
10681082
"liquidityCents": "5534102886",
@@ -1196,7 +1210,9 @@ exports[`getSimulatedPool > returns simulated pool with updated asset balances w
11961210
"isBorrowable": true,
11971211
"isBorrowableByUser": true,
11981212
"isCollateralOfUser": false,
1213+
"isGated": false,
11991214
"isProtectionModeEnabled": false,
1215+
"isRestricted": true,
12001216
"liquidationPenaltyPercentage": 4,
12011217
"liquidationThresholdPercentage": 80,
12021218
"liquidityCents": "3654492935",
@@ -1546,7 +1562,9 @@ exports[`getSimulatedPool > returns simulated pool with updated asset balances w
15461562
"isBorrowable": true,
15471563
"isBorrowableByUser": true,
15481564
"isCollateralOfUser": true,
1565+
"isGated": false,
15491566
"isProtectionModeEnabled": false,
1567+
"isRestricted": false,
15501568
"liquidationPenaltyPercentage": 4,
15511569
"liquidationThresholdPercentage": 50,
15521570
"liquidityCents": "8036465875",
@@ -1672,7 +1690,9 @@ exports[`getSimulatedPool > returns simulated pool with updated asset balances w
16721690
"isBorrowable": false,
16731691
"isBorrowableByUser": false,
16741692
"isCollateralOfUser": true,
1693+
"isGated": false,
16751694
"isProtectionModeEnabled": false,
1695+
"isRestricted": false,
16761696
"liquidationPenaltyPercentage": 4,
16771697
"liquidationThresholdPercentage": 80,
16781698
"liquidityCents": "1702951959",
@@ -1814,7 +1834,9 @@ exports[`getSimulatedPool > returns simulated pool with updated asset balances w
18141834
"isBorrowable": true,
18151835
"isBorrowableByUser": true,
18161836
"isCollateralOfUser": true,
1837+
"isGated": true,
18171838
"isProtectionModeEnabled": false,
1839+
"isRestricted": false,
18181840
"liquidationPenaltyPercentage": 4,
18191841
"liquidationThresholdPercentage": 80,
18201842
"liquidityCents": "5534102886",
@@ -1948,7 +1970,9 @@ exports[`getSimulatedPool > returns simulated pool with updated asset balances w
19481970
"isBorrowable": true,
19491971
"isBorrowableByUser": true,
19501972
"isCollateralOfUser": false,
1973+
"isGated": false,
19511974
"isProtectionModeEnabled": false,
1975+
"isRestricted": true,
19521976
"liquidationPenaltyPercentage": 4,
19531977
"liquidationThresholdPercentage": 80,
19541978
"liquidityCents": "3654492935",
@@ -2310,7 +2334,9 @@ exports[`getSimulatedPool > updates simulated VAI borrow balances when VAI mutat
23102334
"isBorrowable": true,
23112335
"isBorrowableByUser": true,
23122336
"isCollateralOfUser": true,
2337+
"isGated": false,
23132338
"isProtectionModeEnabled": false,
2339+
"isRestricted": false,
23142340
"liquidationPenaltyPercentage": 4,
23152341
"liquidationThresholdPercentage": 50,
23162342
"liquidityCents": "8036465875",
@@ -2436,7 +2462,9 @@ exports[`getSimulatedPool > updates simulated VAI borrow balances when VAI mutat
24362462
"isBorrowable": false,
24372463
"isBorrowableByUser": false,
24382464
"isCollateralOfUser": false,
2465+
"isGated": false,
24392466
"isProtectionModeEnabled": false,
2467+
"isRestricted": false,
24402468
"liquidationPenaltyPercentage": 4,
24412469
"liquidationThresholdPercentage": 80,
24422470
"liquidityCents": "1702951959",
@@ -2578,7 +2606,9 @@ exports[`getSimulatedPool > updates simulated VAI borrow balances when VAI mutat
25782606
"isBorrowable": true,
25792607
"isBorrowableByUser": true,
25802608
"isCollateralOfUser": true,
2609+
"isGated": true,
25812610
"isProtectionModeEnabled": false,
2611+
"isRestricted": false,
25822612
"liquidationPenaltyPercentage": 4,
25832613
"liquidationThresholdPercentage": 80,
25842614
"liquidityCents": "5534102886",
@@ -2712,7 +2742,9 @@ exports[`getSimulatedPool > updates simulated VAI borrow balances when VAI mutat
27122742
"isBorrowable": true,
27132743
"isBorrowableByUser": true,
27142744
"isCollateralOfUser": false,
2745+
"isGated": false,
27152746
"isProtectionModeEnabled": false,
2747+
"isRestricted": true,
27162748
"liquidationPenaltyPercentage": 4,
27172749
"liquidationThresholdPercentage": 80,
27182750
"liquidityCents": "3654492935",

apps/evm/src/clients/api/queries/useGetAsset/__snapshots__/index.spec.tsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ exports[`useGetAsset > returns the correct asset 1`] = `
4040
"isBorrowable": true,
4141
"isBorrowableByUser": true,
4242
"isCollateralOfUser": true,
43+
"isGated": false,
4344
"isProtectionModeEnabled": false,
45+
"isRestricted": false,
4446
"liquidationPenaltyPercentage": 4,
4547
"liquidationThresholdPercentage": 50,
4648
"liquidityCents": "8036465875",

apps/evm/src/clients/api/queries/useGetPool/__snapshots__/index.spec.tsx.snap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ exports[`useGetPool > returns the correct asset 1`] = `
4242
"isBorrowable": true,
4343
"isBorrowableByUser": true,
4444
"isCollateralOfUser": true,
45+
"isGated": false,
4546
"isProtectionModeEnabled": false,
47+
"isRestricted": false,
4648
"liquidationPenaltyPercentage": 4,
4749
"liquidationThresholdPercentage": 50,
4850
"liquidityCents": "8036465875",
@@ -168,7 +170,9 @@ exports[`useGetPool > returns the correct asset 1`] = `
168170
"isBorrowable": false,
169171
"isBorrowableByUser": false,
170172
"isCollateralOfUser": false,
173+
"isGated": false,
171174
"isProtectionModeEnabled": false,
175+
"isRestricted": false,
172176
"liquidationPenaltyPercentage": 4,
173177
"liquidationThresholdPercentage": 80,
174178
"liquidityCents": "1702951959",
@@ -310,7 +314,9 @@ exports[`useGetPool > returns the correct asset 1`] = `
310314
"isBorrowable": true,
311315
"isBorrowableByUser": true,
312316
"isCollateralOfUser": true,
317+
"isGated": true,
313318
"isProtectionModeEnabled": false,
319+
"isRestricted": false,
314320
"liquidationPenaltyPercentage": 4,
315321
"liquidationThresholdPercentage": 80,
316322
"liquidityCents": "5534102886",
@@ -444,7 +450,9 @@ exports[`useGetPool > returns the correct asset 1`] = `
444450
"isBorrowable": true,
445451
"isBorrowableByUser": true,
446452
"isCollateralOfUser": false,
453+
"isGated": false,
447454
"isProtectionModeEnabled": false,
455+
"isRestricted": true,
448456
"liquidationPenaltyPercentage": 4,
449457
"liquidationThresholdPercentage": 80,
450458
"liquidityCents": "3654492935",

0 commit comments

Comments
 (0)