Skip to content

Commit 9fe0a44

Browse files
committed
Gemini wallet
1 parent 4e2c850 commit 9fe0a44

File tree

10 files changed

+2887
-0
lines changed

10 files changed

+2887
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@floating-ui/dom": "1.6.7",
3939
"@floating-ui/react": "0.26.19",
4040
"@gelatonetwork/relay-sdk": "5.6.0",
41+
"@gemini-wallet/rainbow": "0.0.1",
4142
"@headlessui/react": "1.7.19",
4243
"@lingui/core": "4.10.0",
4344
"@lingui/macro": "4.11.3",

sdk/src/types/subsquid.ts

Lines changed: 733 additions & 0 deletions
Large diffs are not rendered by default.

src/lib/wallets/rainbowKitConfig.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { geminiRainbowKitConnector } from "@gemini-wallet/rainbow";
12
import { getDefaultConfig, WalletList } from "@rainbow-me/rainbowkit";
23
import {
34
coinbaseWallet,
@@ -34,6 +35,7 @@ const popularWalletList: WalletList = [
3435
injectedWallet,
3536
// The Safe option will only appear in the Safe Wallet browser environment.
3637
safeWallet,
38+
geminiRainbowKitConnector,
3739
],
3840
},
3941
];

src/typechain-types/StBTC.ts

Lines changed: 639 additions & 0 deletions
Large diffs are not rendered by default.

src/typechain-types/SyntheticsReader.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ export declare namespace ReaderPricingUtils {
477477

478478
export declare namespace ReaderPositionUtils {
479479
export type PositionInfoStruct = {
480+
positionKey: BytesLike;
480481
position: Position.PropsStruct;
481482
fees: PositionPricingUtils.PositionFeesStruct;
482483
executionPriceResult: ReaderPricingUtils.ExecutionPriceResultStruct;
@@ -486,13 +487,15 @@ export declare namespace ReaderPositionUtils {
486487
};
487488

488489
export type PositionInfoStructOutput = [
490+
positionKey: string,
489491
position: Position.PropsStructOutput,
490492
fees: PositionPricingUtils.PositionFeesStructOutput,
491493
executionPriceResult: ReaderPricingUtils.ExecutionPriceResultStructOutput,
492494
basePnlUsd: bigint,
493495
uncappedBasePnlUsd: bigint,
494496
pnlAfterPriceImpactUsd: bigint,
495497
] & {
498+
positionKey: string;
496499
position: Position.PropsStructOutput;
497500
fees: PositionPricingUtils.PositionFeesStructOutput;
498501
executionPriceResult: ReaderPricingUtils.ExecutionPriceResultStructOutput;
@@ -889,6 +892,7 @@ export interface SyntheticsReaderInterface extends Interface {
889892
| "getAccountOrders"
890893
| "getAccountPositionInfoList"
891894
| "getAccountPositions"
895+
| "getAdlState"
892896
| "getDeposit"
893897
| "getDepositAmountOut"
894898
| "getExecutionPrice"
@@ -901,6 +905,7 @@ export interface SyntheticsReaderInterface extends Interface {
901905
| "getNetPnl"
902906
| "getOpenInterestWithPnl"
903907
| "getOrder"
908+
| "getPendingPositionImpactPoolDistributionAmount"
904909
| "getPnl"
905910
| "getPnlToPoolFactor"
906911
| "getPosition"
@@ -936,6 +941,10 @@ export interface SyntheticsReaderInterface extends Interface {
936941
functionFragment: "getAccountPositions",
937942
values: [AddressLike, AddressLike, BigNumberish, BigNumberish]
938943
): string;
944+
encodeFunctionData(
945+
functionFragment: "getAdlState",
946+
values: [AddressLike, AddressLike, boolean, MarketUtils.MarketPricesStruct]
947+
): string;
939948
encodeFunctionData(functionFragment: "getDeposit", values: [AddressLike, BytesLike]): string;
940949
encodeFunctionData(
941950
functionFragment: "getDepositAmountOut",
@@ -986,6 +995,10 @@ export interface SyntheticsReaderInterface extends Interface {
986995
values: [AddressLike, Market.PropsStruct, Price.PropsStruct, boolean, boolean]
987996
): string;
988997
encodeFunctionData(functionFragment: "getOrder", values: [AddressLike, BytesLike]): string;
998+
encodeFunctionData(
999+
functionFragment: "getPendingPositionImpactPoolDistributionAmount",
1000+
values: [AddressLike, AddressLike]
1001+
): string;
9891002
encodeFunctionData(
9901003
functionFragment: "getPnl",
9911004
values: [AddressLike, Market.PropsStruct, Price.PropsStruct, boolean, boolean]
@@ -1029,6 +1042,7 @@ export interface SyntheticsReaderInterface extends Interface {
10291042
decodeFunctionResult(functionFragment: "getAccountOrders", data: BytesLike): Result;
10301043
decodeFunctionResult(functionFragment: "getAccountPositionInfoList", data: BytesLike): Result;
10311044
decodeFunctionResult(functionFragment: "getAccountPositions", data: BytesLike): Result;
1045+
decodeFunctionResult(functionFragment: "getAdlState", data: BytesLike): Result;
10321046
decodeFunctionResult(functionFragment: "getDeposit", data: BytesLike): Result;
10331047
decodeFunctionResult(functionFragment: "getDepositAmountOut", data: BytesLike): Result;
10341048
decodeFunctionResult(functionFragment: "getExecutionPrice", data: BytesLike): Result;
@@ -1041,6 +1055,7 @@ export interface SyntheticsReaderInterface extends Interface {
10411055
decodeFunctionResult(functionFragment: "getNetPnl", data: BytesLike): Result;
10421056
decodeFunctionResult(functionFragment: "getOpenInterestWithPnl", data: BytesLike): Result;
10431057
decodeFunctionResult(functionFragment: "getOrder", data: BytesLike): Result;
1058+
decodeFunctionResult(functionFragment: "getPendingPositionImpactPoolDistributionAmount", data: BytesLike): Result;
10441059
decodeFunctionResult(functionFragment: "getPnl", data: BytesLike): Result;
10451060
decodeFunctionResult(functionFragment: "getPnlToPoolFactor", data: BytesLike): Result;
10461061
decodeFunctionResult(functionFragment: "getPosition", data: BytesLike): Result;
@@ -1115,6 +1130,12 @@ export interface SyntheticsReader extends BaseContract {
11151130
"view"
11161131
>;
11171132

1133+
getAdlState: TypedContractMethod<
1134+
[dataStore: AddressLike, market: AddressLike, isLong: boolean, prices: MarketUtils.MarketPricesStruct],
1135+
[[bigint, boolean, bigint, bigint]],
1136+
"view"
1137+
>;
1138+
11181139
getDeposit: TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Deposit.PropsStructOutput], "view">;
11191140

11201141
getDepositAmountOut: TypedContractMethod<
@@ -1207,6 +1228,12 @@ export interface SyntheticsReader extends BaseContract {
12071228

12081229
getOrder: TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Order.PropsStructOutput], "view">;
12091230

1231+
getPendingPositionImpactPoolDistributionAmount: TypedContractMethod<
1232+
[dataStore: AddressLike, market: AddressLike],
1233+
[[bigint, bigint]],
1234+
"view"
1235+
>;
1236+
12101237
getPnl: TypedContractMethod<
12111238
[
12121239
dataStore: AddressLike,
@@ -1364,6 +1391,13 @@ export interface SyntheticsReader extends BaseContract {
13641391
[Position.PropsStructOutput[]],
13651392
"view"
13661393
>;
1394+
getFunction(
1395+
nameOrSignature: "getAdlState"
1396+
): TypedContractMethod<
1397+
[dataStore: AddressLike, market: AddressLike, isLong: boolean, prices: MarketUtils.MarketPricesStruct],
1398+
[[bigint, boolean, bigint, bigint]],
1399+
"view"
1400+
>;
13671401
getFunction(
13681402
nameOrSignature: "getDeposit"
13691403
): TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Deposit.PropsStructOutput], "view">;
@@ -1468,6 +1502,9 @@ export interface SyntheticsReader extends BaseContract {
14681502
getFunction(
14691503
nameOrSignature: "getOrder"
14701504
): TypedContractMethod<[dataStore: AddressLike, key: BytesLike], [Order.PropsStructOutput], "view">;
1505+
getFunction(
1506+
nameOrSignature: "getPendingPositionImpactPoolDistributionAmount"
1507+
): TypedContractMethod<[dataStore: AddressLike, market: AddressLike], [[bigint, bigint]], "view">;
14711508
getFunction(
14721509
nameOrSignature: "getPnl"
14731510
): TypedContractMethod<

0 commit comments

Comments
 (0)