conflux_web3.types

Contents

conflux_web3.types#

class conflux_web3.types.AccessListEntry[source]#
address: cfx_address.address.Base32Address#
storageKeys: typing.Sequence[typing.NewType(HexStr, str)]#
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#
admin: cfx_address.address.Base32Address#
balance: cfx_utils.token_unit.Drip#
codeHash: typing.NewType(Hash32, bytes)#
collateralForStorage: typing.NewType(Storage, int)#
nonce: typing.NewType(Nonce, int)#
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#
baseFeePerGas: cfx_utils.token_unit.Drip#
blame: int#
blockNumber: int | None#
custom: typing.Sequence[hexbytes.main.HexBytes]#
deferredLogsBloomHash: typing.NewType(Hash32, bytes)#
deferredReceiptsRoot: typing.NewType(Hash32, bytes)#
deferredStateRoot: typing.NewType(Hash32, bytes)#
difficulty: int#
epochNumber: int | None#
gasLimit: int#
gasUsed: int | None#
hash: typing.NewType(Hash32, bytes)#
height: int#
miner: cfx_address.address.Base32Address#
nonce: hexbytes.main.HexBytes#
parentHash: typing.NewType(Hash32, bytes)#
posReference: typing.NewType(Hash32, bytes)#
powQuality: hexbytes.main.HexBytes | None#
refereeHashes: typing.Sequence[typing.NewType(Hash32, bytes)]#
size: int#
timestamp: int#
transactions: typing.Sequence[typing.NewType(Hash32, bytes) | conflux_web3.types.TxData]#
transactionsRoot: typing.NewType(Hash32, bytes)#
class conflux_web3.types.BlockRewardInfo[source]#
Parameters:
  • blockHash (|)

  • author (|)

  • totalReward (|)

  • baseReward (|)

  • txFee (|)

author: cfx_address.address.Base32Address#
baseReward: cfx_utils.token_unit.Drip#
blockHash: typing.NewType(Hash32, bytes)#
totalReward: cfx_utils.token_unit.Drip#
txFee: cfx_utils.token_unit.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 (|)

  • storagePointProp (|)

  • baseFeeShareProp (|)

baseFeeShareProp: int#
interestRate: int#
powBaseReward: cfx_utils.token_unit.Drip#
storagePointProp: int#
class conflux_web3.types.DepositInfo[source]#
Parameters:
  • accumulatedInterestRate (|)

  • amount (|)

  • depositTime (|)

accumulatedInterestRate: int#
amount: cfx_utils.token_unit.Drip#
depositTime: int#
class conflux_web3.types.EstimateResult[source]#

Estimation result of a transaction as dict

Parameters:
  • gasLimit (|)

  • gasUsed (|)

  • storageCollateralized (|)

gasLimit: int#
gasUsed: int#
storageCollateralized: typing.NewType(Storage, 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: typing.Dict[str, typing.Any]#
blockHash: typing.NewType(Hash32, bytes)#
epochNumber: int#
event: str#
logIndex: int#
transactionHash: typing.NewType(Hash32, bytes)#
transactionIndex: int#
transactionLogIndex: int#
class conflux_web3.types.FeeHistory[source]#

Fee history information

Parameters:
  • baseFeePerGas (|)

  • gasUsedRatio (|)

  • oldestEpoch (|)

  • reward (|)

baseFeePerGas: typing.Sequence[cfx_utils.token_unit.Drip]#
gasUsedRatio: typing.Sequence[float]#
oldestEpoch: int#
reward: typing.Sequence[typing.Sequence[cfx_utils.token_unit.Drip]]#
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: cfx_address.address.Base32Address | typing.List[cfx_address.address.Base32Address]#
blockHashes: typing.Sequence[typing.NewType(Hash32, bytes) | bytes | typing.NewType(HexStr, str) | str]#
fromBlock: typing.NewType(BlockNumber, int)#
fromEpoch: typing.Literal['earliest', 'latest_checkpoint', 'latest_finalized', 'latest_confirmed', 'latest_state', 'latest_mined', 'pending'] | typing.NewType(EpochNumber, int) | int#
toBlock: typing.NewType(BlockNumber, int)#
toEpoch: typing.Literal['earliest', 'latest_checkpoint', 'latest_finalized', 'latest_confirmed', 'latest_state', 'latest_mined', 'pending'] | typing.NewType(EpochNumber, int) | int#
topics: typing.Sequence[typing.NewType(Hash32, bytes) | bytes | typing.NewType(HexStr, str) | str | typing.Sequence[typing.NewType(Hash32, bytes) | bytes | typing.NewType(HexStr, str) | str] | None]#
class conflux_web3.types.LegacyTxData#
blockHash: None | typing.NewType(Hash32, bytes)#
chainId: int#
contractCreated: None | cfx_address.address.Base32Address#
data: hexbytes.main.HexBytes#
epochHeight: int#
from: cfx_address.address.Base32Address#
gas: int#
gasPrice: cfx_utils.token_unit.Drip#
hash: typing.NewType(Hash32, bytes)#
nonce: typing.NewType(Nonce, int)#
r: hexbytes.main.HexBytes#
s: hexbytes.main.HexBytes#
status: None | int#
storageLimit: typing.NewType(Storage, int)#
to: None | cfx_address.address.Base32Address#
transactionIndex: None | int#
type: int#
v: int#
value: cfx_utils.token_unit.Drip#
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: typing.NewType(Hash32, bytes)#
data: hexbytes.main.HexBytes#
epochNumber: int#
logIndex: int#
topics: typing.Sequence[hexbytes.main.HexBytes]#
transactionHash: typing.NewType(Hash32, bytes)#
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: typing.NewType(Hash32, bytes)#
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: typing.NewType(Nonce, int)#
nextPendingTx: typing.NewType(Hash32, bytes)#
pendingCount: int#
pendingNonce: typing.NewType(Nonce, int)#
class conflux_web3.types.PendingTransactionStatus[source]#
pending: typing.Literal['futureNonce', 'notEnoughCash']#
class conflux_web3.types.PendingTransactionsInfo[source]#
Parameters:
  • firstTxStatus (|)

  • pendingCount (|)

  • pendingTransactions (|)

firstTxStatus: conflux_web3.types.PendingTransactionStatus | typing.Literal['ready']#
pendingCount: int#
pendingTransactions: typing.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: typing.NewType(PoSBlockNumber, int)#
totalPosStakingTokens: cfx_utils.token_unit.Drip#
class conflux_web3.types.PoSEpochRewardInfo[source]#
Parameters:
  • accountRewards (|)

  • powEpochHash (|)

accountRewards: typing.Sequence[conflux_web3.types.PoSAccountRewardsInfo]#
powEpochHash: typing.NewType(Hash32, bytes)#
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#
class conflux_web3.types.StorageRoot[source]#
Parameters:
  • delta (|)

  • intermediate (|)

  • snapshot (|)

delta: typing.NewType(Hash32, bytes) | typing.Literal['TOMBSTONE', None]#
intermediate: typing.NewType(Hash32, bytes) | typing.Literal['TOMBSTONE', None]#
snapshot: typing.NewType(Hash32, bytes) | typing.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: typing.Dict[str, typing.Any]#
blockHash: typing.NewType(Hash32, bytes)#
epochNumber: int#
event: str#
transactionHash: typing.NewType(Hash32, bytes)#
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: typing.Sequence[hexbytes.main.HexBytes]#
class conflux_web3.types.TransactionPaymentInfo[source]#
Parameters:
  • isBalanceEnough (|)

  • willPayCollateral (|)

  • willPayTxFee (|)

isBalanceEnough: bool#
willPayCollateral: bool#
willPayTxFee: bool#
class conflux_web3.types.TxData[source]#

Transaction data as a dict

Parameters:
  • "type" (|)

  • "blockHash" (|)

  • "chainId" (|)

  • "contractCreated" (|)

  • "data" (|)

  • "epochHeight" (|)

  • "from" (|)

  • "gas" (|)

  • "gasPrice" (|)

  • "hash" (|)

  • "nonce" (|)

  • "r" (|)

  • "s" (|)

  • "status" (|)

  • "storageLimit" (|)

  • "to" (|)

  • "transactionIndex" (|)

  • "v" (|)

  • "value" (|)

accessList: typing.Sequence[conflux_web3.types.AccessListEntry]#
blockHash: None | typing.NewType(Hash32, bytes)#
chainId: int#
contractCreated: None | cfx_address.address.Base32Address#
data: hexbytes.main.HexBytes#
epochHeight: int#
from: cfx_address.address.Base32Address#
gas: int#
gasPrice: cfx_utils.token_unit.Drip#
hash: typing.NewType(Hash32, bytes)#
maxFeePerGas: cfx_utils.token_unit.Drip#
maxPriorityFeePerGas: cfx_utils.token_unit.Drip#
nonce: typing.NewType(Nonce, int)#
r: hexbytes.main.HexBytes#
s: hexbytes.main.HexBytes#
status: None | int#
storageLimit: typing.NewType(Storage, int)#
to: None | cfx_address.address.Base32Address#
transactionIndex: None | int#
type: int#
v: int#
value: cfx_utils.token_unit.Drip#
yParity: int#
class conflux_web3.types.TxReceipt#

Transaction receipt as a dict

Parameters:
  • "type" (|)

  • "transactionHash" (|)

  • "index" (|)

  • "blockHash" (|)

  • "epochNumber" (|)

  • "from" (|)

  • "to" (|)

  • "gasUsed" (|)

  • "gasFee" (|)

  • "gasCoveredBySponsor" (|)

  • "storageCollateralized" (|)

  • "storageCoveredBySponsor" (|)

  • "storageReleased" (|)

  • "contractCreated" (|)

  • "stateRoot" (|)

  • "outcomeStatus" (|)

  • "logsBloom" (|)

  • "logs" (|)

  • "txExecErrorMsg" (|)

  • "effectiveGasPrice" (|)

  • "burntGasFee" (|)

blockHash: typing.NewType(Hash32, bytes)#
burntGasFee: cfx_utils.token_unit.Drip#
contractCreated: cfx_address.address.Base32Address | None#
effectiveGasPrice: cfx_utils.token_unit.Drip#
epochNumber: int#
from: cfx_address.address.Base32Address#
gasCoveredBySponsor: bool#
gasFee: cfx_utils.token_unit.Drip#
gasUsed: int#
index: int#
logs: typing.List[conflux_web3.types.TransactionLogReceipt]#
logsBloom: hexbytes.main.HexBytes#
outcomeStatus: int#
stateRoot: typing.NewType(Hash32, bytes)#
storageCollateralized: typing.NewType(Storage, int)#
storageCoveredBySponsor: bool#
storageReleased: typing.List[typing.NewType(Storage, int)]#
to: cfx_address.address.Base32Address | None#
transactionHash: typing.NewType(Hash32, bytes)#
txExecErrorMsg: str | None#
type: int#
class conflux_web3.types.TxReceiptWithSpace[source]#
blockHash: typing.NewType(Hash32, bytes)#
burntGasFee: cfx_utils.token_unit.Drip#
contractCreated: cfx_address.address.Base32Address | None#
effectiveGasPrice: cfx_utils.token_unit.Drip#
epochNumber: int#
from: cfx_address.address.Base32Address#
gasCoveredBySponsor: bool#
gasFee: cfx_utils.token_unit.Drip#
gasUsed: int#
index: int#
logs: typing.List[conflux_web3.types.TransactionLogReceipt]#
logsBloom: hexbytes.main.HexBytes#
outcomeStatus: int#
space: typing.Literal['native', 'evm']#
stateRoot: typing.NewType(Hash32, bytes)#
storageCollateralized: typing.NewType(Storage, int)#
storageCoveredBySponsor: bool#
storageReleased: typing.List[typing.NewType(Storage, int)]#
to: cfx_address.address.Base32Address | None#
transactionHash: typing.NewType(Hash32, bytes)#
txExecErrorMsg: str | None#
type: int#
class conflux_web3.types.VoteInfo[source]#
Parameters:
  • amount (|)

  • unlockBlockNumber (|)

amount: cfx_utils.token_unit.Drip#
unlockBlockNumber: int#
class conflux_web3.types.Web3MiddlewareProtocol(*args, **kwargs)[source]#
request_processor(method: web3.types.RPCEndpoint, params: Any) Any[source]#
Return type:

typing.Any

response_processor(method: web3.types.RPCEndpoint, response: web3.types.RPCResponse) web3.types.RPCResponse[source]#
Return type:

web3.types.RPCResponse

conflux_web3.types.TxParam#

alias of LegacyTxDict | TypedTxDict | CIP1559TxDict | Dict[str, Any]