compass_api_sdk 1.1.3rc0__py3-none-any.whl → 1.1.4__py3-none-any.whl
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.
Potentially problematic release.
This version of compass_api_sdk might be problematic. Click here for more details.
- compass_api_sdk/_version.py +3 -3
- compass_api_sdk/aave_v3.py +24 -0
- compass_api_sdk/aerodrome_slipstream.py +30 -0
- compass_api_sdk/erc_4626_vaults.py +12 -0
- compass_api_sdk/ethena.py +18 -0
- compass_api_sdk/models/aaveborrowrequest.py +6 -1
- compass_api_sdk/models/aavelooprequest.py +10 -1
- compass_api_sdk/models/aaverepayrequest.py +6 -1
- compass_api_sdk/models/aavesupplyrequest.py +6 -1
- compass_api_sdk/models/aavewithdrawrequest.py +6 -1
- compass_api_sdk/models/aerodromeslipstreambuyexactlyrequest.py +6 -1
- compass_api_sdk/models/aerodromeslipstreamincreaseliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/aerodromeslipstreammintliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/aerodromeslipstreamsellexactlyrequest.py +5 -0
- compass_api_sdk/models/aerodromeslipstreamwithdrawliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/batcheduseroperationsrequest.py +7 -2
- compass_api_sdk/models/ethenadepositrequest.py +6 -1
- compass_api_sdk/models/ethenarequesttowithdrawrequest.py +6 -1
- compass_api_sdk/models/ethenaunstakerequest.py +6 -1
- compass_api_sdk/models/morphoborrowrequest.py +6 -1
- compass_api_sdk/models/morphodepositrequest.py +6 -1
- compass_api_sdk/models/morphorepayrequest.py +11 -1
- compass_api_sdk/models/morphosupplycollateralrequest.py +11 -1
- compass_api_sdk/models/morphowithdrawcollateralrequest.py +6 -1
- compass_api_sdk/models/morphowithdrawrequest.py +6 -1
- compass_api_sdk/models/multicallexecuterequest.py +7 -2
- compass_api_sdk/models/odosswaprequest.py +6 -1
- compass_api_sdk/models/pendlemanageliquidityrequest.py +6 -1
- compass_api_sdk/models/pendleredeemyieldrequest.py +6 -1
- compass_api_sdk/models/pendletradeptrequest.py +6 -1
- compass_api_sdk/models/pendletradeytrequest.py +6 -1
- compass_api_sdk/models/setallowancerequest.py +6 -1
- compass_api_sdk/models/skybuyrequest.py +6 -1
- compass_api_sdk/models/skydepositrequest.py +6 -1
- compass_api_sdk/models/skysellrequest.py +6 -1
- compass_api_sdk/models/skywithdrawrequest.py +6 -1
- compass_api_sdk/models/tokentransferrequest.py +6 -1
- compass_api_sdk/models/uniswapbuyexactlyrequest.py +6 -1
- compass_api_sdk/models/uniswapincreaseliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/uniswapmintliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/uniswapsellexactlyrequest.py +6 -1
- compass_api_sdk/models/uniswapwithdrawliquidityprovisionrequest.py +6 -1
- compass_api_sdk/models/unsignedmulticalltransaction.py +34 -3
- compass_api_sdk/models/unsignedtransaction.py +34 -3
- compass_api_sdk/models/unwrapwethrequest.py +6 -1
- compass_api_sdk/models/vaultdepositrequest.py +6 -1
- compass_api_sdk/models/vaultwithdrawrequest.py +6 -1
- compass_api_sdk/models/wrapethrequest.py +6 -1
- compass_api_sdk/morpho.py +36 -0
- compass_api_sdk/pendle.py +24 -0
- compass_api_sdk/sky.py +24 -0
- compass_api_sdk/smart_account.py +6 -0
- compass_api_sdk/swap.py +6 -0
- compass_api_sdk/token.py +6 -0
- compass_api_sdk/transaction_bundler.py +12 -0
- compass_api_sdk/uniswap_v3.py +30 -0
- compass_api_sdk/universal.py +18 -0
- {compass_api_sdk-1.1.3rc0.dist-info → compass_api_sdk-1.1.4.dist-info}/METADATA +1 -1
- {compass_api_sdk-1.1.3rc0.dist-info → compass_api_sdk-1.1.4.dist-info}/RECORD +60 -60
- {compass_api_sdk-1.1.3rc0.dist-info → compass_api_sdk-1.1.4.dist-info}/WHEEL +0 -0
|
@@ -50,6 +50,8 @@ class AaveBorrowRequestTypedDict(TypedDict):
|
|
|
50
50
|
action_type: Literal["AAVE_BORROW"]
|
|
51
51
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
52
52
|
r"""The address on behalf of whom the supply is made"""
|
|
53
|
+
estimate_gas: NotRequired[bool]
|
|
54
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
53
55
|
|
|
54
56
|
|
|
55
57
|
class AaveBorrowRequest(BaseModel):
|
|
@@ -81,9 +83,12 @@ class AaveBorrowRequest(BaseModel):
|
|
|
81
83
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
82
84
|
r"""The address on behalf of whom the supply is made"""
|
|
83
85
|
|
|
86
|
+
estimate_gas: Optional[bool] = True
|
|
87
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
88
|
+
|
|
84
89
|
@model_serializer(mode="wrap")
|
|
85
90
|
def serialize_model(self, handler):
|
|
86
|
-
optional_fields = ["action_type", "on_behalf_of"]
|
|
91
|
+
optional_fields = ["action_type", "on_behalf_of", "estimate_gas"]
|
|
87
92
|
nullable_fields = ["on_behalf_of"]
|
|
88
93
|
null_default_fields = []
|
|
89
94
|
|
|
@@ -75,6 +75,8 @@ class AaveLoopRequestTypedDict(TypedDict):
|
|
|
75
75
|
r"""Maximum allowed slippage for token swaps in percentage"""
|
|
76
76
|
loan_to_value: LoanToValueTypedDict
|
|
77
77
|
r"""Loan To Value percentage of the loop"""
|
|
78
|
+
estimate_gas: NotRequired[bool]
|
|
79
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
78
80
|
signed_authorization: NotRequired[Nullable[SignedAuthorizationTypedDict]]
|
|
79
81
|
r"""EIP-7702 authorization. Required when `is_account_abstraction` is False."""
|
|
80
82
|
is_account_abstraction: NotRequired[bool]
|
|
@@ -107,6 +109,9 @@ class AaveLoopRequest(BaseModel):
|
|
|
107
109
|
loan_to_value: LoanToValue
|
|
108
110
|
r"""Loan To Value percentage of the loop"""
|
|
109
111
|
|
|
112
|
+
estimate_gas: Optional[bool] = True
|
|
113
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
114
|
+
|
|
110
115
|
signed_authorization: OptionalNullable[SignedAuthorization] = UNSET
|
|
111
116
|
r"""EIP-7702 authorization. Required when `is_account_abstraction` is False."""
|
|
112
117
|
|
|
@@ -115,7 +120,11 @@ class AaveLoopRequest(BaseModel):
|
|
|
115
120
|
|
|
116
121
|
@model_serializer(mode="wrap")
|
|
117
122
|
def serialize_model(self, handler):
|
|
118
|
-
optional_fields = [
|
|
123
|
+
optional_fields = [
|
|
124
|
+
"estimate_gas",
|
|
125
|
+
"signed_authorization",
|
|
126
|
+
"is_account_abstraction",
|
|
127
|
+
]
|
|
119
128
|
nullable_fields = ["signed_authorization"]
|
|
120
129
|
null_default_fields = []
|
|
121
130
|
|
|
@@ -50,6 +50,8 @@ class AaveRepayRequestTypedDict(TypedDict):
|
|
|
50
50
|
action_type: Literal["AAVE_REPAY"]
|
|
51
51
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
52
52
|
r"""The address on behalf of whom the supply is made"""
|
|
53
|
+
estimate_gas: NotRequired[bool]
|
|
54
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
53
55
|
|
|
54
56
|
|
|
55
57
|
class AaveRepayRequest(BaseModel):
|
|
@@ -81,9 +83,12 @@ class AaveRepayRequest(BaseModel):
|
|
|
81
83
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
82
84
|
r"""The address on behalf of whom the supply is made"""
|
|
83
85
|
|
|
86
|
+
estimate_gas: Optional[bool] = True
|
|
87
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
88
|
+
|
|
84
89
|
@model_serializer(mode="wrap")
|
|
85
90
|
def serialize_model(self, handler):
|
|
86
|
-
optional_fields = ["action_type", "on_behalf_of"]
|
|
91
|
+
optional_fields = ["action_type", "on_behalf_of", "estimate_gas"]
|
|
87
92
|
nullable_fields = ["on_behalf_of"]
|
|
88
93
|
null_default_fields = []
|
|
89
94
|
|
|
@@ -44,6 +44,8 @@ class AaveSupplyRequestTypedDict(TypedDict):
|
|
|
44
44
|
action_type: Literal["AAVE_SUPPLY"]
|
|
45
45
|
on_behalf_of: NotRequired[Nullable[str]]
|
|
46
46
|
r"""The address on behalf of whom the supply is made. Defaults to the transaction sender."""
|
|
47
|
+
estimate_gas: NotRequired[bool]
|
|
48
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
47
49
|
|
|
48
50
|
|
|
49
51
|
class AaveSupplyRequest(BaseModel):
|
|
@@ -69,9 +71,12 @@ class AaveSupplyRequest(BaseModel):
|
|
|
69
71
|
on_behalf_of: OptionalNullable[str] = UNSET
|
|
70
72
|
r"""The address on behalf of whom the supply is made. Defaults to the transaction sender."""
|
|
71
73
|
|
|
74
|
+
estimate_gas: Optional[bool] = True
|
|
75
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
76
|
+
|
|
72
77
|
@model_serializer(mode="wrap")
|
|
73
78
|
def serialize_model(self, handler):
|
|
74
|
-
optional_fields = ["action_type", "on_behalf_of"]
|
|
79
|
+
optional_fields = ["action_type", "on_behalf_of", "estimate_gas"]
|
|
75
80
|
nullable_fields = ["on_behalf_of"]
|
|
76
81
|
null_default_fields = []
|
|
77
82
|
|
|
@@ -7,7 +7,7 @@ from enum import Enum
|
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional, Union
|
|
10
|
-
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
AaveWithdrawRequestAmountTypedDict = TypeAliasType(
|
|
@@ -39,6 +39,8 @@ class AaveWithdrawRequestTypedDict(TypedDict):
|
|
|
39
39
|
sender: str
|
|
40
40
|
r"""The address of the transaction sender."""
|
|
41
41
|
action_type: Literal["AAVE_WITHDRAW"]
|
|
42
|
+
estimate_gas: NotRequired[bool]
|
|
43
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
class AaveWithdrawRequest(BaseModel):
|
|
@@ -63,3 +65,6 @@ class AaveWithdrawRequest(BaseModel):
|
|
|
63
65
|
],
|
|
64
66
|
pydantic.Field(alias="action_type"),
|
|
65
67
|
] = "AAVE_WITHDRAW"
|
|
68
|
+
|
|
69
|
+
estimate_gas: Optional[bool] = True
|
|
70
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -7,7 +7,7 @@ from enum import Enum
|
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional, Union
|
|
10
|
-
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
AerodromeSlipstreamBuyExactlyRequestAmountOutTypedDict = TypeAliasType(
|
|
@@ -55,6 +55,8 @@ class AerodromeSlipstreamBuyExactlyRequestTypedDict(TypedDict):
|
|
|
55
55
|
sender: str
|
|
56
56
|
r"""The address of the transaction sender."""
|
|
57
57
|
action_type: Literal["AERODROME_SLIPSTREAM_BUY_EXACTLY"]
|
|
58
|
+
estimate_gas: NotRequired[bool]
|
|
59
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
58
60
|
|
|
59
61
|
|
|
60
62
|
class AerodromeSlipstreamBuyExactlyRequest(BaseModel):
|
|
@@ -87,3 +89,6 @@ class AerodromeSlipstreamBuyExactlyRequest(BaseModel):
|
|
|
87
89
|
],
|
|
88
90
|
pydantic.Field(alias="action_type"),
|
|
89
91
|
] = "AERODROME_SLIPSTREAM_BUY_EXACTLY"
|
|
92
|
+
|
|
93
|
+
estimate_gas: Optional[bool] = True
|
|
94
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -7,7 +7,7 @@ from enum import Enum
|
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional, Union
|
|
10
|
-
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
AerodromeSlipstreamIncreaseLiquidityProvisionRequestAmount0DesiredTypedDict = (
|
|
@@ -91,6 +91,8 @@ class AerodromeSlipstreamIncreaseLiquidityProvisionRequestTypedDict(TypedDict):
|
|
|
91
91
|
sender: str
|
|
92
92
|
r"""The address of the transaction sender."""
|
|
93
93
|
action_type: Literal["AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION"]
|
|
94
|
+
estimate_gas: NotRequired[bool]
|
|
95
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
94
96
|
|
|
95
97
|
|
|
96
98
|
class AerodromeSlipstreamIncreaseLiquidityProvisionRequest(BaseModel):
|
|
@@ -123,3 +125,6 @@ class AerodromeSlipstreamIncreaseLiquidityProvisionRequest(BaseModel):
|
|
|
123
125
|
],
|
|
124
126
|
pydantic.Field(alias="action_type"),
|
|
125
127
|
] = "AERODROME_SLIPSTREAM_INCREASE_LIQUIDITY_PROVISION"
|
|
128
|
+
|
|
129
|
+
estimate_gas: Optional[bool] = True
|
|
130
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -104,6 +104,8 @@ class AerodromeSlipstreamMintLiquidityProvisionRequestTypedDict(TypedDict):
|
|
|
104
104
|
action_type: Literal["AERODROME_SLIPSTREAM_MINT_LIQUIDITY_PROVISION"]
|
|
105
105
|
recipient: NotRequired[Nullable[str]]
|
|
106
106
|
r"""The address that will receive the LP tokens"""
|
|
107
|
+
estimate_gas: NotRequired[bool]
|
|
108
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
107
109
|
|
|
108
110
|
|
|
109
111
|
class AerodromeSlipstreamMintLiquidityProvisionRequest(BaseModel):
|
|
@@ -154,9 +156,12 @@ class AerodromeSlipstreamMintLiquidityProvisionRequest(BaseModel):
|
|
|
154
156
|
recipient: OptionalNullable[str] = UNSET
|
|
155
157
|
r"""The address that will receive the LP tokens"""
|
|
156
158
|
|
|
159
|
+
estimate_gas: Optional[bool] = True
|
|
160
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
161
|
+
|
|
157
162
|
@model_serializer(mode="wrap")
|
|
158
163
|
def serialize_model(self, handler):
|
|
159
|
-
optional_fields = ["action_type", "recipient"]
|
|
164
|
+
optional_fields = ["action_type", "recipient", "estimate_gas"]
|
|
160
165
|
nullable_fields = ["recipient"]
|
|
161
166
|
null_default_fields = []
|
|
162
167
|
|
|
@@ -57,6 +57,8 @@ class AerodromeSlipstreamSellExactlyRequestTypedDict(TypedDict):
|
|
|
57
57
|
AerodromeSlipstreamSellExactlyRequestAmountOutMinimumTypedDict
|
|
58
58
|
]
|
|
59
59
|
r"""The minimum amount of the token to swap to, defaults to 0"""
|
|
60
|
+
estimate_gas: NotRequired[bool]
|
|
61
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
60
62
|
|
|
61
63
|
|
|
62
64
|
class AerodromeSlipstreamSellExactlyRequest(BaseModel):
|
|
@@ -91,3 +93,6 @@ class AerodromeSlipstreamSellExactlyRequest(BaseModel):
|
|
|
91
93
|
AerodromeSlipstreamSellExactlyRequestAmountOutMinimum
|
|
92
94
|
] = None
|
|
93
95
|
r"""The minimum amount of the token to swap to, defaults to 0"""
|
|
96
|
+
|
|
97
|
+
estimate_gas: Optional[bool] = True
|
|
98
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -7,7 +7,7 @@ from enum import Enum
|
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional, Union
|
|
10
|
-
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
AerodromeSlipstreamWithdrawLiquidityProvisionRequestPercentageForWithdrawalTypedDict = TypeAliasType(
|
|
@@ -39,6 +39,8 @@ class AerodromeSlipstreamWithdrawLiquidityProvisionRequestTypedDict(TypedDict):
|
|
|
39
39
|
sender: str
|
|
40
40
|
r"""The address of the transaction sender."""
|
|
41
41
|
action_type: Literal["AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"]
|
|
42
|
+
estimate_gas: NotRequired[bool]
|
|
43
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
class AerodromeSlipstreamWithdrawLiquidityProvisionRequest(BaseModel):
|
|
@@ -64,3 +66,6 @@ class AerodromeSlipstreamWithdrawLiquidityProvisionRequest(BaseModel):
|
|
|
64
66
|
],
|
|
65
67
|
pydantic.Field(alias="action_type"),
|
|
66
68
|
] = "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION"
|
|
69
|
+
|
|
70
|
+
estimate_gas: Optional[bool] = True
|
|
71
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -4,8 +4,8 @@ from __future__ import annotations
|
|
|
4
4
|
from .useroperation import UserOperation, UserOperationTypedDict
|
|
5
5
|
from compass_api_sdk.types import BaseModel
|
|
6
6
|
from enum import Enum
|
|
7
|
-
from typing import List
|
|
8
|
-
from typing_extensions import TypedDict
|
|
7
|
+
from typing import List, Optional
|
|
8
|
+
from typing_extensions import NotRequired, TypedDict
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class BatchedUserOperationsRequestChain(str, Enum):
|
|
@@ -25,6 +25,8 @@ class BatchedUserOperationsRequestTypedDict(TypedDict):
|
|
|
25
25
|
r"""The address of the transaction sender."""
|
|
26
26
|
operations: List[UserOperationTypedDict]
|
|
27
27
|
r"""List of possible user operations"""
|
|
28
|
+
estimate_gas: NotRequired[bool]
|
|
29
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
class BatchedUserOperationsRequest(BaseModel):
|
|
@@ -40,3 +42,6 @@ class BatchedUserOperationsRequest(BaseModel):
|
|
|
40
42
|
|
|
41
43
|
operations: List[UserOperation]
|
|
42
44
|
r"""List of possible user operations"""
|
|
45
|
+
|
|
46
|
+
estimate_gas: Optional[bool] = True
|
|
47
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -42,6 +42,8 @@ class EthenaDepositRequestTypedDict(TypedDict):
|
|
|
42
42
|
action_type: Literal["ETHENA_DEPOSIT"]
|
|
43
43
|
receiver: NotRequired[Nullable[str]]
|
|
44
44
|
r"""The address which will receive the shares (sUSDe) from Ethena's vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
45
|
+
estimate_gas: NotRequired[bool]
|
|
46
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
45
47
|
|
|
46
48
|
|
|
47
49
|
class EthenaDepositRequest(BaseModel):
|
|
@@ -64,9 +66,12 @@ class EthenaDepositRequest(BaseModel):
|
|
|
64
66
|
receiver: OptionalNullable[str] = UNSET
|
|
65
67
|
r"""The address which will receive the shares (sUSDe) from Ethena's vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
66
68
|
|
|
69
|
+
estimate_gas: Optional[bool] = True
|
|
70
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
71
|
+
|
|
67
72
|
@model_serializer(mode="wrap")
|
|
68
73
|
def serialize_model(self, handler):
|
|
69
|
-
optional_fields = ["action_type", "receiver"]
|
|
74
|
+
optional_fields = ["action_type", "receiver", "estimate_gas"]
|
|
70
75
|
nullable_fields = ["receiver"]
|
|
71
76
|
null_default_fields = []
|
|
72
77
|
|
|
@@ -7,7 +7,7 @@ from enum import Enum
|
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Any, Literal, Optional
|
|
10
|
-
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class EthenaRequestToWithdrawRequestChain(str, Enum):
|
|
@@ -21,6 +21,8 @@ class EthenaRequestToWithdrawRequestTypedDict(TypedDict):
|
|
|
21
21
|
sender: str
|
|
22
22
|
r"""The address of the transaction sender."""
|
|
23
23
|
action_type: Literal["ETHENA_REQUEST_WITHDRAW"]
|
|
24
|
+
estimate_gas: NotRequired[bool]
|
|
25
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
24
26
|
|
|
25
27
|
|
|
26
28
|
class EthenaRequestToWithdrawRequest(BaseModel):
|
|
@@ -39,3 +41,6 @@ class EthenaRequestToWithdrawRequest(BaseModel):
|
|
|
39
41
|
],
|
|
40
42
|
pydantic.Field(alias="action_type"),
|
|
41
43
|
] = "ETHENA_REQUEST_WITHDRAW"
|
|
44
|
+
|
|
45
|
+
estimate_gas: Optional[bool] = True
|
|
46
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -28,6 +28,8 @@ class EthenaUnstakeRequestTypedDict(TypedDict):
|
|
|
28
28
|
action_type: Literal["ETHENA_UNSTAKE"]
|
|
29
29
|
receiver: NotRequired[Nullable[str]]
|
|
30
30
|
r"""The address which will receive the unstaked USDe. Defaults to the sender."""
|
|
31
|
+
estimate_gas: NotRequired[bool]
|
|
32
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
31
33
|
|
|
32
34
|
|
|
33
35
|
class EthenaUnstakeRequest(BaseModel):
|
|
@@ -47,9 +49,12 @@ class EthenaUnstakeRequest(BaseModel):
|
|
|
47
49
|
receiver: OptionalNullable[str] = UNSET
|
|
48
50
|
r"""The address which will receive the unstaked USDe. Defaults to the sender."""
|
|
49
51
|
|
|
52
|
+
estimate_gas: Optional[bool] = True
|
|
53
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
54
|
+
|
|
50
55
|
@model_serializer(mode="wrap")
|
|
51
56
|
def serialize_model(self, handler):
|
|
52
|
-
optional_fields = ["action_type", "receiver"]
|
|
57
|
+
optional_fields = ["action_type", "receiver", "estimate_gas"]
|
|
53
58
|
nullable_fields = ["receiver"]
|
|
54
59
|
null_default_fields = []
|
|
55
60
|
|
|
@@ -48,6 +48,8 @@ class MorphoBorrowRequestTypedDict(TypedDict):
|
|
|
48
48
|
r"""The address where the collateral is borrowed against. Defaults to sender."""
|
|
49
49
|
receiver: NotRequired[Nullable[str]]
|
|
50
50
|
r"""The address of the receiver of the tokens borrowed. Defaults to the transaction sender."""
|
|
51
|
+
estimate_gas: NotRequired[bool]
|
|
52
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
51
53
|
|
|
52
54
|
|
|
53
55
|
class MorphoBorrowRequest(BaseModel):
|
|
@@ -76,9 +78,12 @@ class MorphoBorrowRequest(BaseModel):
|
|
|
76
78
|
receiver: OptionalNullable[str] = UNSET
|
|
77
79
|
r"""The address of the receiver of the tokens borrowed. Defaults to the transaction sender."""
|
|
78
80
|
|
|
81
|
+
estimate_gas: Optional[bool] = True
|
|
82
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
83
|
+
|
|
79
84
|
@model_serializer(mode="wrap")
|
|
80
85
|
def serialize_model(self, handler):
|
|
81
|
-
optional_fields = ["action_type", "on_behalf_of", "receiver"]
|
|
86
|
+
optional_fields = ["action_type", "on_behalf_of", "receiver", "estimate_gas"]
|
|
82
87
|
nullable_fields = ["on_behalf_of", "receiver"]
|
|
83
88
|
null_default_fields = []
|
|
84
89
|
|
|
@@ -46,6 +46,8 @@ class MorphoDepositRequestTypedDict(TypedDict):
|
|
|
46
46
|
action_type: Literal["MORPHO_DEPOSIT"]
|
|
47
47
|
receiver: NotRequired[Nullable[str]]
|
|
48
48
|
r"""The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
49
|
+
estimate_gas: NotRequired[bool]
|
|
50
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
49
51
|
|
|
50
52
|
|
|
51
53
|
class MorphoDepositRequest(BaseModel):
|
|
@@ -71,9 +73,12 @@ class MorphoDepositRequest(BaseModel):
|
|
|
71
73
|
receiver: OptionalNullable[str] = UNSET
|
|
72
74
|
r"""The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender."""
|
|
73
75
|
|
|
76
|
+
estimate_gas: Optional[bool] = True
|
|
77
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
78
|
+
|
|
74
79
|
@model_serializer(mode="wrap")
|
|
75
80
|
def serialize_model(self, handler):
|
|
76
|
-
optional_fields = ["action_type", "receiver"]
|
|
81
|
+
optional_fields = ["action_type", "receiver", "estimate_gas"]
|
|
77
82
|
nullable_fields = ["receiver"]
|
|
78
83
|
null_default_fields = []
|
|
79
84
|
|
|
@@ -36,6 +36,8 @@ class MorphoRepayRequestTypedDict(TypedDict):
|
|
|
36
36
|
r"""The address on behalf of whom the repayment is made. Defaults to sender."""
|
|
37
37
|
callback_data: NotRequired[Nullable[bytes]]
|
|
38
38
|
r"""An optional field for callback byte data that will be triggered upon successful repaying of debt."""
|
|
39
|
+
estimate_gas: NotRequired[bool]
|
|
40
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
39
41
|
|
|
40
42
|
|
|
41
43
|
class MorphoRepayRequest(BaseModel):
|
|
@@ -64,9 +66,17 @@ class MorphoRepayRequest(BaseModel):
|
|
|
64
66
|
callback_data: OptionalNullable[bytes] = UNSET
|
|
65
67
|
r"""An optional field for callback byte data that will be triggered upon successful repaying of debt."""
|
|
66
68
|
|
|
69
|
+
estimate_gas: Optional[bool] = True
|
|
70
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
71
|
+
|
|
67
72
|
@model_serializer(mode="wrap")
|
|
68
73
|
def serialize_model(self, handler):
|
|
69
|
-
optional_fields = [
|
|
74
|
+
optional_fields = [
|
|
75
|
+
"action_type",
|
|
76
|
+
"on_behalf_of",
|
|
77
|
+
"callback_data",
|
|
78
|
+
"estimate_gas",
|
|
79
|
+
]
|
|
70
80
|
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
71
81
|
null_default_fields = []
|
|
72
82
|
|
|
@@ -48,6 +48,8 @@ class MorphoSupplyCollateralRequestTypedDict(TypedDict):
|
|
|
48
48
|
r"""The address on behalf of whom the supplied collateral is made. Defaults to sender."""
|
|
49
49
|
callback_data: NotRequired[Nullable[bytes]]
|
|
50
50
|
r"""An optional field for callback byte data that will be triggered upon successful supplying of collateral."""
|
|
51
|
+
estimate_gas: NotRequired[bool]
|
|
52
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
51
53
|
|
|
52
54
|
|
|
53
55
|
class MorphoSupplyCollateralRequest(BaseModel):
|
|
@@ -76,9 +78,17 @@ class MorphoSupplyCollateralRequest(BaseModel):
|
|
|
76
78
|
callback_data: OptionalNullable[bytes] = UNSET
|
|
77
79
|
r"""An optional field for callback byte data that will be triggered upon successful supplying of collateral."""
|
|
78
80
|
|
|
81
|
+
estimate_gas: Optional[bool] = True
|
|
82
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
83
|
+
|
|
79
84
|
@model_serializer(mode="wrap")
|
|
80
85
|
def serialize_model(self, handler):
|
|
81
|
-
optional_fields = [
|
|
86
|
+
optional_fields = [
|
|
87
|
+
"action_type",
|
|
88
|
+
"on_behalf_of",
|
|
89
|
+
"callback_data",
|
|
90
|
+
"estimate_gas",
|
|
91
|
+
]
|
|
82
92
|
nullable_fields = ["on_behalf_of", "callback_data"]
|
|
83
93
|
null_default_fields = []
|
|
84
94
|
|
|
@@ -48,6 +48,8 @@ class MorphoWithdrawCollateralRequestTypedDict(TypedDict):
|
|
|
48
48
|
r"""The address on behalf of whom the withdraw is made. Defaults to sender."""
|
|
49
49
|
receiver: NotRequired[Nullable[str]]
|
|
50
50
|
r"""The address where the withdrawn collateral will be received. Defaults to sender."""
|
|
51
|
+
estimate_gas: NotRequired[bool]
|
|
52
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
51
53
|
|
|
52
54
|
|
|
53
55
|
class MorphoWithdrawCollateralRequest(BaseModel):
|
|
@@ -76,9 +78,12 @@ class MorphoWithdrawCollateralRequest(BaseModel):
|
|
|
76
78
|
receiver: OptionalNullable[str] = UNSET
|
|
77
79
|
r"""The address where the withdrawn collateral will be received. Defaults to sender."""
|
|
78
80
|
|
|
81
|
+
estimate_gas: Optional[bool] = True
|
|
82
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
83
|
+
|
|
79
84
|
@model_serializer(mode="wrap")
|
|
80
85
|
def serialize_model(self, handler):
|
|
81
|
-
optional_fields = ["action_type", "on_behalf_of", "receiver"]
|
|
86
|
+
optional_fields = ["action_type", "on_behalf_of", "receiver", "estimate_gas"]
|
|
82
87
|
nullable_fields = ["on_behalf_of", "receiver"]
|
|
83
88
|
null_default_fields = []
|
|
84
89
|
|
|
@@ -34,6 +34,8 @@ class MorphoWithdrawRequestTypedDict(TypedDict):
|
|
|
34
34
|
action_type: Literal["MORPHO_WITHDRAW"]
|
|
35
35
|
receiver: NotRequired[Nullable[str]]
|
|
36
36
|
r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
|
|
37
|
+
estimate_gas: NotRequired[bool]
|
|
38
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
37
39
|
|
|
38
40
|
|
|
39
41
|
class MorphoWithdrawRequest(BaseModel):
|
|
@@ -59,9 +61,12 @@ class MorphoWithdrawRequest(BaseModel):
|
|
|
59
61
|
receiver: OptionalNullable[str] = UNSET
|
|
60
62
|
r"""The address which will receive the tokens withdrawn. Defaults to the sender."""
|
|
61
63
|
|
|
64
|
+
estimate_gas: Optional[bool] = True
|
|
65
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
66
|
+
|
|
62
67
|
@model_serializer(mode="wrap")
|
|
63
68
|
def serialize_model(self, handler):
|
|
64
|
-
optional_fields = ["action_type", "receiver"]
|
|
69
|
+
optional_fields = ["action_type", "receiver", "estimate_gas"]
|
|
65
70
|
nullable_fields = ["receiver"]
|
|
66
71
|
null_default_fields = []
|
|
67
72
|
|
|
@@ -12,7 +12,7 @@ from compass_api_sdk.types import (
|
|
|
12
12
|
)
|
|
13
13
|
from enum import Enum
|
|
14
14
|
from pydantic import model_serializer
|
|
15
|
-
from typing import List
|
|
15
|
+
from typing import List, Optional
|
|
16
16
|
from typing_extensions import NotRequired, TypedDict
|
|
17
17
|
|
|
18
18
|
|
|
@@ -30,6 +30,8 @@ class MulticallExecuteRequestTypedDict(TypedDict):
|
|
|
30
30
|
r"""The address of the transaction sender."""
|
|
31
31
|
actions: List[UserOperationTypedDict]
|
|
32
32
|
r"""List of possible actions for multicall"""
|
|
33
|
+
estimate_gas: NotRequired[bool]
|
|
34
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
33
35
|
signed_authorization: NotRequired[Nullable[SignedAuthorizationTypedDict]]
|
|
34
36
|
r"""EIP-7702 authorization"""
|
|
35
37
|
|
|
@@ -45,12 +47,15 @@ class MulticallExecuteRequest(BaseModel):
|
|
|
45
47
|
actions: List[UserOperation]
|
|
46
48
|
r"""List of possible actions for multicall"""
|
|
47
49
|
|
|
50
|
+
estimate_gas: Optional[bool] = True
|
|
51
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
52
|
+
|
|
48
53
|
signed_authorization: OptionalNullable[SignedAuthorization] = UNSET
|
|
49
54
|
r"""EIP-7702 authorization"""
|
|
50
55
|
|
|
51
56
|
@model_serializer(mode="wrap")
|
|
52
57
|
def serialize_model(self, handler):
|
|
53
|
-
optional_fields = ["signed_authorization"]
|
|
58
|
+
optional_fields = ["estimate_gas", "signed_authorization"]
|
|
54
59
|
nullable_fields = ["signed_authorization"]
|
|
55
60
|
null_default_fields = []
|
|
56
61
|
|
|
@@ -7,7 +7,7 @@ from enum import Enum
|
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional, Union
|
|
10
|
-
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
OdosSwapRequestAmountTypedDict = TypeAliasType(
|
|
@@ -39,6 +39,8 @@ class OdosSwapRequestTypedDict(TypedDict):
|
|
|
39
39
|
sender: str
|
|
40
40
|
r"""The address of the transaction sender."""
|
|
41
41
|
action_type: Literal["ODOS_SWAP"]
|
|
42
|
+
estimate_gas: NotRequired[bool]
|
|
43
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
class OdosSwapRequest(BaseModel):
|
|
@@ -65,3 +67,6 @@ class OdosSwapRequest(BaseModel):
|
|
|
65
67
|
],
|
|
66
68
|
pydantic.Field(alias="action_type"),
|
|
67
69
|
] = "ODOS_SWAP"
|
|
70
|
+
|
|
71
|
+
estimate_gas: Optional[bool] = True
|
|
72
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -7,7 +7,7 @@ from enum import Enum
|
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional, Union
|
|
10
|
-
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class PendleManageLiquidityRequestAction(str, Enum):
|
|
@@ -50,6 +50,8 @@ class PendleManageLiquidityRequestTypedDict(TypedDict):
|
|
|
50
50
|
sender: str
|
|
51
51
|
r"""The address of the transaction sender."""
|
|
52
52
|
action_type: Literal["PENDLE_MANAGE_LIQUIDITY"]
|
|
53
|
+
estimate_gas: NotRequired[bool]
|
|
54
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
53
55
|
|
|
54
56
|
|
|
55
57
|
class PendleManageLiquidityRequest(BaseModel):
|
|
@@ -80,3 +82,6 @@ class PendleManageLiquidityRequest(BaseModel):
|
|
|
80
82
|
],
|
|
81
83
|
pydantic.Field(alias="action_type"),
|
|
82
84
|
] = "PENDLE_MANAGE_LIQUIDITY"
|
|
85
|
+
|
|
86
|
+
estimate_gas: Optional[bool] = True
|
|
87
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -7,7 +7,7 @@ from enum import Enum
|
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional
|
|
10
|
-
from typing_extensions import Annotated, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class PendleRedeemYieldRequestChain(str, Enum):
|
|
@@ -23,6 +23,8 @@ class PendleRedeemYieldRequestTypedDict(TypedDict):
|
|
|
23
23
|
sender: str
|
|
24
24
|
r"""The address of the transaction sender."""
|
|
25
25
|
action_type: Literal["PENDLE_REDEEM_YIELD"]
|
|
26
|
+
estimate_gas: NotRequired[bool]
|
|
27
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
26
28
|
|
|
27
29
|
|
|
28
30
|
class PendleRedeemYieldRequest(BaseModel):
|
|
@@ -41,3 +43,6 @@ class PendleRedeemYieldRequest(BaseModel):
|
|
|
41
43
|
],
|
|
42
44
|
pydantic.Field(alias="action_type"),
|
|
43
45
|
] = "PENDLE_REDEEM_YIELD"
|
|
46
|
+
|
|
47
|
+
estimate_gas: Optional[bool] = True
|
|
48
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
@@ -7,7 +7,7 @@ from enum import Enum
|
|
|
7
7
|
import pydantic
|
|
8
8
|
from pydantic.functional_validators import AfterValidator
|
|
9
9
|
from typing import Literal, Optional, Union
|
|
10
|
-
from typing_extensions import Annotated, TypeAliasType, TypedDict
|
|
10
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class PendleTradePtRequestAction(str, Enum):
|
|
@@ -50,6 +50,8 @@ class PendleTradePtRequestTypedDict(TypedDict):
|
|
|
50
50
|
sender: str
|
|
51
51
|
r"""The address of the transaction sender."""
|
|
52
52
|
action_type: Literal["PENDLE_TRADE_PT"]
|
|
53
|
+
estimate_gas: NotRequired[bool]
|
|
54
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|
|
53
55
|
|
|
54
56
|
|
|
55
57
|
class PendleTradePtRequest(BaseModel):
|
|
@@ -80,3 +82,6 @@ class PendleTradePtRequest(BaseModel):
|
|
|
80
82
|
],
|
|
81
83
|
pydantic.Field(alias="action_type"),
|
|
82
84
|
] = "PENDLE_TRADE_PT"
|
|
85
|
+
|
|
86
|
+
estimate_gas: Optional[bool] = True
|
|
87
|
+
r"""Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed."""
|