Skip to content

Commit b0499a3

Browse files
committed
Rm unsupported types
1 parent fc24e7d commit b0499a3

File tree

1 file changed

+4
-234
lines changed

1 file changed

+4
-234
lines changed

ankr/types.py

Lines changed: 4 additions & 234 deletions
Original file line numberDiff line numberDiff line change
@@ -2013,238 +2013,6 @@ def from_dict(cls, **data):
20132013
)
20142014

20152015

2016-
class GetInternalTransactionsByParentHashRequest:
2017-
def __init__(
2018-
self,
2019-
blockchain: Blockchain,
2020-
onlyWithValue: bool,
2021-
parentTransactionHash: str,
2022-
syncCheck: bool = None,
2023-
):
2024-
self.blockchain = blockchain
2025-
self.onlyWithValue = onlyWithValue
2026-
self.parentTransactionHash = parentTransactionHash
2027-
self.syncCheck = syncCheck
2028-
2029-
def to_dict(self):
2030-
if isinstance(self.blockchain, str):
2031-
blockchain_value = self.blockchain
2032-
elif isinstance(self.blockchain, list):
2033-
blockchain_value = [
2034-
block.value if isinstance(block, Blockchain) else block
2035-
for block in self.blockchain
2036-
]
2037-
elif self.blockchain is not None:
2038-
blockchain_value = self.blockchain.value
2039-
else:
2040-
blockchain_value = None
2041-
return {
2042-
"blockchain": blockchain_value,
2043-
"onlyWithValue": self.onlyWithValue,
2044-
"parentTransactionHash": self.parentTransactionHash,
2045-
"syncCheck": self.syncCheck,
2046-
}
2047-
2048-
2049-
class GetInternalTransactionsByBlockNumberRequest:
2050-
def __init__(
2051-
self,
2052-
blockNumber: float,
2053-
blockchain: Blockchain,
2054-
onlyWithValue: bool,
2055-
syncCheck: bool = None,
2056-
):
2057-
self.blockNumber = blockNumber
2058-
self.blockchain = blockchain
2059-
self.onlyWithValue = onlyWithValue
2060-
self.syncCheck = syncCheck
2061-
2062-
def to_dict(self):
2063-
if isinstance(self.blockchain, str):
2064-
blockchain_value = self.blockchain
2065-
elif isinstance(self.blockchain, list):
2066-
blockchain_value = [
2067-
block.value if isinstance(block, Blockchain) else block
2068-
for block in self.blockchain
2069-
]
2070-
elif self.blockchain is not None:
2071-
blockchain_value = self.blockchain.value
2072-
else:
2073-
blockchain_value = None
2074-
return {
2075-
"blockNumber": self.blockNumber,
2076-
"blockchain": blockchain_value,
2077-
"onlyWithValue": self.onlyWithValue,
2078-
"syncCheck": self.syncCheck,
2079-
}
2080-
2081-
2082-
class InternalTransaction:
2083-
def __init__(
2084-
self,
2085-
blockHash: str,
2086-
blockHeight: float,
2087-
blockchain: Blockchain,
2088-
callType: str,
2089-
fromAddress: str,
2090-
gas: float,
2091-
gasUsed: float,
2092-
input: str,
2093-
output: str,
2094-
timestamp: str,
2095-
toAddress: str,
2096-
transactionHash: str,
2097-
transactionIndex: float,
2098-
value: str,
2099-
callPath: str = None,
2100-
callStack: List[float] = None,
2101-
error: str = None,
2102-
contractAddress: str = None,
2103-
):
2104-
self.blockHash = blockHash
2105-
self.blockHeight = blockHeight
2106-
self.blockchain = blockchain
2107-
self.callType = callType
2108-
self.fromAddress = fromAddress
2109-
self.gas = gas
2110-
self.gasUsed = gasUsed
2111-
self.input = input
2112-
self.output = output
2113-
self.timestamp = timestamp
2114-
self.toAddress = toAddress
2115-
self.transactionHash = transactionHash
2116-
self.transactionIndex = transactionIndex
2117-
self.value = value
2118-
self.callPath = callPath
2119-
self.callStack = callStack
2120-
self.error = error
2121-
self.contractAddress = contractAddress
2122-
2123-
@classmethod
2124-
def from_dict(cls, **data):
2125-
return cls(
2126-
blockHash=data.get("blockHash"),
2127-
blockHeight=data.get("blockHeight"),
2128-
blockchain=Blockchain(data.get("blockchain")),
2129-
callType=data.get("callType"),
2130-
fromAddress=data.get("fromAddress"),
2131-
gas=data.get("gas"),
2132-
gasUsed=data.get("gasUsed"),
2133-
input=data.get("input"),
2134-
output=data.get("output"),
2135-
timestamp=data.get("timestamp"),
2136-
toAddress=data.get("toAddress"),
2137-
transactionHash=data.get("transactionHash"),
2138-
transactionIndex=data.get("transactionIndex"),
2139-
value=data.get("value"),
2140-
callPath=data.get("callPath"),
2141-
callStack=data.get("callStack"),
2142-
error=data.get("error"),
2143-
contractAddress=data.get("contractAddress"),
2144-
)
2145-
2146-
2147-
class GetInternalTransactionsReply:
2148-
def __init__(
2149-
self, internalTransactions: List[InternalTransaction], nextPageToken: str = None
2150-
):
2151-
self.internalTransactions = internalTransactions
2152-
self.nextPageToken = nextPageToken
2153-
2154-
@classmethod
2155-
def from_dict(cls, **data):
2156-
return cls(
2157-
internalTransactions=[
2158-
InternalTransaction.from_dict(**internaltransaction_data)
2159-
for internaltransaction_data in data.get("internalTransactions", [])
2160-
],
2161-
nextPageToken=data.get("nextPageToken"),
2162-
)
2163-
2164-
2165-
class GetAccountBalanceHistoricalRequest:
2166-
def __init__(
2167-
self,
2168-
walletAddress: str,
2169-
blockchain: Blockchain | List[Blockchain] = None,
2170-
onlyWhitelisted: bool = None,
2171-
nativeFirst: bool = None,
2172-
pageToken: str = None,
2173-
pageSize: float = None,
2174-
blockHeight: float
2175-
| Literal[Literal["latest"]]
2176-
| Literal[Literal["earliest"]] = None,
2177-
syncCheck: bool = None,
2178-
):
2179-
self.walletAddress = walletAddress
2180-
self.blockchain = blockchain
2181-
self.onlyWhitelisted = onlyWhitelisted
2182-
self.nativeFirst = nativeFirst
2183-
self.pageToken = pageToken
2184-
self.pageSize = pageSize
2185-
self.blockHeight = blockHeight
2186-
self.syncCheck = syncCheck
2187-
2188-
def to_dict(self):
2189-
if isinstance(self.blockchain, str):
2190-
blockchain_value = self.blockchain
2191-
elif isinstance(self.blockchain, list):
2192-
blockchain_value = [
2193-
block.value if isinstance(block, Blockchain) else block
2194-
for block in self.blockchain
2195-
]
2196-
elif self.blockchain is not None:
2197-
blockchain_value = self.blockchain.value
2198-
else:
2199-
blockchain_value = None
2200-
return {
2201-
"walletAddress": self.walletAddress,
2202-
"blockchain": blockchain_value,
2203-
"onlyWhitelisted": self.onlyWhitelisted,
2204-
"nativeFirst": self.nativeFirst,
2205-
"pageToken": self.pageToken,
2206-
"pageSize": self.pageSize,
2207-
"blockHeight": self.blockHeight,
2208-
"syncCheck": self.syncCheck,
2209-
}
2210-
2211-
2212-
class GetAccountBalanceHistoricalReply:
2213-
def __init__(
2214-
self,
2215-
assets: List[Balance],
2216-
totalBalanceUsd: str,
2217-
totalCount: float,
2218-
nextPageToken: str = None,
2219-
syncStatus: SyncStatus = None,
2220-
blockHeight: float
2221-
| Literal[Literal["latest"]]
2222-
| Literal[Literal["earliest"]] = None,
2223-
):
2224-
self.assets = assets
2225-
self.totalBalanceUsd = totalBalanceUsd
2226-
self.totalCount = totalCount
2227-
self.nextPageToken = nextPageToken
2228-
self.syncStatus = syncStatus
2229-
self.blockHeight = blockHeight
2230-
2231-
@classmethod
2232-
def from_dict(cls, **data):
2233-
return cls(
2234-
assets=[
2235-
Balance.from_dict(**balance_data)
2236-
for balance_data in data.get("assets", [])
2237-
],
2238-
totalBalanceUsd=data.get("totalBalanceUsd"),
2239-
totalCount=data.get("totalCount"),
2240-
nextPageToken=data.get("nextPageToken"),
2241-
syncStatus=SyncStatus.from_dict(**data.get("syncStatus"))
2242-
if data.get("syncStatus") is not None
2243-
else None,
2244-
blockHeight=data.get("blockHeight"),
2245-
)
2246-
2247-
22482016
class Blockchain(Enum):
22492017
Arbitrum = "arbitrum"
22502018
Avalanche = "avalanche"
@@ -2258,17 +2026,19 @@ class Blockchain(Enum):
22582026
Fantom = "fantom"
22592027
Flare = "flare"
22602028
Gnosis = "gnosis"
2261-
Incentiv_devnet = "incentiv_devnet"
2029+
Incentiv_devnet_v3 = "incentiv_devnet_v3"
2030+
Incentiv_testnet = "incentiv_testnet"
22622031
Linea = "linea"
22632032
Neura_devnet = "neura_devnet"
22642033
Neura_testnet_v1 = "neura_testnet_v1"
22652034
Optimism = "optimism"
2266-
Optimism_testnet = "optimism_testnet"
2035+
Optimism_sepolia = "optimism_sepolia"
22672036
Polygon = "polygon"
22682037
Polygon_amoy = "polygon_amoy"
22692038
Polygon_zkevm = "polygon_zkevm"
22702039
Rollux = "rollux"
22712040
Scroll = "scroll"
2041+
Stellar = "stellar"
22722042
Syscoin = "syscoin"
22732043
Telos = "telos"
22742044
Xai = "xai"

0 commit comments

Comments
 (0)