conflux_web3.types
conflux_web3.types¶
-
class
conflux_web3.types.
AccountInfo
[source]¶ - Parameters
address (|) –
balance (|) –
nonce (|) –
codeHash (|) –
stakingBalance (|) –
collateralForStorage (|) –
accumulatedInterestReturn (|) –
admin (|) –
-
accumulatedInterestReturn
: cfx_utils.token_unit.Drip¶
-
address
: cfx_address.address.Base32Address¶
-
balance
: cfx_utils.token_unit.Drip¶
-
codeHash
: Hash32¶
-
nonce
: Nonce¶
-
stakingBalance
: cfx_utils.token_unit.Drip¶
-
class
conflux_web3.types.
BlockData
[source]¶ Block data as a dict
- Parameters
hash (|) –
parentHash (|) –
height (|) –
miner (|) –
deferredStateRoot (|) –
deferredReceiptsRoot (|) –
deferredLogsBloomHash (|) –
blame (|) –
transactionsRoot (|) –
epochNumber (|) –
blockNumber (|) –
gasLimit (|) –
gasUsed (|) –
timestamp (|) –
difficulty (|) –
powQuality (|) –
refereeHashes (|) –
adaptive (|) –
nonce (|) –
size (|) –
custom (|) –
posReference (|) –
transactions (|) –
-
adaptive
: bool¶
-
blame
: int¶
-
blockNumber
: Optional[int]¶
-
custom
: Sequence[hexbytes.main.HexBytes]¶
-
deferredLogsBloomHash
: Hash32¶
-
deferredReceiptsRoot
: Hash32¶
-
deferredStateRoot
: Hash32¶
-
difficulty
: int¶
-
epochNumber
: Optional[int]¶
-
gasLimit
: int¶
-
gasUsed
: Optional[int]¶
-
hash
: Hash32¶
-
height
: int¶
-
nonce
: hexbytes.main.HexBytes¶
-
parentHash
: Hash32¶
-
posReference
: Hash32¶
-
powQuality
: Optional[hexbytes.main.HexBytes]¶
-
refereeHashes
: Sequence[Hash32]¶
-
size
: int¶
-
timestamp
: int¶
-
transactions
: Sequence[Union[Hash32, conflux_web3.types.TxData]]¶
-
transactionsRoot
: Hash32¶
-
conflux_web3.types.
BlockFilterId
(x)¶
-
class
conflux_web3.types.
BlockRewardInfo
[source]¶ - Parameters
blockHash (|) –
author (|) –
totalReward (|) –
baseReward (|) –
txFee (|) –
-
baseReward
: cfx_utils.token_unit.Drip¶
-
blockHash
: Hash32¶
-
totalReward
: cfx_utils.token_unit.Drip¶
-
txFee
: cfx_utils.token_unit.Drip¶
-
class
conflux_web3.types.
CFX
(value: Union[int, decimal.Decimal, str, float, cfx_utils.token_unit.AbstractTokenUnit[BaseTokenUnit]])[source]¶ A derived token unit from
Drip
in Conflux, corresponding to Ethereum’s Ether.CFX
inherits fromAbstractTokenUnit
so it supports__eq__()
,__le__()
,__add__()
, etc. 1 CFX = 10**18 Drip.
-
class
conflux_web3.types.
CollateralInfo
[source]¶ - Parameters
totalStorageTokens (|) –
convertedStoragePoints (|) –
usedStoragePoints (|) –
-
convertedStoragePoints
: int¶
-
totalStorageTokens
: int¶
-
usedStoragePoints
: int¶
-
class
conflux_web3.types.
DAOVoteInfo
[source]¶ - Parameters
powBaseReward (|) –
interestRate (|) –
-
interestRate
: int¶
-
powBaseReward
: cfx_utils.token_unit.Drip¶
-
class
conflux_web3.types.
DepositInfo
[source]¶ - Parameters
accumulatedInterestRate (|) –
amount (|) –
depositTime (|) –
-
accumulatedInterestRate
: int¶
-
amount
: cfx_utils.token_unit.Drip¶
-
depositTime
: int¶
-
conflux_web3.types.
EpochNumber
(x)¶
-
class
conflux_web3.types.
EstimateResult
[source]¶ Estimation result of a transaction as dict
- Parameters
gasLimit (|) –
gasUsed (|) –
storageCollateralized (|) –
-
gasLimit
: int¶
-
gasUsed
: int¶
-
class
conflux_web3.types.
EventData
[source]¶ Transaction event data
- Parameters
address (|) –
args (|) –
event (|) –
blockHash (|) –
epochNumber (|) –
transactionHash (|) –
transactionIndex (|) –
transactionLogIndex (|) –
logIndex (|) –
-
address
: cfx_address.address.Base32Address¶
-
args
: Dict[str, Any]¶
-
blockHash
: Hash32¶
-
epochNumber
: int¶
-
event
: str¶
-
logIndex
: int¶
-
transactionHash
: Hash32¶
-
transactionIndex
: int¶
-
transactionLogIndex
: int¶
-
class
conflux_web3.types.
FilterParams
[source]¶ Parameter dict to filter logs, more information at https://developer.confluxnetwork.org/conflux-doc/docs/json_rpc/#cfx_getlogs
- Parameters
fromEpoch (|) –
toEpoch (|) –
fromBlock (|) –
toBlock (|) –
blockHashes (|) –
address (|) –
topics (|) –
-
address
: Union[cfx_address.address.Base32Address, List[cfx_address.address.Base32Address]]¶
-
blockHashes
: Sequence[Union[Hash32, bytes, HexStr, str]]¶
-
fromBlock
: BlockNumber¶
-
fromEpoch
: Union[typing_extensions.Literal[earliest, latest_checkpoint, latest_finalized, latest_confirmed, latest_state, latest_mined, pending], EpochNumber, int]¶
-
toBlock
: BlockNumber¶
-
toEpoch
: Union[typing_extensions.Literal[earliest, latest_checkpoint, latest_finalized, latest_confirmed, latest_state, latest_mined, pending], EpochNumber, int]¶
-
topics
: Sequence[Optional[Union[Hash32, bytes, HexStr, str, Sequence[Union[Hash32, bytes, HexStr, str]]]]]¶
-
class
conflux_web3.types.
GDrip
(value: Union[int, decimal.Decimal, str, float, cfx_utils.token_unit.AbstractTokenUnit[BaseTokenUnit]])[source]¶ A derived token unit from
Drip
in Conflux, which corresponds to Ethereum’s GWei. 1 GDrip = 10**9 Drip
-
conflux_web3.types.
HexAddress
(x)¶
-
conflux_web3.types.
LogFilterId
(x)¶
-
class
conflux_web3.types.
LogReceipt
[source]¶ Full log receipt
- Parameters
address (|) –
topics (|) –
data (|) –
blockHash (|) –
epochNumber (|) –
transactionHash (|) –
transactionIndex (|) –
logIndex (|) –
transactionLogIndex (|) –
-
address
: cfx_address.address.Base32Address¶
-
blockHash
: Hash32¶
-
data
: hexbytes.main.HexBytes¶
-
epochNumber
: int¶
-
logIndex
: int¶
-
topics
: Sequence[hexbytes.main.HexBytes]¶
-
transactionHash
: Hash32¶
-
transactionIndex
: int¶
-
transactionLogIndex
: int¶
-
class
conflux_web3.types.
NodeStatus
[source]¶ Node status as dict
- Parameters
bestHash1111 (|) –
chainId (|) –
networkId (|) –
blockNumber (|) –
epochNumber (|) –
latestCheckpoint (|) –
latestConfirmed (|) –
latestState (|) –
latestFinalized (|) –
ethereumSpaceChainId (|) –
pendingTxNumber (|) –
-
bestHash
: Hash32¶
-
blockNumber
: int¶
-
chainId
: int¶
-
epochNumber
: int¶
-
ethereumSpaceChainId
: int¶
-
latestCheckpoint
: int¶
-
latestConfirmed
: int¶
-
latestFinalized
: int¶
-
latestState
: int¶
-
networkId
: int¶
-
pendingTxNumber
: int¶
-
class
conflux_web3.types.
PendingInfo
[source]¶ - Parameters
localNonce (|) –
pendingNonce (|) –
pendingCount (|) –
nextPendingTx (|) –
-
localNonce
: Nonce¶
-
nextPendingTx
: Hash32¶
-
pendingCount
: int¶
-
pendingNonce
: Nonce¶
-
class
conflux_web3.types.
PendingTransactionsInfo
[source]¶ - Parameters
firstTxStatus (|) –
pendingCount (|) –
pendingTransactions (|) –
-
firstTxStatus
: Union[conflux_web3.types.PendingTransactionStatus, typing_extensions.Literal[ready]]¶
-
pendingCount
: int¶
-
pendingTransactions
: Sequence[conflux_web3.types.TxData]¶
-
class
conflux_web3.types.
PoSAccountRewardsInfo
[source]¶ - Parameters
posAddress (|) –
powAddress (|) –
reward (|) –
-
posAddress
: cfx_address.address.Base32Address¶
-
powAddress
: cfx_address.address.Base32Address¶
-
reward
: cfx_utils.token_unit.Drip¶
-
class
conflux_web3.types.
PoSEconomicsInfo
[source]¶ - Parameters
distributablePosInterest (|) –
lastDistributeBlock (|) –
totalPosStakingTokens (|) –
-
distributablePosInterest
: cfx_utils.token_unit.Drip¶
-
lastDistributeBlock
: PoSBlockNumber¶
-
totalPosStakingTokens
: cfx_utils.token_unit.Drip¶
-
class
conflux_web3.types.
PoSEpochRewardInfo
[source]¶ - Parameters
accountRewards (|) –
powEpochHash (|) –
-
accountRewards
: Sequence[conflux_web3.types.PoSAccountRewardsInfo]¶
-
powEpochHash
: Hash32¶
-
class
conflux_web3.types.
SponsorInfo
[source]¶ - Parameters
sponsorBalanceForCollateral (|) –
sponsorBalanceForGas (|) –
sponsorForCollateral (|) –
sponsorForGas (|) –
sponsorGasBound (|) –
usedStoragePoints (|) –
availableStoragePoints (|) –
-
availableStoragePoints
: int¶
-
sponsorBalanceForCollateral
: cfx_utils.token_unit.Drip¶
-
sponsorBalanceForGas
: cfx_utils.token_unit.Drip¶
-
sponsorForCollateral
: cfx_address.address.Base32Address¶
-
sponsorForGas
: cfx_address.address.Base32Address¶
-
sponsorGasBound
: cfx_utils.token_unit.Drip¶
-
usedStoragePoints
: int¶
-
conflux_web3.types.
Storage
(x)¶
-
class
conflux_web3.types.
StorageRoot
[source]¶ - Parameters
delta (|) –
intermediate (|) –
snapshot (|) –
-
delta
: Union[Hash32, typing_extensions.Literal[TOMBSTONE, None]]¶
-
intermediate
: Union[Hash32, typing_extensions.Literal[TOMBSTONE, None]]¶
-
snapshot
: Union[Hash32, typing_extensions.Literal[TOMBSTONE, None]]¶
-
class
conflux_web3.types.
SupplyInfo
[source]¶ - Parameters
totalIssued (|) –
totalCollateral (|) –
totalStaking (|) –
totalCirculating (|) –
totalEspaceTokens (|) –
-
totalCirculating
: cfx_utils.token_unit.Drip¶
-
totalCollateral
: cfx_utils.token_unit.Drip¶
-
totalEspaceTokens
: cfx_utils.token_unit.Drip¶
-
totalIssued
: cfx_utils.token_unit.Drip¶
-
totalStaking
: cfx_utils.token_unit.Drip¶
-
class
conflux_web3.types.
TransactionEventData
[source]¶ Transaction event data as a dict
- Parameters
address (|) –
args (|) –
event (|) –
blockHash (|) –
epochNumber (|) –
transactionHash (|) –
transactionIndex (|) –
transactionLogIndex (|) –
-
address
: cfx_address.address.Base32Address¶
-
args
: Dict[str, Any]¶
-
blockHash
: Hash32¶
-
epochNumber
: int¶
-
event
: str¶
-
transactionHash
: Hash32¶
-
transactionIndex
: int¶
-
transactionLogIndex
: int¶
-
class
conflux_web3.types.
TransactionLogReceipt
[source]¶ Log receipt in transaction receipt
- Parameters
address (|) –
topics (|) –
data (|) –
-
address
: cfx_address.address.Base32Address¶
-
data
: hexbytes.main.HexBytes¶
-
topics
: Sequence[hexbytes.main.HexBytes]¶
-
class
conflux_web3.types.
TransactionPaymentInfo
[source]¶ - Parameters
isBalanceEnough (|) –
willPayCollateral (|) –
willPayTxFee (|) –
-
isBalanceEnough
: bool¶
-
willPayCollateral
: bool¶
-
willPayTxFee
: bool¶
-
class
conflux_web3.types.
TxDict
¶ -
chainId
: int¶
-
data
: Union[bytes, HexStr]¶
-
epochHeight
: int¶
-
from
: Union[Base32Address, str]¶
-
gas
: int¶
-
gasPrice
: Union[cfx_utils.token_unit.Drip, cfx_utils.token_unit.AbstractDerivedTokenUnit[cfx_utils.token_unit.Drip], int]¶
-
nonce
: Nonce¶
-
to
: Union[Base32Address, str]¶
-
value
: Union[cfx_utils.token_unit.Drip, cfx_utils.token_unit.AbstractDerivedTokenUnit[cfx_utils.token_unit.Drip], int]¶
-
-
conflux_web3.types.
TxFilterId
(x)¶
-
class
conflux_web3.types.
TxReceipt
¶ Transaction receipt as a dict
- Parameters
"transactionHash" (|) –
"index" (|) –
"blockHash" (|) –
"epochNumber" (|) –
"from" (|) –
"to" (|) –
"gasUsed" (|) –
"gasFee" (|) –
"gasCoveredBySponsor" (|) –
"storageCollateralized" (|) –
"storageCoveredBySponsor" (|) –
"storageReleased" (|) –
"contractCreated" (|) –
"stateRoot" (|) –
"outcomeStatus" (|) –
"logsBloom" (|) –
"logs" (|) –
"txExecErrorMsg" (|) –
-
blockHash
: Hash32¶
-
contractCreated
: Optional[cfx_address.address.Base32Address]¶
-
epochNumber
: int¶
-
gasCoveredBySponsor
: bool¶
-
gasFee
: cfx_utils.token_unit.Drip¶
-
gasUsed
: int¶
-
index
: int¶
-
logs
: List[conflux_web3.types.TransactionLogReceipt]¶
-
logsBloom
: hexbytes.main.HexBytes¶
-
outcomeStatus
: int¶
-
stateRoot
: Hash32¶
-
storageCoveredBySponsor
: bool¶
-
to
: Optional[cfx_address.address.Base32Address]¶
-
transactionHash
: Hash32¶
-
txExecErrorMsg
: Optional[str]¶
-
class
conflux_web3.types.
VoteInfo
[source]¶ - Parameters
amount (|) –
unlockBlockNumber (|) –
-
amount
: cfx_utils.token_unit.Drip¶
-
unlockBlockNumber
: int¶
-
conflux_web3.types.
TxParam
¶ The central part of internal API.
This represents a generic version of type ‘origin’ with type arguments ‘params’. There are two kind of these aliases: user defined and special. The special ones are wrappers around builtin collections and ABCs in collections.abc. These must have ‘name’ always set. If ‘inst’ is False, then the alias can’t be instantiated, this is used by e.g. typing.List and typing.Dict.
alias of Union[cfx_utils.types.TxDict, Dict[str, Any]]